Oil and gas load hourly prediction method and system and electronic equipment

Through the method of dynamically determining the time particle size and multi-layer feature extraction, the oil and gas load time-by-time prediction model is trained, which solves the problem of insufficient accuracy in oil and gas load prediction in the existing technology, and achieves more accurate oil and gas load prediction.

CN119443340APending Publication Date: 2025-02-14PIPECHINA SOUTH CHINA CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411273693.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the accuracy of oil and gas load prediction has been insufficient, resulting in the shortage of oil and gas supply.

Method used

By obtaining the historical load data of the oil and gas pipeline network, dynamically determine the time particle size, perform preprocessing and multi-layer feature extraction, use a one-dimensional convolutional neural network to extract potential representation features and static features, and perform time-series encoding to train oil and gas load time-by-time prediction Model to achieve more accurate predictions.

Benefits of technology

Improve the accuracy of oil and gas load prediction, dynamic time particle size determination avoids prediction inaccuracy caused by fixed time particle size, median elimination removes abnormal data, multi-layer feature extraction extracts periodic information, significantly improving the prediction results accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443340A_ABST
    Figure CN119443340A_ABST
Patent Text Reader

Abstract

The invention discloses an oil and gas load hourly prediction method and system and electronic equipment, and the method comprises the steps: S1, obtaining the historical load data of a to-be-predicted oil and gas pipe network, determining the corresponding time granularity according to the fluctuation condition, and obtaining the corresponding relation between the time granularity and the historical load data; s2, preprocessing the historical load data according to the corresponding relation between the time granularity and the historical load data to obtain sample data; and S3, performing multi-layer feature extraction on the sample data to obtain periodic time sequence information among the time granularities. And S4, taking the periodic time sequence information between the time granularities as input, taking the trained load data as output, comparing the trained load data of the same time granularity with corresponding load data in the sample data, and carrying out iterative training. And S5, inputting the time granularity into the oil and gas load hourly prediction model to obtain load data needing to be output. In this way, oil and gas load prediction better meets actual requirements, and the accuracy of oil and gas load prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil and gas load prediction, and in particular to an hourly oil and gas load prediction method, system and electronic equipment. Background Art

[0002] With the increase in car ownership rate and the rapid development of the oil and gas industry, a "gas shortage" phenomenon has emerged. The sharp increase in oil and gas consumption is the main reason for the "gas shortage" phenomenon.

[0003] In addition to the increase in consumption, another reason for the "gas shortage" phenomenon is: the lack of accuracy in oil and gas load forecasting, and there are still major problems in the accuracy of oil and gas load forecasting. The supply shortage after the sharp increase in oil and gas was not predicted in advance, indicating that with the further development of the oil and gas industry, the oil and gas load forecasting technology has not been improved, which has led to a large deviation in the forecast results and the "gas shortage" phenomenon.

[0004] Therefore, a more accurate prediction of oil and gas load is urgently needed. Summary of the invention

[0005] The technical problem to be solved by the present invention is that it is impossible to accurately predict the oil and gas load.

[0006] In order to solve the above technical problems, the present invention provides a method, system and electronic equipment for hourly prediction of oil and gas load. The specific technical solutions are as follows: In the first aspect, the present application provides a method for hourly prediction of oil and gas load, comprising: Step S1: Obtain historical load data of the oil and gas pipeline network to be predicted, determine the corresponding time granularity according to the fluctuation of the historical load data, and obtain the corresponding relationship between the time granularity and the historical load data. Step S2: According to the corresponding relationship between the time granularity and the historical load data, pre-process the historical load data to obtain sample data. Step S3: Perform multi-layer feature extraction on the sample data to obtain periodic timing information between each time granularity, specifically including the following steps. Step S31: Input the sample data into the extraction network model, and use a one-dimensional convolutional neural network to extract the potential representation features of the sample data. Step S32: Input the potential representation features into the normalized activation layer for processing to obtain the static features of the sample data. Step S33: Perform time series encoding on the static features to obtain periodic timing information between each time granularity. Step S4: Train the initial model for hourly prediction of oil and gas load, take the periodic time series information between each time granularity as input, take the trained load data as output, and perform iterative training by comparing the trained load data of the same time granularity with the corresponding load data in the sample data until the training end condition is met, end the training, and obtain the hourly prediction model of oil and gas load. Step S5: Input the time granularity into the hourly prediction model of oil and gas load to obtain the load data to be output.

[0007] In combination with the first aspect, in an optional implementation, in the above step S1, historical load data of the oil and gas pipeline network to be predicted is obtained, the corresponding time granularity is determined according to the fluctuation of the historical load data, and the corresponding relationship between the time granularity and the historical load data is obtained. The detailed steps are as follows: Step S11: Determine the initial time granularity, obtain the historical load data corresponding to the initial time granularity, calculate the average value of the historical load data corresponding to the initial time granularity, and obtain the average historical load data corresponding to the initial time granularity. Step S12: Perform time granularity integration processing according to the fluctuation value of the average historical load data of the initial time granularity and the adjacent time granularity to obtain the corresponding relationship between the time granularity and the historical load data, specifically including: obtaining the average historical load data corresponding to the initial time granularity, the average historical load data corresponding to the first time granularity, and the average historical load data corresponding to the second time granularity. The adjacent time granularity includes: the first time granularity and the second time granularity, and the first time granularity and the second time granularity are the time granularities adjacent to the initial time granularity. Calculate the difference between the first average historical load data of the initial time granularity and the first time granularity, and the difference between the second average historical load data of the initial time granularity and the second time granularity. Compare the difference between the first average historical load data and the second average historical load data with the difference threshold value respectively. If the first average historical load data difference is ≤ the difference threshold, and the second average historical load data difference is ≤ the difference threshold, the initial time granularity, the first time granularity and the second time granularity are integrated and merged into one time granularity. If the first average historical load data difference is greater than the difference threshold, and / or the second average historical load data difference is greater than the difference threshold, no integration is performed. Loop through all time granularities until the average historical load data differences of all adjacent time granularities are greater than the difference threshold, determine the time granularity, and obtain the corresponding relationship between the time granularity and the historical load data.

[0008] In combination with the first aspect, in an optional implementation, in the above step S2, according to the correspondence between the time granularity and the historical load data, the historical load data is preprocessed to obtain sample data, including the following steps: Step S21: According to the correspondence between the time granularity and the historical load data, the median of the historical load data of each time granularity is calculated, and the historical load data of the time granularity is subtracted from the median to obtain the difference data of the historical load data of each time granularity. Step S22: Compare the difference data with the difference threshold data, if the difference data ≥ the difference threshold data, then eliminate the historical load data of the time granularity corresponding to the difference data to obtain sample data.

[0009] In combination with the first aspect, in an optional implementation, in the above step S31, a one-dimensional convolutional neural network is used to extract the potential representation features of the sample data, using the following formula: Among them, CNN1 is the extraction function of the one-dimensional convolutional neural network. is the input of the k+1th layer of the one-dimensional convolutional neural network, E k+1is the potential representation feature extracted by the k+1th layer of the one-dimensional convolutional neural network, E k+1 Including T time granularities in d k+1 ×T dimensions of potential representation features, namely represents the potential representation feature corresponding to the t-th time granularity in the k+1th layer of the one-dimensional convolutional neural network, d k+1 It represents the number of dimensions of the k+1th layer of the one-dimensional convolutional neural network, T is the number of time granularities in each layer of the one-dimensional convolutional neural network, k is the number of layers of the one-dimensional convolutional neural network, t=[1, T], k=[1, K].

[0010] In combination with the first aspect, in an optional implementation, in the above step S32, the potential representation features are input into the normalized activation layer for processing to obtain the static features of the sample data. The detailed steps are as follows: Step S321: Input the potential representation features extracted from each layer of the one-dimensional convolutional neural network into the normalized activation layer, perform normalized activation processing, and obtain the features after normalized activation processing, using the following formula: U k+1 =δ(BN(E k+1 )); Where U k+1 is the feature of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, BN represents the batch normalization layer function, and δ is the ReLU activation function; Step S322: Perform an average operation on the time dimension on the features that have been normalized and activated to obtain a global representation of the features that have been normalized and activated. The calculation formula is: Z q k+1 =avg(U k+1 [q,:]); Among them, Z q k+1 It represents the global representation of the features of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, U k+1 [q,:] is to take U k+1 All values ​​corresponding to the qth dimension, q = 1, ..., d k+1 ×T; Step S323: Calculate the network weight value of each dimensional feature of each layer of the one-dimensional convolutional neural network, and the calculation formula is: Among them, S k+1 represents the network weight value of each dimension feature of the k+1th layer of the one-dimensional convolutional neural network, σ is the sigmoid activation function, and are the network weights to be learned respectively; Step S324: Use the network weight values ​​of the features of each dimension to perform feature excitation on the global representation of the features that have been normalized and activated to obtain static features. The calculation formula is: in, Indicates S k+1 The qth element of Including T time granularities in d k+1 The eigenvalues ​​of the feature excitations in ×T dimensions, It represents the feature value of the t-th time granularity after feature excitation in the k+1-th layer of the one-dimensional convolutional neural network.

[0011] In combination with the first aspect, in an optional implementation, in the above step s4, the initial model for hourly prediction of oil and gas load is trained, and the detailed steps include: Step S41: Input the periodic time series information between each time granularity into the initial model for hourly prediction of oil and gas load for training, and output the trained load data. Step S42: Obtain the trained load data of the same time granularity and the corresponding load data in the sample data, obtain the load data difference, and compare the load data difference with the load data difference threshold. If the load data difference ≤ the load data difference threshold, the training end condition is met, the training ends, and the oil and gas load hourly prediction model is obtained. If the load data difference > the load data difference threshold, continue iterative training and execute step S43. Step S43: Repeat step S42 until the training end condition is met, the training ends, and the oil and gas load hourly prediction model is obtained.

[0012] In combination with the first aspect, in an optional implementation, the load data includes an oil and gas load rate.

[0013] The above technical solution provided in the first aspect of the present invention has the following beneficial effects: 1. The hourly prediction method of oil and gas load of the present application dynamically determines the size of the time granularity, which can avoid the problem of inaccurate prediction caused by fixed time granularity and make the prediction result more consistent with the actual result.

[0014] 2. Through the median elimination method, abnormal data can be eliminated, so that the sample data is more in line with actual requirements.

[0015] 3. Through multi-layer feature extraction, the periodic information between each time granularity of oil and gas load is extracted. Then, the summarized periodic information is used as input and the actual historical load of oil and gas is used as output to train the hourly prediction model of oil and gas load, which can make the prediction results of oil and gas load more accurate.

[0016] In the second aspect, the present invention provides an hourly prediction system for oil and gas load, comprising: an acquisition module, a preprocessing module, a feature extraction module, a model training module and a prediction module. Among them, the acquisition module is used to obtain the historical load data of the oil and gas pipeline network to be predicted, determine the corresponding time granularity according to the fluctuation of the historical load data, and obtain the corresponding relationship between the time granularity and the historical load data. The preprocessing module is used to preprocess the historical load data according to the corresponding relationship between the time granularity and the historical load data to obtain sample data. The feature extraction module is used to perform multi-layer feature extraction on the sample data to obtain periodic time series information between each time granularity. The feature extraction module is specifically used to input the sample data into the extraction network model, and use a one-dimensional convolutional neural network to extract the potential representation features of the sample data; input the potential representation features into the normalized activation layer for processing to obtain the static features of the sample data; perform time series encoding on the static features to obtain periodic time series information between each time granularity. The model training module is used to train the initial model for hourly prediction of oil and gas load, taking the periodic time series information between each time granularity as input and the trained load data as output. By comparing the trained load data of the same time granularity with the corresponding load data in the sample data, iterative training is performed until the training end condition is met, and the training is terminated to obtain the hourly prediction model of oil and gas load. The prediction module is used to input the time granularity into the hourly prediction model of oil and gas load to obtain the load data to be output.

[0017] In a third aspect, the present invention provides an electronic device, comprising: a memory, and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in the first aspect and any one of the optional methods thereof.

[0018] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method as described in the first aspect and any one of its optional aspects.

[0019] It can be understood that the beneficial effects that can be achieved by the oil and gas load hourly prediction system of the second aspect, the electronic device of the third aspect, and the computer-readable storage medium of the fourth aspect can be referred to the beneficial effects of the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 A flow chart of a method for hourly forecasting of oil and gas load provided by an embodiment of the present invention; Figure 2 A schematic structural diagram of an oil and gas load hourly prediction system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.

[0023] In order to solve the problem that the oil and gas load cannot be accurately predicted, an embodiment of the present invention provides an hourly prediction method for the oil and gas load. Figure 1 is a flow chart of a method for hourly forecasting of oil and gas load provided by an embodiment of the present invention. Figure 1 The hourly prediction method of oil and gas load proposed in this application includes: Step S1: Obtain historical load data of the oil and gas pipeline network to be predicted, determine the corresponding time granularity according to the fluctuation of the historical load data, and obtain the corresponding relationship between the time granularity and the historical load data.

[0024] The historical load data refers to the historical load data within a few days before the day to be predicted. Furthermore, the load data may include the oil and gas load rate and other information. In the embodiment of the present invention, the oil and gas load rate information in the load data is used to use the oil and gas load hourly prediction method to predict the oil and gas load rate to be output. The time granularity refers to the unit time of the oil and gas load prediction.

[0025] In some embodiments, the load of the oil and gas pipeline network may be different on different dates and at different times of the day. Therefore, dividing the historical load data with a fixed time granularity may be inaccurate. The following steps may be used to determine the time granularity: Step S11: determine the initial time granularity, obtain the historical load data corresponding to the initial time granularity, calculate the average value of the historical load data corresponding to the initial time granularity, and obtain the average historical load data corresponding to the initial time granularity.

[0026] Step S12: Perform time granularity integration processing based on the fluctuation value of the average historical load data of the initial time granularity and the adjacent time granularity to obtain the corresponding relationship between the time granularity and the historical load data. Specifically including: First, obtain the average historical load data corresponding to the initial time granularity, the average historical load data corresponding to the first time granularity, and the average historical load data corresponding to the second time granularity. The adjacent time granularities include: the first time granularity and the second time granularity. The first time granularity and the second time granularity are the time granularities adjacent to the initial time granularity.

[0027] Then, the first average historical load data difference between the initial time granularity and the first time granularity, and the second average historical load data difference between the initial time granularity and the second time granularity are calculated respectively.

[0028] Next, the first average historical load data difference and the second average historical load data difference are compared with difference thresholds respectively.

[0029] If the first average historical load data difference is ≤ the difference threshold, and the second average historical load data difference is ≤ the difference threshold, the initial time granularity, the first time granularity and the second time granularity are integrated and merged into one time granularity.

[0030] If the first average historical load data difference is greater than the difference threshold, and / or the second average historical load data difference is greater than the difference threshold, no integration processing is performed.

[0031] Finally, all time granularities are looped through until the difference between the average historical load data of all adjacent time granularities is greater than the difference threshold, the time granularity is determined, and the corresponding relationship between the time granularity and the historical load data is obtained.

[0032] In the embodiment of the present invention, first, the initial time granularity is set to 1 hour, and then a day can be divided into 24 time granularities. Then, the historical load data fluctuation values ​​of each time granularity and the adjacent time granularity are obtained in turn, and the time granularity integration processing is performed.

[0033] For example, if there are three adjacent time granularities 1-3, the average historical load data of each time granularity is obtained respectively. If the difference between the average historical load data corresponding to the time granularity 2 in the middle position and the average historical load data of the time granularities 1 and 3 is less than the difference threshold, it means that the volatility of the load data in the time interval of time granularity 1-3 is not large, and it is not necessary to set three time granularities. Time granularities 1-3 can be integrated into one time granularity A. Repeat the above operation until all time granularities with small load fluctuations are integrated respectively, and the difference of the average historical load data of all adjacent time granularities is greater than the difference threshold, and finally determine the time granularity to obtain the corresponding relationship between the time granularity and the historical load data.

[0034] In this way, when making hourly predictions of oil and gas loads, the size of the time granularity is dynamically determined, which can avoid the problem of inaccurate predictions caused by fixed time granularity and make the prediction results more consistent with the actual results.

[0035] Step S2: According to the correspondence between the time granularity and the historical load data, the historical load data is preprocessed to obtain sample data.

[0036] In some embodiments, in step S2, according to the correspondence between the time granularity and the historical load data, the historical load data is preprocessed to obtain sample data, including obtaining difference data and eliminating abnormal data, which specifically includes the following steps: Step S21: According to the correspondence between the time granularity and the historical load data, the median of the historical load data of each time granularity is calculated, and the historical load data of the time granularity is subtracted from the median to obtain the difference data of the historical load data of each time granularity.

[0037] Step S22: compare the difference data with the difference threshold data. If the difference data ≥ the difference threshold data, remove the historical load data of the time granularity corresponding to the difference data to obtain sample data.

[0038] In this way, abnormal data can be eliminated through the median elimination method, so that the sample data can be more in line with actual requirements.

[0039] Step S3: Perform multi-layer feature extraction on the sample data to obtain periodic time series information between various time granularities.

[0040] Specifically, the multi-layer feature extraction of sample data includes: extracting potential representation features, extracting static features and time series numbers. Specifically, the steps include: Step S31: Input the sample data into the extraction network model, and use a one-dimensional convolutional neural network to extract the potential representation features of the sample data.

[0041] Step S32: Input the potential representation features into the normalized activation layer for processing to obtain the static features of the sample data.

[0042] Step S33: Perform time series encoding on the static features to obtain periodic time series information between various time granularities.

[0043] In some embodiments, in the above step S31, a one-dimensional convolutional neural network is used to extract the potential representation features of the sample data using the following formula: Among them, CNN1 is the extraction function of the one-dimensional convolutional neural network. is the input of the k+1th layer of the one-dimensional convolutional neural network, E k+1 is the potential representation feature extracted by the k+1th layer of the one-dimensional convolutional neural network, E k+1 Including T time granularities in d k+1 ×T dimensions of potential representation features, namely represents the potential representation feature corresponding to the t-th time granularity in the k+1th layer of the one-dimensional convolutional neural network, d k+1 It represents the number of dimensions of the k+1th layer of the one-dimensional convolutional neural network, T is the number of time granularities in each layer of the one-dimensional convolutional neural network, k is the number of layers of the one-dimensional convolutional neural network, t=[1, T], k=[1, K].

[0044] In some embodiments, in the above step S32, the potential representation features are input into the normalized activation layer for processing to obtain the static features of the sample data. The detailed steps are as follows: Step S321: Input the potential representation features extracted by each layer of the one-dimensional convolutional neural network into the normalized activation layer, perform normalized activation processing, and obtain the features after normalized activation processing, using the following formula: U k+1 =δ(BN(E k+1 )); Where U k+1 is the feature of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, BN represents the batch normalization layer function, and δ is the ReLU activation function; Step S322: Perform an average operation on the time dimension on the features that have been normalized and activated to obtain a global representation of the features that have been normalized and activated. The calculation formula is: Z q k+1 =avg(U k+1 [q,:]); Among them, Z q k+1It represents the global representation of the features of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, U k+1 [q,:] is to take U k+1 All values ​​corresponding to the qth dimension, q = 1, ..., d k+1 ×T; Step S323: Calculate the network weight value of each dimensional feature of each layer of the one-dimensional convolutional neural network, and the calculation formula is: Among them, S k+1 represents the network weight value of each dimension feature of the k+1th layer of the one-dimensional convolutional neural network, σ is the sigmoid activation function, and are the network weights to be learned respectively; Step S324: Use the network weight values ​​of the features of each dimension to perform feature excitation on the global representation of the features that have been normalized and activated to obtain static features. The calculation formula is: in, Indicates S k+1 The qth element of Including T time granularities in d k+1 The eigenvalues ​​of the feature excitations in ×T dimensions, It represents the feature value of the t-th time granularity after feature excitation in the k+1-th layer of the one-dimensional convolutional neural network.

[0045] In this way, the periodic information between each time granularity of oil and gas load is extracted through multi-layer feature extraction. Then, the summarized periodic information is used as input and the actual historical load of oil and gas is used as output to train the hourly prediction model of oil and gas load, which can make the prediction results of oil and gas load more accurate.

[0046] Step S4: Train the initial model for hourly prediction of oil and gas load, with the periodic time series information between each time granularity as input and the trained load data as output. By comparing the trained load data of the same time granularity with the corresponding load data in the sample data, iterative training is performed until the training end conditions are met, and the training is terminated to obtain the hourly prediction model of oil and gas load.

[0047] In some embodiments, in the above step S4, the initial model for hourly prediction of oil and gas load is trained, and the detailed steps include: Step S41: input the periodic timing information between each time granularity into the initial model for hourly prediction of oil and gas load for training, and output the trained load data.

[0048] Step S42: Obtain the load data after training and the corresponding load data in the sample data at the same time granularity, obtain the load data difference, and compare the load data difference with the load data difference threshold: If the load data difference is less than or equal to the load data difference threshold, the training end condition is met, the training is ended, and the oil and gas load hourly prediction model is obtained.

[0049] If the load data difference is greater than the load data difference threshold, the iterative training continues and step S43 is executed.

[0050] Step S43: Repeat step S42 until the training end condition is met, end the training, and obtain the hourly prediction model of oil and gas load.

[0051] In this way, the periodic time series information between each time granularity is used as the input of the oil and gas load hourly prediction model, and the trained load data is used as the output of the oil and gas load hourly prediction model. The trained load data of the same time granularity and the corresponding load data in the sample data are obtained to obtain the load data difference, and the load data difference is compared with the load data difference threshold, and the oil and gas load hourly prediction model is iteratively trained. That is, the oil and gas load hourly prediction model is trained according to the periodic law of the oil and gas load.

[0052] In one implementation, the above-mentioned oil and gas load hourly prediction model can adopt a convolutional neural network model.

[0053] Step S5: Input the time granularity into the hourly oil and gas load prediction model to obtain the load data to be output.

[0054] In this way, the oil and gas load hourly prediction model can be used to make a more accurate prediction of the oil and gas load, and the prediction results meet the actual requirements, thus avoiding the occurrence of the "gas shortage" phenomenon.

[0055] By using the hourly prediction method for oil and gas load as described in steps S1-S5 provided by the embodiment of the present invention, the size of the time granularity can be dynamically determined to avoid the problem of inaccurate prediction caused by fixed time granularity, so that the prediction result is more in line with the actual result. By using the median elimination method, abnormal data can be eliminated, so that the sample data is more in line with actual requirements. In addition, by extracting the periodic information between the time granularities of the oil and gas load through multi-layer feature extraction, the hourly prediction model for oil and gas load is trained by using the summarized periodic information as input and the actual historical load of oil and gas as output, so that the prediction result of oil and gas load can be more accurate.

[0056] In some embodiments, the present invention also provides an hourly forecasting system for oil and gas load. Figure 2 A schematic diagram of the structure of the oil and gas load hourly prediction system provided by the embodiment of the present invention is shown in FIG. Figure 2As shown, the oil and gas load hourly prediction system 200 includes: an acquisition module 201, a preprocessing module 202, a feature extraction module 203, a model training module 204 and a prediction module 205.

[0057] The acquisition module 201 is used to acquire the historical load data of the oil and gas pipeline network to be predicted, determine the corresponding time granularity according to the fluctuation of the historical load data, and obtain the corresponding relationship between the time granularity and the historical load data.

[0058] The preprocessing module 202 is used to preprocess the historical load data according to the corresponding relationship between the time granularity and the historical load data to obtain sample data.

[0059] The feature extraction module 203 is used to perform multi-layer feature extraction on the sample data to obtain periodic time series information between various time granularities.

[0060] The feature extraction module 203 is specifically used to input the sample data into the extraction network model, use the one-dimensional convolutional neural network to extract the potential representation features of the sample data; input the potential representation features into the normalized activation layer for processing to obtain the static features of the sample data; perform time series encoding on the static features to obtain periodic time series information between each time granularity.

[0061] The model training module 204 is used to train the initial model for hourly prediction of oil and gas load. It takes the periodic time series information between each time granularity as input and the trained load data as output. It performs iterative training by comparing the trained load data of the same time granularity with the corresponding load data in the sample data until the training end condition is met. The training is terminated to obtain the hourly prediction model of oil and gas load.

[0062] The prediction module 205 is used to input the time granularity into the oil and gas load hourly prediction model to obtain the load data to be output.

[0063] In some embodiments, an embodiment of the present invention further provides an electronic device, comprising: a memory, one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the relevant steps of hourly prediction of oil and gas load in the above method embodiment.

[0064] In some embodiments, an embodiment of the present invention further provides a computer-readable storage medium, including computer instructions, which, when executed on an electronic device, enable the electronic device to execute relevant steps of hourly prediction of oil and gas load in the above method embodiment.

[0065] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0066] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0067] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0068] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" 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 representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0069] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

Claims

1. A method for hourly prediction of oil and gas load, characterized in that: include: Step S1: Acquire historical load data of the oil and gas pipeline network to be predicted, determine a corresponding time granularity according to fluctuations of the historical load data, and obtain a corresponding relationship between the time granularity and the historical load data; Step S2: preprocessing the historical load data according to the corresponding relationship between the time granularity and the historical load data to obtain sample data; Step S3: performing multi-layer feature extraction on the sample data to obtain periodic time series information between the time granularities, specifically comprising the following steps: Step S31: inputting the sample data into an extraction network model, and using a one-dimensional convolutional neural network to extract potential representation features of the sample data; Step S32: inputting the potential representation features into a normalized activation layer for processing to obtain static features of the sample data; Step S33: performing time series coding on the static features to obtain periodic time series information between the time granularities; Step S4: training an initial model for hourly prediction of oil and gas load, taking the periodic time series information between the time granularities as input and the trained load data as output, and performing iterative training by comparing the trained load data of the same time granularity with the corresponding load data in the sample data until the training end condition is met, and then the training is terminated to obtain an hourly prediction model for oil and gas load; Step S5: input the time granularity into the oil and gas load hourly prediction model to obtain the load data to be output.

2. The method according to claim 1, characterized in that In step S1, the historical load data of the oil and gas pipeline network to be predicted is obtained, the corresponding time granularity is determined according to the fluctuation of the historical load data, and the corresponding relationship between the time granularity and the historical load data is obtained. The detailed steps are as follows: Step S11: determining an initial time granularity, acquiring historical load data corresponding to the initial time granularity, calculating an average value of the historical load data corresponding to the initial time granularity, and obtaining average historical load data corresponding to the initial time granularity; Step S12: performing time granularity integration processing according to the fluctuation values ​​of the average historical load data of the initial time granularity and the adjacent time granularities to obtain the corresponding relationship between the time granularity and the historical load data, specifically including: Obtaining average historical load data corresponding to the initial time granularity, average historical load data corresponding to the first time granularity, and average historical load data corresponding to the second time granularity, wherein the adjacent time granularities include: the first time granularity and the second time granularity, and the first time granularity and the second time granularity are time granularities adjacent to and before the initial time granularity; respectively calculating a first average historical load data difference between the initial time granularity and the first time granularity, and a second average historical load data difference between the initial time granularity and the second time granularity; Compare the first average historical load data difference and the second average historical load data difference with the difference threshold respectively: if the first average historical load data difference is ≤ the difference threshold, and the second average historical load data difference is ≤ the difference threshold, then integrate the initial time granularity, the first time granularity and the second time granularity into one time granularity; If the first average historical load data difference value is greater than the difference threshold value, and / or the second average historical load data difference value is greater than the difference threshold value, no integration processing is performed; All time granularities are traversed in a loop until the average historical load data differences of all adjacent time granularities are greater than the difference threshold, the time granularity is determined, and the corresponding relationship between the time granularity and the historical load data is obtained.

3. The method according to claim 1, characterized in that In step S2, the historical load data is preprocessed according to the correspondence between the time granularity and the historical load data to obtain sample data, including the following steps: Step S21: according to the correspondence between the time granularity and the historical load data, the median of the historical load data of each time granularity is calculated, and the difference between the historical load data of the time granularity and the median is obtained to obtain the difference data of the historical load data of each time granularity; Step S22: Compare the difference data with the difference threshold data. If the difference data ≥ the difference threshold data, remove the historical load data of the time granularity corresponding to the difference data to obtain the sample data.

4. The method according to claim 1, characterized in that: In step S31, the one-dimensional convolutional neural network is used to extract the potential representation features of the sample data using the following formula: Among them, CNN1 is the extraction function of the one-dimensional convolutional neural network. is the input of the k+1th layer of the one-dimensional convolutional neural network, E k+1 is the potential representation feature extracted by the k+1th layer of the one-dimensional convolutional neural network, and the E k+1 Including T time granularities in d k+1 ×T dimensions of potential representation features, namely represents the potential representation feature corresponding to the t-th time granularity in the k+1th layer of the one-dimensional convolutional neural network, d k+1 It represents the number of dimensions of the k+1th layer of the one-dimensional convolutional neural network, T is the number of time granularities in each layer of the one-dimensional convolutional neural network, k is the number of layers of the one-dimensional convolutional neural network, t=[1, T], k=[1, K].

5. The method according to claim 4, characterized in that In step S32, the potential representation features are input into the normalized activation layer for processing to obtain the static features of the sample data. The detailed steps are as follows: Step S321: Input the potential representation features extracted from each layer of the one-dimensional convolutional neural network into the normalized activation layer, perform normalized activation processing, and obtain the features after normalized activation processing, using the following formula: U k+1 =δ((BN(E k+1 )); Where U k+1 is the feature of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, BN represents the batch normalization layer function, and δ is the ReLU activation function; Step S322: Perform an average operation on the time dimension on the features that have undergone normalized activation processing to obtain a global representation of the features that have undergone normalized activation processing. The calculation formula is: With q k+1 =Aug(U k+1 [q,:]); Among them, Z q k+1 It represents the global representation of the features of the k+1th layer of the one-dimensional convolutional neural network after normalized activation processing, U k+1 [g,:] is to take U k+1 All values ​​corresponding to the qth dimension, q = 1, ..., d k+1 ×T; Step S323: Calculate the network weight value of each dimensional feature of each layer of the one-dimensional convolutional neural network, and the calculation formula is: Among them, S k+1 represents the network weight value of each dimension feature of the k+1th layer of the one-dimensional convolutional neural network, σ is the sigmoid activation function, and are the network weights to be learned respectively; Step S324: Using the network weight values ​​of the features of each dimension, feature excitation is performed on the global representation of the features that have undergone normalized activation processing to obtain the static features. The calculation formula is: in, Indicates S k+1 The qth element of Including T time granularities in d k+1 The eigenvalues ​​of the feature excitations in ×T dimensions, It represents the feature value of the t-th time granularity after feature excitation in the k+1-th layer of the one-dimensional convolutional neural network.

6. The method according to claim 1, characterized in that In step S4, the training of the initial model for hourly prediction of oil and gas load includes the following detailed steps: Step S41: inputting the periodic time series information between the time granularities into the initial model for hourly prediction of oil and gas load for training, and outputting the trained load data; Step S42: Obtain the trained load data and the corresponding load data in the sample data at the same time granularity to obtain a load data difference, and compare the load data difference with a load data difference threshold: If the load data difference is less than or equal to the load data difference threshold, the training end condition is met, the training is ended, and the oil and gas load hourly prediction model is obtained; If the load data difference is greater than the load data difference threshold, continue iterative training and execute step S43; Step S43: Repeat step S42 until the training end condition is met, and then end the training to obtain the oil and gas load hourly prediction model.

7. The method according to claim 1, characterized in that The load data includes oil and gas load ratio.

8. An hourly forecasting system for oil and gas load, characterized in that: include: Acquisition module, preprocessing module, feature extraction module, model training module and prediction module; The acquisition module is used to acquire the historical load data of the oil and gas pipeline network to be predicted, determine the corresponding time granularity according to the fluctuation of the historical load data, and obtain the corresponding relationship between the time granularity and the historical load data; The preprocessing module is used to preprocess the historical load data according to the corresponding relationship between the time granularity and the historical load data to obtain sample data; The feature extraction module is used to perform multi-layer feature extraction on the sample data to obtain periodic time series information between each of the time granularities; The feature extraction module is specifically used to input the sample data into an extraction network model, and use a one-dimensional convolutional neural network to extract the potential representation features of the sample data; input the potential representation features into a normalized activation layer for processing to obtain static features of the sample data; perform time series encoding on the static features to obtain periodic time series information between the time granularities; The model training module is used to train the initial model for hourly prediction of oil and gas load, taking the periodic time series information between the time granularities as input and the trained load data as output, and performing iterative training by comparing the trained load data of the same time granularity with the corresponding load data in the sample data until the training end condition is met, and then the training is terminated to obtain the hourly prediction model of oil and gas load; The prediction module is used to input the time granularity into the oil and gas load hourly prediction model to obtain the load data to be output.

9. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.