In the background of China's goals of "Dual Carbon",hydrogen,as clean energy,is expected to be widely used;however,it leads to large carbon emissions in the production process. Hydrocarbon Steam Reforming (HSR) is a common pro- cess for hydrogen production in refineries,in which accurate carbon accounting is hard to perform,due to the high fluctuation of feed- stock and low frequency of monitoring of key carbon emissions data. In this paper,the hydrogen production process of a refinery was taken as an example,and the HSR model was built by Aspen Plus to analyze the impact of different process parameters on carbon emis- sions in order to address the lack of accurate carbon measurements. Due to the large variation of some important parameters in the actu- al production process,it is hard for a steady model to produce sufficiently accurate simulation data . This performed experiment inter- connected MATLAB with Aspen Plus and changed model input parameters in accordance with the actual production data to achieve the dynamic simulation of the production process. The experimental results verified that the proposed model can well simulate the actual hydrogen production process and thus,provide data support for accurate carbon accounting.