Gas load prediction method and target gas load prediction model training method

By combining multiple sub-target prediction models and determining the model with target weights, the accuracy and stability problems in gas load prediction are solved, and more accurate and reliable gas load prediction is achieved.

CN120449652APending Publication Date: 2025-08-08BEIJING YAHUA WULIAN TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510505976.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing gas load prediction methods have problems with limited prediction accuracy and insufficient stability, especially when a single model is prone to deviations when facing complex data.

Method used

Multiple sub-objective prediction models are combined, and the model is determined through fusion processing and target weights, and the information of each sub-model is comprehensively used to adjust the weights dynamically to adapt to different situations.

Benefits of technology

It improves the accuracy and stability of gas load prediction, can better cope with complex and changeable actual situations, and meets the real-time scheduling needs of gas supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449652A_ABST
    Figure CN120449652A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of gas load prediction, in particular to a gas load prediction method and a target gas load prediction model training method. Acquiring historical gas load data corresponding to a preset historical duration before the future to-be-predicted duration; inputting the historical gas load data into a target gas load prediction model; the target gas load prediction model comprises at least two sub-target prediction models; and based on the sub-prediction results corresponding to the sub-target prediction models, determining predicted gas load data corresponding to the future to-be-predicted duration. The target gas load prediction model comprises at least two sub-target prediction models, and the combination of the multiple sub-target prediction models can complement each other, so that the risk caused by a single model is reduced. And by performing fusion processing on the plurality of sub-prediction results, information provided by each sub-target prediction model can be fully utilized, so that the final prediction result is more accurate and reasonable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas load prediction, and in particular to a gas load prediction method and a target gas load prediction model training method. Background Art

[0002] Gas, as an important energy source, is widely used in industrial production, residential life, and other fields. Accurately forecasting daily gas load is crucial for the scientific planning, efficient scheduling, and safe operation of gas supply systems. It helps gas companies rationally plan gas source procurement, optimize pipeline transportation, reduce operating costs, and ensure stable gas demand from users. However, current daily gas load forecasting faces a series of severe challenges.

[0003] In the field of daily gas load forecasting, simple statistical models and empirical methods, such as moving average and exponential smoothing, were initially used. These methods did not adequately exploit data features and resulted in limited forecasting accuracy. With technological advancements, advanced machine learning and deep learning models, such as neural networks and support vector machines, have been applied to gas load forecasting. However, single models often have limitations. For example, neural network training is prone to falling into local optimality, and support vector machines are inefficient in processing large amounts of data.

[0004] Therefore, how to accurately predict the gas load has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the present invention provides a gas load prediction method and a target gas load prediction model training method to solve the problem of how to accurately predict the gas load.

[0006] In a first aspect, the present invention provides a gas load forecasting method, the method comprising:

[0007] Obtain historical gas load data corresponding to a preset historical duration before the future duration to be predicted;

[0008] Inputting historical gas load data into a target gas load prediction model; the target gas load prediction model includes at least two sub-target prediction models;

[0009] Based on the sub-forecast results corresponding to each sub-target prediction model, the predicted gas load data corresponding to the future predicted time period is determined.

[0010] The gas load forecasting method provided in the embodiments of the present application obtains historical gas load data corresponding to a preset historical period prior to the future forecast period. This historical gas load data includes gas usage at different times and under different operating conditions. Collecting this data reveals patterns in gas load changes over time, such as seasonal fluctuations and differences between weekdays and weekends. These patterns form the basis for subsequent forecasts and provide rich information for the model to learn about gas load variations. For example, in winter, gas load typically increases significantly due to heating demand. By analyzing historical data, the model can learn about these seasonal trends, enabling more accurate forecasts of gas load for the coming winter. The historical gas load data is then input into a target gas load forecasting model, which includes at least two sub-target forecasting models. A single model may have limitations when dealing with complex gas load data. Using a single model can lead to significant deviations in forecast results when the data is anomaly or does not conform to model assumptions. Combining multiple sub-target forecasting models can complement each other and reduce the risks associated with a single model. Even if a sub-target prediction model deviates under specific circumstances, the prediction results of other sub-target prediction models may serve to correct and compensate for the deviation, making the target gas load prediction model more robust to various data conditions and changes, and improving the stability and reliability of the prediction. Based on the sub-prediction results corresponding to each sub-target prediction model, the predicted gas load data corresponding to the future forecast period is determined. By integrating the sub-prediction results of each sub-target prediction model, the one-sidedness of the prediction of a single model can be avoided. By fusing multiple sub-prediction results (such as weighted averaging and voting), the information provided by each sub-target prediction model can be fully utilized, making the final prediction result more accurate and reasonable. For example, in some cases, different sub-target prediction models may have different predicted values for future gas load. Through a reasonable fusion method, these differences can be comprehensively considered to obtain a prediction value that is more consistent with the actual situation, thereby improving the accuracy of the prediction.

[0011] In an optional embodiment, the target gas load forecasting model further includes a target weight determination model, which determines the forecast gas load data corresponding to the future forecast period based on the sub-forecast results corresponding to each sub-target forecasting model, including:

[0012] Obtain future meteorological characteristic data and future date characteristic data corresponding to the future time to be predicted;

[0013] Input each sub-forecast result, future meteorological characteristic data and future date characteristic data into the target weight determination model, and output the target weight corresponding to each sub-target prediction model;

[0014] Based on the weights of each target, the sub-forecast results are fused to determine the predicted gas load data corresponding to the future predicted time period.

[0015] The gas load forecasting method provided in the embodiments of the present application obtains future meteorological characteristic data and future date characteristic data corresponding to the predicted time period. This allows for improved prediction influencing factors. Furthermore, meteorological and date conditions are constantly changing. By understanding this information in advance, the target gas load forecasting model can promptly adjust its forecast direction. When it is known that temperatures will drop significantly in the coming days, the target gas load forecasting model can prioritize the impact of heating demand on gas load and adjust the forecast results accordingly, making the forecast more timely and accurate, meeting the requirements for real-time gas supply scheduling. Each sub-forecast result, future meteorological characteristic data, and future date characteristic data are input into a target weight determination model, which outputs target weights corresponding to each sub-target forecasting model. Different sub-target forecasting models perform differently in different situations. The target weight determination model dynamically adjusts the weights of each sub-target forecasting model based on the sub-forecast results, future meteorological characteristics, and date characteristics. Furthermore, gas load is complex and influenced by multiple factors. The target weight determination model integrates multi-source data and conducts in-depth analysis of the relationship between each factor and the predictive capabilities of the sub-target forecasting model to generate weights that are more realistic. In complex scenarios involving the overlap of extreme weather and special holidays, the model comprehensively considers various factors and rationally assigns weights, allowing the forecast model to adapt to complex and changing real-world conditions and improving forecast reliability. Based on the target weights, the sub-forecast results are fused to determine the predicted gas load data for the future forecast period. Fusion of the sub-forecast results using target weights leverages the strengths of each sub-forecast model. Furthermore, different sub-forecast models have varying sensitivities to data fluctuations, and the fused results balance these differences. Some sub-forecast models may experience significant fluctuations when experiencing data anomalies. Weighted fusion can mitigate the impact of these anomalies on the overall forecast. When individual data points deviate, the stable outputs of other sub-forecast models provide a counterbalance, ensuring stable forecast results and avoiding significant fluctuations in predicted values, thereby ensuring the stability and reliability of gas supply.

[0016] In a second aspect, the present invention provides a target gas load prediction model training method, the method comprising:

[0017] Obtain a training data set, which includes multiple sets of training data; each set of training data includes training history gas load data corresponding to the training history duration, training meteorological characteristic data, training date characteristic data, and real gas load data for the training prediction duration corresponding to the training history duration; the real gas load data is labeled data;

[0018] Based on the training data set, training at least two sub-initial prediction networks to obtain at least two sub-target prediction models;

[0019] Based on at least two sub-target prediction models, a target gas load prediction model is trained and obtained; the target gas load prediction model is the target gas load prediction model in the gas load prediction method of the first aspect or any corresponding embodiment thereof.

[0020] The target gas load forecasting model training method provided in an embodiment of the present application obtains a training dataset and, based on the training dataset, trains at least two sub-initial forecasting networks to obtain at least two sub-target forecasting models, thereby ensuring the accuracy of the at least two sub-target forecasting models obtained through training. The combination of multiple sub-target forecasting models can complement each other, reducing the risks associated with a single model. Even if a sub-target forecasting model deviates under specific circumstances, the prediction results of other sub-target forecasting models may serve to correct and compensate for the deviation, making the entire forecasting system more robust to various data conditions and changes. For example, when encountering sudden meteorological changes or special social activities that cause gas load fluctuations, a sub-target forecasting model may not be able to accurately predict, but other sub-target forecasting models may capture such changes and make corresponding adjustments, thereby ensuring the relative accuracy of the overall forecast results. A target gas load forecasting model is trained based on at least two sub-target forecasting models. Combining multiple sub-target forecasting models to train the target gas load forecasting model allows for the comprehensive utilization of the forecast information from each sub-target forecasting model. By fusing the results of multiple sub-target prediction models (e.g., weighted averaging, voting, etc.), we can avoid the one-sidedness of single-model predictions and fully leverage the strengths of each sub-target prediction model, thereby improving the accuracy and reliability of predictions. For example, in some cases, different sub-target prediction models may have different predicted values for future gas load. Through a reasonable fusion method, these differences can be comprehensively considered to obtain a prediction value that is more consistent with actual conditions. Moreover, during the training process, the weights of the sub-target prediction models in the target model can be dynamically adjusted based on their performance in different situations, further optimizing prediction performance.

[0021] In an optional embodiment, the target gas load prediction model further includes a target weight determination model, which is trained based on at least two sub-target prediction models to obtain the target gas load prediction model, including:

[0022] Obtain sub-virtual gas load data output by each sub-target prediction model based on each set of training data;

[0023] For each set of training data, based on the sub-virtual gas load data and the real gas load data, determine the evaluation indicators corresponding to each sub-target prediction model;

[0024] Input the evaluation index corresponding to each sub-target prediction model and the training meteorological characteristic data and training date characteristic data included in each training data into the initial weight determination network;

[0025] Training the initial weight determination network to obtain the target weight determination model;

[0026] Based on the sub-target prediction models and the target weight determination model, the target gas load prediction model is obtained.

[0027] The target gas load forecasting model training method provided in the embodiments of the present application obtains sub-virtual gas load data output by each sub-target forecasting model based on each set of training data. By obtaining the sub-virtual gas load data output by the sub-target forecasting model, the forecasting performance of each sub-target forecasting model when processing the training data can be intuitively understood. Due to differences in their algorithmic principles and learning characteristics, different sub-target forecasting models may produce different forecast results for the same training data. This sub-virtual gas load data provides basic data for subsequent accurate evaluation of the sub-target forecasting model performance, facilitating comparison of the difference between the predicted values of each sub-target forecasting model and the actual values, thereby clarifying the strengths and weaknesses of each sub-target forecasting model. For each set of training data, the evaluation index corresponding to each sub-target forecasting model is determined based on the sub-virtual gas load data and the actual gas load data, ensuring the accuracy of the evaluation index determined for each sub-target forecasting model. The evaluation index corresponding to each sub-target forecasting model, along with the training meteorological and date feature data included in each training data, is input into the initial weight determination network. This multi-factor input approach makes weight determination more adaptable. Gas load is dynamically influenced by multiple factors, and a single factor cannot fully reflect the actual situation. By integrating multi-factor information, the initial weight determination network can dynamically adjust the weights of each sub-target prediction model based on the characteristics of the training data. This ensures that the final target weights better align with actual gas load fluctuations, enhancing the predictive capability of the target gas load prediction model. The initial weight determination network is trained to obtain the target weight determination model. The trained target weight determination model exhibits improved stability. It maintains a relatively stable weight allocation strategy when exposed to varying training data, preventing significant weight fluctuations due to data fluctuations. This enables the target gas load prediction model to provide relatively stable and reliable prediction results in various complex situations in practical applications, providing strong support for gas supply planning and management. Based on the sub-target prediction models and the target weight determination model, the target gas load prediction model is derived. This fully leverages the strengths of each sub-target prediction model. The target weight determination model rationally assigns weights based on the performance and data characteristics of the sub-target prediction models, effectively fusing the prediction results of each sub-target prediction model. This fused prediction result comprehensively considers multiple factors and prediction information from different models, reducing the error of individual models. This significantly improves the prediction accuracy of the target gas load prediction model and more accurately reflects the actual future gas load situation.

[0028] In an optional embodiment, training the initial weight determination network to obtain a target weight determination model includes:

[0029] Randomly generate multiple initial weight vectors;

[0030] For each initial weight vector, target virtual gas load data is obtained based on the initial weight vector and the sub-virtual gas load data corresponding to each sub-target prediction model;

[0031] Based on the target virtual gas load data and the real gas load data, the fitness corresponding to the initial weight vector is calculated;

[0032] Based on the fitness corresponding to each initial weight vector, the initial weight determination network is trained to obtain a target weight determination model.

[0033] The target gas load forecasting model training method provided in the embodiments of the present application randomly generates multiple initial weight vectors. For each initial weight vector, target virtual gas load data is obtained based on the initial weight vector and the sub-virtual gas load data corresponding to each sub-target forecasting model. By applying the initial weight vector to the sub-virtual gas load data of each sub-target forecasting model, the overall forecasting effect under different weight combinations can be simulated. Each sub-target forecasting model has a different focus on gas load forecasting, and the initial weight vector determines their contribution to the final forecast result. This step can intuitively demonstrate how different weight assignments affect the overall forecast value, providing a basis for subsequent evaluation and selection of weight vectors. For example, if one initial weight vector gives a higher weight to a SARIMA model that excels at capturing trends, while another one excels at handling nonlinear relationships, the fitness of the initial weight vector is calculated based on the target virtual gas load data and the actual gas load data. By calculating the fitness based on the target virtual gas load data and the actual gas load data, the quality of each initial weight vector can be evaluated using a quantitative metric. By calculating the fitness, the advantages and disadvantages of different initial weight vectors can be clearly compared, providing an objective standard for subsequent selection and optimization of weight vectors. For example, initial weight vectors with low fitness values correspond to predictions that are closer to the true value, indicating that this weight combination performs better under the current training data. Based on the fitness corresponding to each initial weight vector, the initial weight determination network is trained to obtain the target weight determination model. Using the fitness of the initial weight vectors to train the initial weight determination network continuously adjusts the network's parameters to output more optimal weights. During training, the network learns the relationship between different initial weight vectors and their corresponding fitness values, gradually finding a more appropriate weight distribution. Furthermore, the trained target weight determination model more accurately assigns weights to each sub-target prediction model, thereby improving the prediction performance of the target gas load prediction model. Appropriate weight distribution allows sub-models that perform well in different situations to play a greater role in the overall prediction, preventing the advantages of certain sub-models from being lost due to inappropriate weighting. Ultimately, the target gas load prediction model can more accurately predict gas load, providing more reliable decision support for gas supply management.

[0034] In an optional embodiment, based on the fitness corresponding to each initial weight vector, the initial weight determination network is trained to obtain a target weight determination model, including:

[0035] Based on each fitness, each initial weight vector is divided into different levels;

[0036] Different selection methods are used for initial weight vectors at different levels, and candidate weight vectors are determined from each initial weight vector;

[0037] Perform cross-mutation operations on each candidate weight vector to generate a target weight vector;

[0038] Based on the fitness corresponding to each target weight vector, the initial weight determination network is trained to obtain a target weight determination model.

[0039] The target gas load prediction model training method provided in the embodiment of the present application divides each initial weight vector into different levels based on each fitness. By dividing the levels of the initial weight vectors by fitness, it is possible to clearly identify which weight vectors correspond to prediction results that are closer to the true value and which are relatively poor. Different selection methods are used for the initial weight vectors of different levels, and candidate weight vectors are determined from each initial weight vector, so that potential candidate weight vectors can be screened out more effectively. This hierarchical selection method can maintain the diversity of the population (weight vector set) while ensuring that the algorithm converges to a better solution. A crossover mutation operation is performed on each candidate weight vector to generate a target weight vector. The crossover operation can combine the excellent features of different candidate weight vectors to generate a new weight vector, and can also enable the algorithm to jump out of the local optimal solution. When the algorithm falls into a local optimum, some new solutions different from the current local optimal solution can be generated through crossover mutation, providing the algorithm with the opportunity to explore other possible better solutions. This operation can increase the diversity of the population, make the algorithm more flexible in the search process, and increase the probability of finding the global optimal solution. Based on the fitness corresponding to each target weight vector, the initial weight determination network is trained to obtain the target weight determination model. Using the fitness of the target weight vector to train the initial weight determination network allows the network to learn the relationship between different weight vectors and fitness, thereby adjusting the network parameters to output more optimal weights. Through continuous iterative training, the network can gradually optimize the weight allocation strategy and improve the prediction accuracy of the target gas load forecasting model.

[0040] The trained target weight determination model can assign more appropriate weights to each sub-target prediction model, allowing the target gas load prediction model to better integrate the strengths of each sub-model and improve overall prediction performance. This reasonable weight allocation dynamically adjusts the contribution of each sub-model to the forecast based on factors such as meteorological conditions and date characteristics, leading to more accurate gas load forecasts and providing a more reliable basis for gas supply scheduling and management.

[0041] In an optional embodiment, the initial weight vectors are divided into different levels based on the fitness, including:

[0042] Determine the initial weight vector whose fitness is greater than a first preset threshold as the first level;

[0043] Determine the initial weight vector whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold as the second level;

[0044] Determine the initial weight vector whose fitness is greater than the third preset threshold and less than or equal to the second preset threshold as the third level;

[0045] The initial weight vector whose fitness is greater than a fourth preset threshold and less than or equal to the third preset threshold is determined as the fourth level; wherein the first preset threshold is greater than the second preset threshold, the second preset threshold is greater than the third preset threshold, and the third preset threshold is greater than the fourth preset threshold.

[0046] The target gas load prediction model training method provided in the embodiment of the present application determines the initial weight vectors whose fitness is greater than the first preset threshold as the first level; the initial weight vectors whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold as the second level; the initial weight vectors whose fitness is greater than the third preset threshold and less than or equal to the second preset threshold as the third level; and the initial weight vectors whose fitness is greater than the fourth preset threshold and less than or equal to the third preset threshold as the fourth level. The first preset threshold is greater than the second preset threshold, the second preset threshold is greater than the third preset threshold, and the third preset threshold is greater than the fourth preset threshold. This ensures the accuracy of stratification of the initial weight vectors.

[0047] In an optional embodiment, different selection methods are used for initial weight vectors of different levels. According to each selection method, a target weight vector is generated based on each initial weight vector, including:

[0048] For each initial weight vector in the first level, adopt the all-retain selection method to determine each initial weight vector as a candidate weight vector;

[0049] For each initial weight vector in the second level, a roulette wheel selection method is used to perform weighted calculation on each initial weight vector using a preset weighting method to increase the probability of each initial weight vector being selected, and a candidate weight vector is selected from each initial weight vector;

[0050] For each initial weight vector in the third level, a tournament selection method is used to select a candidate weight vector from each initial weight vector;

[0051] For each initial weight vector in the fourth level, a complete deletion selection method is adopted to delete each initial weight vector.

[0052] The target gas load forecasting model training method provided in the embodiments of this application utilizes a retain-all selection method for each initial weight vector in the first level to identify each initial weight vector as a candidate weight vector. This ensures that the algorithm does not lose the currently found best solution, providing a solid foundation for subsequent model optimization. For each initial weight vector in the second level, a roulette wheel selection method is used to weight each initial weight vector using a preset weighting method, increasing the probability of each initial weight vector being selected, and then selecting candidate weight vectors from each initial weight vector. Roulette wheel selection itself provides each vector with a chance of being selected, and the preset weighting method further increases their probability of selection, giving these superior vectors more opportunities to participate in subsequent operations. This approach can fully leverage their prediction advantages and the effective weight distribution information they carry to improve the performance of the overall forecasting model. For example, in actual forecasting, certain vectors may be more accurate in predicting gas load under specific meteorological conditions. Increasing their probability of selection can enhance the model's forecasting capabilities under those conditions. For each initial weight vector in the third level, a tournament selection method is used to select candidate weight vectors from each initial weight vector. The tournament selection method selects the best vector from multiple randomly selected vectors at each stage, identifying relatively superior vectors within that stage as candidate weight vectors. This method can identify promising weight vectors within that stage. Even if these vectors don't perform particularly well overall, they may possess unique advantages in certain areas. Tournament selection can identify these superior vectors, providing more possibilities for subsequent optimization. A delete-all selection method is used to delete all initial weight vectors from the fourth stage. Deleting these vectors completely avoids unnecessary crossover and mutation calculations in subsequent operations, saving significant computing resources and time, and improving algorithm efficiency. Computational resources and time are crucial in large-scale gas load forecasting tasks. Deleting these low-quality vectors allows the algorithm to focus resources on more valuable vectors, improving overall optimization results.

[0053] In a third aspect, the present invention provides an electronic device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby execute the gas load prediction method of the first aspect or any corresponding embodiment thereof and the target gas load prediction model training method of the second aspect or any corresponding embodiment thereof.

[0054] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the gas load prediction method of the first aspect or any corresponding embodiment thereof and the target gas load prediction model training method of the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1 is a flow chart of a gas load forecasting method according to an embodiment of the present invention;

[0057] Figure 2 is a flow chart of another gas load forecasting method according to an embodiment of the present invention;

[0058] Figure 3 is a flow chart of a target gas load prediction model training method according to an embodiment of the present invention;

[0059] Figure 4 is a flow chart of another target gas load prediction model training method according to an embodiment of the present invention;

[0060] Figure 5 is a structural block diagram of a gas load prediction device according to an embodiment of the present invention;

[0061] Figure 6 is a structural block diagram of a target gas load prediction model training device according to an embodiment of the present invention;

[0062] Figure 7 FIG. 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0063] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0064] It should be noted that the method for gas load prediction provided in the embodiments of the present application may be executed by a gas load prediction device, which may be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware. The electronic device may be a server or a terminal. The server in the embodiments of the present application may be a single server or a server cluster composed of multiple servers. The terminal in the embodiments of the present application may be a smart phone, a personal computer, a tablet computer, a wearable device, an intelligent robot, or other intelligent hardware devices. In the following method embodiments, the execution subject is an electronic device as an example for explanation.

[0065] According to an embodiment of the present invention, an embodiment of a gas load forecasting method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0066] In this embodiment, a gas load prediction method is provided, which can be used in the above-mentioned electronic equipment. Figure 1 FIG. 1 is a flow chart of a gas load forecasting method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0067] Step S101: Obtain historical gas load data corresponding to a preset historical duration before the future duration to be predicted.

[0068] Specifically, the electronic device may receive historical gas load data corresponding to a preset historical duration before the future predicted duration input by the user, or may search for historical gas load data corresponding to a preset historical duration before the future predicted duration from a storage space.

[0069] The preset historical duration is longer than the future duration to be predicted. The future duration to be predicted can be one hour in the future, 12 hours in the future, or any other duration in the future. The preset historical duration can be one day, three days, a week, or any other duration before the future duration to be predicted. This embodiment of the application does not specifically limit the future duration to be predicted and the preset historical duration.

[0070] For example, if the future time period to be predicted is tomorrow, the electronic device may obtain corresponding historical gas load data within a week before tomorrow.

[0071] Step S102: inputting historical gas load data into a target gas load prediction model.

[0072] The target gas load prediction model includes at least two sub-target prediction models.

[0073] Specifically, the electronic device may input historical gas load data into at least two sub-target prediction models in the target gas load prediction model to obtain sub-prediction results output by the at least two sub-target prediction models.

[0074] Among them, the sub-target prediction model can be at least two of the ridge regression analysis (Ridge) model, seasonal autoregressive moving average model (SARIMA), support vector machine regression (SVR), extreme gradient boosting tree (XGBoost), long short-term memory network (LSTM), GM (1,1) model and BP neural network.

[0075] Among them, Ridge Regression Analysis (Ridge) is a biased estimation regression method used for collinear data analysis. It introduces a regularization factor based on ordinary least squares to adjust the regression coefficients to improve model stability and predictive ability. The Seasonal Autoregressive Moving Average (SARIMA) model builds on the ARIMA model by adding the ability to handle seasonal characteristics of time series. It can effectively capture seasonal and trend patterns in data and is suitable for predicting data with significant seasonal variations. Support Vector Machine Regression (SVR) is a machine learning algorithm based on statistical learning theory. It maps the input vector into a higher-dimensional space and finds an optimal hyperplane to achieve regression prediction of the data. It is effective in handling nonlinear problems. Extreme Gradient Boosting Trees (XGBoost) is an extension of the Gradient Boosting Machine (GBDT) algorithm. It offers advantages such as fast training speed, high prediction accuracy, and the ability to handle large-scale data. It builds a powerful predictive model by combining multiple weak learners. The Long Short-Term Memory (LSTM) network is a special type of recurrent neural network (RNN). By introducing a gating mechanism, it effectively addresses the vanishing and exploding gradient problems of traditional RNNs, thereby better capturing long-term dependencies in time series data. Genetic algorithm is an optimization algorithm that simulates natural selection and genetic mechanisms. It performs selection, crossover and mutation operations on the population and continuously iterates to find the optimal solution. It is often used to solve complex optimization problems, such as the determination of the weights of the combined prediction model in the present invention. The GM (1,1) model is a type of gray prediction model. It generates a data sequence with strong regularity by accumulating the original data, establishes a differential equation model, and thus predicts the data. It is suitable for prediction scenarios with small amounts of data and incomplete information, and can mine the potential patterns of the data. The BP neural network is a multi-layer feedforward network trained by the error back propagation algorithm. It is one of the most widely used neural networks. It consists of an input layer, a hidden layer, and an output layer. By adjusting the connection weights between neurons in each layer, the output of the network continuously approaches the expected value, and has a strong nonlinear mapping capability.

[0076] Step S103: Determine the predicted gas load data corresponding to the future predicted time period based on the sub-prediction results corresponding to each sub-target prediction model.

[0077] Specifically, the electronic device can perform fusion processing on the sub-prediction results output by each sub-target prediction model to determine the predicted gas load data corresponding to the future predicted time period.

[0078] This step will be described in detail below.

[0079] The gas load forecasting method provided in the embodiments of the present application obtains historical gas load data corresponding to a preset historical period prior to the future forecast period. This historical gas load data includes gas usage at different times and under different operating conditions. Collecting this data reveals patterns in gas load changes over time, such as seasonal fluctuations and differences between weekdays and weekends. These patterns form the basis for subsequent forecasts and provide rich information for the model to learn about gas load variations. For example, in winter, gas load typically increases significantly due to heating demand. By analyzing historical data, the model can learn about these seasonal trends, enabling more accurate forecasts of gas load for the coming winter. The historical gas load data is then input into a target gas load forecasting model, which includes at least two sub-target forecasting models. A single model may have limitations when dealing with complex gas load data. Using a single model can lead to significant deviations in forecast results when the data is anomaly or does not conform to model assumptions. Combining multiple sub-target forecasting models can complement each other and reduce the risks associated with a single model. Even if a sub-target prediction model deviates under specific circumstances, the prediction results of other sub-target prediction models may serve to correct and compensate for the deviation, making the target gas load prediction model more robust to various data conditions and changes, and improving the stability and reliability of the prediction. Based on the sub-prediction results corresponding to each sub-target prediction model, the predicted gas load data corresponding to the future forecast period is determined. By integrating the sub-prediction results of each sub-target prediction model, the one-sidedness of the prediction of a single model can be avoided. By fusing multiple sub-prediction results (such as weighted averaging and voting), the information provided by each sub-target prediction model can be fully utilized, making the final prediction result more accurate and reasonable. For example, in some cases, different sub-target prediction models may have different predicted values for future gas load. Through a reasonable fusion method, these differences can be comprehensively considered to obtain a prediction value that is more consistent with the actual situation, thereby improving the accuracy of the prediction.

[0080] In this embodiment, a gas load prediction method is provided, which can be used in the above-mentioned electronic equipment. Figure 2 FIG. 1 is a flow chart of a gas load forecasting method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0081] Step S201 : obtaining historical gas load data corresponding to a preset historical duration before the future duration to be predicted.

[0082] For details about this step, please refer to the above description of step S101 and will not be repeated here.

[0083] Step S202: inputting historical gas load data into a target gas load prediction model.

[0084] The target gas load prediction model includes at least two sub-target prediction models.

[0085] For details about this step, please refer to the above description of step S102 and will not be repeated here.

[0086] Step S203: Determine the predicted gas load data corresponding to the future predicted time period based on the sub-prediction results corresponding to each sub-target prediction model.

[0087] Specifically, the target gas load prediction model also includes a target weight determination model. The above step S203 may include the following steps:

[0088] Step S2031, obtaining future meteorological characteristic data and future date characteristic data corresponding to the future time period to be predicted.

[0089] Specifically, electronic devices can access future weather characteristic data corresponding to the forecasted time period based on the meteorological department's official website and data platform. This data includes basic meteorological elements such as temperature, humidity, wind speed, and air pressure. For example, the China Meteorological Administration's meteorological data sharing service network provides high-precision, wide-ranging forecast data covering basic meteorological elements such as temperature, humidity, wind speed, and air pressure, providing fundamental information for gas load forecasting.

[0090] Electronic devices can also obtain basic information about future dates, including the year, month, day, and weekday, based on common calendar databases, such as national standard calendars and third-party calendar APIs (such as calendar interfaces provided by aggregated data). Based on this basic information, special dates such as statutory holidays and compensatory holidays are marked to determine characteristic data for future dates. Some specialized industry databases further process date data based on the characteristics of the gas industry. For example, they can calculate the average changes in gas load during holidays in different years to facilitate reference for prediction models.

[0091] Step S2032: Input each sub-forecast result, future meteorological characteristic data, and future date characteristic data into the target weight determination model, and output the target weight corresponding to each sub-target prediction model.

[0092] Specifically, electronic devices can use methods such as splicing and weighted summation to integrate the sub-forecast results, future weather characteristic data, and future date characteristic data into a comprehensive feature vector. Then, built-in algorithms (such as neural networks and decision trees) analyze the feature vector to explore potential relationships between the data. If a neural network is used as the target weight determination model, the hidden layer neurons will perform complex nonlinear transformations on the fused features, extract key information, and analyze the degree of correlation between each sub-forecast result and the weather and date characteristics.

[0093] Based on the results of feature analysis, the target weight determination model calculates the target weight for each sub-target prediction model. The output target weight reflects the importance of each sub-target prediction model in the final prediction, ranging from 0 to 1 and summing to 1. Weight assignment is based on the model's learning and analysis of data, taking into account sub-model performance and the influence of external factors. Under specific meteorological and date conditions, if a sub-model's prediction is accurate, its weight will be increased; otherwise, it will be decreased. In scenarios with high summer temperatures and weekdays, sub-models that capture the changes in gas load caused by summer cooling and perform well on weekdays will be assigned higher weights.

[0094] Target weights are used to combine sub-forecast results to achieve more accurate daily gas load forecasts. Sub-model predictions with higher weights carry a larger weight in the final forecast, leveraging their strengths. For example, during the Spring Festival holiday, sub-models that best capture holiday gas usage characteristics are given higher weights. Their predictions play a leading role in the combined forecast, ensuring that the final forecast better reflects the gas load variations during the holiday, improving forecast accuracy and providing reliable support for gas supply management.

[0095] Step S2033: Based on the target weights, each sub-forecast result is fused to determine the predicted gas load data corresponding to the future predicted time period.

[0096] Specifically, the electronic device may perform an average calculation based on multiplying each sub-prediction result by the corresponding target weight to determine the predicted gas load data corresponding to the future predicted time period.

[0097] The gas load forecasting method provided in the embodiments of the present application obtains future meteorological characteristic data and future date characteristic data corresponding to the predicted time period. This allows for improved prediction influencing factors. Furthermore, meteorological and date conditions are constantly changing. By understanding this information in advance, the target gas load forecasting model can promptly adjust its forecast direction. When it is known that temperatures will drop significantly in the coming days, the target gas load forecasting model can prioritize the impact of heating demand on gas load and adjust the forecast results accordingly, making the forecast more timely and accurate, meeting the requirements for real-time gas supply scheduling. Each sub-forecast result, future meteorological characteristic data, and future date characteristic data are input into a target weight determination model, which outputs target weights corresponding to each sub-target forecasting model. Different sub-target forecasting models perform differently in different situations. The target weight determination model dynamically adjusts the weights of each sub-target forecasting model based on the sub-forecast results, future meteorological characteristics, and date characteristics. Furthermore, gas load is complex and influenced by multiple factors. The target weight determination model integrates multi-source data and conducts in-depth analysis of the relationship between each factor and the predictive capabilities of the sub-target forecasting model to generate weights that are more realistic. In complex scenarios involving the overlap of extreme weather and special holidays, the model comprehensively considers various factors and rationally assigns weights, allowing the forecast model to adapt to complex and changing real-world conditions and improving forecast reliability. Based on the target weights, the sub-forecast results are fused to determine the predicted gas load data for the future forecast period. Fusion of the sub-forecast results using target weights leverages the strengths of each sub-forecast model. Furthermore, different sub-forecast models have varying sensitivities to data fluctuations, and the fused results balance these differences. Some sub-forecast models may experience significant fluctuations when experiencing data anomalies. Weighted fusion can mitigate the impact of these anomalies on the overall forecast. When individual data points deviate, the stable outputs of other sub-forecast models provide a counterbalance, ensuring stable forecast results and avoiding significant fluctuations in predicted values, thereby ensuring the stability and reliability of gas supply.

[0098] According to an embodiment of the present invention, an embodiment of a target gas load prediction model training method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0099] In this embodiment, a target gas load prediction model training method is provided, which can be used for the above-mentioned electronic equipment. Figure 3 FIG. 1 is a flow chart of a gas load forecasting method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0100] Step S301: Obtain a training data set.

[0101] Among them, the training data set includes multiple groups of training data; each group of training data includes training historical gas load data corresponding to the training history duration, training meteorological feature data, training date feature data, and real gas load data of the training prediction duration corresponding to the training history duration; the real gas load data is label data.

[0102] Specifically, the electronic device may receive a training data set sent by other devices, or may receive a training data set input by a user.

[0103] For example, a set of training data includes training historical gas load data, training meteorological characteristic data, and training date characteristic data corresponding to January 1 to January 7, 2024, and actual gas load data corresponding to January 8, 2024. The electronic device can predict the actual gas load data corresponding to January 8, 2024, based on the training historical gas load data, training meteorological characteristic data, and training date characteristic data corresponding to January 1 to January 7, 2024.

[0104] Step S302: Based on the training data set, train at least two sub-initial prediction networks to obtain at least two sub-target prediction models.

[0105] Among them, the sub-target prediction model can be at least two of the ridge regression analysis (Ridge) model, seasonal autoregressive moving average model (SARIMA), support vector machine regression (SVR), extreme gradient boosting tree (XGBoost), long short-term memory network (LSTM), GM (1,1) model and BP neural network.

[0106] For example, for the Ridge Regression model, features used for prediction are extracted from the training dataset, including historical gas load data for a specific number of days before the prediction start date, historical gas load data for training around the corresponding date in the previous year, recent meteorological data, the type of weekday of the prediction day, and whether it is a holiday, to construct an input vector. These data are standardized to prevent the model training effect from being affected by differences in feature scales. Then, the model is constructed based on the Ridge Regression module of the Python Sklearn library, and the regularization strength parameter alpha is set (e.g., alpha = 10000). Regularization can effectively address data collinearity issues and make the model more stable. The prepared input vector and the corresponding real gas load data are used as the training set, and the model is trained by minimizing the loss function (e.g., the least squares method) to determine the coefficients of the sub-target prediction model corresponding to the Ridge Regression model. The Ridge Regression model can effectively handle the complex linear relationship between gas load and multiple factors. Even when there is collinearity in the data, it can provide relatively reliable coefficient estimates, avoid model overfitting, and provide a stable foundation for subsequent predictions.

[0107] For the Seasonal Autoregressive Moving Average (SARIMA) model, electronic equipment observes daily gas load time series data and plots the time series to determine the seasonal cycle (e.g., year, month, or week). If seasonality is present in the data, seasonal differencing is performed to remove the seasonal trend. Stationarity tests (e.g., ADF tests) are then performed. If not, differencing is continued until the data becomes stationary. A grid search or other optimization algorithm is then used to determine the model parameters, including the autoregressive order (p), differencing order (d), and moving average order (q), as well as the seasonal autoregressive order (P), seasonal differencing order (D), seasonal moving average order (Q), and seasonal period (S). These parameters are continuously adjusted to optimize the model fit for the training data. The processed data is then fed into the model for training, and the model makes predictions by learning the seasonal and trend characteristics of the data. The SARIMA model has a strong ability to capture gas load data with significant seasonality and trend. It can fully leverage the cyclical patterns in historical data to provide accurate trend analysis for gas load forecasting and excels in predicting future load fluctuations caused by seasonal changes.

[0108] Support Vector Machine Regression (SVR), based on the SVR module of the Python Sklearn library, uses mean squared error as its objective. The input vector, similar to ridge regression, includes historical training gas load data, gas weather data, and training date data (including holiday information). Kernel functions (such as Linear, Poly, RBF, and Sigmod) and parameters such as the penalty factor C, kernel coefficient gamma, and insensitive loss coefficient ε are dynamically selected through K-fold cross-validation. The training data is divided into multiple subsets, and training and validation are performed on different subsets. Parameters are continuously adjusted to minimize the model error on the validation set and find the optimal model parameter combination. The SVR model maps the data into a high-dimensional space and finds an optimal hyperplane to fit the data, thereby predicting gas load. The SVR model effectively handles nonlinear problems and has good adaptability to the complex nonlinear relationships in gas load forecasting. It can discover potential patterns in the data and has unique advantages in handling gas load forecasting under complex operating conditions.

[0109] For the extreme gradient boosting tree (XGBoost), the Python xgboost library was used to build a model, set general parameters (such as eta to control the shrinkage step size), built-in parameters (such as gamma to control the node splitting condition), and learning target parameters (such as objective = logistic). The input vector contains data such as recent load, weather, date type (distinguishing holidays), etc. Then, the parameter values are determined through k-fold cross-validation trials. The XGBoost model is based on the gradient boosting algorithm and continuously fits the residuals of the previous round of models to improve prediction performance. During the training process, the model automatically selects important features and accelerates the training process through parallel computing to improve training efficiency. XGBoost has high computational efficiency, can mine complex data features, and has good adaptability to large-scale data and complex model structures. When processing gas load data containing multiple factors, it can quickly analyze data features and provide accurate prediction results.

[0110] For this, a long short-term memory (LSTM) model is built using a deep learning framework such as TensorFlow or PyTorch. Historical daily gas load data is preprocessed into a format suitable for model input, divided into fixed-length sequence segments, and the date type (including holiday information) is encoded and processed as input features. Model hyperparameters are set, such as the number of hidden layer neurons, the number of layers, and the learning rate. The preprocessed data is then fed into the LSTM model for training. The LSTM effectively captures long-term data dependencies through a gating mechanism. During training, a backpropagation algorithm is used to calculate prediction errors and adjust model weights to continuously optimize model performance. The LSTM model has unique advantages in processing time series data. It can retain information over long periods of time and is highly capable of capturing long-term trends and cyclical changes in gas load data. This allows it to fully consider the long-term impact of historical data when forecasting future gas loads.

[0111] For the GM(1,1) model, the collected daily gas load data is accumulated and processed to construct the differential equation for the GM(1,1) model. The model parameters are estimated using the least squares method to obtain the model's specific expression. The model is tested for residual errors and correlation to ensure its reliability. If the model does not meet the test requirements, the data or model parameters are adjusted and retrained. The trained model is used to predict daily gas load. The GM(1,1) model can uncover potential patterns in the data and is particularly suitable for situations with limited data. The GM(1,1) model has low data requirements and can provide effective predictions even when data is insufficient. By exploring the inherent patterns in the data, it supplements gas load forecasting and can be combined with other models to improve overall forecasting effectiveness.

[0112] For BP neural networks, the network structure of the BP neural network is determined, including the number of input layer nodes (determined based on the characteristics of the input data), the number of hidden layer nodes (which can be determined through empirical formulas or trial-and-error methods), and the number of output layer nodes (usually the predicted daily gas load value). The connection weights between neurons in each layer are initialized using random number generation. Then, the preprocessed daily gas load data, meteorological data, and date type data are input into the network. The network output is calculated through forward propagation, and backpropagation is performed based on the error between the output and the true value to adjust the connection weights. After multiple iterative training, the network's prediction error is reduced to a minimum, thus achieving the prediction of daily gas load.

[0113] BP neural network has strong nonlinear mapping capabilities and can learn complex functional relationships. It performs well in processing the complex relationship between gas load and multiple factors. The accuracy of prediction can be improved through continuous training.

[0114] Step S303: Based on at least two sub-target prediction models, a target gas load prediction model is trained to obtain the target gas load prediction model.

[0115] The target gas load prediction model is the target gas load prediction model in the gas load prediction method in any one of the above-mentioned implementation modes.

[0116] Specifically, based on at least two sub-target prediction models, a target weight determination model is trained, thereby training a target gas load prediction model.

[0117] This step will be described in detail below.

[0118] The target gas load forecasting model training method provided in an embodiment of the present application obtains a training dataset and, based on the training dataset, trains at least two sub-initial forecasting networks to obtain at least two sub-target forecasting models, thereby ensuring the accuracy of the at least two sub-target forecasting models obtained through training. The combination of multiple sub-target forecasting models can complement each other, reducing the risks associated with a single model. Even if a sub-target forecasting model deviates under specific circumstances, the prediction results of other sub-target forecasting models may serve to correct and compensate for the deviation, making the entire forecasting system more robust to various data conditions and changes. For example, when encountering sudden meteorological changes or special social activities that cause gas load fluctuations, a sub-target forecasting model may not be able to accurately predict, but other sub-target forecasting models may capture such changes and make corresponding adjustments, thereby ensuring the relative accuracy of the overall forecast results. A target gas load forecasting model is trained based on at least two sub-target forecasting models. Combining multiple sub-target forecasting models to train the target gas load forecasting model allows for the comprehensive utilization of the forecast information from each sub-target forecasting model. By fusing the results of multiple sub-target prediction models (e.g., weighted averaging, voting, etc.), we can avoid the one-sidedness of single-model predictions and fully leverage the strengths of each sub-target prediction model, thereby improving the accuracy and reliability of predictions. For example, in some cases, different sub-target prediction models may have different predicted values for future gas load. Through a reasonable fusion method, these differences can be comprehensively considered to obtain a prediction value that is more consistent with actual conditions. Moreover, during the training process, the weights of the sub-target prediction models in the target model can be dynamically adjusted based on their performance in different situations, further optimizing prediction performance.

[0119] In this embodiment, a target gas load prediction model training method is provided, which can be used for the above-mentioned electronic equipment. Figure 4 FIG. 1 is a flow chart of a gas load forecasting method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0120] Step S401: Obtain a training data set.

[0121] Among them, the training data set includes multiple groups of training data; each group of training data includes training historical gas load data corresponding to the training history duration, training meteorological feature data, training date feature data, and real gas load data of the training prediction duration corresponding to the training history duration; the real gas load data is label data.

[0122] For details about this step, please refer to the above description of step S301 and will not be repeated here.

[0123] Step S402: Based on the training data set, train at least two sub-initial prediction networks to obtain at least two sub-target prediction models.

[0124] For details about this step, please refer to the above description of step S401 and will not be repeated here.

[0125] Step S403: Based on at least two sub-target prediction models, a target gas load prediction model is trained to obtain the target gas load prediction model.

[0126] The target gas load prediction model is the target gas load prediction model in the gas load prediction method in any one of the above-mentioned implementation modes.

[0127] Specifically, the target gas load prediction model also includes a target weight determination model. The above step S403 may include the following steps:

[0128] Step S4031: obtaining sub-virtual gas load data output by each sub-target prediction model based on each set of training data.

[0129] Specifically, the electronic device inputs each set of training data into each sub-target prediction model, and each sub-target prediction model extracts features from each set of training data and outputs sub-virtual gas load data corresponding to each set of training data.

[0130] Step S4032: for each set of training data, based on the sub-virtual gas load data and the real gas load data, determine the evaluation index corresponding to each sub-target prediction model.

[0131] Specifically, the electronic device can calculate the loss value between the sub-virtual gas load data and the actual gas load data based on at least one of the following methods: mean relative error (MAPE), root mean square error (RMSE), grey correlation, correlation coefficient, and Theil's inequality coefficient. Each loss value is then normalized. Common normalization methods include min-max scaling and Z-score normalization.

[0132] After normalizing each loss value, the normalized loss value is compared with the preset loss value threshold. Normalized loss values that are less than the preset loss value threshold are deleted. The remaining normalized loss values are then weighted averaged to obtain the evaluation index corresponding to each sub-goal prediction model.

[0133] Step S4033: Input the evaluation index corresponding to each sub-target prediction model and the training meteorological feature data and training date feature data included in each training data into the initial weight determination network.

[0134] Specifically, the electronic device inputs the evaluation index corresponding to each sub-target prediction model and the training meteorological feature data and training date feature data included in each training data into the initial weight determination network.

[0135] Step S4034: train the initial weight determination network to obtain a target weight determination model.

[0136] Specifically, the above step S4034 may include the following steps:

[0137] Step a1: randomly generate multiple initial weight vectors.

[0138] Specifically, the electronic device may randomly generate a plurality of initial weight vectors, wherein the dimension of each initial weight vector is consistent with the number of sub-goal prediction models.

[0139] Step a2: for each initial weight vector, based on the initial weight vector and the sub-virtual gas load data corresponding to each sub-target prediction model, obtain target virtual gas load data.

[0140] Specifically, for each initial weight vector, the electronic device performs weighted averaging based on the initial weight vector and the sub-virtual gas load data corresponding to each sub-target prediction model to obtain target virtual gas load data.

[0141] Step a3: Calculate the fitness corresponding to the initial weight vector based on the target virtual gas load data and the real gas load data.

[0142] Specifically, the electronic device can calculate the loss value between the target virtual gas load data and the actual gas load data based on at least one of the following methods: mean relative error (MAPE), root mean square error (RMSE), grey correlation, correlation coefficient, and Theil's inequality coefficient. Each loss value is then normalized. Common normalization methods include min-max scaling and Z-score normalization.

[0143] After normalizing each loss value, the normalized loss value is compared with a preset loss value threshold. Normalized loss values that are less than the preset loss value threshold are deleted. The remaining normalized loss values are then weighted averaged to obtain the fitness corresponding to the initial weight vector.

[0144] Step a4: Based on the fitness corresponding to each initial weight vector, the initial weight determination network is trained to obtain a target weight determination model.

[0145] Specifically, the above step a4 may include the following steps:

[0146] Step a41: Based on the fitness, the initial weight vectors are divided into different levels.

[0147] Specifically, the above step a41 may include the following steps:

[0148] Step a411: determine the initial weight vector with a fitness greater than a first preset threshold as the first level.

[0149] Specifically, the electronic device determines the initial weight vector with a fitness greater than a first preset threshold as the first level.

[0150] Step a412: Determine the initial weight vectors whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold as the second level.

[0151] Specifically, the electronic device determines the initial weight vector whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold as the second level.

[0152] Step a413: Determine the initial weight vectors whose fitness is greater than the third preset threshold and less than or equal to the second preset threshold as the third level.

[0153] Specifically, the electronic device determines the initial weight vector whose fitness is greater than the third preset threshold and less than or equal to the second preset threshold as the third level.

[0154] In step a414, the initial weight vectors whose fitness is greater than the fourth preset threshold and less than or equal to the third preset threshold are determined as the fourth level.

[0155] The first preset threshold is greater than the second preset threshold, the second preset threshold is greater than the third preset threshold, and the third preset threshold is greater than the fourth preset threshold.

[0156] Specifically, the electronic device determines the initial weight vector whose fitness is greater than the fourth preset threshold and less than or equal to the third preset threshold as the fourth level.

[0157] Step a42: Different selection methods are used for initial weight vectors at different levels to determine candidate weight vectors from each initial weight vector.

[0158] Specifically, the above step a42 may include the following steps:

[0159] In step a421 , for each initial weight vector in the first level, a retain-all selection method is used to determine each initial weight vector as a candidate weight vector.

[0160] Specifically, for each initial weight vector in the first level, the electronic device adopts a full retention selection method to determine each initial weight vector in the first level as a candidate weight vector.

[0161] In step a422, a roulette wheel selection method is used to perform weighted calculation on each initial weight vector in the second level by a preset weighting method to increase the probability of each initial weight vector being selected, and a candidate weight vector is selected from each initial weight vector.

[0162] Specifically, roulette wheel selection is a probability-based selection method, figuratively similar to roulette gambling. In this method, the probability of each individual (here, the initial weight vector) being selected is proportional to its fitness. Imagine a roulette wheel divided into several sectors, each corresponding to an individual, and its area is proportional to the individual's fitness. When the wheel is spun, the probability of the pointer pointing to a certain sector represents the probability of that individual being selected. Initially, individuals with high fitness occupy a large sector on the wheel and have a high probability of being selected; individuals with low fitness occupy a small sector and have a low probability of being selected.

[0163] To further emphasize the advantages of the initial weight vectors in the second level, a preset weighting scheme is used. Specifically, the fitness of each initial weight vector is increased by performing a mathematical operation (such as multiplying it by a coefficient greater than 1 or performing an exponential operation). This weighted fitness increases the "area" of these vectors in the roulette wheel selection when calculating the selection probability, thereby increasing their probability of being selected.

[0164] For example, suppose there are three initial weight vectors V1, V2, and V3 at the second level, and their original fitness values are f1, f2, and f3, respectively. Using a preset weighting method, their fitness values are adjusted to f1′=k1×f1, f2=k2×f2, and f3′=k3×f3 (k1, k2, and k3 are weighting coefficients greater than 1). The adjusted selection probability is then calculated. It can be seen that after weighting, the selection probability of each vector has changed and has increased relative to the original probability.

[0165] After calculating the weighted selection probabilities for each initial weight vector, the roulette wheel selection process begins. A random number r is generated in the interval [0, 1], and the selection probabilities of each vector are accumulated. When the accumulated sum exceeds r, the corresponding initial weight vector is selected as a candidate weight vector. This process is repeated until the required number of candidate weight vectors are selected.

[0166] For example, suppose the selection probabilities for the three initial weight vectors V1, V2, and V3 have been calculated as p1′ = 0.3, p2′ = 0.5, and p3′ = 0.2, respectively. A random number r = 0.4 is generated and p1′ is first added. 0.3 < 0.4. Continuing to add p1′ + p2′ = 0.3 + 0.5 = 0.8 > 0.4, V2 is selected. Random numbers can then be generated again for the next round of selection until the required number of candidate weight vectors is met.

[0167] This selection method for the second-level initial weight vectors fully utilizes the good weight distribution information already present in these vectors. By increasing their probability of selection, these vectors are given more opportunities to participate in subsequent model optimization processes (such as crossover and mutation operations), further tapping into their potential and improving the model's predictive performance. Furthermore, the inherent randomness of roulette wheel selection maintains the diversity of the population (the set of initial weight vectors) and prevents the algorithm from prematurely falling into a local optimum. Combining pre-set weighting with roulette wheel selection leverages the advantages of the second-level vectors while also balancing diversity, helping to achieve better balance and effectiveness during model optimization.

[0168] Step a423 : For each initial weight vector in the third level, a tournament selection method is used to select a candidate weight vector from each initial weight vector.

[0169] Specifically, the tournament selection method simulates the tournament mechanism used in sports competitions. The basic idea is to randomly select a certain number of individuals (initial weight vectors) from a population (here, the set of initial weight vectors at the third level) and "compete" them. This involves comparing their fitness, with the individuals with higher fitness winning and being selected as candidate weight vectors. This process is then repeated until a sufficient number of candidate weight vectors are selected.

[0170] First, the number of initial weight vectors participating in each "tournament" must be determined. This number is called the tournament size and is typically denoted by k. The value of k can be set based on the specific problem and experience. Generally, a value between 2 and half the group size is common. For example, if there are 20 initial weight vectors in the third level, k can be set to 5, meaning that 5 vectors are randomly selected from the 20 for comparison each time. Randomly select participants: K vectors are randomly drawn from the initial weight vectors in the third level as participants in each "tournament." For example, the first random draw might yield vectors V1, V2, V3, V4, and V5. Compare fitness and select a winner: The fitness of these k participating initial weight vectors is compared. Fitness is typically calculated based on performance metrics of the gas load forecasting model, such as mean relative error (MAPE) and root mean square error (RMSE). A smaller fitness value indicates better performance in the model (because the goal is to minimize the error). Assume that among these five vectors, V3 has the lowest fitness, meaning that it performs best in the prediction model relative to the other five. In this case, V3 is the winner of this "competition" and is selected as the candidate weight vector. Repeat the above steps, randomly selecting k initial weight vectors for the "competition" and selecting the winner, until a sufficient number of candidate weight vectors are selected. For example, to select 10 candidate weight vectors, 10 such "competitions" are required.

[0171] The tournament selection method for the initial weight vectors of the third level has the following important implications and benefits. On the one hand, it can select relatively superior vectors as candidates through comparison and screening among relatively inferior weight vectors, helping to tap into the potential useful information in these vectors and providing more possibilities for model optimization. On the other hand, the tournament selection method is somewhat random and competitive. Unlike a simple fitness-based ranking selection method that focuses solely on the optimal individuals, it instead uses random grouping competition to give individuals with slightly lower fitness but certain characteristics more opportunities to be selected. This maintains population diversity, prevents the algorithm from prematurely converging to a local optimal solution, and facilitates the search for more optimal weight combinations in a wider space, improving the accuracy and generalization capabilities of the gas load forecasting model.

[0172] In step a424 , all initial weight vectors in the fourth level are deleted using a complete deletion selection method.

[0173] Specifically, for each initial weight vector in the fourth level, the electronic device uses a complete deletion selection method to delete each initial weight vector in the fourth level.

[0174] Step a43: Perform a crossover mutation operation on each candidate weight vector to generate a target weight vector.

[0175] Specifically, the electronic device can randomly select two candidate weight vectors as parents from the set of candidate weight vectors, assuming that the two parent weight vectors are A = [a1, a2, …, an] and B = [b1, b2, …, bn], where n is the dimension of the weight vector, corresponding to the number of sub-target prediction models.

[0176] The electronic device randomly determines one or more crossover points and divides the weight vector into different parts. For example, for two-dimensional weight vectors A = [a1, a2] and B = [b1, b2], if the crossover point is determined to be the first position, the vector is divided into two parts. Based on the crossover point, some genes of the two parent weight vectors are swapped. In the previous example, this swap generates two child weight vectors, C = [a1, b2] and D = [b1, a2]. In practical applications, for higher-dimensional weight vectors, there can be multiple crossover points, swapping even more genes. The electronic device then repeats the above process of selecting parents, determining crossover points, and swapping genes, performing a crossover operation on multiple candidate weight vectors to generate multiple child weight vectors. The crossover operation combines the features of different candidate weight vectors to generate new weight combinations. These new combinations may contain more optimal weight allocation schemes, resulting in better performance of the combined prediction model in gas load forecasting. The crossover operation expands the search range of the weight space, increasing the likelihood of finding the global optimal solution.

[0177] Mutation is the process of randomly changing one or more genes (weight values) in a weight vector to introduce new genetic features. Mutation can cause the weight vector to deviate from its original state to a certain extent, thereby breaking out of the local optimal solution and exploring unexplored areas in the weight space.

[0178] The specific process of mutation operation:

[0179] The electronic device can randomly select a weight vector as a mutant from the offspring weight vectors obtained after the crossover operation (which may also include candidate weight vectors that did not participate in the crossover operation), assuming E = [e1, e2, …, e3]. One or more mutation positions are randomly determined, that is, the positions of the weight values to be changed. For example, for a three-dimensional weight vector E = [e1, e2, e3], if the mutation position is determined to be the second position, the weight value at the selected position is randomly changed. The original weight value can be replaced by a new value randomly generated within a certain range. For example, if the original e2 = 0.3, and a new value of 0.6 is randomly generated within the range [0, 1], the mutated weight vector is E′ = [e1, 0.6, e3]. Multiple weight vectors can be mutated to increase their diversity. Mutation operations can introduce new changes to the weight vectors, preventing the algorithm from falling into a local optimal solution. In gas load forecasting, due to the complexity of the problem, there may be multiple local optimal solutions. Mutation operations can give the algorithm the opportunity to jump out of these local optimal areas and explore better weight combinations, thereby improving the prediction accuracy and generalization ability of the model.

[0180] After the crossover and mutation operations, the resulting offspring weight vectors are the target weight vectors. These target weight vectors, with their new weight combinations and characteristics, are used for subsequent model training and evaluation. By calculating the fitness corresponding to these target weight vectors (for example, based on the prediction error of the gas load forecasting model), we can further screen for more optimal weight vectors and continuously optimize the performance of the gas load forecasting model.

[0181] Step a44: Based on the fitness corresponding to each target weight vector, the initial weight determination network is trained to obtain a target weight determination model.

[0182] Specifically, the electronic device can calculate the fitness corresponding to each target weight vector, and then, based on the fitness corresponding to each target weight vector, perform fitness on the parameters of the initial weight determination network until the preset number of iterations reaches a certain value or the fitness value converges to a certain accuracy, thereby obtaining a target weight determination model.

[0183] Step S4035: Obtain a target gas load prediction model based on each sub-target prediction model and the target weight determination model.

[0184] Specifically, the electronic device combines each sub-target prediction model with a target weight determination model. This is done by weighting the prediction results of each sub-target prediction model according to the weights in the target weight vector to obtain the final target gas load forecast value. Assuming there are n sub-target prediction models, M1, M2, …, Mn, with their corresponding prediction results y1, y2, …, yn, and the target weight vector W = [w1, w2, …, wn], the calculation formula for the target gas load prediction model Y is: Y = w1y1 + w2y2 + … + wnyn.

[0185] The target gas load forecasting model training method provided in the embodiments of the present application obtains sub-virtual gas load data output by each sub-target forecasting model based on each set of training data. By obtaining the sub-virtual gas load data output by the sub-target forecasting model, the forecasting performance of each sub-target forecasting model when processing the training data can be intuitively understood. Due to differences in their algorithmic principles and learning characteristics, different sub-target forecasting models may produce different forecast results for the same training data. This sub-virtual gas load data provides basic data for subsequent accurate evaluation of the sub-target forecasting model performance, facilitating comparison of the difference between the predicted values of each sub-target forecasting model and the actual values, thereby clarifying the strengths and weaknesses of each sub-target forecasting model. For each set of training data, the evaluation index corresponding to each sub-target forecasting model is determined based on the sub-virtual gas load data and the actual gas load data, ensuring the accuracy of the evaluation index determined for each sub-target forecasting model. The evaluation index corresponding to each sub-target forecasting model, along with the training meteorological and date feature data included in each training data, is input into the initial weight determination network. This multi-factor input approach makes weight determination more adaptable. Gas load is dynamically influenced by multiple factors, and a single factor cannot fully reflect the actual situation. By integrating multi-factor information, the initial weight determination network can dynamically adjust the weights of each sub-target prediction model according to different training data characteristics, so that the final target weight is more in line with the actual gas load change scenario, thereby enhancing the prediction ability of the target gas load prediction model.

[0186] Next, multiple initial weight vectors are randomly generated. For each initial weight vector, the target virtual gas load data is obtained based on the initial weight vector and the corresponding sub-virtual gas load data of each sub-target prediction model. By applying the initial weight vector to the sub-virtual gas load data of each sub-target prediction model, the overall prediction effect under different weight combinations can be simulated. Each sub-target prediction model has different priorities for gas load prediction, and the initial weight vector determines their contribution to the final prediction result. This step visually demonstrates how different weight assignments affect the overall prediction value, providing a basis for subsequent evaluation and selection of weight vectors. For example, one initial weight vector may give a higher weight to a SARIMA model that excels at capturing trends, while another may excel at handling nonlinear relationships. Based on the target virtual gas load data and the actual gas load data, the fitness of the initial weight vector is calculated. Calculating the fitness based on the target virtual gas load data and the actual gas load data allows a quantitative metric to be used to evaluate the quality of each initial weight vector. By calculating the fitness, the advantages and disadvantages of different initial weight vectors can be clearly compared, providing an objective standard for subsequent selection and optimization of weight vectors. For example, the prediction result corresponding to the initial weight vector with a low fitness value is closer to the true value, indicating that the weight combination performs better under the current training data. The initial weight vector whose fitness is greater than the first preset threshold is determined to be the first level; the initial weight vector whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold is determined to be the second level; the initial weight vector whose fitness is greater than the third preset threshold and less than or equal to the second preset threshold is determined to be the third level; the initial weight vector whose fitness is greater than the fourth preset threshold and less than or equal to the third preset threshold is determined to be the fourth level. The accuracy of stratification of each initial weight vector is guaranteed. By dividing the levels of the initial weight vectors by fitness, it is possible to clearly identify which weight vectors correspond to prediction results that are closer to the true value and which are relatively poor. For each initial weight vector in the first level, the all-retention selection method is adopted to determine each initial weight vector as a candidate weight vector, thereby ensuring that the algorithm will not lose the best solution currently found, providing a solid foundation for subsequent model optimization. A roulette wheel selection method is used to weight each initial weight vector in the second level using a preset weighting method. This method increases the probability of selection and selects candidate weight vectors from among these initial weight vectors. While roulette wheel selection itself provides each vector with a chance of selection, the preset weighting method further increases their probability of selection, giving these superior vectors greater opportunities to participate in subsequent operations. This method fully leverages their predictive strengths and the effective weight distribution information they carry, improving the performance of the overall prediction model.For example, in actual forecasting, certain vectors may be more accurate for predicting gas load under specific meteorological conditions. Increasing their selection probability can enhance the model's forecasting capabilities under these conditions. A tournament selection method is used to select candidate weight vectors from each initial weight vector in the third level. This method selects the best vector from multiple randomly selected vectors at each selection, identifying relatively superior vectors within this level as candidate weight vectors. This method can identify promising weight vectors within this level. Even if these vectors do not perform particularly well overall, they may possess unique advantages in certain areas. Tournament selection can identify these superior vectors, providing more possibilities for subsequent optimization. A complete deletion method is used to delete all initial weight vectors in the fourth level. Deleting these vectors avoids unnecessary crossover and mutation calculations in subsequent operations, saving significant computing resources and time, and improving algorithm efficiency. Computing resources and time are crucial in large-scale gas load forecasting tasks. Deleting these low-quality vectors allows the algorithm to focus resources on more valuable vectors, improving overall optimization results.

[0187] A crossover mutation operation is performed on each candidate weight vector to generate a target weight vector. This crossover operation combines the best features of different candidate weight vectors to produce a new weight vector and allows the algorithm to escape from a local optimum. When the algorithm is stuck in a local optimum, crossover mutation can generate new solutions that differ from the current local optimum, providing the algorithm with the opportunity to explore other potentially more optimal solutions. This operation increases the diversity of the population, making the algorithm more flexible during the search process and improving the probability of finding the global optimal solution. Based on the fitness corresponding to each target weight vector, the initial weight determination network is trained to obtain the target weight determination model. Using the fitness of the target weight vector to train the initial weight determination network allows the network to learn the relationship between different weight vectors and fitness, thereby adjusting the network parameters to output more optimal weights. Through continuous iterative training, the network can gradually optimize the weight allocation strategy and improve the prediction accuracy of the target gas load forecasting model.

[0188] The trained target weight determination model can assign more appropriate weights to each sub-target prediction model, allowing the target gas load prediction model to better integrate the strengths of each sub-model and improve overall prediction performance. This reasonable weight allocation dynamically adjusts the contribution of each sub-model to the forecast based on factors such as meteorological conditions and date characteristics, leading to more accurate gas load forecasts and providing a more reliable basis for gas supply scheduling and management.

[0189] This embodiment also provides a gas load forecasting device and a target gas load forecasting model training device. These devices are used to implement the above-mentioned embodiments and preferred embodiments, and details already described are omitted. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0190] This embodiment provides a gas load prediction device, such as Figure 5 As shown, including:

[0191] The first acquisition module 501 is used to obtain historical gas load data corresponding to a preset historical time period before the future predicted time period;

[0192] An input module 502 is configured to input historical gas load data into a target gas load prediction model; the target gas load prediction model includes at least two sub-target prediction models;

[0193] The determination module 503 is used to determine the predicted gas load data corresponding to the future predicted time period based on the sub-prediction results corresponding to each sub-target prediction model.

[0194] This embodiment provides a target gas load prediction model training device, such as Figure 6 As shown, including:

[0195] The second acquisition module 601 is used to obtain a training data set, which includes multiple sets of training data; each set of training data includes training history gas load data corresponding to the training history duration, training meteorological characteristic data, training date characteristic data, and real gas load data for the training prediction duration corresponding to the training history duration; the real gas load data is label data;

[0196] A first training module 602 is configured to train at least two sub-initial prediction networks based on a training data set to obtain at least two sub-target prediction models;

[0197] The second training module 603 is used to train a target gas load prediction model based on at least two sub-target prediction models; the target gas load prediction model is the target gas load prediction model in the gas load prediction method in any one of the above implementations.

[0198] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0199] The gas load prediction device and the target gas load prediction model training device in this embodiment are presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0200] An embodiment of the present invention further provides an electronic device having the above Figure 5 The gas load forecasting device shown and Figure 6 The target gas load prediction model training device shown.

[0201] See also Figure 7 , Figure 7 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0202] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0203] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0204] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0205] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0206] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The bus connection is taken as an example.

[0207] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0208] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0209] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0210] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A gas load forecasting method, characterized in that: The method comprises: Obtain historical gas load data corresponding to a preset historical duration before the future duration to be predicted; Inputting the historical gas load data into a target gas load prediction model; the target gas load prediction model includes at least two sub-target prediction models; Based on the sub-forecast results corresponding to the sub-target prediction models, the predicted gas load data corresponding to the future predicted time period is determined.

2. The method according to claim 1, characterized in that The target gas load prediction model further includes a target weight determination model, which determines the predicted gas load data corresponding to the future predicted time period based on the sub-prediction results corresponding to each of the sub-target prediction models, including: Obtaining future meteorological characteristic data and future date characteristic data corresponding to the future time to be predicted; Inputting each of the sub-forecast results, the future meteorological characteristic data, and the future date characteristic data into the target weight determination model, and outputting the target weight corresponding to each of the sub-target prediction models; Based on the target weights, the sub-forecast results are fused to determine the predicted gas load data corresponding to the future predicted time period.

3. A target gas load prediction model training method, characterized in that: The method comprises: Obtain a training data set, wherein the training data set includes multiple groups of training data; each group of training data includes training history gas load data corresponding to the training history duration, training meteorological characteristic data, training date characteristic data, and real gas load data of the training prediction duration corresponding to the training history duration; the real gas load data is label data; Based on the training data set, training at least two sub-initial prediction networks to obtain at least two sub-target prediction models; Based on at least two of the sub-target prediction models, a target gas load prediction model is trained; the target gas load prediction model is the target gas load prediction model in the gas load prediction method described in any one of claims 1-2.

4. The method according to claim 3, characterized in that The target gas load prediction model further includes a target weight determination model, which is trained based on at least two of the sub-target prediction models to obtain the target gas load prediction model, including: Obtaining sub-virtual gas load data output by each sub-target prediction model based on each group of training data; For each group of the training data, based on the sub-virtual gas load data and the real gas load data, determining an evaluation index corresponding to each sub-target prediction model; Inputting the evaluation index corresponding to each sub-target prediction model and the training meteorological characteristic data and training date characteristic data included in each training data into an initial weight determination network; Training the initial weight determination network to obtain the target weight determination model; Based on each of the sub-target prediction models and the target weight determination model, the target gas load prediction model is obtained.

5. The method according to claim 4, characterized in that The training of the initial weight determination network to obtain the target weight determination model includes: Randomly generate multiple initial weight vectors; For each of the initial weight vectors, target virtual gas load data is obtained based on the initial weight vector and the sub-virtual gas load data corresponding to each of the sub-target prediction models; Calculating the fitness corresponding to the initial weight vector based on the target virtual gas load data and the real gas load data; Based on the fitness corresponding to each of the initial weight vectors, the initial weight determination network is trained to obtain the target weight determination model.

6. The method according to claim 5, characterized in that The training of the initial weight determination network based on the fitness corresponding to each of the initial weight vectors to obtain the target weight determination model includes: Based on the fitness, the initial weight vectors are divided into different levels; Using different selection methods for the initial weight vectors at different levels, and determining candidate weight vectors from each of the initial weight vectors; Performing a crossover mutation operation on each of the candidate weight vectors to generate a target weight vector; Based on the fitness corresponding to each of the target weight vectors, the initial weight determination network is trained to obtain the target weight determination model.

7. The method according to claim 6, characterized in that Based on the fitness, the initial weight vectors are divided into different levels, including: Determine the initial weight vector whose fitness is greater than a first preset threshold as a first level; Determine the initial weight vector whose fitness is greater than the second preset threshold and less than or equal to the first preset threshold as the second level; Determine the initial weight vector whose fitness is greater than a third preset threshold and less than or equal to the second preset threshold as a third level; The initial weight vector whose fitness is greater than a fourth preset threshold and less than or equal to a third preset threshold is determined as a fourth level; wherein the first preset threshold is greater than the second preset threshold, the second preset threshold is greater than the third preset threshold, and the third preset threshold is greater than the fourth preset threshold.

8. The method according to claim 7, characterized in that The adopting different selection methods for the initial weight vectors of different levels, and generating a target weight vector based on each initial weight vector according to each selection method, includes: For each of the initial weight vectors in the first level, adopt a retain-all selection method to determine each of the initial weight vectors as a candidate weight vector; For each of the initial weight vectors in the second level, a roulette wheel selection method is used to perform weighted calculation on each of the initial weight vectors using a preset weighting method to increase the probability of each of the initial weight vectors being selected, and a candidate weight vector is selected from each of the initial weight vectors; For each of the initial weight vectors in the third level, a tournament selection method is used to select a candidate weight vector from each of the initial weight vectors; For each of the initial weight vectors in the fourth level, a complete deletion selection method is adopted to delete each of the initial weight vectors.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the gas load prediction method according to any one of claims 1 to 2 and the target gas load prediction model training method according to any one of claims 3 to 8 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the gas load prediction method according to any one of claims 1 to 2 and the target gas load prediction model training method according to any one of claims 3 to 8.