Gas load prediction method and device, electronic equipment and storage medium
By denoising and reconstructing the phase space of the initial gas load data, and combining it with the ANFIS model, a target prediction model is constructed, which solves the problem of the accuracy of gas load prediction and achieves higher prediction accuracy.
Patent Information
- Application Number
- CN202310011399.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-01-05
AI Technical Summary
In existing gas load forecasting methods, the non-stationarity and volatility of gas load affect the accuracy of single time series analysis, making it difficult to improve the accuracy of gas load forecasting.
By denoising and reconstructing the phase space of the initial historical gas load data, a target prediction model is constructed, including a fuzzification layer, a rule layer, a normalization layer, and an output layer. The ANFIS model is then used to predict the gas load.
It improves the accuracy of gas load forecasting, solves the problem of the non-stationarity and volatility of gas load data on forecasting, and enhances the accuracy of the forecasting model.
Smart Images

Figure CN116011647B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a gas load prediction method and device, an electronic device and a storage medium. BACKGROUND
[0002] At present, by performing short-term gas load prediction, a gas company can flexibly schedule gas according to the prediction result and reasonably plan gas use. In related technologies, a gas load prediction method includes a multivariate time series analysis method and a single time series analysis method. The multivariate time series analysis method refers to taking seasonal, climate, temperature and humidity and other key information related to gas load as input data of a prediction model. However, due to the influence of regional conditions and technical limitations in actual application, sufficient key information cannot be obtained. In addition, due to the non-stationary and fluctuating characteristics of gas load, the accuracy of the single time series analysis method is affected. Therefore, how to improve the accuracy of gas load prediction has become a technical problem to be solved. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a gas load prediction method and device, an electronic device and a storage medium, which aims to improve the accuracy of gas load prediction.
[0004] To achieve the above-mentioned purpose, a first aspect of the embodiments of the present application provides a gas load prediction method, which comprises:
[0005] obtaining initial historical gas load data;
[0006] performing denoising processing on the initial historical gas load data to obtain target historical gas load data;
[0007] performing phase space reconstruction processing on the target historical gas load data to obtain target reconstructed gas load data;
[0008] performing gas load prediction on the target reconstructed gas load data by using a preset target prediction model to obtain target load prediction data.
[0009] In some embodiments, before the target load prediction data is obtained by performing gas load prediction on the target reconstructed gas load data by using the preset prediction model, the method further comprises training the target prediction model, specifically comprising:
[0010] obtaining original historical gas load data;
[0011] performing denoising processing on the original historical gas load data to obtain sample historical gas load data;
[0012] The sample historical gas load data is subjected to phase space reconstruction processing to obtain sample reconstructed gas load data;
[0013] Sample gas data and sample prediction data are obtained according to the sample reconstructed gas load data;
[0014] Sample load prediction data is obtained by predicting the gas load of the sample gas data through a preset initial prediction model;
[0015] The initial prediction model is adjusted according to the sample prediction data and the sample load prediction data to obtain the target prediction model.
[0016] In some embodiments, the denoising processing of the original historical gas load data to obtain sample historical gas load data comprises:
[0017] The original historical gas load data is subjected to modal decomposition processing to obtain initial decomposition gas load data;
[0018] The original center frequency of the initial decomposition gas load data is obtained;
[0019] The initial decomposition gas load data is updated according to the preset constraint data and the original center frequency to obtain target decomposition gas load data;
[0020] The correlation coefficient is obtained by calculating the correlation between the target decomposition gas load data and the original historical gas load data;
[0021] The sample historical gas load data is obtained according to the correlation coefficient and the target decomposition gas load data.
[0022] In some embodiments, the phase space reconstruction processing of the sample historical gas load data to obtain sample reconstructed gas load data comprises:
[0023] Mutual information of the sample historical gas load data is calculated to obtain a mutual information value;
[0024] The target delay time is determined according to the mutual information value;
[0025] The target number is obtained according to the target delay time and the sample historical gas load data to determine the data amount of the near neighbor data;
[0026] The target space dimension is determined according to the target number and a preset proportion value;
[0027] The sample historical gas load data is subjected to phase space reconstruction processing according to the target space dimension and the target delay time to obtain the sample reconstructed gas load data.
[0028] In some embodiments, the denoising processing on the initial historical gas load data obtains target historical gas load data, and the denoising processing includes:
[0029] The initial historical gas load data is subjected to Gaussian filtering processing to obtain the target historical gas load data.
[0030] In some embodiments, the target prediction model includes a fuzzification layer, a rule layer, a normalization layer, a defuzzification layer, and an output layer.
[0031] The target load prediction data is obtained by performing gas load prediction on the target reconstructed gas load data through the preset target prediction model.
[0032] The target reconstructed gas load data is subjected to fuzzification processing through the fuzzification layer to obtain gas load membership.
[0033] The gas load membership is subjected to fuzzy rule calculation through the rule layer to obtain rule applicability.
[0034] The rule applicability is subjected to normalization processing through the normalization layer to obtain applicability probability.
[0035] The applicability probability and the target reconstructed gas load data are subjected to defuzzification processing through the defuzzification layer to obtain key reconstructed gas load data.
[0036] The key reconstructed gas load data is subjected to mapping output through the output layer to obtain the target load prediction data.
[0037] To achieve the above object, a second aspect of the embodiment of the present application proposes a gas load prediction device, and the device includes:
[0038] A data acquisition module is configured to acquire initial historical gas load data.
[0039] A denoising module is configured to perform denoising processing on the initial historical gas load data to obtain target historical gas load data.
[0040] A phase space reconstruction module is configured to perform phase space reconstruction processing on the target historical gas load data to obtain target reconstructed gas load data.
[0041] A gas load prediction module is configured to perform gas load prediction on the target reconstructed gas load data through a preset target prediction model to obtain target load prediction data.
[0042] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.
[0043] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.
[0044] The gas load prediction method and device, electronic device and storage medium provided by the present application can obtain target historical gas load data by denoising the initial historical gas load data. The target historical gas load data is reconstructed in phase space to obtain target reconstructed gas load data, thereby solving the problem that the accuracy of the single time series analysis method is affected due to the non-stationary and fluctuating characteristics of the gas load data in the related art. Therefore, when the target reconstructed gas load data is predicted by the preset target prediction model, the accuracy of the gas load prediction can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a flowchart of the gas load prediction method of the embodiments of the present application;
[0046] Figure 2 is another flowchart of the gas load prediction method of the embodiments of the present application;
[0047] Figure 3 is another flowchart of the gas load prediction method of the embodiments of the present application;
[0048] Figure 4 is another flowchart of the gas load prediction method of the embodiments of the present application;
[0049] Figure 5 is another flowchart of the gas load prediction method of the embodiments of the present application;
[0050] Figure 6 is a structural schematic diagram of the gas load prediction device of the embodiments of the present application;
[0051] Figure 7 is a hardware structural schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0052] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0053] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification is for the purpose of describing the embodiments of the present application only and is not intended to be limiting of the present application.
[0055] First, the terms involved in the present application are analyzed:
[0056] Artificial intelligence (AI): is a new technical science that studies, develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, and artificial intelligence aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. The research in this field includes robots, language recognition, image recognition, natural language processing and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also the theory, method, technology and application system of using digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, to perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0057] Phase space reconstruction (PSR): the basic idea of phase space reconstruction is that the evolution of any element in the system is determined by other elements that interact with it, so the information of these related elements is hidden in the development process of any element. Therefore, the purpose of phase space reconstruction is to dig more information from the whole time series, to find another system equivalent to the original system in some sense, to obtain the hidden information of the original system from another system.
[0058] Variational mode decomposition (VMD): It is an adaptive, completely non-recursive modal variational and signal processing method. In the process of obtaining the decomposition components, the method determines the frequency center and bandwidth of each component by iteratively searching for the optimal solution of the variational model, so as to adaptively realize signal frequency domain profiling and effective separation of each component. VMD can decompose multiple sub-signals constituting a noisy signal, and then reconstruct the original signal using these sub-signals, thereby realizing the function of noise reduction.
[0059] Adaptive-Network-Based Fuzzy Inference System (ANFIS): The fuzzy inference system is composed of five functional modules: the first, a rule base containing a number of fuzzy if-then rules; the second, a database defining membership functions for fuzzy sets used in the fuzzy if-then rules; the third, a decision unit that performs the inference operation on the rules; the fourth, a fuzzifier that converts crisp inputs into degrees of matching with linguistic values; and the fifth, a defuzzifier that converts the fuzzy results of the inference into crisp outputs. ANFIS implements all three basic processes of fuzzification, fuzzy inference and defuzzification of fuzzy control using a neural network structure, and automatically extracts rules from input and output sample data using the learning mechanism of the neural network to form an adaptive neural fuzzy controller.
[0060] At present, by performing short-term gas load prediction, the gas company can flexibly schedule the gas according to the prediction result and reasonably plan the gas use. In related technologies, the gas load prediction method includes a multivariate time series analysis method and a single time series analysis method. Among them, the multivariate time series analysis method refers to taking the key information related to the gas load such as season, climate, temperature and humidity as the input data of the prediction model, but due to the influence of regional conditions and technical limitations in actual application, sufficient key information cannot be obtained. In addition, due to the non-stationary and fluctuating characteristics of the gas load, the accuracy of the single time series analysis method is affected. Therefore, how to improve the accuracy of the gas load prediction has become a technical problem to be solved.
[0061] Based on this, the embodiments of the present application provide a gas load prediction method and device, electronic equipment and storage medium, aiming to improve the accuracy of gas load prediction.
[0062] The gas load prediction method and device, electronic equipment and storage medium provided by the embodiments of the present application are specifically explained by the following embodiments, first, the gas load prediction method in the embodiments of the present application is described.
[0063] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. The artificial intelligence (AI) is a theory, method, technology and application system for simulating, extending and expanding human intelligence by using a digital computer or a machine controlled by a digital computer, perceiving environment, acquiring knowledge and using knowledge to obtain optimal results.
[0064] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0065] The gas load prediction method provided by the embodiments of the present application relates to the field of artificial intelligence. The gas load prediction method provided by the embodiments of the present application can be applied in a terminal, can also be applied in a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application for implementing the gas load prediction method, etc., but is not limited to the above forms.
[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0067] Figure 1 is an optional flowchart of the gas load prediction method provided by the embodiments of the present application,Figure 1 The method in the method can include but not limited to including steps S101 to S104.
[0068] Step S101, obtaining initial historical gas load data;
[0069] Step S102, denoising the initial historical gas load data to obtain target historical gas load data;
[0070] Step S103, phase space reconstruction processing is carried out to the target historical gas load data, and target reconstructed gas load data is obtained;
[0071] Step S104, through the preset target prediction model, the target reconstructed gas load data is carried out gas load prediction, and target load prediction data is obtained.
[0072] The steps S101 to S104 shown in the embodiment of the application, by denoising the initial historical gas load data, target historical gas load data is obtained. And phase space reconstruction processing is carried out to the target historical gas load data, and target reconstructed gas load data is obtained, thereby solve the problem that the accuracy of single time series analysis method is influenced due to the non-stationary, fluctuation and other characteristics of gas load data in the related art. Therefore, when the target reconstructed gas load data is carried out gas load prediction through the preset target prediction model, the accuracy of gas load prediction can be improved.
[0073] In step S101 of some embodiments, the daily gas load data of the to-be-tested region in a historical period is obtained through a related application programming interface (API) or the like to obtain initial gas load data. It can be understood that the target load prediction data obtained by prediction is used to represent the gas load situation of the to-be-tested region in a future period, and therefore the historical period and the future period should be two adjacent periods or two periods with a time interval within a preset threshold range. For example, in order to predict the gas load situation of the to-be-tested region from March to April 2022, the initial historical gas load data of the to-be-tested region from January to February 2022 should be obtained. Alternatively, in order to predict the gas load situation of the to-be-tested region from November to December 2022, since November to December is winter, the gas load situation is greatly different from that in other three seasons, and therefore the gas load data of the to-be-tested region from November to December 2021 can be selected as the initial historical gas load data. At this time, the preset threshold range is one year. In addition, the time length of the historical period can be the same as or different from the time length of the future period, which is not specifically limited in the embodiments of the present application. However, in order to improve the accuracy of gas load prediction, it is necessary to ensure that the amount of data input into the target prediction model is sufficient, and at this time, the time length of the historical period can be set to be greater than or equal to the time length of the future period.
[0074] In step S102 of some embodiments, since there can be abnormal gas load data in the initial historical gas load data, in order to improve the accuracy of subsequent gas load prediction, the initial historical gas load data needs to be denoised, that is, the abnormal gas load data is filtered out to obtain target historical gas load data. It can be understood that any one of mean filtering, median filtering, Gaussian filtering, VMD or the like can be used to denoise the initial historical gas load data, which is not specifically limited in the embodiments of the present application.
[0075] In some embodiments, Gaussian filtering is used to denoise the initial gas load data to obtain smoother target historical gas load data.
[0076] In step S103 of some embodiments, the target historical gas load data is subjected to phase space reconstruction processing to expand the single sequence of target historical gas load data in multiple dimensions to obtain target reconstructed gas load data with chaotic characteristics, so that more hidden information in the target historical gas load data can be mined. The hidden information includes, but is not limited to, the potential law of change of gas load data, etc.
[0077] Reference Figure 2In some embodiments, before step S104, the gas load prediction method provided in this application further includes training a target prediction model, specifically including but not limited to steps S201 to S206.
[0078] Step S201: Obtain raw historical gas load data;
[0079] Step S202: Denoise the original historical gas load data to obtain sample historical gas load data;
[0080] Step S203: Perform phase space reconstruction processing on the sample historical gas load data to obtain the sample reconstructed gas load data;
[0081] Step S204: Obtain sample gas data and sample prediction data based on the sample reconstructed gas load data;
[0082] Step S205: Predict the gas load of the sample gas data using a preset initial prediction model to obtain the sample load prediction data;
[0083] Step S206: Adjust the parameters of the initial prediction model based on the sample prediction data and sample load prediction data to obtain the target prediction model.
[0084] In step S201 of some embodiments, gas load data of the sample area within the sample time is obtained to obtain the original historical gas load data X1(t)=(x1,x2,...,x n It is understandable that, in order to improve the accuracy of gas load forecasting for the region to be predicted, the sample region and the region to be predicted should be the same region. Secondly, since label data for loss calculation needs to be obtained from the original historical gas load data during subsequent model training, the time span of the sample period should be long enough, for example, from January 1, 2017 to December 31, 2021.
[0085] In step S202 of some embodiments, since there may be abnormal gas load data in the original historical gas load data, in order to improve the accuracy of subsequent model training, it is necessary to denoise the original historical gas load data, that is, to filter out the abnormal gas load data, and obtain the sample historical gas load data X2(t). It is understood that any method such as mean filtering, median filtering, Gaussian filtering, VMD, etc. can be used to denoise the original historical gas load data, and the embodiments of this application do not specifically limit this.
[0086] Reference Figure 3 In some embodiments, step S202 includes, but is not limited to, steps S301 to S305.
[0087] Step S301, modal decomposition processing is performed on the original historical gas load data to obtain initial decomposition gas load data;
[0088] Step S302, the original center frequency of the initial decomposition gas load data is obtained;
[0089] Step S303, the initial decomposition gas load data is updated according to the preset constraint data and the original center frequency to obtain target decomposition gas load data;
[0090] Step S304, correlation calculation is performed on the target decomposition gas load data and the original historical gas load data to obtain a correlation coefficient;
[0091] Step S305, sample historical gas load data is obtained according to the correlation coefficient and the target decomposition gas load data.
[0092] It should be noted that the gas load data has non-stationary and random fluctuation due to the influence of weather, date, etc., so the original gas load is denoised and smoothed by the VMD method in the embodiments of the present application. The VMD method extracts the characteristic information of non-stationary signals by using non-recursive signal processing to solve the problem of random and non-linear gas load data.
[0093] In step S301 of some embodiments, the original historical gas load data X1(t) is decomposed to obtain K modal components with a certain bandwidth, and initial decomposition gas load data u k ={u1, u2, …, u K} is obtained.
[0094] It can be understood that in the decomposition process, the constraint variation conditions shown in the following formula (1) and formula (2) are satisfied:
[0095]
[0096]
[0097] wherein, denotes the partial derivative with respect to time, and δ(t) is the unit impulse function.
[0098] In step S302 of some embodiments, the center frequency of each modal component is obtained to obtain the original center frequency ω k ={ω1, ω2, …, ω K}.
[0099] In step S303 of some embodiments, in order to solve the optimal problem of the above constraint, according to the preset constraint data (including the quadratic penalty term a and the Lagrange multiplier λ), the constrained variational problem is converted into an unconstrained variational problem as shown in the following formula (3).
[0100]
[0101] Specifically, initialize n = 0, K = 1, and perform iterative updating according to n = n + 1, k = k + 1, the following formulas (4) to (6), and the alternating direction multiplier algorithm:
[0102]
[0103]
[0104]
[0105] wherein γ is the noise tolerance of the signal. The iterative updating is repeated until a convergence condition is met or a maximum number of iterations is reached, and then the iterative updating is stopped. The convergence condition is shown in the following formula (7), and both γ and ε are constants greater than zero.
[0106]
[0107] According to the above iterative updating, the optimal solution of the unconstrained variational problem is obtained, that is, the target decomposition gas load data u k ′ is obtained.
[0108] In step S304 of some embodiments, the correlation between each modal component in the target decomposition gas load data u k ′ and the original historical gas load data X1(t) is calculated to obtain the correlation coefficient of each modal component. It can be understood that the Pearson correlation coefficient or other correlation coefficients can be used for correlation calculation, and the embodiments of the present application are not limited in this regard.
[0109] In step S305 of some embodiments, the target decomposition gas load data u k ′ is screened according to the correlation coefficient of each modal component, so as to screen out the modal components with a correlation coefficient greater than a preset threshold, that is, to screen out the modal components with a consistent main change trend in the target decomposition gas load data u k ′. The screened modal components from the target decomposition gas load data u k ′ are reconstructed to obtain the sample historical gas load data X2(t).
[0110] In step S203 of some embodiments, the sample historical gas load data is subjected to phase space reconstruction processing to unfold the single sequence of sample historical gas load data in multiple dimensions, to obtain sample reconstructed gas load data with chaotic characteristics, so that more hidden information in the sample historical gas load data can be mined. The hidden information includes, but is not limited to, potential rules of changes in gas load data, etc.
[0111] Specifically, as shown in the following formula (8), the sample reconstructed gas load data N is obtained by phase space reconstruction processing with embedding space dimension m and delay time τ.
[0112]
[0113] For example, when the embedding space dimension m = 3 and the delay time τ = 2, the sample reconstructed gas load data N is as shown in the following formula (9).
[0114]
[0115] Reference Figure 4 In some embodiments, step S203 includes, but is not limited to, steps S401 to S405.
[0116] Step S401, mutual information calculation is performed on the sample historical gas load data to obtain a mutual information value;
[0117] Step S402, a target delay time is determined according to the mutual information value;
[0118] Step S403, a data amount of near neighbor data is determined according to the target delay time and the sample historical gas load data, to obtain a target amount;
[0119] Step S404, a target space dimension is determined according to the target amount and a preset proportion value;
[0120] Step S405, phase space reconstruction processing is performed on the sample historical gas load data according to the target space dimension and the target delay time, to obtain sample reconstructed gas load data.
[0121] It should be noted that the sample historical gas load data is processed by the phase space reconstruction technology in the embodiments of the present application, to deeply mine the internal structural characteristics and potential rules of the sample historical gas load data in the chaotic time sequence. It can be understood that the main idea of phase space reconstruction is to map the sample historical gas load data X2(t) to a high-dimensional space, so that the data obtained by mapping is more consistent with the actual gas load changes.
[0122] In steps S401-S402 of some embodiments, mutual information calculation shown in equation (10) is performed on the sample historical gas load data X2(t) to measure the sample historical gas load data X2(t) to obtain a mutual information value. Specifically, the mutual information value I(τ') is calculated as shown in equation (10).
[0123]
[0124] wherein it is assumed that the sample historical gas load data X2(t) = {x1, x2,..., x N}, then P(x t ) represents the probability that the value of the gas load data x t corresponds to the value in {x1, x2,..., x N}; P(x t+τ′ ) represents the probability that the value of the gas load data x t+τ′ corresponds to the value in {x 1+τ′ , x 2+τ′ ,..., x N+τ′}; P(x t , x t+τ ) represents the joint probability that the values corresponding to P(x t ) and P(x t+τ′ ) respectively appear simultaneously in the sequences {x1, x2,..., x N} and {x 1+τ′ , x 2+τ′ ,..., x N+τ′}. When I(τ') is a minimum value, it indicates that the x t and x t+τ′ at this time have the maximum possible irrelevance. Since the chaotic system has nonlinear characteristics, i.e., has irrelevance, the first minimum value I(τ') obtained according to the preset τ' is taken as the optimal delay time τ when the phase space is reconstructed, i.e., as the target delay time.
[0125] In steps S403-S404 of some embodiments, the pseudo-nearest neighbor method is used to determine the optimal embedding space dimension m when the phase space is reconstructed, i.e., to determine the target space dimension. Specifically, for any phase point (i.e., vector) in the m-dimensional space there exists a nearest neighbor The distance between the phase point and the nearest neighbor is shown in equation (11).
[0126]
[0127] wherein when the embedding space dimension increases to m+1, the distance between the phase point and the nearest neighbor the distance is changed to the distance shown in the following formula (12)
[0128]
[0129] It can be understood that when the difference between the distance and the distance is greater than a preset threshold value, it indicates that two points that are not adjacent in the high-dimensional space become pseudo-nearest neighbor points when projected into the low-dimensional space. That is, when the ratio is calculated according to the distance and the distance , if the obtained ratio S m < preset ratio S0, it indicates that is a pseudo-nearest neighbor point of F t According to the above method, the number of samples of the pseudo-nearest neighbor points in the sample historical gas load data X2(t) under the current embedding space dimension m is determined. The current sample proportion of the pseudo-nearest neighbor points is determined according to the number of samples.
[0130]
[0131] If the current sample proportion is less than a preset proportion, it indicates that the internal structure and characteristics of the sample historical gas load data X2(t) can be fully displayed under the current embedding space dimension m, and therefore the current embedding space dimension m is taken as the target space dimension. If the obtained ratio S m ≥ preset ratio S0, the current embedding space dimension m is updated. The new number of samples of the pseudo-nearest neighbor points in the sample historical gas load data X2(t) is recalculated according to the updated embedding space dimension, and a new sample proportion is obtained according to the new number of samples. The current embedding space dimension m is iteratively updated until the new sample proportion is less than the preset proportion. It can be understood that in some embodiments, when the current sample proportion is equal to the new sample proportion, the embedding space dimension corresponding to the current sample proportion is taken as the target space dimension, and the embodiments of the present application are not limited in this regard.
[0132] In step S405 of some embodiments, the sample historical gas load data X2(t) is reconstructed in phase space according to the target space dimension and the target delay time to obtain sample reconstructed gas load data N. For example, when the target space dimension is determined to be equal to 3 and the delay time is equal to 2, the sample reconstructed gas load data N shown in the above formula (9) is obtained.
[0133] In step S204 of some embodiments, the sample reconstructed gas load data is classified to construct sample gas data and sample prediction data. It can be understood that the time node of the sample gas data is before the sample prediction data, that is, the sample prediction data can be predicted according to the sample gas data, that is, the sample prediction data is taken as the label data of the sample gas data. For example, according to the sample reconstructed gas load data N shown in formula (9), the sample gas data J shown in formula (14) and the sample prediction data L shown in formula (15) can be constructed.
[0134]
[0135]
[0136] It can be understood that the gas load data x6 is the label data corresponding to the gas load data {x1, x3, x5}.
[0137] In step S205 of some embodiments, an initial prediction model with an ANFIS model structure is constructed in advance, the sample gas data J is taken as the input data of the initial prediction model, and the prediction data of the initial prediction model, that is, the sample load prediction data, is obtained.
[0138] In step S206 of some embodiments, the loss calculation is performed on the sample load prediction data and the sample prediction data L according to a preset loss function, the parameters of the initial prediction model are adjusted according to the calculated loss value, the prediction ability of the initial prediction model is improved, and a target prediction model is obtained.
[0139] In step S104 of some embodiments, the target reconstructed gas load data is taken as the input data of the target prediction model, and the target load prediction data for characterizing the gas load situation in a future period of time is obtained. It can be understood that the target prediction model is a model trained in advance based on the ANFIS model structure.
[0140] Referring to Figure 5 In some embodiments, the target prediction model includes a fuzzification layer, a rule layer, a normalization layer, a defuzzification layer, and an output layer. Step S104 includes but is not limited to steps S501 to S505.
[0141] Step S501, the target reconstructed gas load data is processed by the fuzzification layer to obtain gas load membership;
[0142] Step S502, the gas load membership is calculated by the rule layer to obtain rule applicability;
[0143] Step S503, the rule applicability is processed by the normalization layer to obtain applicability probability;
[0144] Step S504, deblurring the target reconstructed gas load data through the deblurring layer to obtain key reconstructed gas load data;
[0145] Step S505, mapping and outputting the key reconstructed gas load data through the output layer to obtain target load prediction data.
[0146] In step S501 of some embodiments, assuming that the target reconstructed gas load data P is as shown in the following formula (16), the target reconstructed gas load data is taken as the input data of the fuzzification layer to perform fuzzification processing on the target reconstructed gas load data through the fuzzification layer to obtain gas load membership.
[0147]
[0148] For example, for input data After fuzzification processing through the fuzzification layer, the output data of the fuzzification layer, i.e., the gas load membership, as shown in formula (17) is obtained.
[0149]
[0150] wherein, μ Ai (x1') is the gas load membership corresponding to the input data x1'; μ Bj (x'3) is the gas load membership corresponding to the input data x3'; μ Ck (x'5) is the gas load membership corresponding to the input data x5'. It can be understood that μ Ai (x1'), μ Bj (x'3), μ Ck (x'5) are calculated according to the preset bell-shaped membership function, and the specific calculation formula is as shown in formula (18) to formula (20).
[0151]
[0152]
[0153]
[0154] wherein, a z , b z , c z (z=A i , B j , C k ) are all prior parameters.
[0155] In step S502 of some embodiments, the applicability of each fuzzy if-then rule in the preset rule library is calculated by the rule layer to obtain a rule applicability O 2,u , i.e., the triggering strength of each rule. Specifically, the rule applicability O is calculated according to the following formula (21) 2,u .
[0156] O2, u = W u = μ Ai (x'1)· μ Bj (x'3)· μC k (x'5), u = 1, 2, 3,... formula (21)
[0157] In step S503 of some embodiments, the rule applicability of each rule is normalized by the normalization layer to obtain an applicability probability, so as to determine the triggering proportion of the corresponding rule in the entire rule library, i.e., the probability of using the rule in the entire prediction process. Specifically, the applicability probability O is calculated according to the following formula (22) 3,u .
[0158]
[0159] In step S504 of some embodiments, the corresponding prediction result when each rule is used for prediction is calculated by the defuzzification layer to obtain key reconstructed gas load data. Specifically, the key reconstructed gas load data O is calculated according to the following formula (23) 4,u .
[0160]
[0161] wherein p u , q u , r u , s u are preset conclusion parameters; f u is a linear combination form of the conclusion parameters, used to represent the fuzzy rule.
[0162] In step S505 of some embodiments, the nonlinear mapping result of the target reconstructed gas load data , i.e., the target load prediction data, is obtained by the output layer. Specifically, the target load prediction data O5 is calculated according to the following formula (24)
[0163]
[0164] The gas load prediction method provided in the embodiments of the present application can obtain target historical gas load data by performing denoising processing on initial historical gas load data. The target historical gas load data is subjected to phase space reconstruction processing to obtain target reconstructed gas load data, thereby solving the problem in the related art that the accuracy of the single time series analysis method is affected due to the non-stationary and fluctuation characteristics of the gas load data. Therefore, when the target reconstructed gas load data is subjected to gas load prediction by using a preset target prediction model, the accuracy of the gas load prediction can be improved.
[0165] For example, Figure 6 The embodiments of the present application also provide a gas load prediction device, which can implement the above-described gas load prediction method. The device comprises:
[0166] The data acquisition module 601 is configured to acquire initial historical gas load data.
[0167] The denoising module 602 is configured to perform denoising processing on the initial historical gas load data to obtain target historical gas load data.
[0168] The phase space reconstruction module 603 is configured to perform phase space reconstruction processing on the target historical gas load data to obtain target reconstructed gas load data.
[0169] The gas load prediction module 604 is configured to perform gas load prediction on the target reconstructed gas load data by using a preset target prediction model to obtain target load prediction data.
[0170] The specific implementation of the gas load prediction device is basically the same as that of the above-described gas load prediction method, and thus will not be described herein again.
[0171] The embodiments of the present application also provide an electronic device. The electronic device comprises a memory and a processor. The memory stores a computer program. The processor implements the above-described gas load prediction method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0172] For example, Figure 7 , Figure 7 The hardware structure of the electronic device of another embodiment is shown in FIG. 7. The electronic device comprises:
[0173] The processor 701 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute a related program to implement the technical solutions provided in the embodiments of the present application.
[0174] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 702 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 702 and are called and executed by the processor 701 to implement the gas load prediction method of the embodiments of the present application.
[0175] The input / output interface 703 is configured to realize information input and output.
[0176] The communication interface 704 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0177] The bus 705 is configured to transmit information between various components (for example, the processor 701, the memory 702, the input / output interface 703, and the communication interface 704) of the device.
[0178] The processor 701, the memory 702, the input / output interface 703, and the communication interface 704 are connected to each other through the bus 705 to realize the communication connection between the devices.
[0179] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the above-mentioned gas load prediction method.
[0180] The memory is a non-transitory computer readable storage medium, which can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor. These remote memories can be connected to the processor through 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 a combination thereof.
[0181] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0182] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation to the embodiments of the present application, and can include more or fewer steps than the figures, or combine certain steps, or different steps.
[0183] The apparatus embodiments described above are merely illustrative, and units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.
[0184] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0185] The terms "first", "second", "third", "fourth" and the like used in the description of the present application and the above-described figures (if any) are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0186] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0187] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0188] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0189] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0190] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0191] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the rights of the embodiments of the present application. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A gas load prediction method, characterized in that, The method includes: Obtain initial historical gas load data; The initial historical gas load data is denoised to obtain the target historical gas load data; The target historical gas load data is subjected to phase space reconstruction processing to obtain the target reconstructed gas load data; The target reconstructed gas load data is used to predict the gas load by using a preset target prediction model to obtain the target load prediction data. The training method for the target prediction model specifically includes: Obtain raw historical gas load data; Modal decomposition processing is performed on the original historical gas load data to obtain initial decomposed gas load data; Obtain the original center frequency of the initial decomposed gas load data; The initial decomposed gas load data is updated based on the preset constraint data and the original center frequency to obtain the target decomposed gas load data. The correlation coefficient is obtained by calculating the correlation between the target decomposed gas load data and the original historical gas load data; Each modal component in the target decomposed gas load data is filtered according to a preset threshold, and the modal component corresponding to the correlation coefficient greater than the preset threshold is obtained to obtain the sample historical gas load data. The sample historical gas load data is subjected to phase space reconstruction processing to obtain sample reconstructed gas load data; Based on the reconstructed gas load data from the samples, sample gas data and sample prediction data are obtained; The sample gas load is predicted by using a preset initial prediction model to obtain sample load prediction data. The parameters of the initial prediction model are adjusted based on the sample prediction data and the sample load prediction data to obtain the target prediction model.
2. The method according to claim 1, characterized in that, The step of performing phase space reconstruction processing on the sample historical gas load data to obtain sample reconstructed gas load data includes: Mutual information is calculated on the historical gas load data of the sample to obtain the mutual information value; Determine the target delay time based on the mutual information value; The target quantity is obtained by determining the amount of data in the nearest neighbor data based on the target delay time and the sample historical gas load data. The dimension of the target space is determined based on the target quantity and the preset proportion value; Based on the target spatial dimension and the target delay time, the sample historical gas load data is reconstructed in phase space to obtain the sample reconstructed gas load data.
3. The method according to any one of claims 1 to 2, characterized in that, The step of denoising the initial historical gas load data to obtain the target historical gas load data includes: The initial historical gas load data is processed by Gaussian filtering to obtain the target historical gas load data.
4. The method according to any one of claims 1 to 2, characterized in that, The target prediction model includes a fuzzing layer, a rule layer, a normalization layer, a defuzzing layer, and an output layer; The step of predicting the target reconstructed gas load data using a preset target prediction model to obtain target load prediction data includes: The gas load data reconstructed from the target is fuzzified using the fuzzification layer to obtain the gas load membership degree; The rule applicability is obtained by performing fuzzy rule calculation on the membership degree of the gas load through the rule layer. The applicability of the rule is normalized through the normalization layer to obtain the applicability probability; The applicable probability and the target reconstructed gas load data are defuzzed by the defuzzing layer to obtain the key reconstructed gas load data. The target load prediction data is obtained by mapping and outputting the key reconfigured gas load data through the output layer.
5. A gas load prediction device, characterized in that, The device includes: The data acquisition module is used to acquire initial historical gas load data; The noise reduction module is used to perform noise reduction processing on the initial historical gas load data to obtain the target historical gas load data; The phase space reconstruction module is used to perform phase space reconstruction processing on the target historical gas load data to obtain the target reconstructed gas load data; The gas load prediction module is used to predict the gas load of the target reconstructed gas load data through a preset target prediction model, and obtain the target load prediction data. The gas load forecasting device is also used to: acquire raw historical gas load data; Modal decomposition processing is performed on the original historical gas load data to obtain initial decomposed gas load data; Obtain the original center frequency of the initial decomposed gas load data; The initial decomposed gas load data is updated based on the preset constraint data and the original center frequency to obtain the target decomposed gas load data. The correlation coefficient is obtained by calculating the correlation between the target decomposed gas load data and the original historical gas load data; Each modal component in the target decomposed gas load data is filtered according to a preset threshold, and the modal component corresponding to the correlation coefficient greater than the preset threshold is obtained to obtain the sample historical gas load data. The sample historical gas load data is subjected to phase space reconstruction processing to obtain sample reconstructed gas load data; Based on the reconstructed gas load data from the samples, sample gas data and sample prediction data are obtained; The sample gas load is predicted by using a preset initial prediction model to obtain sample load prediction data. The parameters of the initial prediction model are adjusted based on the sample prediction data and the sample load prediction data to obtain the target prediction model.
6. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the gas load prediction method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the gas load prediction method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Short-term load prediction method and device, electronic equipment and storage medium
CN114819267A