## 1 Introduction  
Gas production and preservation are critical factors that govern shale gas enrichment [1; 2; 3]. The exploration practice in the Sichuan Basin revealed significant differences in shale gas production among various structural regions, indicating that preservation plays a vital role in shale gas enrichment [4; 5; 6].  
Molecular diffusion occurs in geological settings when concentration gradients are present, which are crucial for the migration and preservation of natural gas [7; 8; 9; 10]. Losses due to diffusion have a direct impact on the size of the gas accumulation in shale, the long-term accumulation of shale gas, and the cumulative amount of diffusion that can ruin shale gas reservoirs with industrial exploitation value [11; 12; 13; 14]. Shale gas reservoirs, with their unique features, are classified in a way that constantly causes upwardly diffusing gas to lower the thermal fluid activity and mix with the gas reservoir. The generation, storage, and dispersal effects maintain the shale gas reservoir in a stable dynamic equilibrium state when the gas source is continuously supplied [15; 16; 17; 18]. The persistence of this dynamic equilibrium in a region for natural gas migration and accumulation is a long-term evolutionary process therefore, studying the diffusion history of shale gas reservoirs is equally important as studying their hydrocarbon generation and reservoir development history, and it is a crucial component of understanding the matching history of shale gas accumulation [19; 20; 21; 22]. In consideration of regional resources, accurate appraisal and prediction of shale gas reserves are of paramount importance due to the precise calculation of shale gas diffusion losses [23; 24; 25; 26].  
The study of natural gas diffusion in conventional gas reservoirs has made significant progress. Most studies focus on the microscopic diffusion mechanism of conventional natural gas and coal measure strata, as well as the experimental methods for measuring the diffusion coefficient, and calculating the diffusion volume in conventional gas reservoirs [27; 28; 29; 30; 31] however, there is a shortage of quantitative research on the dynamic changes of shale gas diffusion, and the current studies on shale gas diffusion are mainly qualitative assessments of preservation circumstances.  
Although some researchers have quantitatively studied the diffusion loss of natural gas in the hydrocarbon source rock, their assumptions often differ significantly from the actual geological conditions. For example, some scholars believe that shale pores are all filled with water, ignoring the presence of free gas in shale pores, thus taking a small part of dissolved gas concentration dissolved in formation water as the initial concentration of diffusion. They also assume that the concentration of dissolved gas is only a function of depth, ignoring factors such as pyrolysis of organic matter supplying the diffusion source and the diffusion consumption of the diffusion source, and thus they have incorrectly calculated the amount of natural gas diffusion [32; 33; 34; 35].  
To address this issue, this paper comprehensively applies [PERSON]'s diffusion equation and fluid dynamics theory, taking into account the conditions of gas migration, temperature and pressure changes, and organic matter gas generation. Using the shale interval of the Longmaxi Formation in the study area as an example, the study recovers the shale gas diffusion history of the Longmaxi Formation and clarifies the plane distribution characteristics of shale gas diffusion. The reliability of the calculation results is verified by geochemical parameters. Thus, the results can provide theoretical guidance and technical support for the exploration and development of marine shale gas in southern China.