A natural gas consumption prediction method and device based on a large model

By constructing a multi-dimensional experience base and integrating a large language model with a deep network for collaborative decision-making, the adaptability and interpretability issues of existing natural gas consumption forecasting methods in complex scenarios are solved, achieving high-precision and transparent natural gas consumption forecasting and supporting urban operational safety and supply-demand balance.

CN122472262APending Publication Date: 2026-07-28CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610580856.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-29
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing natural gas consumption forecasting methods suffer from problems such as insufficient scenario adaptability, rigid evaluation weight settings, and lack of model interpretability when facing complex and ever-changing actual scheduling scenarios. They are unable to accurately capture the nonlinear mutation characteristics under non-stationary operating conditions, resulting in poor prediction robustness and lagging decision-making logic.

Method used

A natural gas consumption prediction method based on a large model is adopted. By constructing a multi-dimensional experience base and combining a large language model and a deep network, the prediction model can be adaptively optimized and made interpretable. The experience base is generated by using user profiles, time features and interpretation reports, the attention of evaluation indicators is dynamically adjusted, and the prediction accuracy is improved by dual-path collaborative decision fusion.

Benefits of technology

It significantly improves the prediction accuracy under complex and non-stationary conditions, realizes adaptive optimization of the prediction model and transparent and reliable decision support, and enhances the stable operation of the system under extreme conditions and the interpretability of the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122472262A_ABST
    Figure CN122472262A_ABST
Patent Text Reader

Abstract

The application provides a natural gas consumption prediction method and device based on a large model, and belongs to the technical field of natural gas consumption prediction. The corresponding method comprises the following steps: generating an experience library according to a user portrait of natural gas, time characteristics, performance of a natural gas consumption prediction model, and an explanation report; wherein the experience library is used for storing historical data of natural gas consumption and prediction model information; determining an optimal set of the prediction model according to a feature vector of a current natural gas consumption prediction task and the experience library; and predicting the natural gas consumption of the current natural gas consumption prediction task according to natural gas consumption prediction results of all prediction models in the optimal set, a pre-generated large language model, and a pre-trained deep network. The method provided by the application can effectively improve the prediction accuracy of natural gas consumption, realize self-adaptive optimization and prediction of the prediction model, and enhance the explainability of the prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of natural gas consumption prediction technology, particularly the field of natural gas consumption prediction through machine learning, and specifically relates to a method and device for predicting natural gas consumption based on a large model. Background Technology

[0002] Currently, natural gas is a core component of the urban energy supply system, and its supply and demand balance is directly related to urban operational safety and people's livelihood. Affected by the nonlinear coupling of multiple heterogeneous factors such as sudden weather changes, social events, and supply scheduling strategies, urban natural gas load exhibits significant time-varying, non-stationary, and long-tailed distribution characteristics. Accurate load forecasting is not only the first line of defense for ensuring pipeline pressure safety and preventing gas supply interruptions, but also the cornerstone for optimizing gas source scheduling and allocation, achieving refined supply and demand balance, and reducing operating costs.

[0003] Existing natural gas load forecasting methods have evolved from early statistical methods to a data-driven model dominated by deep learning. Models such as LSTM, Transformer and their variants, with their powerful nonlinear mapping capabilities, can achieve good forecasting accuracy under normal operating conditions.

[0004] However, although existing natural gas consumption forecasting methods have improved overall forecasting accuracy, they still have insurmountable limitations when dealing with complex and ever-changing real-world scheduling scenarios. These limitations are manifested in the following three aspects: (1) Insufficient scenario adaptability and agility: Existing models are mostly based on the assumption of stationary sequences, which makes it difficult to accurately capture the nonlinear mutation characteristics under non-stationary operating conditions such as sudden cold waves, long holiday shutdowns, and boiler start-up and shutdown during the heating season. General error indicators often mask the large deviations at special nodes, resulting in the model optimization results not matching the actual high-risk scenarios and poor prediction robustness.

[0005] (2) Rigid evaluation weight settings: Traditional combined prediction or model optimization methods often use static fixed weights or simple statistical weighting, which lack the flexibility of human-computer interaction. The system has difficulty dynamically adjusting the attention of each evaluation indicator according to the specific characteristics of the scenario, resulting in a lag in decision-making logic.

[0006] (3) The model lacks interpretability and lacks guarantees of logical reasoning and physical consistency: Existing deep learning models can usually only construct nonlinear numerical mappings of data features, and cannot intuitively show the logical derivation process and attribution basis behind the prediction results, making it difficult for decision-makers to assess the rationality and confidence of the prediction results. In addition, pure data-driven methods lack human-like thinking chain reasoning ability. When faced with sudden events lacking historical samples or scenarios that require calibration with physical common sense, their generalization ability is weak, and they are very likely to output prediction values ​​that violate physical laws or common sense. Summary of the Invention

[0007] One object of the present invention is to provide a method for predicting natural gas consumption based on a large model, which aims to solve at least some of the above-mentioned technical problems.

[0008] Another object of the present invention is to provide a natural gas consumption prediction device based on a large model. A further object of the present invention is to provide an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the steps of the aforementioned natural gas consumption prediction method based on a large model. A further object of the present invention is to provide a readable medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the aforementioned natural gas consumption prediction method based on a large model.

[0009] To address the technical problems in the background section of this invention, the present invention provides the following technical solutions: In a first aspect, the present invention provides a method for predicting natural gas consumption based on a large model, comprising: An experience base is generated based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set of prediction models is determined based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption for the current natural gas consumption prediction task is predicted based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

[0010] In some embodiments of the present invention, predicting the natural gas consumption for the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the preferred set, a pre-generated large language model, and a pre-trained deep network includes: A first prediction result is generated based on the natural gas consumption prediction results of each prediction model in the preferred set and the large language model. A second prediction result is generated based on the natural gas consumption prediction results of each prediction model in the preferred set and the deep network. Predict the natural gas consumption for the current natural gas consumption forecasting task based on the first and second prediction results.

[0011] In some embodiments of the present invention, predicting the natural gas consumption for the current natural gas consumption prediction task based on the first prediction result and the second prediction result includes: Calculate the difference between the first prediction result and the second prediction result; If the difference is less than a preset threshold, predict the natural gas consumption of the current natural gas consumption prediction task based on the second prediction result; Otherwise, predict the natural gas consumption for the current natural gas consumption prediction task based on the first prediction result.

[0012] In some embodiments of the present invention, the experience base is used to store a set of conventional indicators for evaluating the stability of the prediction model, as well as a set of special indicators for evaluating scenarios such as extreme weather, heating switching, and power supply scheduling.

[0013] In some embodiments of the present invention, a natural gas consumption prediction method based on a large model further includes: Generate the semantic layer of the experience base based on the interpretation report; A natural language inference report is generated based on the large language model and the prediction results of natural gas consumption. The experience base is iteratively optimized based on the semantic layer, the natural language inference report, the regular indicator set, and the special indicator set.

[0014] In some embodiments of the present invention, determining the preferred set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base includes: Based on the feature vector, match the set of historical reference application scenarios for the current natural gas consumption prediction task in the experience base; Based on the historical reference application scenario set, determine the global optimal weight vector of the conventional index set and the global optimal weight vector of the special index set corresponding to the current natural gas consumption prediction task. The preferred set of the prediction model is determined based on the globally optimal weight vector of the conventional index set and the globally optimal weight vector of the special index set.

[0015] Secondly, the present invention provides a natural gas consumption prediction device based on a large model, the device comprising: An experience base generation module is used to generate an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set determination module is used to determine the preferred set of the prediction model based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption prediction module is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

[0016] In some embodiments of the present invention, the natural gas consumption prediction module includes: The first prediction result generation unit is used to generate a first prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the big language model. The second prediction result generation unit is used to generate a second prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the deep network. A natural gas consumption prediction unit is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the first prediction result and the second prediction result.

[0017] In some embodiments of the present invention, the natural gas consumption prediction unit includes: A difference calculation unit is used to calculate the difference between the first prediction result and the second prediction result; The first subunit for predicting natural gas consumption is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the second prediction result if the difference is less than a preset threshold. The second subunit for natural gas consumption prediction is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the first prediction result, otherwise.

[0018] In some embodiments of the present invention, a natural gas consumption prediction device based on a large model further includes: A semantic layer generation module is used to generate the semantic layer of the experience base based on the interpretation report; The Natural Language Inference Report Generation Module is used to generate a Natural Language Inference Report based on the large language model and the prediction results of natural gas consumption. The experience base optimization module is used to iteratively optimize the experience base based on the semantic layer, the natural language inference report, the regular indicator set, and the special indicator set.

[0019] In some embodiments of the present invention, the preferred set determination module includes: A scenario set matching unit is used to match the historical reference application scenario set of the current natural gas consumption prediction task in the experience base according to the feature vector. The global optimal weight vector determination unit is used to determine the global optimal weight vector of the conventional indicator set and the global optimal weight vector of the special indicator set corresponding to the current natural gas consumption prediction task based on the historical reference application scenario set. The preferred set determination unit is used to determine the preferred set of the prediction model based on the globally optimal weight vector of the conventional index set and the globally optimal weight vector of the special index set.

[0020] Thirdly, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of a natural gas consumption prediction method based on a large model.

[0021] Fourthly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a natural gas consumption prediction method based on a large model.

[0022] Fifthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for predicting natural gas consumption based on a large model.

[0023] As described above, embodiments of the present invention provide a method and apparatus for predicting natural gas consumption based on a large model. The corresponding method for predicting natural gas consumption based on a large model includes: First, generating an experience base based on natural gas user profiles, time characteristics, the performance of the natural gas consumption prediction model, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; Next, determining an optimal set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base; Finally, predicting the natural gas consumption of the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the optimal set, a pre-generated large language model, and a pre-trained deep network.

[0024] The method provided by this invention can effectively improve the prediction accuracy of natural gas consumption, realize adaptive optimization and prediction of the prediction model, and enhance the interpretability of the prediction results. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a schematic flowchart of a natural gas consumption prediction method based on a large model provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating step 300 provided in an embodiment of the present invention; Figure 3 This is a flowchart illustrating step 303 provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a second process for a natural gas consumption prediction method based on a large model, provided in an embodiment of the present invention. Figure 5 This is a flowchart illustrating step 200 provided in an embodiment of the present invention; Figure 6 A mind map illustrating a natural gas consumption prediction method based on a large model, provided for specific embodiments of the present invention; Figure 7 A flowchart illustrating a natural gas consumption prediction method based on a large model, provided for a specific embodiment of the present invention; Figure 8 A flowchart illustrating step S2 for a specific embodiment of the present invention; Figure 9 A flowchart illustrating step S2.2 provided for a specific embodiment of the present invention; Figure 10 A flowchart illustrating step S3 for a specific embodiment of the present invention; Figure 11 A schematic diagram of a natural gas consumption prediction device based on a large model, provided for an embodiment of the present invention; Figure 12 A schematic diagram of the structure of the natural gas consumption prediction module 30 provided in an embodiment of the present invention; Figure 13 A schematic diagram of the structure of the natural gas consumption prediction unit 30c provided in an embodiment of the present invention; Figure 14 A second structural schematic diagram of a natural gas consumption prediction device based on a large model, provided for an embodiment of the present invention; Figure 15 A schematic diagram of the preferred set determination module 20 provided in an embodiment of the present invention; Figure 16 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0029] It should be noted that the terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses. Without conflict, the embodiments and features in the embodiments of this invention can be combined with each other. The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0030] The acquisition, storage, use, and processing of data in the technical solution of this invention all comply with the relevant provisions of laws and regulations.

[0031] Embodiments of the present invention provide a method for predicting natural gas consumption based on a large model, see below. Figure 1 The natural gas consumption prediction method based on large models specifically includes the following: Step 100: Generate an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; Step 200: Determine the preferred set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base; Step 300: Based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network, predict the natural gas consumption for the current natural gas consumption prediction task.

[0032] As described above, embodiments of the present invention provide a method for predicting natural gas consumption based on a large model, comprising: first, generating an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; next, determining an optimal set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base; finally, predicting the natural gas consumption of the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the optimal set, a pre-generated large language model, and a pre-trained deep network.

[0033] The method provided by this invention can effectively improve the prediction accuracy of natural gas consumption, realize adaptive optimization and prediction of the prediction model, and enhance the interpretability of the prediction results.

[0034] Regarding step 100, the experience base has multi-dimensional attributes and semantic self-evolution capabilities. This multi-dimensional experience base, used to store historical data and model information, comprises four dimensions: user profiles, time features, model performance, and model explanation reports. Specifically, the model performance dimension deconstructs error metrics into a general set of metrics for evaluating the stability of normal operating conditions, and a special set of metrics covering scenarios such as extreme weather, heating system switching, and power supply scheduling. The model explanation report dimension, as the semantic layer of the experience base, possesses self-evolutionary characteristics: it generates natural language inference reports based on prediction feedback using a large language model and automatically extracts key semantic tags as indexes stored in the database, assisting in the accurate retrieval and reuse of historical scenarios with the same semantic features.

[0035] For step 200, based on the feature vector of the current task to be predicted, hard filtering is performed on multi-source scene elements in the experience base to recall the set of historical reference scenes that meet the key elements.

[0036] For step 300, the prediction of natural gas consumption is divided into two paths. First, the prediction results of each model are generated using an optimized model set, and then the process enters a dual-path collaborative processing stage. The first path performs qualitative reasoning based on the Large Language Model (LLM) thought chain: structured prompts guide the LLM to perform the reasoning logic of "semantic alignment-physical verification-quantitative mapping," and the confidence adjustment coefficient is output to correct the model score in conjunction with historical interpretation reports. The generated analysis report is then stored back to the experience base to achieve closed-loop updates. The second path performs quantitative integration of a pre-trained deep network: the basic predicted values ​​and covariates are input into a pre-trained lightweight deep neural network, and the integrated predicted value is output through nonlinear mapping. Finally, a dual-path decision fusion is performed based on prediction consistency: the difference between the two prediction results is calculated. When the difference is small, the deep integration result is emphasized to utilize statistical regularity; when the difference is significant, the LLM reasoning result is emphasized to utilize logical correction capabilities. The final predicted value is dynamically weighted and output.

[0037] In some embodiments of the present invention, see Figure 2 Step 300 includes: Step 301: Generate a first prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the large language model; Step 302: Generate a second prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the deep network; In steps 301 and 302, this application provides a prediction framework that combines LLM and deep learning: First, a structured thought chain prompting engineering is defined, which includes structured prompts based on "scene input - indicator reasoning logic - historical performance evaluation - formatted output" to guide LLM to execute implicit reasoning logic of "semantic alignment - physical verification - quantization mapping". This not only outputs prediction adjustment coefficients but also generates traceable attribution analysis reports, enhancing the interpretability of the model selection process. Next, the reasoning ability of LLM is innovatively combined with deep learning integrated computation, and based on a dynamic confidence fusion strategy for prediction consistency, the fusion coefficients are adaptively adjusted according to different operating conditions to improve the accuracy of the final prediction results.

[0038] Step 303: Based on the first prediction result and the second prediction result, predict the natural gas consumption for the current natural gas consumption prediction task.

[0039] In some embodiments of the present invention, see Figure 3 Step 303 includes: Step 3031: Calculate the difference between the first prediction result and the second prediction result; Dual-path decision fusion based on prediction consistency: calculate the difference between the two prediction results.

[0040] Step 3032: If the difference is less than a preset threshold, generate the natural gas consumption for the current natural gas consumption prediction task based on the second prediction result; Step 3033: Otherwise, generate the natural gas consumption for the current natural gas consumption prediction task based on the first prediction result.

[0041] In steps 3031 and 3032, when the differences are small, the deep network integration results are emphasized to utilize statistical regularities, and when the differences are significant, the LLM inference results are emphasized to utilize logical correction capabilities, and the final predicted value is output dynamically weighted.

[0042] In some embodiments of the present invention, the experience base is used to store a set of conventional indicators for evaluating the stability of the prediction model, as well as a set of special indicators for evaluating scenarios such as extreme weather, heating switching, and power supply scheduling.

[0043] Specifically, to support LLM's deep reasoning on the causes of model failure, error metrics are decomposed into two categories: a set of regular metrics and a set of special metrics. 1) A set of general indicators is used to evaluate the stability of the model under normal operating conditions, including one-day lag error, same-week lag error, same-month lag error, and same-year lag error. The indicators are shown in Table 1: Table 1 General Indicator Set

[0044] 2) A special set of indicators is used to capture the model's adaptability under non-stationary conditions, covering key scenarios such as extreme weather, heating system switching, long holiday effects, weekday effects, and supply guarantee scheduling. The indicators are shown in Table 2. Table 2 Special Indicator Set

[0045] In some embodiments of the present invention, a method for predicting natural gas consumption based on a large model is described below. Figure 4 It also includes: Step 400: Generate the semantic layer of the experience base based on the interpretation report; Specifically, the explanatory report of the predictive model is the semantic layer of the experience base, storing natural language analysis reports on the model's performance in specific scenarios. The content covers attribution analysis of error sources, the impact mechanism of specific events on the model, and the selection logic of the optimal model.

[0046] Step 500: Generate a natural language inference report based on the large language model and the prediction results of natural gas consumption; Specifically, a natural language reasoning report is generated based on prediction feedback through a large language model, and key semantic tags are automatically extracted and stored in the database as indexes to assist in the accurate retrieval and reuse of historical scenes with the same semantic features.

[0047] Step 600: Iteratively optimize the experience base based on the semantic layer, the natural language inference report, the regular indicator set, and the special indicator set.

[0048] Specifically, the "Analysis Report" field output by LLM is the interpretability report for this prediction. This report contains natural language descriptions of the meteorological impact mechanisms and the sources of model confidence. Simultaneously, this report is timestamped and tagged with a scene, directly stored in the model interpretation report dimension, thus enabling the experience base to have "self-evolution" capabilities. During subsequent searches, LLM can refer to its previous analysis reports, forming a closed-loop optimization.

[0049] In some embodiments of the present invention, see Figure 5 Step 200 includes: Step 201: Match the set of historical reference application scenarios for the current natural gas consumption prediction task in the experience base according to the feature vector; Based on the feature vector of the current task to be predicted, hard filtering is performed on multi-source scene elements in the experience base to recall a set of historical reference scenes that meet the key elements. Step 202: Determine the global optimal weight vector of the conventional indicator set and the global optimal weight vector of the special indicator set corresponding to the current natural gas consumption prediction task based on the historical reference application scenario set. Specifically, a historical backtracking-based indicator weight optimization model is constructed. The original indicator values ​​of the candidate model in the recall scenario are extracted to construct a backtracking matrix, and the historical true error is converted into the true score. Subsequently, a convex quadratic programming model with L2 regularization is established with the objective of minimizing the square of the Euclidean distance between the "weight-based calculated score" and the "error-based true score". The interior point method is used to solve for the global optimal weight vector of each evaluation indicator.

[0050] Step 203: Determine the preferred set of the prediction model based on the global optimal weight vector of the conventional index set and the global optimal weight vector of the special index set.

[0051] The overall confidence score of the candidate models under the current task is calculated using this weight, and the preferred model set is selected accordingly.

[0052] As described above, embodiments of the present invention provide a method for predicting natural gas consumption based on a large model, comprising: first, generating an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; next, determining an optimal set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base; finally, predicting the natural gas consumption for the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the optimal set, a pre-generated large language model, and a pre-trained deep network. Compared with the prior art, this application has the following beneficial effects: (1) Significantly improves the prediction accuracy under complex non-stationary working conditions.

[0053] By introducing a "special indicator set" covering scenarios such as extreme weather, heating system switching, and power supply scheduling, and combining it with a dual-path collaborative mechanism of "LLM qualitative inference + deep network quantitative computation," the system effectively overcomes the problem of single statistical models failing when data distribution undergoes abrupt changes. The system can accurately capture the nonlinear characteristics in non-stationary sequences, significantly reducing prediction errors in special scenarios.

[0054] (2) Implement mechanism-driven adaptive model selection.

[0055] A dynamic evaluation algorithm based on convex quadratic programming is proposed, which changes the traditional fixed-weight evaluation method. The system can automatically solve for the globally optimal weights of the evaluation indicators based on the characteristics of the current task to be predicted and historical backtracking data. This dynamic mechanism enables the model selection strategy to "adaptively" adjust with changes in the environment, matching the optimal model combination for the current scenario.

[0056] (3) Provide transparent and credible decision-making interpretability.

[0057] By leveraging the LLM thought process, the system executes a reasoning logic of "semantic alignment - physical verification - quantization mapping." While outputting prediction results, the system generates a natural language report containing attribution analysis and model confidence sources, enabling schedulers to intuitively understand the underlying logic of the predictions and significantly improving the reliability of decision support.

[0058] (4) Enhance the robustness and generalization ability of the system operation.

[0059] By constructing a multi-dimensional experience base with "semantic self-evolution" capabilities, the system can continuously accumulate and reuse historical successful experiences. Combined with a dual-path decision fusion strategy based on prediction consistency, the system fully utilizes the statistical regularities of deep learning under normal operating conditions, while emphasizing the logical correction capabilities of LLM under abnormal operating conditions, effectively smoothing prediction fluctuations and ensuring the stable operation of the system under various extreme and sudden conditions.

[0060] For further explanation of the plan, see Figure 6 as well as Figure 7 The present invention also provides a specific implementation method for a natural gas consumption prediction method based on a large model, which includes the following:

[0061] S1: Construct a multidimensional experience base with semantic self-evolution capabilities.

[0062] First, establish an experience base. It stores historical data and model information. The experience base includes the following dimensions: (1) User profile dimension.

[0063] Set user / region set Each element It represents a type of natural gas load user or regional scenario (such as residential areas, industrial parks, or different urban areas).

[0064] (2) Time feature dimension.

[0065] This dimension is a feature set indexed by time step, specifically including: 1) Basic Index: Continuous time features in "days"; 2) Periodic characteristics: Weekly index (week_index, 0-6), Monthly index (month_index, 1-12); 3) Seasonal identification: Seasonal division based on meteorological definitions (e.g., "winter" = December to February of the following year); 4) Event identifier: Used to mark holidays (is_holiday) and extreme weather types (extreme_weather_type).

[0066] (3) Model performance dimension

[0067] This dimension stores the historical performance of each candidate prediction model in a specific "user profile-time feature" combination scenario. It records the MAE and MAPE of each model at historical moments, calculated using formulas (1) and (2): (1) (2) In the formula, This represents the actual natural gas load value. The predicted values ​​are those of the model. In order to minimize the impact of the load magnitude on the prediction, the normalized error index is uniformly adopted for all model performance dimensions, as shown in formulas (3) and (4): (3) (4) (4) Model Explanation Report Dimension.

[0068] This dimension is the semantic layer of the experience base, storing natural language analysis reports on model performance in specific scenarios. The content covers attribution analysis of error sources, the impact mechanism of specific events on the model, and the selection logic for the optimal model.

[0069] Unlike traditional numerical databases, this dimension possesses a "self-evolving" characteristic. Initially, the report library is generated by expert rules. As the system runs, the large language model generates new inference reports based on the latest prediction feedback. Simultaneously, natural language processing technology automatically extracts key semantic tags from the reports, such as "#coldwavedelay" and "#holidayoverestimation," storing these tags along with the unstructured text in the experience library. In the next retrieval (S2), these tags serve as semantic indexes, assisting in quickly locating scenarios with the same "semantic features" from a massive historical dataset, thereby achieving effective reuse and self-evolution of the experience library.

[0070] To visually demonstrate the organization of the multi-dimensional experience base, Table 3 shows a single experience data record based on the "residential heating scenario" during a "winter weekend".

[0071] Table 3 Example of a single row of data in the experience library

[0072] S2: Dynamically evaluate the historical competence of the prediction model based on the convex quadratic programming algorithm.

[0073] Let the candidate model set be (i.e., the number of candidate models is) M The set of evaluation metrics depends on the scenario of the task to be predicted (including general and specific metrics), and the number of metrics is [number missing]. J The overall execution logic of this step is as follows: First, filter out... K A historical reference scenario; subsequently, for the set The first in i Candidate models Extract its context in these historical scenarios J The model's historical competency score is calculated using a set of original evaluation index values ​​and a convex quadratic programming method. Finally, all candidate models are ranked and selected based on their scores.

[0074] To ensure the model evaluation's reference value, it is first necessary to recall a set of historical time steps from the experience base that highly match the features of the current task to be predicted. The feature vector of the current task to be predicted is defined as... ,in Identify user profiles, For time characteristics (such as weekdays / holidays). For meteorological characteristics (such as temperature and wind speed). The search strategy consists of two steps (see [link]). Figure 8 ): S2.1: Hard filtering of historical scenes based on multi-source scene elements.

[0075] The set of scene elements is obtained by parsing the feature vector of the task to be predicted. The scenario elements are limited to the element categories covered by the general / special indicator sets in the experience base, including at least key scenario elements such as extreme weather response, holidays / working days, and supply guarantee scheduling. The experience base pre-sets event identifier fields (such as is_holiday, extreme_weather_type, etc.) in the time feature dimension for structured annotation of scenario elements.

[0076] The set of historical time steps in the experience base Perform constraint filtering to obtain a set of historical scenes that satisfy all scene elements. :

[0077] In the formula, Indicates historical time step t Under the corresponding event identifier field or derivation rule, and scene elements f i Matching. Ultimately, the set of scene elements is satisfied. The total number of historical scenes is K ,Right now and will Output as a set of reference scenarios.

[0078] S2.2: Construct an indicator weight optimization model based on historical backtracking.

[0079] By constructing a historical data playback mechanism, the process of determining the weights of evaluation indicators is transformed into a constrained quadratic programming problem. The system uses historical real errors to back-correct the indicator weights, ensuring that the calculated model score is positively correlated with the actual prediction accuracy. Specifically, see [link to documentation]. Figure 9 Step S2.2 includes the following steps.

[0080] S2.2.1: Construct the retrospective index matrix and the true score confidence vector.

[0081] Extract the product obtained after filtering in step S2.1 K A collection of historical scenes We reconstruct the performance of candidate models at these historical moments using data.

[0082] For the retrieved number k The first historical scene, extract the first i A model At that moment J The original evaluation index values ​​were determined. To eliminate dimensional differences, the indicators were normalized and their polarity was unified (converted to "the larger the value, the better"), and a new evaluation index was constructed. K × J Dimensional backtracking index matrix For example, in formula (5): (5) In the formula, For the first k The first historical scene j The raw values ​​of each indicator This is the set of values ​​for this indicator across all historical samples.

[0083] Subsequently, the model was extracted in the first... k absolute error of a historical scene As shown in formula (6), the error is converted into a true score. , as the target value for optimized alignment. The conversion formula uses an inverse proportional decay function, as shown in formula (7): (6) (7) In the formula, Adjust the sensitivity parameters to ensure that the true error is... At that time, the score The larger the error, Rapid decay.

[0084] In practice The value depends on the stability of the scenario: for aggregated stable loads such as residential areas or city gate stations, higher accuracy is required, and it is recommended to... Take 0.05; for single large industrial users and other loads that fluctuate significantly due to production plans, it is recommended to appropriately relax the limit to 0.10.

[0085] Therefore, we obtain K 3D column vector elements in a vector Representing the i The model's actual score in each historical scenario. The higher the value, the lower the absolute error of the model's prediction in that historical scenario. The smaller the size, the better the performance.

[0086] S2.2.2: Establish a convex quadratic programming model with L2 regularization.

[0087] Define the weight vector to be optimized as follows ,satisfy , Combined with the backtracking indicator matrix in S2.2.1 According to formula (8), the initial weights for each historical scenario are calculated and scored. : (8) In the formula, Weight vector Using J×1 dimension ( K (All historical scenarios share a set of weights), the design basis is as follows: (1) After passing through S2.1 hard filtration, K Each historical scenario belongs to the same "scenario category" as the current prediction scenario, and the core features and indicator importance requirements are consistent, so there is no need to design separate scenario-specific weights. (2) The J×1 dimension weight vector contains only J optimization variables, which has a fast convergence speed, is not easily affected by outliers, and effectively alleviates parameter overfitting. (3) Shared weights can extract the general importance patterns of scenario-based indicators, ensuring that the weights can be transferred to the current prediction scenario, while taking into account the convergence speed of the project and the interpretability of the results.

[0088] Therefore, we obtain K 3D column vector elements in a vector Representing the i In each historical scenario, the model calculates a weighted score based on the weights assigned to each indicator. (Score) The higher the value, the better the model performs across all metrics in that historical scenario.

[0089] Next, an optimization objective function is established, aiming to minimize the "weight-based calculated score". "and error-based true rating" The squared value of the Euclidean distance between the two sides is required, meaning that when the true error of the model is extremely small, the weighted total score must also be extremely high. At the same time, an L2 regularization term is introduced to ensure the numerical stability of the weight distribution.

[0090] objective function The definition is as shown in formula (9): (9) In formula (9), the first term is the fitting residual term, which measures the performance of the fit. K Weight-based score calculation in a series of historically similar scenarios. Compared with error-based true ratings The deviation between them, this item requires the score after weight combination. The score must closely approximate the score calculated from the true error. The second term is the regularization term. This is a regularization coefficient used to prevent the weight from being concentrated on a single indicator due to individual historical outliers, thus ensuring the robustness of the comprehensive evaluation of multiple indicators.

[0091] If the score is calculated based on weights Compared with error-based true ratings The existence of deviation will lead to a change in the weight vector. Unable to accurately map the model's actual performance quality: (1) When the actual score When the model performs well in practice, the corresponding weights are used to calculate the score. If it is too low, it indicates that the weight vector is too low. The model's performance in this scenario was misjudged. (2) When the actual score When the actual performance of the model is poor, the score is calculated based on the corresponding weights. If it is too high, then the weight vector This can interfere with the accuracy of model selection, causing the system to select models whose actual performance does not meet expectations, ultimately leading to a decrease in subsequent prediction accuracy.

[0092] S2.3: Solving for the optimal weight vector based on the interior point method.

[0093] The objective function in step S2.2.2 Expand and rewrite it in standard quadratic programming matrix form, as shown in formula (10): (10) In the formula, The Hessian matrix is ​​composed of the autocorrelation matrix of the backtracking index matrix and a regularization term. , dimension J × J ( (the identity matrix); It is a linear coefficient vector, composed of the cross-correlation between the index matrix and the target confidence level. , dimension J ×1.

[0094] Introducing Lagrange multipliers (Corresponding equality constraints) ) and dual variable vector (Corresponding inequality constraints) ), and construct the Karoš-Kun-Tucker (KKT) system of conditional equations.

[0095] To apply the interior-point method, a perturbation factor is introduced. (Central path parameters), modifying the complementary relaxation condition to At this point, the system equations The definition is as shown in formula (11): (11) In the formula, , All are diagonal matrices; It is a column vector consisting entirely of 1s; This is the equality constraint matrix, corresponding to constraints whose weights sum to 1. The dimension is 1×J; b These are the values ​​constrained by the equality equation. b =1. Satisfies and .

[0096] Finally, the system employs a prediction-correction strategy for iterative solution until the dual gap is reached. Less than the preset threshold (In engineering practice, it is generally set to 1×10) 5 ).

[0097] In the k In this iteration, the following system of linear equations is solved to obtain the search direction. : (12) (13) In the formula, , For the dual and the original residual; Center parameter, .

[0098] The maximum step size for maintaining non-negativity constraints is calculated based on equation (14). And update the iteration point: (14) Calculate the current duality gap according to formula (15): (15) like If the iteration stops, output the result. As the globally optimal weight vector This represents the optimal weight allocation for each evaluation index under the current operating conditions, and this vector automatically satisfies... and Constraints.

[0099] S2.4: Calculate the overall confidence score and rank the candidate models.

[0100] Obtain each candidate model m On the current forecast date J Each evaluation index value, after normalization, yields the current feature vector. The final confidence score is calculated using the optimal weights. For example, in formula (16): (16) according to Sort all candidate models in descending order. Due to the constraints of the optimization objective, at this point... A higher value means a smaller expected error when inferring its corresponding value based on historical patterns. (Selection) The top-N models constitute the preferred set. Input the data into step S3 for fusion prediction.

[0101] S3: Generate collaborative predictive decisions that integrate thought chain reasoning and deep computing.

[0102] In step S2, the system has selected the component with the best overall fitness in the current scenario. N A set of candidate models First, utilize this N Each model predicts the target scenario based on the latest meteorological and historical load data, obtaining the forecast for the current forecast day. N A sequence of basic prediction results .

[0103] Subsequently, the system enters a dual-path parallel processing stage, generating prediction results through both an "LLM-based cognitive reasoning path" and a "deep learning-based ensemble computing path," and finally fusing and outputting the results. For details, see [link to relevant documentation]. Figure 10 Step S3 includes the following steps.

[0104] S3.1: Perform qualitative reasoning based on the LLM thinking chain and adjust the coefficients.

[0105] To stimulate the thinking process of LLM in industrial forecasting, this invention constructs a structured prompt word containing a "scenario-indicator mapping logic." This prompt word is no longer a general query, but rather guides LLM to retrieve relevant experience and knowledge from the experience base in S1 based on the current scenario, perform reasoning and analysis, and obtain the prediction result. The prompt word design includes three key modules: (1) Scene Input: Input the current objective environment data, as well as the data retrieved from the S1 experience base. N Historical performance data of each model in the corresponding dimension.

[0106] (2) Indicator reasoning logic: Incorporate expert rules to guide LLM on how to weigh the importance of "general indicators" and "specific indicators" under different working conditions.

[0107] (3) Evaluation of the effectiveness of historical reasoning chain: Based on the deviation between the reasoning process of historical prediction scenarios and the actual load results, the rationality and reliability of the reasoning logic are judged.

[0108] (4) Formatted output constraints: The output must include the inference report and weight values.

[0109] Specific prompt word design details (where the content within curly braces {} are variables dynamically filled in during program runtime): Role Setting: You are the chief dispatching expert in the field of urban gas load forecasting. You possess a deep understanding of historical model performance metrics (S1 experience base).

[0110] Target prediction scenario: (1) "Predicted Date": "{Year XX Month XX Day} (Weekday X)"; (2) “User Profile”: “{Description of the user profile to be predicted}”; (3) "Meteorological and Event Characteristics": "Temperature Change: {Description of Temperature Change}, Special Event Tags: {Whether it is extreme weather, such as cold wave, supply guarantee}"; Candidate model prediction results: The system has already filtered out N There are 10 candidate models, and the prediction results of each model for this prediction scenario are as follows: (1) Model 1: Predicted value = { }; (2) Model 2: Predicted value = { }; ... (N) model N Predicted value = { }

[0111] Derivation of the thought process: Considering both meteorological fluctuations and the characteristics of sudden events, and combining this with the historical performance of candidate models in the experience base, perform a full-link logical verification and output the "confidence adjustment coefficient." Please strictly adhere to the following thought process: (1) Scene matching and effectiveness evaluation: Compare the similarity between the current prediction day and the historical scenes recalled in step S2.1 in terms of temperature trend, holiday type and extreme event label, and determine the reference value level of historical experience for the current task (high / medium / low).

[0112] (2) Model Attribution and Failure Diagnosis: In-depth analysis of the residual characteristics of candidate models under similar historical scenarios. Focus on diagnosing whether the model has exhibited typical failure behaviors such as "lagging response to cold waves", "peak shaving in extreme value prediction" or "misjudgment of holiday load" under similar operating conditions.

[0113] (3) Determine the adjustment strategy: Based on the above diagnostic results, construct a differentiated confidence calibration strategy and assign a dynamic adjustment coefficient to each model: Positive gain based on mechanistic fit: If the model demonstrates excellent physical consistency in similar historical scenarios (e.g., accurately capturing load surges caused by sudden temperature drops) and conforms to the characteristics of the current operating conditions, it is considered a superior model. Please assign a gain coefficient of 1.1 to 1.3 to amplify its weight in the final decision.

[0114] Negative suppression of risk scenarios: If the model has a history of failures (such as failing to identify the shutdown effect during a long holiday), or the current scenario triggers a known blind spot in the model (such as violating common sense physics), it is considered high-risk. Please assign a decay coefficient of 0.7 to 0.9 to suppress the spread of potential errors.

[0115] Maintaining the baseline statistical capability: If the model performs in accordance with statistical norms, without significant superior features or obvious logical flaws, it is considered the baseline model. Please keep the coefficient at 1.0 to maintain its original data-driven predictive power.

[0116] (4) Generate an explanation report: Summarize the above analysis logic, form a natural language text containing attribution basis, and use it as a tag to update the experience base.

[0117] Output format specifications: Please output strictly in JSON format: { "Adjustment coefficient": {"Model 1": 1.x,"Model 2": 1.y,...}, "Analysis Report": Write a detailed analysis report here. } Specifically, after receiving the aforementioned structured prompts, the LLM executes an implicit inference logic of "semantic alignment - physical verification - quantization mapping": First, the LLM uses the objective characteristics of the current prediction task as an index to filter out the special indicator performance and historical explanation reports of each candidate model under similar historical scenarios in the S1 experience base; then, the LLM combines the physical characteristics of natural gas load changing with temperature to perform physical consistency verification on the prediction trends of each model, and checks whether the model has known failure risks such as "cold wave lag" or "long holiday overestimation" based on the recalled historical reports; finally, based on the above qualitative analysis results, the LLM applies reward and punishment rules, assigns gain coefficients to models that conform to physical laws and have excellent performance in similar historical scenarios, and assigns attenuation coefficients to models that violate physical common sense or hit historical failure labels, thereby transforming unstructured logical reasoning into quantitative confidence adjustment coefficients and outputting an analysis report with the reasoning process.

[0118] The "Analysis Report" field output by LLM is the interpretability report for this prediction. This report contains natural language descriptions of the meteorological impact mechanisms and the sources of model confidence. Simultaneously, this report is timestamped and tagged with a scene, and directly stored in the "Model Interpretation Report Dimension" in step S1. This gives the experience base a "self-evolution" capability; during the next retrieval, LLM can refer to its previous analysis reports to form a closed-loop optimization.

[0119] The system parses the structured JSON data output by the LLM model and extracts the "confidence adjustment coefficient" for each candidate model. Using this coefficient as the semantic correction factor for the current scenario, the "model historical competence score" obtained in step S2 based on convex quadratic programming is dynamically modulated (i.e., the score is weighted and corrected) to achieve the coupling of historical statistical patterns and current logical reasoning. Finally, the corrected score is normalized according to formula (17) to obtain the final fusion weight of each model. .

[0120] (17)

[0121] Finally, the final prediction result of the LLM layer is output according to formula (18): (18) S3.2: Quantitative integration computation of pre-trained deep networks.

[0122] Construct a lightweight deep neural network that is pre-trained using historical data from the S1 experience base to learn a strategy of "approximating the true value by combining the results of the base model." The input layer of this neural network contains... N The predicted values ​​of each model It also concatenates the key covariate vectors for the current moment. (Temperature, humidity, hourly index, etc.); the hidden layer captures the nonlinear correction logic of different models under different operating conditions through activation functions; the output layer outputs the ensemble prediction value of the second path. : (19) In the formula, For a well-trained deep ensemble network, These are network parameters.

[0123] S3.3: Dual-path decision-making with fusion of prediction consistency.

[0124] Define the final prediction result A dynamic fusion algorithm based on prediction consistency is adopted, as shown in formula (20): (20) In the formula, The fusion coefficient has the following value selection logic: Normal operating conditions: when and When the difference is small, the operating condition is considered stable, and the following is taken: =0.5 or slightly biased towards deep learning models (such as 0.4) to take advantage of statistical patterns in the data.

[0125] Abnormal operating conditions (such as extreme cold waves or sudden changes during holidays): When the differences between the two are significant, the system tends to trust the inference ability of LLM. This is because deep learning models are often based on historical statistical distributions and have weak generalization ability to rare samples, while LLM can correct biases through logical reasoning. In this case, increasing the LLM's inference ability is more effective. Values ​​(e.g., 0.7-0.8).

[0126] As described above, the core innovation of this invention lies in constructing a complete technical system of "multi-dimensional experience base + dynamic model optimization + LLM collaborative reasoning". Specifically, compared with the prior art, this application has the following beneficial effects: (1) Self-evolving organizational structure of the multidimensional experience base: 1) Construct a four-dimensional experience base including "user profile dimension, time feature dimension, model performance dimension, and model explanation report dimension"; 2) Innovatively introduce the "model explanation report dimension" to store natural language analysis reports and automatically extract key semantic tags through natural language processing technology to achieve efficient semantic indexing of the experience base; 3) Introduce special indicator sets such as extreme weather response and heating cycle switching, and combine them with general indicator sets to realize refined and structured evaluation and storage of the predictive model's adaptability under stable and non-stable (abnormal) conditions.

[0127] (2) Convex quadratic programming weight optimization technique based on historical backtracking: 1) Based on the hard filtering mechanism of scene elements, a hard filtering strategy based on scene elements such as user profile, meteorological features and event identifiers is proposed to ensure that the recalled historical scenes are highly consistent with the current prediction task in terms of physical laws; 2) A convex quadratic programming model with L2 regularization is designed to solve the optimal weight of each evaluation index (including general and special indexes) in reverse by using the historical real error to ensure that the model score is positively correlated with the actual accuracy, and efficient optimization is achieved by solving the KKT conditions through the interior point method.

[0128] (3) Prediction framework of LLM and deep learning collaboration: 1) A structured thinking chain prompting project was designed, which includes structured prompt words based on "scene input - index reasoning logic - historical performance evaluation - formatted output" to guide LLM to execute the implicit reasoning logic of "semantic alignment - physical verification - quantization mapping". It not only outputs the prediction adjustment coefficient, but also generates a traceable attribution analysis report to enhance the interpretability of the model selection process; 2) The reasoning ability of LLM is innovatively combined with the integrated computation of deep learning, and the dynamic confidence fusion strategy based on prediction consistency is used to adaptively adjust the fusion coefficient according to different working conditions to improve the accuracy of the final prediction results.

[0129] Based on the same inventive concept, embodiments of the present invention also provide a natural gas consumption prediction device based on a large model, which can be used to implement the method described in the above embodiments, as shown in the following embodiments. Since the principle of the natural gas consumption prediction device based on a large model is similar to that of the natural gas consumption prediction method based on a large model, the implementation of the natural gas consumption prediction device based on a large model can refer to the implementation of the natural gas consumption prediction method based on a large model, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0130] This invention provides a specific implementation of a large-model-based natural gas consumption prediction device capable of implementing a large-model-based natural gas consumption prediction method, wherein, see [link to relevant documentation]. Figure 11 A natural gas consumption prediction device based on a large model includes: The experience base generation module 10 is used to generate an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set determination module 20 is used to determine the preferred set of the prediction model based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption prediction module 30 is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

[0131] In some embodiments of the present invention, see Figure 12 The natural gas consumption prediction module 30 includes: The first prediction result generation unit 30a is used to generate a first prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the big language model. The second prediction result generation unit 30b is used to generate a second prediction result based on the natural gas consumption prediction results of each prediction model in the preferred set and the deep network. The natural gas consumption prediction unit 30c is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the first prediction result and the second prediction result.

[0132] In some embodiments of the present invention, see Figure 13 The natural gas consumption forecasting unit 30c includes: The difference calculation unit 30c1 is used to calculate the difference between the first prediction result and the second prediction result; Natural gas consumption prediction first subunit 30c2 is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the second prediction result if the difference is less than a preset threshold. The second subunit 30c3 for natural gas consumption prediction is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the first prediction result, otherwise.

[0133] In some embodiments of the present invention, see Figure 14 A natural gas consumption prediction device based on a large model also includes: Semantic layer generation module 40 is used to generate the semantic layer of the experience base based on the interpretation report; Natural language reasoning report generation module 50 is used to generate a natural language reasoning report based on the large language model and the prediction results of natural gas consumption. The experience base optimization module 60 is used to iteratively optimize the experience base based on the semantic layer, the natural language inference report, the regular indicator set, and the special indicator set.

[0134] In some embodiments of the present invention, see Figure 15 The preferred set determination module 20 includes: The scenario set matching unit 20a is used to match the historical reference application scenario set of the current natural gas consumption prediction task in the experience base according to the feature vector. The global optimal weight vector determination unit 20b is used to determine the global optimal weight vector of the conventional indicator set and the global optimal weight vector of the special indicator set corresponding to the current natural gas consumption prediction task based on the historical reference application scenario set. The preferred set determination unit 20c is used to determine the preferred set of the prediction model based on the global optimal weight vector of the conventional index set and the global optimal weight vector of the special index set.

[0135] The embodiments of this application also provide a specific implementation of an electronic device capable of implementing all steps in the large-model-based natural gas consumption prediction method described in the above embodiments. See [link to implementation details]. Figure 16 The electronic devices specifically include the following: Processor 1201, memory 1202, communications interface 1203, and bus 1204; The processor 1201, memory 1202, and communication interface 1203 communicate with each other via bus 1204; the communication interface 1203 is used to realize information transmission between server-side devices and user-side devices and other related devices. The processor 1201 is used to call the computer program in the memory 1202. When the processor executes the computer program, it implements all the steps in the natural gas consumption prediction method based on a large model in the above embodiments. For example, when the processor executes the computer program, it implements the following steps: An experience base is generated based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set of prediction models is determined based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption for the current natural gas consumption prediction task is predicted based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

[0136] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the large-model-based natural gas consumption prediction method described in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the large-model-based natural gas consumption prediction method described in the above embodiments. For example, the processor generates an experience base based on natural gas user profiles, time characteristics, the performance of the natural gas consumption prediction model, and interpretation reports. The experience base stores historical data on natural gas consumption and prediction model information. An optimal set of prediction models is determined based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption of the current natural gas consumption prediction task is predicted based on the natural gas consumption prediction results of each prediction model in the optimal set, a pre-generated large language model, and a pre-trained deep network.

[0137] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, hardware + program embodiments are relatively simple in description because they are fundamentally similar to method embodiments; relevant parts can be referred to the descriptions in the method embodiments.

[0138] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0139] While this application provides method operation steps as shown in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual device or user terminal product execution, the method can be executed in the order shown in the embodiments or drawings or in parallel (e.g., in a parallel processor or multi-threaded processing environment).

[0140] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing the embodiments of this specification, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0141] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0143] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0144] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the embodiments in this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0145] The above description is merely an embodiment of the present specification and is not intended to limit the embodiments of the present specification. For those skilled in the art, various modifications and variations can be made to the embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present specification should be included within the scope of the claims of the embodiments of the present specification.

Claims

1. A method for predicting natural gas consumption based on a large model, characterized in that, include: An experience base is generated based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set of prediction models is determined based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption for the current natural gas consumption prediction task is predicted based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

2. The natural gas consumption prediction method according to claim 1, characterized in that, The step of predicting the natural gas consumption for the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network includes: A first prediction result is generated based on the natural gas consumption prediction results of each prediction model in the preferred set and the large language model. A second prediction result is generated based on the natural gas consumption prediction results of each prediction model in the preferred set and the deep network. Predict the natural gas consumption for the current natural gas consumption forecasting task based on the first and second prediction results.

3. The natural gas consumption prediction method according to claim 2, characterized in that, Based on the first prediction result and the second prediction result, predict the natural gas consumption for the current natural gas consumption prediction task, including: Calculate the difference between the first prediction result and the second prediction result; If the difference is less than a preset threshold, predict the natural gas consumption of the current natural gas consumption prediction task based on the second prediction result; Otherwise, predict the natural gas consumption for the current natural gas consumption prediction task based on the first prediction result.

4. The natural gas consumption prediction method according to claim 1, characterized in that, The experience base is used to store a set of conventional indicators for evaluating the stability of the prediction model, as well as a set of special indicators for evaluating scenarios such as extreme weather, heating switching, and supply guarantee scheduling.

5. The natural gas consumption prediction method according to claim 4, characterized in that, Also includes: Generate the semantic layer of the experience base based on the interpretation report; A natural language inference report is generated based on the large language model and the prediction results of natural gas consumption. The experience base is iteratively optimized based on the semantic layer, the natural language inference report, the regular indicator set, and the special indicator set.

6. The natural gas consumption prediction method according to claim 5, characterized in that, The step of determining the preferred set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base includes: Based on the feature vector, match the set of historical reference application scenarios for the current natural gas consumption prediction task in the experience base; Based on the historical reference application scenario set, determine the global optimal weight vector of the conventional index set and the global optimal weight vector of the special index set corresponding to the current natural gas consumption prediction task. The preferred set of the prediction model is determined based on the globally optimal weight vector of the conventional index set and the globally optimal weight vector of the special index set.

7. A natural gas consumption prediction device based on a large model, characterized in that, include: An experience base generation module is used to generate an experience base based on natural gas user profiles, time characteristics, the performance of natural gas consumption prediction models, and interpretation reports; wherein, the experience base is used to store historical data on natural gas consumption and prediction model information; The preferred set determination module for prediction models is used to determine the preferred set of prediction models based on the feature vector of the current natural gas consumption prediction task and the experience base. The natural gas consumption prediction module is used to predict the natural gas consumption of the current natural gas consumption prediction task based on the natural gas consumption prediction results of each prediction model in the preferred set, the pre-generated large language model, and the pre-trained deep network.

8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the natural gas consumption prediction method based on a large model as described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the natural gas consumption prediction method based on a large model as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the natural gas consumption prediction method based on a large model as described in any one of claims 1 to 6.