基于大模型与时序知识增强的天然气用气量短期预测方法

A short-term prediction method for natural gas consumption based on large language models and temporal knowledge enhancement

  • 摘要:
    目的 随着我国天然气管网智能化发展水平的不断提高,天然气用气量的精准预测已成为管网优化调度的关键支撑。当前预测方法存在对复杂多维因素过度依赖、覆盖用户范围受限以及时序知识集成能力缺乏等局限性,大语言模型(简称大模型)技术的进步为解决上述问题提供了一种有效途径。然而,现有大模型对行业领域认知不足,进而导致预测不准,且针对天然气用气量预测的大模型适配研究尚未深入。
    方法 为此,提出一种基于大模型与时序知识增强的天然气用气量预测方法。该方法构建了天然气用气量时间序列知识库(简称时序知识库),以提取具有区域性的气量数据特征,并通过相似性检索辅助大模型预测;在构建阶段,为避免欧式距离在时间序列发生时间轴偏移或形态变形时的失效问题,将动态时间规整与中心化思想融入了K-means聚类算法内进行解决;同时,为使冻结部分参数的大模型更有效地理解输入序列,在输入至大模型前的提示词范式中注入了数据分解、输入序列与时序知识库相似性检索片段及统计学等先验知识。
    结果 实验验证表明:①建立时序知识库检索机制与构建提示词范式,有效提升天然气用气量预测的准确性,且较传统方法滞后性更小、强趋势与周期性拟合能力更强、预测精度更高,通过构建重编程补丁嵌入层,有效提升大模型针对强波动性数据的拟合和预测能力;②新建方法在四种数据集上的预测精度显著优于其他模型,从衡量预测准确性的关键指标来看,均方根误差、平均绝对误差、对称平均绝对百分比误差、平均绝对百分比误差的平均值分别为23635.610915.1、1.9、1.9%,模型的决定系数平均为0.96,能够很好地拟合观测数据,验证了新建预测方法的泛化性;③在超长期负荷预测中,新建方法通过融入丰富的多模态领域先验知识,较其他模型预测精度最高,模型预测结果的均方根误差、平均绝对误差、对称平均绝对百分比误差、平均绝对百分比误差分别比其余模型平均降低13.62%,21.49%,22.21%,22.91%,新建方法的决定系数平均为0.95。
    结论 研究表明,新建方法不仅优于现有天然气用气量生成式预测领域的基准方法,还为多模态智能决策系统的构建提供了新的技术路径,推动预测技术从单一场景向跨模态协同方向演进。

     

    Abstract:
    Objective With the ongoing intelligent development in China’s natural gas pipeline network, accurate prediction of natural gas consumption has become a key support for optimal dispatching of pipeline network. Current prediction methods are limited by heavy reliance on complex multi-dimensional factors, narrow user coverage, and inadequate integration of temporal knowledge. The emergence of large language models (LLMs) offers a promising solution; however, existing LLMs lack sufficient industry-specific understanding, resulting in inaccurate predictions. Moreover, research on adapting these models for the prediction of natural gas consumption remains insufficient.
    Methods To this end, a natural gas consumption prediction method based on LLMs and temporal knowledge enhancement was proposed. A temporal knowledge base for natural gas consumption (hereinafter referred to as the “temporal knowledge base”) was constructed to extract regional gas consumption features and to assist in LLM-based prediction through similarity retrieval. During construction, dynamic time warping barycenter averaging (DBA) was embedded into the K-means clustering algorithm to prevent Euclidean distance failure caused by time-axis shifts or distortions in the time series. Meanwhile, to improve the LLM’s understanding of input time series with partially frozen parameters, prompt templates were enriched with prior knowledge—including data decomposition, similarity retrieval snippets between the input time series and the temporal knowledge base, and statistical descriptors—before being fed to the LLM.
    Results Experimental results demonstrated that: (1) Establishing a retrieval mechanism for the temporal knowledge base and constructing prompt templates significantly enhanced the accuracy of natural gas consumption prediction. Compared to traditional methods, this approach exhibited reduced lag, stronger trend- and seasonality-fitting ability, and better handling of highly volatile series owing to a re-programming patch embedding layer. (2) The proposed method achieved significantly better prediction accuracy than other models across four datasets, achieving average values of  23 635.6 for Root Mean Square Error (RMSE) ,  10 915.1 for Mean Absolute Error (MAE), 1.9% for Symmetric Mean Absolute Percentage Error (SMAPE) , 1.9% for Mean Absolute Persentage Error (MAPE), and  0.96 for R2 , demonstrating robust generalization. (3) For ultra-long-term load prediction, the integration of rich multimodal prior knowledge enabled the proposed method to achieve the highest accuracy among all models, further reducing RMSE, MAE, SMAPE, and MAPE by an average of 13.62%, 21.49%, 22.21%, and 22.91%, respectively, while maintaining an average R2 = 0.95.
    Conclusion The research demonstrates that the newly proposed method outperforms existing benchmark approaches for generative prediction of natural gas consumption and offers a novel technical pathway for developing multimodal intelligent decision-making systems, facilitating the evolution of prediction technology from single-scenario to cross-modal collaboration.

     

/

返回文章
返回