Method for predicting peak and trough of gas consumption of regional gas users
By establishing a spatiotemporal data model and HEBT architecture, the trend and periodic characteristics of gas consumption are extracted, and the problems of low efficiency and data lag in gas consumption prediction of regional gas users are solved, and more accurate peak and trough predictions are achieved, reducing cost risks.
Patent Information
- Application Number
- CN202310807610.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-03
AI Technical Summary
The prior art has problems such as low efficiency, data lag and lack of technical theoretical support in the prediction of gas volume peaks and troughs of regional gas users, resulting in increased cost waste and peak shaving difficulty.
By establishing a spatiotemporal data model, extracting data trend characteristics and periodic characteristics, combining deep learning technology and HEBT architecture, predicting the peak or trough information of gas consumption, to form a more accurate gas consumption prediction.
Improve the accuracy of gas usage forecasting, help gas suppliers clarify the purchase demand during trading, avoid excessive or insufficient, and reduce cost risks.
Smart Images

Figure CN119250245A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of gas consumption prediction for regional gas users, and in particular to a method for predicting gas consumption peaks and troughs for regional gas users. Background Art
[0002] The prediction of natural gas consumption peaks and troughs has an important impact on the operating costs of natural gas companies. However, there is a large deviation between the predicted values and the occurrence time of future peaks or troughs of gas consumption of regional gas users determined by manual experience or manual calculation and the actual values and the occurrence time, which will cause insufficient or excessive natural gas transmission and cause cost waste.
[0003] However, for regional gas, the gas demand, operating conditions and gas usage of its downstream customer companies are different, resulting in very different gas usage behaviors, which is also called large gas usage volatility. This volatility exists objectively and is not the same. In addition, the volatility of different users is superimposed on each other, resulting in a further increase in the peak-to-valley difference, which puts forward high peak-shaving requirements for regional gas and its natural gas suppliers. Regional gas users have high weights, including people's livelihood, public buildings, industrial and commercial enterprises, etc. These users can be divided into year-round users and seasonal users according to whether they have obvious seasonal needs. Due to the differences in climatic conditions in various places, the heating period varies from 1 to 7 months, so the gas usage period is also different. This type of user presents very obvious seasonal characteristics. Industrial and commercial enterprises, natural gas vehicles and other users are non-seasonal users. Although their gas consumption is related to climatic conditions and varies in different seasons, they use gas for production all year round. The factors determining their gas consumption have nothing to do with seasonality, and the range of change is not large. Compared with seasonal users, their gas consumption seasons (or months) are basically uniform. The development of this part of the gas consumption structure is relatively stable, but at the same time, there are many variable factors in the development of the gas consumption structure, such as temperature and policy.
[0004] Therefore, the gas consumption and gas consumption behavior of domestic regional gas enterprises are artificially set according to manual experience, which has great limitations and irrationality. The high weight is reflected in several aspects. First, the gas consumption fluctuation and uneven coefficient are determined by manual experience or manual calculation, which is inefficient and difficult to respond to emergencies or changes in market conditions in a timely, accurate and efficient manner; second, the peaks and troughs of regional gas consumption determined based on manual experience are not necessarily the most realistic peaks and troughs, which will cause the lag effect of the corresponding data; third, the volatility of regional gas consumption determined by manual experience lacks the support of technical theory, and may not fully meet the actual situation, and there is a situation where subjective emotions are affected; fourth, when there are many influencing factors and regional gas users, the correlation between the factors and how to quantify the impact of emergencies will be a more complex logical relationship problem. These problems cannot be effectively solved only through manual experience or manual calculation, and as the scale of the problem expands, the complexity and difficulty of the model calculation will increase exponentially.
[0005] How to calculate the gas consumption behavior of gas users more reasonably, efficiently and accurately has become particularly important. This will also become the focus of market competition in the future pipeline gas marketing. Summary of the invention
[0006] The present invention aims to solve the problems of establishing a gas consumption data model for regional gas users, making reasonable predictions on gas consumption trends, and improving the accuracy of regional gas consumption predictions.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A method for predicting gas consumption peaks and troughs of regional gas users, characterized by comprising the following steps:
[0009] Combine historical gas consumption data and historical influencing factor data to generate a spatiotemporal data model;
[0010] Extract data trend features and periodic features based on spatiotemporal data models;
[0011] Determine the time series within the forecast period based on trend characteristics and period characteristics;
[0012] The peak or trough information of gas consumption is determined based on the time series within the forecast period.
[0013] In a further solution, the method for extracting data trend characteristics includes: obtaining an impact coefficient according to the impact degree of the historical influencing factors on the periodic historical gas consumption data of different periods, and determining the impact ratio of the historical influencing factors on the periodic historical gas consumption data in different periods according to the ranking of the impact coefficients;
[0014] The trend characteristics of the gas consumption are determined according to the impact coefficient and the influence ratio.
[0015] In a further scheme, the method for extracting data trend characteristics also includes: screening out influencing factors with high weights according to the ranking of the impact coefficients, and analyzing the residual terms of their establishment time to determine whether the screened out high-weight factors fit each cycle. If not, it is necessary to find other ranking factors or sudden factors to add to the analysis until the requirements are met. After the requirements are met, the high-weight influencing factors are merged to form a weight matrix of different factors, and the periodic characteristics are determined according to the cycle represented by the weight matrix.
[0016] In a further scheme, the step also includes: determining an evaluation index of the spatiotemporal data model, wherein the evaluation index refers to the use of deep learning technology with the goal of minimizing the loss function when historical influencing factors of regional gas customer gas demand are given.
[0017] In a further solution, the method for determining the time series within the prediction period based on trend characteristics and cycle characteristics includes: obtaining the time series of gas consumption peaks or troughs according to historical influencing factor data within the prediction period, combined with trend characteristics and cycle characteristics within the prediction period.
[0018] In a further embodiment, the method further includes fitting the gas consumption within the cycle by predicting the time series of the peak or trough of the gas consumption within the cycle.
[0019] In a further solution, the steps are implemented based on HEBT architecture control, the HEBT architecture includes an input module, a Transformer module and a codec module, the Transformer module includes an ETS-former module and an N-beats module, and the ETS-former module includes an ESA module and a FA module;
[0020] The input module is used to merge the acquired historical gas consumption data and influencing factor data to obtain a spatiotemporal data model;
[0021] The ETS-former module is used to extract trend features based on the spatiotemporal data model;
[0022] The N-beats module is used to extract periodic features based on a spatiotemporal data model;
[0023] The encoding and decoding module is used to determine the time series within the prediction period based on the trend characteristics and the seasonal characteristics, so as to determine the peak or trough information of the gas consumption based on the time series within the prediction period.
[0024] In a further solution, the historical influencing factor data include the regional weather, temperature, humidity, population, regional GDP level, pipeline gas laying length, pipeline gas auction resource volume, regional gas location, historical demand in the region and the smoothness of the supply chain.
[0025] The second aspect of the present invention provides a regional gas user gas consumption peak and trough prediction system, including a memory and a processor, the memory storing programs or instructions that can be run on the processor, and the programs or instructions, when executed by the processor, implement the steps of the regional gas user gas consumption peak and trough prediction method described in any of the above-mentioned technical solutions.
[0026] The third aspect of the present invention provides a readable storage medium having programs and / or instructions stored thereon, which, when executed by a processor, implement the steps of the method for predicting peak and trough gas consumption of regional gas users described in any of the above technical solutions.
[0027] Beneficial effects of the present invention:
[0028] The present invention integrates and processes the data of the influencing factors of each cycle, so that a more accurate change trend of gas consumption can be obtained, and the trend characteristics and period characteristics extracted by fitting the influencing factors in the forecast period can be used to obtain the optimal time series of user gas consumption in the forecast period, so as to better predict the peak and trough of regional gas consumption. When buying and selling gas, the time when the purchase amount needs to be increased and reduced can be more clearly determined, which can effectively prevent the purchase amount from being increased at the peak of gas consumption, resulting in excessive gas purchase, and then causing losses, or the purchase amount is reduced at the trough, resulting in insufficient gas.
[0029] By building a model based on the HEBT architecture, data processing can be made more convenient, the prediction model selection after fitting can be more accurate, and the accuracy of the prediction can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the 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 creative work.
[0031] Figure 1 is a schematic flow chart of a method for predicting peak and trough gas consumption of regional gas users according to an embodiment of the present invention;
[0032] Figure 2 Schematic diagram of HEBT architecture in an embodiment of the present invention;
[0033] Figure 3 is the formula of the four-dimensional vector in the embodiment of the present invention;
[0034] Figure 4 This is the schematic diagram of the short-term attention ETS-Former that introduces ESA and FA in this embodiment;
[0035] Figure 5 This is a diagram of the HEBT model architecture in which the ETS-Former layer is introduced in this embodiment;
[0036] Figure 6 It is the architecture diagram of the HEBT multi-head attention mechanism in this embodiment;
[0037] Figure 7 is a flow chart of a method for establishing a regional gas user demand model based on the HEBT architecture in this embodiment;
[0038] Figure 8 is a flow chart of the optimal model and parameter analysis and evaluation method in an embodiment of the present invention;
[0039] Fig. 9 is a block diagram of a regional gas user gas consumption peak and trough prediction system based on HEBT according to an embodiment of the present invention;
[0040] Fig.10 It is a schematic diagram of the HEBT architecture module in an embodiment of the present invention.
[0041] In the figure: 500 is a regional gas user gas consumption peak and trough prediction system based on HEBT, 502 is a memory, and 504 is a processor. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] like Figure 1 As shown, a method for predicting the peak and trough of gas consumption of regional gas users includes the following steps:
[0044] Combine historical gas consumption data and historical influencing factor data to generate a spatiotemporal data model;
[0045] Extract data trend features and periodic features based on spatiotemporal data models;
[0046] Determine the time series within the forecast period based on trend characteristics and period characteristics;
[0047] The peak or trough information of gas consumption is determined based on the time series within the forecast period.
[0048] The method for extracting data trend characteristics comprises: obtaining an impact coefficient according to the impact degree of the historical influencing factors on the periodic historical gas consumption data of different periods, and determining the impact proportion of the historical influencing factors on the periodic historical gas consumption data in different periods according to the ranking of the impact coefficients;
[0049] The trend characteristics of the gas consumption are determined according to the impact coefficient and the influence ratio.
[0050] The method for extracting data trend characteristics also includes: screening out high-weight influencing factors according to the impact coefficient ranking, and analyzing the establishment time residual items to determine whether the screened out high-weight factors fit each cycle. If not, it is necessary to find other ranking factors or sudden factors to add to the analysis until the requirements are met. After the requirements are met, the high-weight influencing factors are merged to form a weight matrix of different factors, and the periodic characteristics are determined according to the cycle represented by the weight matrix.
[0051] The step also includes: determining an evaluation index of the spatiotemporal data model, wherein the evaluation index refers to obtaining a plurality of models to be tested that are associated with different factors by using deep learning technology with the goal of minimizing the loss function, given the historical influencing factors of regional gas customer gas demand.
[0052] The method for determining the time series within the prediction period based on trend characteristics and cycle characteristics includes: according to the historical influencing factor data within the prediction period, combined with the trend characteristics and cycle characteristics within the prediction period, after selecting the optimal model through the above-mentioned model to be tested, inputting the optimal parameters, establishing the corresponding demand prediction model, and obtaining the time series of gas consumption peaks or troughs through the output of the corresponding demand prediction model.
[0053] The method further comprises fitting the gas consumption within the period by predicting the time series of the peak or trough of the gas consumption within the period.
[0054] See also Fig.10, HEBT architecture includes input module (such as MQRNN connection layer), Transformer module, encoding and decoding module; Transformer module includes ETS-former module and N-beats module; ETS-former module includes ESA module and FA module. (HEBT is specifically Hierarchical Elasticity Behavior Transformer, and its Chinese name is User Behavior Hierarchical Demand Elasticity Encoder), (ETS-former module is exponential smoothing encoder module), (N-beats is Neural Basis Expansion Analysis for interpretable Time Series forecasting, and its Chinese name is Time Series Neural Network Bottom Expansion Analysis), ESA (exponential smoothing attention) and FA (frequency attention).
[0055] The specific prediction methods of regional gas user gas consumption peaks and troughs based on the HEBT architecture include:
[0056] The input module is used to merge the acquired historical gas consumption data and influencing factor data to obtain a spatiotemporal data model. For example, the gas consumption data and historical influencing factor data are classified according to different periods to obtain periodic historical gas consumption data and periodic historical influencing factor data, and then a multidimensional spatiotemporal data model is generated in space at the corresponding time; the ETS-former module is used to extract trend features based on the spatiotemporal data model;
[0057] The N-beats module is used to extract seasonal features based on the spatiotemporal data model;
[0058] The encoding and decoding module is used to determine the time series within the prediction period based on trend characteristics and seasonal characteristics, so as to determine the peak or trough information of the gas consumption based on the time series within the prediction period.
[0059] like Figure 2 As shown in the figure, the schematic diagram of the HEBT framework is shown in the figure. Specifically, the method based on this component processes data by taking the entire historical sales series as the input layer of the model structure. In a multivariate time series, at a given time step t, the input is in the form of (x 1 ,t)、(x 2 ,t)……(x m ,t), where (x i ,t) is the sales value of natural gas corresponding to feature i at time step t, m is the total number of features / sequences, we pass the input through an ETS-Former layer and transform it into four dimensions, representing e t Base value (Level), bt Growth Forecasting, s t Seasonal fluctuation value (Seasonal), thus generating a time-based four-dimensional vector, the formula of which is as follows Figure 3 As shown, x represents the natural gas demand, p represents the seasonal cycle, h represents the predicted time step value, t represents the time step value, and α, β, and γ are all parameters. This time embedding means that it will represent the entire input set as a single entity, so the model will only learn the temporal dynamics between time steps, but will miss the spatial relationship between features / variables. Through the ETS-Former module in the HEBT architecture, the specific values and corresponding components of the predicted gas demand volatility are output.
[0060] like Figure 4 As shown in the figure, assuming that the factors affecting regional gas consumption volatility, the weight of the impact, the direction of increase or decrease in demand, and the natural gas consumption demand of each downstream user are known, in order to assign weights to a certain influencing factor and analyze and calculate the path of its impact on demand according to the principle of the shortest distance from the current time t, it is necessary to identify the longest time period that the influencing factor can affect, and use quantile regression to output the prediction interval and predicted value. By introducing the interpretable exponential smoothing attention (ESA) and frequency attention (FA) attention mechanisms, the weights of this layer of variables can reveal which time steps are the most important during the model backtesting. The visualization of these weights can reveal the most significant seasonal trends and natural growth trends in the entire data set.
[0061] like Figure 5 As shown in the figure, the encoder-decoder architecture of the entire ETS-Former module is shown. In each layer of the encoder-decoder, the model extracts the seasonal and trend characteristics of the data within a certain time range, and then sends the seasonal and trend characteristics to the decoder. The prediction combination of the growth module and other modules further generates the final h-step prediction results. This process can be aggregated according to different time points. Different influencing factors are serialized and input into the encoder model, and extracted according to the time characteristics of different influencing factors. Finally, through the HEBT architecture model, a relationship matrix composed of multiple features and multiple explanatory variables is formed.
[0062] exist Figure 5 In the hierarchical architecture, the HEBT model can also perform feature extraction and feature fusion at each layer, gradually integrating the information between multiple economic variables. For each layer of operation, the model can define a unified formula. Given an input I t K and another source I at layer K t’(k) The input feature can be expressed as h t and h' t . In order to capture the correlation between information at different levels, the model also adds a multi-step fusion mechanism. This is because the influence between two different levels of sequences may be time-delayed. For example, in addition to being affected by today's temperature, the user's gas consumption may also be related to yesterday's weather. For example, if it was cold the day before, even if it is hot today, people will tend to turn on the heating equipment for a long time. Therefore, for such situations, we should try to fuse more information within the time interval, not just at the current time point. More specifically, some additional time variables are added, such as weekends, the end of the month, holidays and other related information, because the regional gas consumption is highly correlated with the lives of residents, and the lives of residents are often related to holidays and weekends. Therefore, it can be put into the model as an influencing factor for analysis. The gas consumption may be different in different periods, but users from different regions may have similar samples, so the prediction results will also be different. Therefore, time series sampling for different interval windows can also be used as an input to the model.
[0063] By introducing the ETS-Former layer to process data in different spaces, and introducing the corresponding exponential smoothing attention (ESA) and frequency attention (FA) attention mechanisms to process time features, the same model can make different prediction results in different spaces, and provide adaptive depth and network complexity to meet the needs of different data sets. Variable selection selects relevant input variables at each time step, that is, the model will screen the priority variables at each iteration. Although traditional OLS regression and traditional time series fitting may overfit irrelevant features, variable selection based on the HEBT architecture can improve the generalization ability of the model by anchoring most of the learning ability in the model on the most significant features, making it more suitable for the analysis of gas consumption characteristics in the natural gas market. If S static variables such as regional data are introduced, gas consumption characteristics of different regions can be constructed to control the dynamic modeling method at different times. Moreover, static features may have an important impact on predictions. For example, the location of regional gas may have different sales time dynamics (for example, regional gas companies in the north may see higher shipments at the beginning of winter, but some regional gas consumption close to warm areas in the south may see peaks at the end of winter). Prediction intervals display quantile forecasts to identify the range of target values within each forecast range, helping model users better understand the distribution of outputs rather than just making a prediction for a point in the future.
[0064] like Figure 2 As shown, a method for establishing an output model of gas consumption peaks and troughs of regional gas users based on HEBT in the present application includes:
[0065] S202: Input observed variables and static variables.
[0066] S204: Model ETS module and perform trend detection.
[0067] S206: Extract data features and determine trend features and seasonal features.
[0068] S208: Perform a stationarity test on the remaining part.
[0069] S210: Obtain trends and cycles.
[0070] S212: Check whether the residual is stable or not. If the test result is "yes", execute S214; if the test result is "no", execute S206.
[0071] S214: Take out the corresponding sequence for factor fitting.
[0072] S216: Determine whether there is a mutation point. If the detection result is "yes", execute S218; if the detection result is "no", execute S224.
[0073] S218: Encoding using exponential smoothing attention mechanism.
[0074] S220: Establish a regression model.
[0075] S222: Multi-head attention wit analysis of short-term factors for different morphological sequences.
[0076] S224: Introduce the ETS-former layer to analyze the weights of different factors.
[0077] S226: Return the model evaluation index based on the backtest of the model effect.
[0078] S228: Model selection.
[0079] The specific manifestations are:
[0080] 1. Given the range of factors affecting the volatility of regional gas consumption, the model uses historical gas consumption data as a training set, and the influencing factor data at future time points can be regarded as the model's observed variables;
[0081] 2. Screen out the factors that affect the gas consumption behavior and gas consumption volatility of regional gas customers in the supply chain, and calculate the correlation coefficients and weights of different influencing factors on the gas consumption behavior and gas consumption volatility of the region. The screened influencing factors can be regarded as the observed variables of the model. The observed variables in the model can affect a period of time in the future, and the time of the impact is related to the size of the impact;
[0082] 3. According to the period of the observed variables, they are divided into macro variables and micro variables for analysis, that is, the distance from the current moment and the relationship between the historical observations and the corresponding predicted variables are distributed. At the macro level, climate factors such as temperature and weather are introduced; at the micro level, we introduce short-term user demand and short-term gas consumption fluctuations, using MQRNN (i.e., time series prediction algorithm) as the connection layer; in addition, in the Transformer (i.e., multi-head attention mechanism model) layer, by introducing regional economic data as static variables, the gas consumption volatility can be accurately characterized.
[0083] 4. Based on the above continuous time series observations, different digital features can be used to characterize the gas consumption volatility of users. In order to solve the fitting of user volatility at different time points, we introduced the ETS-Former framework, whose theory comes from the exponential smoothing method, but a deep learning residual regression scheme is introduced for the exponential smoothing method. Exponential smoothing attention (ESA) and frequency attention (FA) are used to replace the short-term attention mechanism, thereby achieving accurate prediction of seasonal gas consumption fluctuations. Figure 5 As shown in the figure, ETS-Former can decompose some intermediate variables into quarterly volatility and trend volatility for separate predictions. Seasonal volatility can be fitted using the N-beats model, while trend volatility can be viewed as the natural growth of gas volume, which is related to macroeconomic variables. You can also choose to add damping growth terms according to actual conditions to generate trend growth forecasts. When the amount of data is large, sampling can also choose aggregation mode to enhance the interpretability of the model. Store all variables in a linked list and encode and decode them in order from small to large. During iterative calculations, you can add a moving smoothing function to the outer loop of the iteration, and introduce exponential smoothing attention (ESA) and frequency attention (FA) attention mechanisms. In this way, each time you predict the next step, you can achieve the optimization rule with the minimum loss function.
[0084] 5. According to the optimization principle of minimizing the loss function, the relevant parameters of a certain influencing factor are screened until the optimal parameters are selected. In the parameter selection of influencing factors, the SHAP theory is introduced to more accurately screen the influencing factors. The lagging influencing factors can be converted into the input variables of the model, or regarded as the observation variables of the next stage of the model, so as to improve the accuracy of the model. In each iteration, find the observation variable with the strongest influencing factor at that moment and assign it a corresponding weight. When the accuracy of the prediction result cannot be improved, it is marked. In the next iterative calculation, find the influence of the unmarked influencing factors on the current moment to improve the accuracy. Repeat this process until the loss function can no longer decrease. It should be noted that the step size of each iteration should not exceed the time interval of the observation variable, otherwise overfitting will occur, that is, the duration of each iteration in the model cannot exceed the shortest time interval of the observation variable;
[0085] 6. There is a certain correlation between the influencing factors in the model and the final observed variable regional gas consumption, and it is assumed that all influencing factors are categorical / static variables, also known as time-invariant features, so as to achieve a more general model than the previous ones. For example, in the prediction of regional gas consumption, we hope to use temperature level as a time-varying feature, which is achievable in the HEBT framework so far, but it is not achievable in other traditional time series (ARIMA autoregressive moving average model, ETS time series notes). Therefore, the HEBT framework can reflect the transmission relationship mechanism between the influencing factors of regional gas consumption and the volatility of gas consumption;
[0086] 7. Although there are cross-effects between the influencing factors, in each iterative calculation, the model will select the best influencing factor that affects the price at that moment and remove some multicollinearity, so the final model will not have serious multicollinearity.
[0087] like Figure 3 As shown, an iterative method for outputting a model of gas consumption peaks and troughs of regional gas users based on HEBT in the present application includes:
[0088] S302: Data input.
[0089] S304: Create a prediction sequence and an observation sequence.
[0090] S306: Extract data features and determine whether the remaining part is stable. When the detection result is "yes", end; when the detection result is "no", execute S308.
[0091] S308: Detection and analysis of relevant factors.
[0092] S310: Extracting association relationships.
[0093] S312: Determine whether the relationship can be added to the model. If the detection result is "yes", execute S314; if the detection result is "no", execute S316.
[0094] S314: Backtest the effects of multiple models and execute S316.
[0095] S316: Model selection.
[0096] S318: Call the parameter method to analyze the optimal parameters and input them into the model.
[0097] S320: Model evaluation to select the optimal model.
[0098] S322: Establish a corresponding demand forecasting model.
[0099] Specifically, the regional gas user demand analysis algorithm based on the HEBT architecture is a process of iteratively executing the seq2seq serialization analysis algorithm. Before the iterative calculation, all influencing factors are sorted according to the size of the Pearson correlation coefficient, and the data feature analysis algorithm is first executed on the influencing factors with a large correlation. It should be noted that if the sequence of a certain data is unbalanced, the final result of the model will be biased. Therefore, in each iterative calculation, the data balance can be processed based on the model (Poisson regression, Tweedie regression, feature distribution balance FDS) or based on data (Log transformation, Box-cox transformation, label distribution smoothing LDS), so as to ensure that when the calculation is terminated, the momentum of each epoch is updated, the training is stabilized, and its loss function reaches the minimum or close to 0.
[0100] The second aspect of the present invention provides a regional gas user gas consumption peak and trough prediction system 500 based on HEBT, such as Fig. 9 As shown, it includes a memory 502 and a processor 504. The memory 502 stores programs or instructions that can be executed on the processor 504. When the programs or instructions are executed by the processor 504, the steps of the method for predicting the peak and trough gas consumption of regional gas users based on HEBT of any of the above-mentioned technical solutions are implemented.
[0101] The regional gas user gas consumption peak and trough prediction system 500 based on HEBT provided by the technical solution of the present invention includes a memory 502 and a processor 504 and a program stored in the memory 502 and executable on the processor 504. When the program is executed by the processor 504, the steps defined by any of the above-mentioned regional gas user gas consumption peak and trough prediction methods based on HEBT are implemented. At the same time, since the regional gas user gas consumption peak and trough prediction system 500 based on HEBT of the present application can implement the steps defined by any of the above-mentioned regional gas user gas consumption peak and trough prediction methods based on HEBT, the regional gas user gas consumption peak and trough prediction system 500 based on HEBT provided by the technical solution has all the beneficial effects of the regional gas user gas consumption peak and trough prediction methods based on HEBT provided in any of the above-mentioned technical solutions.
[0102] The third aspect of the present invention provides a readable storage medium having programs and / or instructions stored thereon. When the programs and / or instructions are executed by a processor, the steps of the method for predicting the peak and trough gas consumption of regional gas users based on HEBT in any of the above-mentioned technical solutions are implemented.
[0103] The scheme in this application integrates and processes the data of the influencing factors of each cycle, so it can obtain more accurate gas consumption trends, thereby better predicting the peaks and troughs of regional gas consumption. When buying and selling gas, it can more clearly determine when to increase and reduce the purchase amount, and effectively prevent the situation where the purchase amount is increased at the peak of gas consumption, resulting in excessive gas purchases and thus losses, or the purchase amount is reduced at the trough, resulting in insufficient gas.
[0104] Those skilled in the art should also be able to imagine that the method for predicting the peak and trough of gas consumption of gas users in the region can also be implemented through other architectures.
[0105] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged in appropriate circumstances, so that the embodiments of the present application described here. In the present application, the orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inside", "outside", "middle", "vertical", "horizontal", "lateral", "longitudinal" etc. are based on the orientation or positional relationship shown in the accompanying drawings.
[0106] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0107] The above shows and describes the basic principles, weighted features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A method for predicting peaks and troughs of gas consumption of regional gas users, characterized in that: The following steps are involved: Combine historical gas consumption data and historical influencing factor data to generate a spatiotemporal data model; Extract data trend features and periodic features based on spatiotemporal data models; Determine the time series within the forecast period based on trend characteristics and period characteristics; The peak or trough information of gas consumption is determined based on the time series within the forecast period.
2. A method for predicting peaks and troughs of regional gas consumption according to claim 1, characterized in that: The method for extracting data trend characteristics comprises: obtaining an impact coefficient according to the impact degree of the historical influencing factors on the periodic historical gas consumption data of different periods, and determining the impact proportion of the historical influencing factors on the periodic historical gas consumption data in different periods according to the ranking of the impact coefficients; The trend characteristics of the gas consumption are determined according to the impact coefficient and the impact ratio.
3. A method for predicting peaks and troughs of regional gas consumption according to claim 2, characterized in that: The method for extracting data trend characteristics also includes: screening out high-weight influencing factors according to the impact coefficient ranking, and analyzing the establishment time residual items to determine whether the screened out high-weight factors fit each cycle. If not, it is necessary to find other ranking factors or sudden factors to add to the analysis until the requirements are met. After the requirements are met, the high-weight influencing factors are merged to form a weight matrix of different factors, and the periodic characteristics are determined according to the cycle represented by the weight matrix.
4. A method for predicting peak and trough gas consumption of regional gas users according to claim 1, characterized in that: The method also includes: determining an evaluation index of the spatiotemporal data model, wherein the evaluation index refers to using deep learning technology with the goal of minimizing the loss function when historical influencing factors of regional gas customer gas demand are given.
5. A method for predicting peak and trough gas consumption of regional gas users according to claim 1, characterized in that: The method for determining the time series within the prediction period based on trend characteristics and cycle characteristics includes: obtaining the time series of gas consumption peaks or troughs according to historical influencing factor data within the prediction period in combination with trend characteristics and cycle characteristics within the prediction period.
6. A method for predicting peak and trough gas consumption of regional gas users according to claim 1, characterized in that: The method further comprises fitting the gas consumption within the period by predicting the time series of the peak or trough of the gas consumption within the period.
7. A method for predicting peak and trough gas consumption of regional gas users according to any one of claims 1 to 6, characterized in that: The method is implemented based on HEBT architecture control, wherein the HEBT architecture includes an input module, a Transformer module and a codec module, wherein the Transformer module includes an ETS-former module and an N-beats module, and wherein the ETS-former module includes an ESA module and an FA module; The input module is used to merge the acquired historical gas consumption data and influencing factor data to obtain a spatiotemporal data model; The ETS-former module is used to extract trend features based on the spatiotemporal data model; The N-beats module is used to extract periodic features based on a spatiotemporal data model; The encoding and decoding module is used to determine the time series within the prediction period based on the trend characteristics and the seasonal characteristics, so as to determine the peak or trough information of the gas consumption based on the time series within the prediction period.
8. A method for predicting peak and trough gas consumption of regional gas users according to claim 1, characterized in that: The historical influencing factor data include the regional weather, temperature, humidity, population, regional GDP level, pipeline gas laying length, pipeline gas auction resource volume, regional gas geographical location, historical demand in the region and the smoothness of the supply chain.
9. A regional gas user gas consumption peak and trough prediction system, characterized in that: It includes a memory and a processor, the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method for predicting peak and trough gas consumption of regional gas users as described in any one of claims 1 to 8 are implemented.
10. A readable storage medium, characterized in that: Programs and / or instructions are stored thereon, and when the programs and / or instructions are executed by the processor, the steps of the method for predicting the peak and trough gas consumption of regional gas users as described in any one of claims 1 to 8 are implemented.
