{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,24]],"date-time":"2026-09-24T16:36:54Z","timestamp":1790267814527,"version":"4.1.0"},"reference-count":42,"publisher":"PeerJ","license":[{"start":{"date-parts":[[2024,2,29]],"date-time":"2024-02-29T00:00:00Z","timestamp":1709164800000},"content-version":"unspecified","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"The Science and Technology Programme Project of the State Administration of Market Supervision and Regulation of China","award":["2023MK230"],"award-info":[{"award-number":["2023MK230"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"abstract":"<jats:p>As the economy continues to develop and technology advances, there is an increasing societal need for an environmentally friendly ecosystem. Consequently, natural gas, known for its minimal greenhouse gas emissions, has been widely adopted as a clean energy alternative. The accurate prediction of short-term natural gas demand poses a significant challenge within this context, as precise forecasts have important implications for gas dispatch and pipeline safety. The incorporation of intelligent algorithms into prediction methodologies has resulted in notable progress in recent times. Nevertheless, certain limitations persist. However, there exist certain limitations, including the tendency to easily fall into local optimization and inadequate search capability. To address the challenge of accurately predicting daily natural gas loads, we propose a novel methodology that integrates the adaptive particle swarm optimization algorithm, attention mechanism, and bidirectional long short-term memory (BiLSTM) neural networks. The initial step involves utilizing the BiLSTM network to conduct bidirectional data learning. Following this, the attention mechanism is employed to calculate the weights of the hidden layer in the BiLSTM, with a specific focus on weight distribution. Lastly, the adaptive particle swarm optimization algorithm is utilized to comprehensively optimize and design the network structure, initial learning rate, and learning rounds of the BiLSTM network model, thereby enhancing the accuracy of the model. The findings revealed that the combined model achieved a mean absolute percentage error (MAPE) of 0.90% and a coefficient of determination (R<jats:sup>2<\/jats:sup>) of 0.99. These results surpassed those of the other comparative models, demonstrating superior prediction accuracy, as well as exhibiting favorable generalization and prediction stability.<\/jats:p>","DOI":"10.7717\/peerj-cs.1890","type":"journal-article","created":{"date-parts":[[2024,2,29]],"date-time":"2024-02-29T09:54:12Z","timestamp":1709200452000},"page":"e1890","source":"Crossref","is-referenced-by-count":9,"title":["Daily natural gas load prediction method based on APSO optimization and Attention-BiLSTM"],"prefix":"10.7717","volume":"10","author":[{"given":"Xinjing","family":"Qi","sequence":"first","affiliation":[{"name":"College of Metrology and Measurement Engineering, China Jiliang University, Hangzhou, Zhejiang, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Huan","family":"Wang","sequence":"additional","affiliation":[{"name":"Ningbo China Resources Xingguang Gas Co Ltd, Ningbo, Zhejiang, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yubo","family":"Ji","sequence":"additional","affiliation":[{"name":"Ningbo China Resources Xingguang Gas Co Ltd, Ningbo, Zhejiang, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yuan","family":"Li","sequence":"additional","affiliation":[{"name":"Wuhan Gas & Heat and Design Institute Co Ltd, Wuhan, Hubei, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xuguang","family":"Luo","sequence":"additional","affiliation":[{"name":"Wuhan Gas & Heat and Design Institute Co Ltd, Wuhan, Hubei, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Rongshan","family":"Nie","sequence":"additional","affiliation":[{"name":"College of Quality and Safety Engineering, China Jiliang University, Hangzhou, Zhejiang, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xiaoyu","family":"Liang","sequence":"additional","affiliation":[{"name":"College of Metrology and Measurement Engineering, China Jiliang University, Hangzhou, Zhejiang, China"},{"name":"College of Quality and Safety Engineering, China Jiliang University, Hangzhou, Zhejiang, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"4443","published-online":{"date-parts":[[2024,2,29]]},"reference":[{"key":"10.7717\/peerj-cs.1890\/ref-1","doi-asserted-by":"publisher","first-page":"2734","DOI":"10.1002\/hyp.10880","article-title":"Canopex: a Canadian hydrometeorological watershed database","volume":"30","author":"Arsenault","year":"2019","journal-title":"Hydrological Processes"},{"issue":"6","key":"10.7717\/peerj-cs.1890\/ref-2","doi-asserted-by":"publisher","first-page":"1189","DOI":"10.1016\/j.ecoenv.2010.07.021","article-title":"A comparative study of different tests for biodegradability enhancement determination during AOP treatment of recalcitrant toxic aqueous solutions","volume":"73","author":"Ballesteros\u00a0Mart\u00edn","year":"2010","journal-title":"Ecotoxicology and Environmental Safety"},{"key":"10.7717\/peerj-cs.1890\/ref-3","first-page":"88","article-title":"The research of electronics equipment online failure prediction based on gray theory and expert system","volume":"31","author":"Chen","year":"2013","journal-title":"Aerospace Control"},{"key":"10.7717\/peerj-cs.1890\/ref-4","doi-asserted-by":"publisher","first-page":"105652","DOI":"10.1016\/j.icheatmasstransfer.2021.105652","article-title":"New insights into the effects of methane and oxygen on heat\/mass transfer in reactive porous media","volume":"129","author":"Cheng","year":"2021","journal-title":"International Communications in Heat and Mass Transfer"},{"key":"10.7717\/peerj-cs.1890\/ref-5","doi-asserted-by":"publisher","first-page":"78","DOI":"10.1016\/j.strusafe.2014.09.002","article-title":"Review and application of artificial neural network models in reliability analysis of steel structures","volume":"52","author":"Chojaczyk","year":"2015","journal-title":"Structural Safety"},{"issue":"5","key":"10.7717\/peerj-cs.1890\/ref-6","doi-asserted-by":"publisher","first-page":"387","DOI":"10.1142\/S0129065709002099","article-title":"Improving neural networks prediction accuracy using particle swarm optimization combiner","volume":"19","author":"Elragal","year":"2009","journal-title":"International Journal of Neural Systems"},{"issue":"2","key":"10.7717\/peerj-cs.1890\/ref-7","doi-asserted-by":"publisher","first-page":"126","DOI":"10.13873\/J.1000-9787(2023)02-0126-04","article-title":"Gas load forecasting based on optimization of GRU neural network using IPSO algorithm","volume":"42","author":"Hai","year":"2023","journal-title":"Transducer and Microsystem Technologies"},{"key":"10.7717\/peerj-cs.1890\/ref-8","doi-asserted-by":"publisher","first-page":"203","DOI":"10.1016\/j.eswa.2016.05.025","article-title":"NN approach and its comparison with NN-SVM to beta-barrel prediction","volume":"61","author":"Hassan","year":"2016","journal-title":"Expert Systems with Applications"},{"issue":"8","key":"10.7717\/peerj-cs.1890\/ref-9","doi-asserted-by":"publisher","first-page":"1735","DOI":"10.1162\/neco.1997.9.8.1735","article-title":"Long short-term memory","volume":"9","author":"Hochreiter","year":"1997","journal-title":"Neural Computation"},{"key":"10.7717\/peerj-cs.1890\/ref-10","doi-asserted-by":"publisher","DOI":"10.1016\/j.energy.2015.03.084","article-title":"Forecasting of natural gas consumption with neural network and neuro fuzzy system","author":"Kaynar","year":"2010"},{"key":"10.7717\/peerj-cs.1890\/ref-11","doi-asserted-by":"publisher","first-page":"1942","DOI":"10.1109\/ICNN.1995.488968","article-title":"Particle swarm optimization","author":"Kennedy","year":"1995"},{"key":"10.7717\/peerj-cs.1890\/ref-12","doi-asserted-by":"publisher","first-page":"640","DOI":"10.1109\/CAC48633.2019.8997284","article-title":"Natural gas load forecasting using fuzzy sigmoid kernel support vector machines with genetic algorithms","author":"Liu","year":"2019"},{"issue":"3","key":"10.7717\/peerj-cs.1890\/ref-13","doi-asserted-by":"publisher","first-page":"47","DOI":"10.16097\/j.cnki.1009-6744.2020.03.008","article-title":"Traffic flow prediction based on hybrid deep learning under-connected and automated vehicle environment","volume":"20","author":"Lu","year":"2020","journal-title":"Journal of Transportation Systems Engineering and Information Technology"},{"key":"10.7717\/peerj-cs.1890\/ref-14","doi-asserted-by":"publisher","first-page":"5705","DOI":"10.1109\/ACCESS.2017.2785229","article-title":"Attention-based relation extraction with bidirectional gated recurrent unit and highway network in the analysis of geological data","volume":"6","author":"Luo","year":"2018","journal-title":"IEEE Access"},{"issue":"152","key":"10.7717\/peerj-cs.1890\/ref-15","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s40948-022-00467-2","article-title":"Horizontal in situ stresses prediction using a CNN-BiLSTM-attention hybrid neural network","volume":"8","author":"Ma","year":"2023","journal-title":"Geomechanics and Geophysics for Geo-Energy and Geo-Resources"},{"issue":"4","key":"10.7717\/peerj-cs.1890\/ref-16","doi-asserted-by":"publisher","first-page":"1641","DOI":"10.3390\/en16041641","article-title":"Short-term occupancy forecasting for a smart home using optimized weight updates based on ga and PSO algorithms for an LSTM network","volume":"16","author":"Mahjoub","year":"2023","journal-title":"Energies"},{"key":"10.7717\/peerj-cs.1890\/ref-17","doi-asserted-by":"publisher","first-page":"922","DOI":"10.1109\/SGES51519.2020.00169","article-title":"Wind speed forecast using LSTM and Bi-LSTM Algorithms over Gabal EI-Zayt Wind Farm","author":"Moharm","year":"2020"},{"issue":"19","key":"10.7717\/peerj-cs.1890\/ref-18","doi-asserted-by":"publisher","first-page":"108","DOI":"10.33404\/j.issn.1672-7649.2021.10.022","article-title":"Prediction of gas turbine fouling performance based on PSO-BP neural network","volume":"43","author":"Nie","year":"2021","journal-title":"Ship Science and Technology"},{"issue":"12","key":"10.7717\/peerj-cs.1890\/ref-19","first-page":"1583","article-title":"Short-term photovoltaic forecasting based on data cleansing and model combination","volume":"38","author":"Qiu","year":"2020","journal-title":"Renewable Energy Resources"},{"issue":"5","key":"10.7717\/peerj-cs.1890\/ref-20","doi-asserted-by":"publisher","first-page":"1452","DOI":"10.1109\/TNNLS.2018.2869822","article-title":"Nonuniformly sampled data processing using LSTM networks","volume":"30","author":"Sahin","year":"2019","journal-title":"IEEE Transactions on Neural Networks and Learning Systems"},{"key":"10.7717\/peerj-cs.1890\/ref-21","doi-asserted-by":"publisher","first-page":"126660","DOI":"10.1016\/j.energy.2023.126660","article-title":"Robust framework based on hybrid deep learning approach for short-term load forecasting of building electricity demand","volume":"268","author":"Sekhar","year":"2023","journal-title":"Energy"},{"key":"10.7717\/peerj-cs.1890\/ref-22","doi-asserted-by":"publisher","first-page":"336","DOI":"10.1109\/VL.1996.545307","article-title":"The eyes have it: a task by data type taxonomy for information visualizations","author":"Shneiderman","year":"1996"},{"key":"10.7717\/peerj-cs.1890\/ref-23","doi-asserted-by":"publisher","first-page":"3285","DOI":"10.1109\/BigData47090.2019.9005","article-title":"The performance of LSTM and BiLSTM in forecasting time series","author":"Siami-Namini","year":"2019"},{"issue":"4","key":"10.7717\/peerj-cs.1890\/ref-24","doi-asserted-by":"publisher","first-page":"343","DOI":"10.3969\/j.issn.1671-7244.2019.04.012","article-title":"Short-term gas load forecasting based on bp neural network and multivariable linear regression","volume":"18","author":"Song","year":"2019","journal-title":"Ningxia Engineering Technology"},{"issue":"2","key":"10.7717\/peerj-cs.1890\/ref-25","doi-asserted-by":"publisher","first-page":"17","DOI":"10.11860\/j.issn.1673-0291.20200005","article-title":"Anomaly detection method based on LSTM-Autoencoder and double feature extraction method","volume":"44","author":"Sun","year":"2020","journal-title":"Journal of Beijing Jiaotong University"},{"key":"10.7717\/peerj-cs.1890\/ref-26","doi-asserted-by":"publisher","first-page":"106005","DOI":"10.1016\/j.engappai.2023.106005","article-title":"Natural gas consumption forecasting using an optimized Grey Bernoulli model: the case of the world\u2019s top three natural gas consumers","volume":"122","author":"Tong","year":"2023","journal-title":"Engineering Applications of Artificial Intelligence"},{"issue":"6","key":"10.7717\/peerj-cs.1890\/ref-27","doi-asserted-by":"publisher","first-page":"2031","DOI":"10.3390\/en15062031","article-title":"A wind power forecasting model using LSTM optimized by the modified bald eagle search algorithm","volume":"15","author":"Tuerxun","year":"2022","journal-title":"Energies"},{"key":"10.7717\/peerj-cs.1890\/ref-28","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1109\/ENERGYCON.2016.7514029","article-title":"Comparison of SARIMAX, SARIMA, modified SARIMA and ANN-based models for short-term PV generation forecasting","author":"Vagropoulos","year":"2016"},{"key":"10.7717\/peerj-cs.1890\/ref-29","doi-asserted-by":"publisher","first-page":"171","DOI":"10.1109\/PSGEC51302.2021.9541781","article-title":"Attention-bidirectional LSTM based short term power load forecasting","author":"Wang","year":"2021"},{"key":"10.7717\/peerj-cs.1890\/ref-30","doi-asserted-by":"publisher","first-page":"104695","DOI":"10.1016\/j.cageo.2021.104695","article-title":"A hybrid approach for El Ni\u00f1o prediction based on Empirical Mode Decomposition and convolutional LSTM Encoder-Decoder","volume":"149","author":"Wang","year":"2021","journal-title":"Computers & Geosciences"},{"issue":"11","key":"10.7717\/peerj-cs.1890\/ref-31","doi-asserted-by":"publisher","first-page":"115209","DOI":"10.1063\/5.0125885","article-title":"Remaining useful life prediction for equipment based on RF-BiLSTM","volume":"12","author":"Wu","year":"2022","journal-title":"AIP Advances"},{"key":"10.7717\/peerj-cs.1890\/ref-32","doi-asserted-by":"publisher","first-page":"23589","DOI":"10.1007\/s11042-022-12039-3","article-title":"SW-BiLSTM: a spark-based weighted BiLSTM model for traffic flow forecasting","volume":"81","author":"Xia","year":"2022","journal-title":"Multimedia Tools and Applications"},{"key":"10.7717\/peerj-cs.1890\/ref-33","doi-asserted-by":"publisher","first-page":"335","DOI":"10.1109\/CASE.2009.101","article-title":"Research on prediction model of natural gas consumption based on grey modeling optimized by genetic algorithm","author":"Xie","year":"2009"},{"key":"10.7717\/peerj-cs.1890\/ref-34","doi-asserted-by":"publisher","first-page":"278","DOI":"10.1109\/CMMNO53328.2021.9467533","article-title":"Attention-based long short-term memory network temperature prediction model","author":"Xiao","year":"2021"},{"issue":"7","key":"10.7717\/peerj-cs.1890\/ref-35","doi-asserted-by":"publisher","first-page":"1750","DOI":"10.1021\/acsearthspacechem.2c00065","article-title":"Characteristics of source rocks and genetic origins of natural gas in deep formations, gudian depression, Songliao Basin, NE China","volume":"6","author":"Xu","year":"2022","journal-title":"ACS Earth and Space Chemistry"},{"key":"10.7717\/peerj-cs.1890\/ref-36","doi-asserted-by":"publisher","first-page":"273","DOI":"10.19912\/j.0254-0096.tynxb.2021-0712","article-title":"Short-term wind power forecasting based on attention-GRU wind speed correction and stacking","volume":"12","author":"Yang","year":"2022","journal-title":"Acta Energiae Solaris Sinica"},{"key":"10.7717\/peerj-cs.1890\/ref-37","doi-asserted-by":"publisher","first-page":"3024","DOI":"10.1109\/CCDC.2019.8832885","article-title":"River water quality parameters prediction method based on LSTM-RNN model","author":"Ye","year":"2019"},{"issue":"9","key":"10.7717\/peerj-cs.1890\/ref-38","doi-asserted-by":"publisher","first-page":"2000","DOI":"10.1109\/TNNLS.2018.2869822","article-title":"Establishment of a combined model for ozone concentration simulation with stepwise regression analysis and artificial neural network","volume":"13","author":"Yu","year":"2013","journal-title":"Atmosphere"},{"issue":"3","key":"10.7717\/peerj-cs.1890\/ref-39","doi-asserted-by":"publisher","first-page":"379","DOI":"10.1007\/s10661-023-10977-5","article-title":"A coupled CEEMD-BiLSTM model for regional monthly temperature prediction","volume":"195","author":"Zhang","year":"2023","journal-title":"Environmental Monitoring and Assessment"},{"issue":"1","key":"10.7717\/peerj-cs.1890\/ref-40","doi-asserted-by":"publisher","first-page":"e1304","DOI":"10.7717\/peerj-cs.1304","article-title":"The prediction of collective economic development based on the PSO-LSTM model in smart agriculture","volume":"9","author":"Zheng","year":"2023","journal-title":"PeerJ Computer Science"},{"key":"10.7717\/peerj-cs.1890\/ref-41","doi-asserted-by":"publisher","first-page":"12","DOI":"10.13202\/j.cnki.cer.2022.09.005","article-title":"The role of natural gas in building a new energy system in China and suggestions to ensure the safety of gas supply","volume":"42","author":"Zhu","year":"2022","journal-title":"Coal Economic Research"},{"key":"10.7717\/peerj-cs.1890\/ref-42","doi-asserted-by":"publisher","first-page":"372","DOI":"10.1145\/3592686.3592753","volume-title":"Prediction of sulfur hexafluoride (SF6) gas pressure time series data based on adaptive particle swarm optimization- long short-term memory (APSO-LSTM)","author":"Zhu","year":"2023"}],"container-title":["PeerJ Computer Science"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/peerj.com\/articles\/cs-1890.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-1890.xml","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-1890.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/peerj.com\/articles\/cs-1890.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,2,29]],"date-time":"2024-02-29T09:54:32Z","timestamp":1709200472000},"score":1,"resource":{"primary":{"URL":"https:\/\/peerj.com\/articles\/cs-1890"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,2,29]]},"references-count":42,"alternative-id":["10.7717\/peerj-cs.1890"],"URL":"https:\/\/doi.org\/10.7717\/peerj-cs.1890","archive":["CLOCKSS","LOCKSS","Portico"],"relation":{},"ISSN":["2376-5992"],"issn-type":[{"value":"2376-5992","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,2,29]]},"article-number":"e1890"}}