Method and device for predicting natural gas sales volume

By training the natural gas sales prediction model based on sequence generation adversarial network and reinforcement learning, the problem of low prediction accuracy in the prior art is solved, and higher prediction accuracy is achieved.

CN120198246APending Publication Date: 2025-06-24PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311783486.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art is difficult to accurately and reliably predict the natural gas usage of users, especially in complex mode data, where the prediction accuracy is low.

Method used

By obtaining the influencing factor data sequences associated with the gas consumption of the target user, Seasonal-Trend-Loss decomposition and Fourier transform, the predicted input data is obtained, and input it into the trained natural gas sales prediction model, using the sequence generation adversarial network and reinforcement learning for training, to obtain accurate gas consumption prediction values.

Benefits of technology

Improve the accuracy of users' natural gas usage prediction and achieve more accurate and reliable prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198246A_ABST
    Figure CN120198246A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a natural gas sales prediction method and device, and the method comprises the steps: obtaining an influence factor data sequence related to the gas consumption of a target user; processing the influence factor data sequence to obtain prediction input data; inputting the prediction input data into the trained natural gas sales prediction model to obtain a prediction value of the gas consumption of the target user in the target time period; wherein the natural gas sales prediction model is obtained by performing reinforcement learning-based training on a preset initial regression prediction model through a training data set and a preset sequence generative adversarial network. According to the method, a sequence generation adversarial network is utilized to implicitly learn an incidence relation between an influence factor data sequence and gas consumption in time and space, reinforcement learning game adversarial training is carried out, training of an initial regression prediction model is completed, and a natural gas sales prediction model with relatively high fitting ability and generalization ability is obtained; therefore, the natural gas consumption of the user can be accurately and reliably predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for predicting natural gas sales. Background Art

[0002] With the market-oriented reform of natural gas and the energy transformation, my country has gradually formed a natural gas market structure of "multiple upstream oil and gas suppliers and full competition in the downstream sales market". Natural gas sales companies are transforming from resource-centered sales companies to user-centered value-added service companies. The integrated business model no longer exists, and sales costs have also changed significantly. For natural gas sales companies, accurately predicting users' natural gas usage is the core of continuously exploring the value of user consumption data, improving transaction quality and marketing strategies, and is also the key to strengthening user resource management. It is also an important opportunity to achieve innovative development and break through market bottlenecks. In related technologies, machine learning models can be used to predict users' natural gas usage, but for complex pattern data, the prediction accuracy is low.

[0003] Therefore, how to accurately and reliably predict users' natural gas consumption is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a natural gas sales prediction method, device, electronic device and storage medium for accurately and reliably predicting a user's natural gas usage.

[0005] One embodiment of the present application provides a method for predicting natural gas sales, the method comprising:

[0006] Acquire a data sequence of influencing factors associated with the gas consumption of the target user; wherein the data sequence of influencing factors includes influencing factor data of multiple historical time periods;

[0007] Processing the influencing factor data sequence to obtain prediction input data;

[0008] The predicted input data is input into the trained natural gas sales prediction model to obtain the predicted value of the gas consumption of the target user in the target time period; wherein the natural gas sales prediction model is obtained by training a preset initial regression prediction model based on reinforcement learning using a training data set and a preset sequence generative adversarial network.

[0009] Furthermore, the processing of the influencing factor data sequence to obtain prediction input data includes:

[0010] Perform Seasonal-Trend-Loss decomposition on the obtained influencing factor data sequence to obtain the time series decomposition result, where the time series decomposition result includes at least the trend wave data sequence;

[0011] Use Fourier transform to convert the trend wave data sequence to the frequency domain as the prediction input data.

[0012] Further, the natural gas sales prediction model is trained in the following manner:

[0013] Obtain the training data set;

[0014] Use the preset initial regression prediction model as the generator and the convolutional neural network model as the discriminator to construct the sequence generation adversarial network; where the convolutional neural network model is used to determine whether the result output by the generator is real data;

[0015] Use the training data set and the sequence generation adversarial network to perform reinforcement learning-based training on the initial regression prediction model to obtain the trained natural gas sales prediction model.

[0016] Further, the training data set is obtained in the following manner:

[0017] Obtain multiple historical influencing factor data sequences of the target user and the historical gas consumption corresponding to each historical influencing factor data sequence;

[0018] Use the historical influencing factor data sequence as the training sample and the historical gas consumption corresponding to the historical influencing factor data sequence as the label of the training sample.

[0019] Further, using the training data set and the sequence generation adversarial network to perform reinforcement learning-based training on the initial regression prediction model to obtain the trained natural gas sales prediction model includes:

[0020] In each round of training, perform the following operations until the sequence generation adversarial network converges:

[0021] According to the samples in the training data set, use the generator to obtain the noise data to be discriminated; where the noise data to be discriminated consists of the sample and the predicted value of the gas consumption of its corresponding target user in the target time period;

[0022] Input the noise data to be discriminated into the discriminator to obtain the discrimination result of whether the predicted value of the gas consumption is real data;

[0023] According to the discrimination result, use the Monte Carlo tree search algorithm to determine the reward value of the generator in this round;

[0024] According to the reward value, the gradient strategy is updated by using the Bayesian optimization algorithm to obtain the parameters of the generator in the next round of training.

[0025] Furthermore, the method further includes:

[0026] Pre-training the initial regression prediction model by using the training data set;

[0027] According to the samples in the training data set, multiple groups of noise data are obtained by using the pre-trained initial regression prediction model; wherein, each group of the noise data is composed of the data in a group of samples and the predicted value of the gas consumption of the target user in the target time period generated according to this group of samples;

[0028] Pre-training the discriminator by using the training data set and the noise data.

[0029] One embodiment of the present application provides a device for predicting natural gas sales, and the device includes:

[0030] A first acquisition module, configured to acquire an influence factor data sequence associated with the gas consumption of a target user; wherein, the influence factor data sequence includes influence factor data of multiple historical time periods;

[0031] A second acquisition module, configured to process the influence factor data sequence to obtain prediction input data;

[0032] A third acquisition module, configured to input the prediction input data into a trained natural gas sales prediction model to obtain a predicted value of the gas consumption of the target user in the target time period; the natural gas sales prediction model is obtained by training a preset initial regression prediction model based on reinforcement learning by using a training data set and a preset sequence generation adversarial network.

[0033] The above technical solutions provided by the embodiments of the present application have at least the following advantages compared with the prior art:

[0034] In the embodiments provided by the present application, factor data sequences associated with the gas consumption of the target user are obtained; the factor data sequences are processed to obtain prediction input data; the prediction input data is input into the trained natural gas sales prediction model to obtain the predicted value of the gas consumption of the target user within the target time period; wherein, the natural gas sales prediction model is obtained by training a preset initial regression prediction model based on reinforcement learning using a training data set and a preset sequence generation adversarial network. This method implicitly learns the spatio-temporal distribution of real data using a sequence generation adversarial network, generates "authentic-looking" data, and uses reinforcement learning game adversarial training to ultimately reach a Nash equilibrium, achieving trend learning and data augmentation, thereby reflecting the fluctuations in real data, and can further improve the accuracy of predicting the natural gas consumption of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The present application will be further described by way of exemplary embodiments, and these exemplary embodiments will be described in detail through the drawings; these embodiments are not restrictive, and in these embodiments, the same numbers represent the same structures, where:

[0036] Figure 1 is an exemplary flowchart of a method for predicting natural gas sales according to some embodiments of the present application;

[0037] Figure 2 is an exemplary flowchart of a method for training a natural gas sales prediction model according to some embodiments of the present application;

[0038] Figure 3 is an exemplary schematic diagram of factor data sequences, seasonal fluctuation data sequences, trend fluctuation data sequences, and residual fluctuation data sequences according to some embodiments of the present application;

[0039] Figure 4 is an exemplary schematic diagram of the reinforcement learning process of a sequence generation adversarial network according to some embodiments of the present application;

[0040] Figure 5 is an exemplary schematic diagram of the training process of a natural gas sales prediction model according to some embodiments of the present application;

[0041] Figure 6 is an exemplary schematic diagram of the internal data structure of an LSTM generator according to some embodiments of the present application;

[0042] Figure 7 is an exemplary schematic diagram of the internal data structure of a CNN generator according to some embodiments of the present application;

[0043] Figure 8 is an exemplary schematic diagram of a device for predicting natural gas sales according to some embodiments of the present application;

[0044] Figure 9 It is an exemplary structural schematic diagram of an electronic device shown according to some embodiments of the present application. Detailed implementation manners

[0045] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. Unless obvious from the language context or otherwise stated, the same reference numerals in the figures represent the same structure or operation.

[0046] It should be understood that the "system", "device", "unit" and / or "module" used herein is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0047] As shown in the present application and the claims, unless the context clearly indicates an exception, words such as "a", "an", "one" and / or "the" are not specifically singular and may also include plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0048] Flowcharts are used in the present application to illustrate the operations performed by the systems according to the embodiments of the present application. It should be understood that the operations before or after do not necessarily need to be executed precisely in sequence. On the contrary, the steps can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or one or several steps can be removed from these processes.

[0049] For ease of understanding, the technical solutions of the present application will be introduced below in conjunction with the accompanying drawings and embodiments.

[0050] Figure 1 It is an exemplary flowchart of a method for predicting natural gas sales volume shown according to some embodiments of the present application. As Figure 1 shown, the method for predicting natural gas sales volume includes the following steps:

[0051] Step S110, obtaining a data sequence of influencing factors associated with the gas consumption of the target user.

[0052] The target user is the user whose gas consumption (natural gas consumption) needs to be predicted during the target time period. For example, the target user can be A Steel Plant. The target time period is a certain time period in the future. For example, if the current time is August, the target time period can be September, October, etc.

[0053] The influencing factor data sequence includes the influencing factor data of multiple historical time periods. The influencing factor data are the factors that affect the gas consumption of the target user, including but not limited to: real estate prosperity index, user product sales volume, product inventory, product price index, etc. Combining Figure 2 As shown, in this embodiment, the influencing factor data sequence includes the natural gas consumption (unit: 10,000 cubic meters) of a certain customer from 2018 to 2023.

[0054] Step S120, process the influencing factor data sequence according to a preset rule to obtain prediction input data.

[0055] In this example, perform Seasonal-Trend-Loss decomposition on the obtained influencing factor data sequence to obtain the time series decomposition result, and the time series decomposition result includes at least the trend wave data sequence.

[0056] In the specific implementation process, in order to obtain a better prediction effect, perform STL decomposition (the full name is Seasonal-Trend-Loss, which is a filtering method that can decompose the time series into a trend term, a seasonal term, and a residual term. STL contains a series of locally weighted regression smoothers, with relatively fast calculation speed and can handle very large time series data) on the influencing factor data sequence obtained in step S110 to obtain the trend fluctuation data sequence, the periodic term (seasonal fluctuation data sequence), and the residual (residual fluctuation data sequence): For Figure 3 the shown influencing factor data sequence, form subsequences by the sample points at the same position in each period of the sequence, extend each subsequence forward and backward by one period, and through locally weighted regression smoothing processing, the trend fluctuation data sequence, seasonal fluctuation data sequence, and residual fluctuation data sequence as shown in Figure 3 can be generated. Then, use the Fourier transform to transform the trend wave data sequence into the frequency domain as the prediction input data. This processing process removes noises such as residual fluctuation data and can reduce the influence of abnormal fluctuation data in the influencing factor data sequence on the prediction result.

[0057] In practical applications, in combination with the principle of STL decomposition, the locally weighted regression algorithm can be used to smooth the data sequence of the influencing factors to generate a seasonal fluctuation data sequence; according to the data sequence of the influencing factors and the seasonal fluctuation data sequence, a trend fluctuation data sequence is generated; the sum of the corresponding elements in the seasonal fluctuation data sequence and the trend fluctuation data sequence is calculated to obtain a baseline component; according to the data sequence of the influencing factors and the baseline component, a residual fluctuation data sequence is generated.

[0058] Step S130: Input the predicted input data into the trained natural gas sales prediction model to obtain the predicted value of the gas consumption of the target user within the target time period. The natural gas sales prediction model is obtained by training a preset initial regression prediction model based on a reinforcement learning algorithm using a training data set and a preset sequence generation adversarial network.

[0059] In the specific implementation process, various machine learning models can be used to construct the natural gas sales prediction model, including but not limited to: Long Short-Term Memory (LSTM), Recurrent Neural Network (RNN), Gate Recurrent Unit (GRU), Transformer and other models.

[0060] In some embodiments, the input data of the natural gas sales prediction model is the predicted input data obtained by processing the data sequence of the influencing factors, and the output is the predicted value of the gas consumption of the target user within the target time period.

[0061] Only as an example, the data sequence of the influencing factors includes data such as the real estate prosperity index, the product sales volume of Steel Plant A, the product inventory of Steel Plant A, and the product price index of natural gas from February to August this year. After processing the above data in step S120, the predicted input data obtained is: x = [x1, x2,..., x7], where x i is a vector containing multiple elements, and each element corresponds to a type of influencing factor data (for example, the real estate prosperity index or the product sales volume of Steel Plant A, etc.). x1 corresponds to the influencing factor data in January, x2 corresponds to the influencing factor data in February, and so on. Input the above predicted input data into the trained natural gas sales prediction model, and the natural gas sales prediction model outputs the predicted value of the gas consumption of Steel Plant A in September.

[0062] The following combines Figure 2 to illustrate a method for training a natural gas sales prediction model to obtain a trained natural gas sales prediction model. Specifically, the training method of the natural gas sales prediction model includes steps 210 - 230:

[0063] Step S210: Obtain a training data set.

[0064] The training data set includes multiple training samples and labels corresponding to each training sample. The training data set can be obtained through the following method:

[0065] Obtain multiple historical influencing factor data sequences of the target user and the corresponding historical gas consumption for each historical influencing factor data sequence; use the historical influencing factor data sequences as training samples, and use the corresponding historical gas consumption of the historical influencing factor data sequences as the labels of the training samples.

[0066] For a detailed description of the historical influencing factor data sequence, refer to the description of the influencing factor data sequence in step S110, which will not be elaborated here.

[0067] Step S220: Use the preset initial regression prediction model as the generator and the convolutional neural network model as the discriminator to construct a sequence generative adversarial network (Sequence Generative Adversarial Nets, i.e., SeqGAN).

[0068] Similar to the basic GAN algorithm, the basic principle of SeqGAN is also to iteratively train the generative model and the discriminative model. Assume that the generator generates a sentence composed of a word sequence, and the discriminator determines whether this sentence is a true sentence (True data) in the training set or a sentence generated by the model (Generate); the ultimate goal is to use the model to generate sentences that are indistinguishable from real ones, so that the discriminative model cannot distinguish. SeqGAN mainly draws on the methods in reinforcement learning. The core of reinforcement learning is to learn the best strategy through continuous trial and error in practice. Generally, what reinforcement learning learns is a series of decisions, and its goal is to maximize the long-term reward.

[0069] Only as an example, the initial regression prediction model (i.e., the generator) is an LSTM model as shown in Figure 6 and the discriminator is a convolutional neural network model as shown in Figure 7 to construct a sequence generative adversarial network as shown in Figure 4 .

[0070] Step S230: Use the training data set and the sequence generative adversarial network to perform reinforcement learning-based training on the initial regression prediction model to obtain a trained natural gas sales prediction model.

[0071] In some embodiments, the initial regression prediction model can be pre-trained using the training data set.

[0072] In the specific implementation process, the data processing method in step S120 can be used to process the samples in the training dataset, and the processed samples are input into the initial regression prediction model, and the initial regression prediction model outputs the predicted value of the gas consumption; according to the difference between the predicted value of the gas consumption and the label of the sample, a loss function is constructed; an optimization algorithm (for example, the gradient descent algorithm) is used to adjust the initial regression prediction model until the initial regression prediction model converges (the objective function reaches the maximum or minimum, or the number of training times reaches the preset number).

[0073] As an example only, maximum likelihood estimation can be used to pre-train G θ , and the smoothed Wasserstein distance is used as the loss function measurement method to make the learning process more stable and easier to converge. The training objective of the generator G θ is to maximize the generated sequence reward, and the objective function is as follows:

[0074]

[0075] where J(θ) is the objective function, is the expectation; R T is the overall reward value obtained by the generator; s0 is the data input to the generator (i.e., the state); θ is the parameter of the generator; y1 is the predicted gas consumption (action); G θ is the generator; is the action-value. In the pre-training stage, according to the label of the sample, the value of can be determined. In the reinforcement learning stage, according to the discrimination result of the discriminator D φ , the value of can be determined.

[0076] In some embodiments, according to the samples in the training dataset, multiple sets of noise data can be obtained by using the pre-trained initial regression prediction model; wherein, each set of noise data is composed of the data in a set of samples and the predicted value of the gas consumption of the target user in the target time period generated according to the set of samples; the discriminator is pre-trained by using the training dataset and the noise data.

[0077] In the specific implementation process, it is assumed that the influencing factor data is N, that is, there are N features in total. The training sample dataset is represented as X = {x1, x2,..., x m}, where x i represents the i-th sample, m represents the number of samples in the sample dataset, and the sample x i can be expressed as The true data distribution is x ∼ p data(x). In the specific implementation process, it is necessary to process the training sample set according to the input_step (dimension) of the data processed by the generator constructed based on LSTM. For example, the original data is processed into data with dimensions of [batch_size, input_step, N]. Before inputting the data into the generator LSTM, the original data can be processed in the same way as in step S120 to obtain the training input data, and then the training input data is input into the sequence generation adversarial network for training in the current round.

[0078] In the specific implementation process, the vector dimension input to the generator is three-dimensional [batch_size, input_step, N], and the output vector dimension is two-dimensional [batch_size, output_step]. The generator internally uses 3 layers of LSTM, and the hidden layer dimensions hidden_size of these 3 layers of LSTM are 256, 128, and 64 in sequence. The input dimension of each LSTM is [batch_size, time_step, hidden_size], and the LSTM output dimension is [batch_size, hidden_size]. Then, it is connected to the fully connected layer Dense, and finally the vector is transposed to make the dimension consistent with the samples in the training sample set.

[0079] The input x of the discriminator D(x, θ d ) is the training input data or noise data, and the output is the probability that x is real data. Its input vector dimension is [batch_size, hidden_size], and the output vector dimension is [batch_size, 1]. The discriminator internally uses 2 layers of CNN. The number of neurons in the convolutional layer is hidden_size, the convolutional kernel size is 1, and the vector dimension of the convolutional layer is [batch_size, 1, hidden_size]. After the convolutional layer, Flatten is used to convert the vector into one-dimensional and finally connected to the fully connected layer Dense. LeakyReLU is used as the activation function for the CNN, and Sigmoid is used as the activation function for the fully connected layer.

[0080] Only as an example, the training objective of the discriminator is to minimize the probability of judging the generated data, and the objective function is as follows:

[0081]

[0082] In the specific implementation process, this objective function can be used to optimize the parameters φ of the discriminator D φ so that it predicts real data p data as true as possible and predicts the data generated by the generator as false as possible.

[0083] In an embodiment of the present invention, the generator and the discriminator are pre-trained to obtain a sequence generative adversarial network, and the initial regression prediction model is trained based on reinforcement learning by using the training data set and the sequence generative adversarial network to obtain a trained natural gas sales prediction model.

[0084] In some embodiments, an example process of training the initial regression prediction model based on reinforcement learning is as Figure 4 shown in the iterative adversarial training module. The training process is a game between a maximum value and a minimum value, and the objective function is as follows:

[0085]

[0086] In the specific implementation process, as Figure 5 shown, in each round of training, the following operations are performed until the sequence generative adversarial network converges:

[0087] Step S510: According to the samples in the training data set, initialize the generator and pre-train the generator using maximum likelihood estimation; obtain the noise data to be discriminated by the generator, and train the discriminator in combination with the training set; wherein, the noise data to be discriminated is composed of the sample and the predicted value of the gas consumption of its corresponding target user in the target time period.

[0088] Step S520: Input the noise data to be discriminated into the discriminator to obtain the discrimination result of whether the predicted value of the gas consumption is real data.

[0089] Step S530: According to the discrimination result, use the Monte Carlo tree search algorithm to determine the reward value of the generator in this round.

[0090] In the specific implementation process, the Monte Carlo tree search can be used to calculate the action value, and the rewards from time t = 1 to T of the state can be calculated Gradient policy to update the parameters of generator G β of.

[0091] Step S540: According to the reward value, use the Bayesian optimization algorithm to update the gradient policy to obtain the parameters of the generator in the next round of training.

[0092] In the embodiments provided by the present application, factor data sequences associated with the gas consumption of a target user are obtained; the factor data sequences are processed, and trend fluctuation data sequences are obtained based on STL decomposition, and then combined with Fourier transform to obtain prediction input data; the prediction input data is input into a trained natural gas sales prediction model to obtain a predicted value of the gas consumption of the target user within a target time period; wherein, the natural gas sales prediction model is obtained by training a preset initial regression prediction model based on reinforcement learning using a training data set and a preset sequence generation adversarial network. The present invention utilizes the characteristics of sequence generation adversarial networks and reinforcement learning, uses the preset initial regression prediction model as a generator, and uses a convolutional neural network model as a discriminator to construct a sequence generation adversarial network; uses the sequence generation adversarial network to implicitly learn the spatio-temporal correlation relationship between the factor data sequences and the gas consumption of the target user within the target time period, conducts reinforcement learning game adversarial training, and through the alternating training and simultaneous improvement of the two groups of models of the discriminator and the generator, finally reaches the Nash equilibrium and realizes trend learning and data augmentation, thereby completing the training of the initial regression prediction model and obtaining a natural gas sales prediction model with strong fitting ability and generalization ability. Furthermore, the natural gas sales prediction model can be used to accurately and reliably predict the natural gas consumption of users.

[0093] Figure 8 It is an exemplary schematic diagram of a natural gas sales prediction device according to some embodiments of the present application.

[0094] As Figure 8 shown, the natural gas sales prediction device includes: a first acquisition module 810, a second acquisition module 820, and a third acquisition module 830.

[0095] The first acquisition module 810 is configured to acquire factor data sequences associated with the gas consumption of a target user; wherein, the factor data sequences include factor data for multiple historical time periods.

[0096] The target user is a user whose gas consumption (natural gas usage) within a target time period needs to be predicted, and the target time period is a certain future time period. For example, if the current time is August, the target time period can be September, October, etc.

[0097] The factor data sequences include factor data for multiple historical time periods. The factor data are factors that affect the gas consumption of the target user, including but not limited to: real estate prosperity index, user product sales volume, product inventory, product price index, etc.

[0098] The second acquisition module 820 is configured to process the factor data sequences to obtain prediction input data.

[0099] In this example, the obtained data sequence of influencing factors is decomposed by Seasonal-Trend-Loss, and a trend fluctuation data sequence, a seasonal fluctuation data sequence, and a residual fluctuation data sequence can be generated. Then, the Fourier transform is used to transform the trend wave data sequence into the frequency domain as the prediction input data. This processing process removes noises such as the residual fluctuation data, which can reduce the influence of abnormal fluctuation data in the influencing factor data sequence on the prediction result.

[0100] A third acquisition module 830 is configured to input the prediction input data into the trained natural gas sales prediction model to obtain a predicted value of the gas consumption of the target user within the target time period; wherein, the natural gas sales prediction model is obtained by training an initial regression prediction model using a training data set and a sequence generation adversarial network.

[0101] In some embodiments, the natural gas sales prediction model is obtained by training in the following manner: obtaining a training data set; using the initial regression prediction model as a generator and a convolutional neural network model as a discriminator to construct the sequence generation adversarial network; wherein, the convolutional neural network model is used to determine whether the result output by the generator is real data; using the training data set, based on the sequence generation adversarial network, training the initial regression prediction model by reinforcement learning to obtain the trained natural gas sales prediction model.

[0102] In some embodiments, the training data set includes a plurality of training samples and the label of each training sample; the training data set is obtained in the following manner: obtaining a plurality of historical influencing factor data sequences of the target user and the corresponding historical gas consumption of each historical influencing factor data sequence; using the historical influencing factor data sequence as a training sample and the corresponding historical gas consumption of the historical influencing factor data sequence as the label of the training sample.

[0103] In some embodiments, using the training data set, based on the sequence generation adversarial network, the initial regression prediction model is trained based on reinforcement learning to obtain a trained natural gas sales prediction model, including: in each round of training, perform the following operations until the sequence generation adversarial network converges: according to the samples in the training data set, use the generator to obtain noise data to be discriminated; wherein, the noise data to be discriminated is composed of the samples and the predicted values of the gas consumption of the corresponding target users within the target time period; input the noise data to be discriminated into the discriminator to obtain a discrimination result on whether the predicted value of the gas consumption is real data; according to the discrimination result, use the Monte Carlo tree search algorithm to determine the reward value of the generator in this round; according to the reward value, use the Bayesian optimization algorithm to update the gradient strategy to obtain the parameters of the generator in the next round of training.

[0104] In some embodiments, the device further includes a pre-training module for: using the training data set to pre-train the initial regression prediction model; according to the samples in the training data set, using the pre-trained initial regression prediction model to obtain multiple groups of noise data; wherein, each group of the noise data is composed of the data in a group of samples and the predicted values of the gas consumption of the target users generated according to this group of samples within the target time period; using the training data set and the noise data to pre-train the discriminator.

[0105] In the embodiments of the above natural gas sales prediction device, the specific processing of each module and the technical effects brought by them can be respectively referred to the relevant descriptions in the corresponding method embodiments, which will not be elaborated here.

[0106] Figure 9 It is an exemplary structural schematic diagram of an electronic device shown according to some embodiments of the present application.

[0107] As Figure 9As shown, the electronic device includes: at least one processor 901, at least one communication interface 902, at least one memory 903, and at least one communication bus 904; Optionally, the communication interface 902 may be the interface of a communication module, such as the interface of a GSM module; The processor 901 may be a processor CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The memory 903 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory. Among them, the memory 903 stores a program, and the processor 901 calls the program stored in the memory 903 to execute some or all of the above method embodiments.

[0108] This application relates to a storage medium for storing a computer-readable program, which when run, executes some or all of the above method embodiments.

[0109] Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices, etc.

[0110] Based on the same inventive concept, an embodiment of this application also provides a computer program product, including a computer program, which when executed by a processor, implements some or all of the above method embodiments.

[0111] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only an example and does not constitute a limitation to this application. Although not explicitly stated here, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are proposed in this application, so such modifications, improvements, and corrections still fall within the spirit and scope of the exemplary embodiments of this application.

[0112] At the same time, this application uses specific terms to describe the embodiments of this application. Such as "one embodiment", "an embodiment", and / or "some embodiments" mean a certain feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that "an embodiment" or "one embodiment" or "an alternative embodiment" mentioned twice or more at different positions in this application does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.

[0113] In addition, unless clearly stated in the claims, the order of the processing elements and sequences, the use of numerical and alphabetical characters, or the use of other names in the present application are not used to limit the order of the processes and methods of the present application. Although some currently useful embodiments of the invention are discussed through various examples in the above disclosure, it should be understood that such details are only for illustrative purposes. The appended claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that conform to the essence and scope of the embodiments of the present application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only through software solutions, such as installing the described system on existing servers or mobile devices.

[0114] Similarly, it should be noted that, in order to simplify the description of the present application disclosure and thus help the understanding of one or more embodiments of the invention, in the previous description of the embodiments of the present application, sometimes multiple features are merged into one embodiment, drawing, or description thereof. However, this disclosure method does not mean that the features required by the subject matter of the present application are more than those mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiments disclosed above.

[0115] In some embodiments, numbers describing components and attribute quantities are used. It should be understood that such numbers used for the description of the embodiments are modified by the modifiers "about", "approximate" or "substantially" in some examples. Unless otherwise stated, "about", "approximate" or "substantially" indicate that the said numbers allow a variation of ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, and such approximate values may change according to the characteristics required by individual embodiments. In some embodiments, the numerical parameters should consider the specified significant digits and adopt the method of retaining the general number of digits. Although the numerical ranges and parameters used to confirm the breadth of the scope in some embodiments of the present application are approximate values, in specific embodiments, such numerical settings are made as precise as possible within the feasible range.

[0116] For each patent, patent application, patent application publication, and other materials cited in the present application, such as articles, books, specifications, publications, documents, etc., their entire contents are hereby incorporated into the present application by reference. Except for the application history documents that are inconsistent with or conflict with the content of the present application, and except for the documents that limit the broadest scope of the claims of the present application (currently or subsequently appended to the present application). It should be noted that if there are inconsistencies or conflicts between the descriptions, definitions, and / or uses of terms in the attached materials of the present application and the content described in the present application, the descriptions, definitions, and / or uses of terms in the present application shall prevail.

[0117] Finally, it should be understood that the embodiments described in this application are only used to illustrate the principles of the embodiments of this application. Other variations may also fall within the scope of this application. Therefore, by way of example and not limitation, alternative configurations of the embodiments of this application may be regarded as consistent with the teachings of this application. Accordingly, the embodiments of this application are not limited to the embodiments explicitly presented and described in this application.

Claims

1. A method for predicting natural gas sales volume, characterized in that, The method includes: Obtaining an influencing factor data sequence associated with the gas consumption of a target user; wherein, the influencing factor data sequence includes influencing factor data for multiple historical time periods; Processing the influencing factor data sequence to obtain prediction input data; Inputting the prediction input data into a trained natural gas sales prediction model to obtain a predicted value of the gas consumption of the target user within a target time period; wherein, the natural gas sales prediction model is obtained by training a preset initial regression prediction model based on reinforcement learning using a training data set and a preset sequence generation adversarial network.

2. The method according to claim 1, characterized in that, The processing the influencing factor data sequence to obtain prediction input data includes: Performing Seasonal-Trend-Loss decomposition on the obtained influencing factor data sequence to obtain a time series decomposition result, where the time series decomposition result at least includes a trend wave data sequence; Using Fourier transform to convert the trend wave data sequence into the frequency domain as the prediction input data.

3. The method according to claim 1, characterized in that, The natural gas sales prediction model is trained through the following method: Obtaining a training data set; Using the preset initial regression prediction model as a generator and a convolutional neural network model as a discriminator to construct the sequence generation adversarial network; wherein, the convolutional neural network model is used to determine whether the result output by the generator is real data; Using the training data set and the sequence generation adversarial network to perform reinforcement learning training on the initial regression prediction model to obtain a trained natural gas sales prediction model.

4. The method according to claim 3, wherein The training data set is obtained through the following method: Obtaining multiple historical influencing factor data sequences of the target user and the historical gas consumption corresponding to each historical influencing factor data sequence; Using the historical influencing factor data sequence as a training sample and the historical gas consumption corresponding to the historical influencing factor data sequence as the label of the training sample.

5. The method according to claim 4, characterized in that, Using the training data set and the sequence generation adversarial network to perform reinforcement learning training on the initial regression prediction model to obtain a trained natural gas sales prediction model, including: In each round of training, perform the following operations until the sequence generation adversarial network converges: According to the samples in the training data set, using the generator to obtain noise data to be discriminated; wherein, the noise data to be discriminated is composed of the sample and the predicted value of the gas consumption of the corresponding target user within the target time period; Inputting the noise data to be discriminated into the discriminator to obtain a discrimination result on whether the predicted value of the gas consumption is real data; According to the discrimination result, using the Monte Carlo tree search algorithm to determine the reward value of the generator in this round; According to the reward value, using the Bayesian optimization algorithm to update the gradient policy to obtain the parameters of the generator in the next round of training.

6. The method according to claim 5, characterized in that, The method further includes: Using the training data set to perform pre-training on the initial regression prediction model; Based on the samples in the training dataset, multiple groups of noise data are obtained by using the initially pre-trained regression prediction model; wherein, each group of the noise data is composed of the data in a group of samples and the predicted value of the gas consumption of the target user in the target time period generated according to this group of samples. The discriminator is pre-trained by using the training dataset and the noise data.

7. A prediction device for natural gas sales volume, characterized in that, The device includes: A first acquisition module, configured to acquire an influence factor data sequence associated with the gas consumption of a target user; wherein, the influence factor data sequence includes influence factor data of multiple historical time periods. A second acquisition module, configured to process the influence factor data sequence to obtain prediction input data. A third acquisition module, configured to input the prediction input data into the trained natural gas sales prediction model to obtain the predicted value of the gas consumption of the target user in the target time period; the natural gas sales prediction model is obtained by training the initially preset regression prediction model based on reinforcement learning by using the training dataset and a preset sequence generation adversarial network.

8. An electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and when the processor runs the program, it executes the method according to any one of claims 1 to 6.

9. A storage medium, used to store a computer-readable program, and when the computer-readable program is run, it executes the method according to any one of claims 1 to 6.

10. A training method for a natural gas sales volume prediction model, characterized in that, Including: Acquire a training dataset; Construct a sequence generation adversarial network by using the initially preset regression prediction model as the generator and the preset convolutional neural network model as the discriminator; wherein, the convolutional neural network model is used to determine whether the result output by the generator is real data. Use the training dataset and the sequence generation adversarial network to perform reinforcement learning-based training on the initially preset regression prediction model to obtain the trained natural gas sales prediction model.