Method and device for predicting gas consumption load of air compression station

By using the attention mechanism LSTM-NN model in the air compressor station, combined with the recurrent neural network and the attention mechanism, and integrating time and space features, the problem of low gas load prediction accuracy in the existing technology is solved, and the prediction accuracy is significantly improved. sex.

CN118586544APending Publication Date: 2024-09-03HANGZHOU ZETA TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410633034.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The existing gas load prediction method for air compressor stations has poor fitting of load data and lacks sensitivity, resulting in prediction accuracy that cannot meet expectations and low accuracy of fault detection results.

Method used

The attention mechanism long short-term memory network (LSTM-NN) model is used to input the preprocessed gas load data into the attention mechanism LSTM network model. The dynamic time step features are obtained through the attention layer, and the fully connected layer is used for calculation. , combines the recurrent neural network and the attention mechanism, integrates the features of the spatial dimension and the temporal dimension, and improves the prediction accuracy.

Benefits of technology

It effectively improves the accuracy of gas load prediction, makes up for the shortcomings of the singleness of variables extracted by traditional neural networks, and can predict the gas load data of air compressor stations more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586544A
    Figure CN118586544A
Patent Text Reader

Abstract

The invention discloses a gas consumption load prediction method and device for an air compression station, and the method comprises the steps: obtaining N continuous to-be-predicted time sequence gas consumption load data in a to-be-predicted time period of the air compression station, and N is an integer greater than 1; preprocessing the to-be-predicted time sequence gas consumption load data to obtain preprocessed to-be-predicted time sequence gas consumption load data; and inputting the preprocessed to-be-predicted time sequence gas load data into a pre-trained LSTM-NN network model, and outputting a gas load prediction result. According to the LSTM-NN network model, features in the time dimension are obtained through an attention mechanism LSTM network model, dynamic time step features containing attention are obtained through an attention layer, calculation of gas consumption load prediction is achieved through a full-connection layer, a recurrent neural network and an attention mechanism are combined, and the prediction accuracy of the gas consumption load is improved. The unicity of variables extracted by a traditional neural network is made up, and the accuracy of gas consumption load data 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 gas load prediction, and in particular to a method and device for predicting gas load of an air compressor station. Background Art

[0002] Air compressors are key equipment in many industrial and commercial applications. It helps optimize the operation of equipment and improve production efficiency. By knowing the future gas load in advance, operators can adjust the operating parameters of the air compressor to ensure timely supply when more compressed air is needed, and reduce energy consumption when the load is light. Secondly, predicting gas load can help with equipment maintenance planning. If the forecast shows that there will be high load operation in the future, the operation team can carry out maintenance and repairs in advance to prevent equipment failure at critical moments, thereby reducing the risk of production interruption. In addition, through real-time monitoring and prediction, energy use can be better planned and energy costs can be reduced. Taking effective energy management measures during peak loads can avoid unnecessary energy waste and improve environmental protection. Gas load prediction can make air compressor stations run more intelligently, improve production efficiency, reduce costs, and also have a positive impact on environmental protection. At the same time, data-driven methods do not require the establishment of an accurate mechanism model of the target device, but only require a large amount of historical data to achieve their purpose. Therefore, they have been favored for a long time in industrial processes with multiple loops, multiple devices, and difficult to perform mechanism modeling.

[0003] At present, common load forecasting methods include statistical methods, machine learning methods, etc. Among them, statistical methods include regression analysis, fluctuation model, etc.; machine learning methods include BP (Back Propagation) neural network method, support vector machine method, random forest, convolutional neural network, etc. However, these methods have poor fitting degree to load data, lack sufficient sensitivity to sudden changes in load forecasting, and their accuracy cannot meet the expectations of load forecasting.

[0004] The above information disclosed in the above Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0005] The present invention provides a method and device for predicting the gas load of an air compression station, which solves the technical problem of low accuracy of fault detection results of an air compression device.

[0006] In a first aspect, a technical solution provided in an embodiment of the present invention is a method for predicting gas load of an air compressor station, comprising:

[0007] Obtain N consecutive time series gas load data to be predicted within the time period to be predicted of the air compressor station, where N is an integer greater than 1;

[0008] Preprocessing the time series gas load data to be predicted to obtain the preprocessed time series gas load data to be predicted;

[0009] The preprocessed time series gas load data to be predicted is input into the pre-trained LSTM-NN network model, and the gas load prediction result is output;

[0010] Among them, the LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features with attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction results. Among them, the training samples include the training time series gas load data.

[0011] In a second aspect, a technical solution provided in an embodiment of the present invention is a gas load prediction device based on an air compressor station, comprising:

[0012] Acquisition module: used to acquire N consecutive time series gas load data to be predicted within the time period to be predicted of the air compressor station, where N is an integer greater than 1;

[0013] Preprocessing module: used to preprocess the gas load data of the time series to be predicted, and obtain the preprocessed gas load data of the time series to be predicted;

[0014] Prediction module: used to input the pre-processed time series gas load data to be predicted into the pre-trained LSTM-NN network model and output the gas load prediction result;

[0015] Among them, the LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features with attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction results. Among them, the training samples include the training time series gas load data.

[0016] In a third aspect, a technical solution provided in an embodiment of the present invention is a chip device, comprising a memory, a processor and a computer program stored in the memory, characterized in that when the computer program is executed by the processor, any of the above-mentioned methods for predicting the gas load of an air compressor station is implemented.

[0017] Beneficial effects of the present invention:

[0018] The attention mechanism LSTM network model is used to obtain the features in the time dimension, the attention layer is used to obtain the dynamic time step features with attention, and the fully connected layer is used to realize the calculation of gas load prediction. The recurrent neural network and the attention mechanism are combined to make up for the singleness of the variables extracted by the traditional neural network, and the features in the spatial dimension and the features in the time dimension are effectively integrated, which can improve the accuracy of gas load data prediction in gas load prediction.

[0019] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.

[0021] Figure 1 A flow chart of a method for predicting gas load of an air compressor station provided in Embodiment 1 of the present invention;

[0022] Figure 2 A schematic diagram of the structure of a gas load prediction device for an air compression station provided in the second embodiment of the present invention;

[0023] Figure 3 This is a schematic diagram of the structure of a chip device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as being processed sequentially, many of the operations (or steps) therein may be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations may be rearranged. A process may be terminated when its operations are completed, but may also have additional steps not included in the accompanying drawings; a process may correspond to a method, function, procedure, subroutine, subprogram, etc.

[0026] The following is a brief description of the technical field involved in the solution of the present disclosure:

[0027] Long Short-Term Memory (LSTM) is a special type of Recurrent Neural Network (RNN) designed to solve the long-term dependency problem in traditional RNNs. In traditional RNNs, the gradient (the information used for learning) decays or explodes quickly over time, making it difficult for the model to capture long-term dependencies. LSTM solves this problem by introducing a structure called a "memory cell". This memory cell consists of an input gate, a forget gate, an output gate, and a memory cell, through which LSTM is able to selectively remember or forget information. In this way, the model is able to effectively maintain memory of previous information even if the time interval is long. Specifically, these gates control the inflow and outflow of information. The input gate determines what information to update to the memory cell, the forget gate determines how much past information to retain, and the output gate determines which part of the memory cell to output. This structure makes LSTM perform very well in processing time series data, especially when long-term dependencies need to be captured. It is widely used in language modeling, sequence prediction and other fields.

[0028] The attention mechanism is a mechanism that allows the model to pay more attention to different parts of the input when processing sequence or collection data, rather than considering all information equally. Its core idea is that given an input sequence, the model is able to assign different weights to each time step or each element to indicate its contribution to the output. In time series prediction, the information of certain time steps may be more critical to the prediction. Through the attention mechanism, the model can dynamically adjust the weights at each time step, focusing more attention on the time steps that are important to the prediction task, and improving the accuracy of the model. The attention mechanism enables the model to effectively process input sequences of different lengths. The model can assign different attention according to the actual situation of the input sequence without being restricted by a fixed length.

[0029] Embodiment 1

[0030] Figure 1A method for predicting gas load of an air compressor station provided by an embodiment of the present invention is shown, which includes:

[0031] Step S1, obtaining N consecutive time series gas load data to be predicted within the time period to be predicted of the air compression station, where N is an integer greater than 1;

[0032] As an example, after obtaining the time series gas load data to be predicted, the data can be cleaned, for example, by removing outliers, filling missing values, etc., so as to ensure the integrity and accuracy of the data.

[0033] Step S2, preprocessing the time series gas load data to be predicted to obtain the preprocessed time series gas load data to be predicted;

[0034] In this embodiment, the integrity and accuracy of the data are ensured by preprocessing the gas load data of the time series to be predicted;

[0035] As an example, the preprocessing may include: normalizing the gas load data for the time series to be predicted, eliminating the influence of different variable dimensions in the original data through the normalization process, thereby improving the working performance of the LSTM-NN network model.

[0036] For example, a Z-SCORE normalization method may be used for preprocessing.

[0037] Step S3, inputting the preprocessed time series gas load data to be predicted into the pre-trained LSTM-NN network model, and outputting the gas load prediction result;

[0038] Among them, the LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features with attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction results. Among them, the training samples include the training time series gas load data.

[0039] In the above embodiment, the attention mechanism LSTM network model is used to obtain the features in the time dimension, the attention layer is used to obtain the dynamic time step features containing attention, and the fully connected layer is used to realize the calculation of the gas load prediction, thereby realizing the combination of the recurrent neural network and the attention mechanism, making up for the singleness of the variables extracted by the traditional neural network, and effectively integrating the features in the spatial dimension and the features in the time dimension, which can improve the accuracy of the gas load data prediction in the gas load prediction.

[0040] In the above embodiment, in the actual prediction process, for a collected process sample X new =[x new1 x new2 …x newt ], after obtaining its hidden features through the attention mechanism LSTM network model, the hidden layer features are input into the attention layer to obtain the dynamic hidden features, which are input into the fully connected layer to calculate the gas load prediction result at the t+1th moment.

[0041] In some embodiments of the present invention, the process variable data of the air compressor device in the air compressor station under normal working conditions is used as a training set, and the training set is recorded as a matrix containing m-dimensional process variables and N training samples, as shown in the following formula:

[0042] X=[x1 x2 … x N ]∈R m×N ; (1)

[0043] In the above formula (1), X is used to represent the training set, x N Used to represent the Nth training sample, R m×N Used to represent m-dimensional process variables and N training samples;

[0044] In the above embodiment, the training samples include key variables such as pressure, temperature, flow rate, power, and air compression ratio.

[0045] In some embodiments of the present invention, the preprocessed training time series gas load data is converted into a p-dimensional hidden layer feature with time characteristics through an attention mechanism LSTM network model, as shown in the following formula:

[0046] H=[h1 h2 … h N ]∈R p×N ; (2)

[0047] In the above formula (2), h N Used to represent the Nth p-dimensional hidden layer feature with time characteristics.

[0048] In the above embodiment, the features in the spatial dimension and the features in the temporal dimension are fused through the attention mechanism LSTM network model to obtain p-dimensional hidden layer features with temporal characteristics.

[0049] In some embodiments of the present invention, the p-dimensional hidden layer features are calculated through the attention layer to obtain the dynamic time step features with attention, as shown in the following formula:

[0050] HW Q =Q; (3)

[0051] HW K =K; (4)

[0052] HW V =V; (5)

[0053]

[0054] In the above formulas (3)-(6), Q is used to represent the query matrix, K is used to represent the key matrix, and V is used to represent the value matrix;

[0055] W Q Used to represent the weight matrix between the p-dimensional hidden layer feature H and the query matrix;

[0056] W K Used to represent the weight matrix between the p-dimensional hidden layer feature H and the key matrix;

[0057] W V Used to represent the weight matrix between the p-dimensional hidden layer feature H and the value matrix;

[0058] K T Used to represent the transpose of K;

[0059] Used to indicate the length of the K vector;

[0060] Softmax stands for normalized exponential function.

[0061] In the above embodiment, the attention layer is used to obtain the dynamic time step features containing attention, so as to dynamically adjust the weight at each time step through the attention mechanism, focus more attention on the time step that is important for the prediction task, and improve the accuracy of the model. And the attention mechanism enables the model to effectively process input sequences of different lengths. The model can allocate different attention according to the actual situation of the input sequence without being restricted by a fixed length. Then, the LSTM model and the attention mechanism are combined to further improve the accuracy of the model.

[0062] In some embodiments of the present invention, the dynamic time step feature is calculated through a fully connected layer to output a gas load prediction result, as shown in the following formula:

[0063]

[0064] In the above formula (7), is the gas load forecast matrix at each moment calculated by the fully connected layer, Used to represent the gas load matrix, W D is the weight matrix of the fully connected layer, H a Used to represent the hidden features after the attention mechanism is calculated, b D is the bias of the fully connected layer.

[0065] In some embodiments of the present invention, the loss function of the LSTM-NN network model is shown in the following formula:

[0066]

[0067] In the above formula (8), N is used to represent the number of samples, y i Used to indicate the true value of gas load. Used to indicate the predicted value of gas load.

[0068] In some embodiments of the present invention, the preprocessed training set is used as the input of the attention mechanism LSTM network model. The attention mechanism LSTM network model includes multiple network units, each of which includes an input gate, a forget gate, and an output gate. The calculation formula of each network unit is as follows:

[0069] The output of the input gate is: i i =σ(W ix x i )+W hh h i-1 +b i ; (9)

[0070] In the above formula (9), i i is the value of the input gate at the i-th moment, W ix is the weight matrix between the input layer and the input gate, x i is the input at the i-th moment, W hh is the weight matrix between the hidden layer at the previous moment and the hidden layer at the current moment, b i is the bias of the input gate, σ represents the activation function;

[0071] The output of the forget gate is: f i =σ(W fx x i )+W fh hi-1 +b f ; (10)

[0072] In the above formula (10), f i is the value of the forget gate at the i-th moment, W fx is the weight matrix between the input layer and the forget gate, x i is the input at the i-th moment, W fh is the weight matrix between the hidden layer and the forget gate, b f is the bias of the forget gate.

[0073] The output of the output gate is: o i =(W ox x i +W hh h i-1 +W oc c i-1 +b o ); (11)

[0074] In the above formula (11), o i is the value of the output gate at time i, W ox is the weight matrix between the output layer and the input gate, x i is the input at the i-th moment, W oc is the weight matrix between the output gate and the memory unit at the i-th moment, b o is the bias of the input gate.

[0075] The memory unit outputs a first parameter and a second parameter, where the first parameter is expressed as:

[0076] c i =f i *c i-1 +i i *tanh(W cx x i +W hh h i-1 +W cc c i-1 +b c ); (12)

[0077] In the above formula (12), c i is the value of the memory unit at the i-th moment, W cx is the weight matrix between the input layer and the memory unit at the i-th moment, W cc is the weight matrix between the memory units at the current moment and the next moment, b c is the bias of the memory cell.

[0078] The second parameter is expressed as: h i =oi *tanh(c i ); (3)

[0079] Among them, hi is used to represent the hidden features at the i-th moment.

[0080] In some embodiments of the present invention, the training process of the LSTM-NN network model further includes:

[0081] Construct a training set and a test set, where the training set includes multiple training samples and the test set includes multiple test samples;

[0082] Each training sample includes N consecutive training time series load data, and each test sample includes N consecutive test time series load data;

[0083] Normalize each training sample;

[0084] Input each normalized training sample into the LSTM-NN network model to output the gas load training prediction result;

[0085] In each training cycle, the test set is used to test the LSTM-NN network model after training, and the LSTM-NN network model that passes the test is used as the trained LSTM-NN network model.

[0086] In the above embodiment, a trained LSTM-NN network model is first obtained, wherein the training of the LSTM-NN network model includes: firstly, using the attention mechanism LSTM network model to extract its time features from the original process data, then taking the extracted features as output, inputting the extracted features into the attention layer to obtain dynamic time step features, and finally inputting the dynamic time step features into the fully connected layer (NN) for calculation and fitting to obtain the predicted load size, and by minimizing the loss function, making the predicted value approach the actual value, and establishing the LSTM-NN model after the training is completed;

[0087] The prediction results are corrected through the test set to improve the prediction accuracy of the LSTM-NN network model.

[0088] As an example, testing the trained LSTM-NN network model may include: constructing a training set, a validation set, and a test set;

[0089] Input the verification samples in the verification set into the initial LSTM-NN network model to obtain the verification results output by the initial LSTM-NN network model;

[0090] Input the test samples in the test set into the trained LSTM-NN network model to obtain the test results output by the trained LSTM-NN network model;

[0091] The accuracy of the LSTM-NN network model after training is determined based on the test results. If the accuracy of the LSTM-NN network model after training is greater than the preset test accuracy threshold, the LSTM-NN network model that passes the test set evaluation is used as the trained LSTM-NN network model, otherwise, retraining is performed.

[0092] In the above example, we can only build the training set and the test set.

[0093] Embodiment 2

[0094] like Figure 2 The invention provides a gas load prediction device based on an air compressor station, comprising:

[0095] Acquisition module 101: used to acquire N consecutive time series gas load data to be predicted within a time period to be predicted of the air compressor station, where N is an integer greater than 1;

[0096] Preprocessing module 102: used to preprocess the time series gas load data to be predicted, and obtain the preprocessed time series gas load data to be predicted;

[0097] Prediction module 103: used to input the pre-processed time series gas load data to be predicted into the pre-trained LSTM-NN network model, and output the gas load prediction result;

[0098] Among them, the LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features with attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction results. Among them, the training samples include the training time series gas load data.

[0099] In the above embodiment, the attention mechanism LSTM network model is used to obtain the features in the time dimension, the attention layer is used to obtain the dynamic time step features containing attention, and the fully connected layer is used to realize the calculation of the gas load prediction, thereby realizing the combination of the recurrent neural network and the attention mechanism, making up for the singleness of the variables extracted by the traditional neural network, and effectively integrating the features of the spatial dimension and the features of the time dimension, which can improve the accuracy of the gas load data prediction in the gas load prediction.

[0100] It should be noted that other specific implementations of the gas load prediction device of the embodiment of the present invention may refer to the specific implementations of the gas load prediction method of the above embodiment of the present invention.

[0101] Embodiment 3

[0102] Corresponding to the above embodiment, the present invention further provides a chip device.

[0103] like Figure 3 As shown, the chip device includes: a processor 201 and a memory 203. The processor 201 and the memory 203 are connected, such as through a bus 202. Optionally, the chip device may also include a transceiver 204. It should be noted that in actual applications, the transceiver 204 is not limited to one, and the structure of the chip device does not constitute a limitation on the embodiments of the present invention.

[0104] The processor 201 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor 201 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0105] The bus 202 may include a path to transmit information between the above components. The bus 202 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 202 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0106] The memory 203 is used to store a computer program corresponding to the load forecasting method of the above embodiment of the present invention, and the computer program is controlled and executed by the processor 201. The processor 201 is used to execute the computer program stored in the memory 203 to implement the content shown in the above method embodiment.

[0107] in, Figure 3 The chip device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0108] The chip device of the embodiment of the present invention can improve the accuracy of load data prediction when performing load prediction by implementing the gas load prediction method.

[0109] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0110] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0111] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0112] In addition, 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 the indicated technical features. Therefore, the features defined as "first" and "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.

[0113] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for predicting gas load of an air compressor station. It is characterized in that include: Obtain N consecutive time series gas load data to be predicted within the time period to be predicted of the air compressor station, where N is an integer greater than 1; Preprocessing the time series gas load data to be predicted to obtain preprocessed time series gas load data to be predicted; Inputting the preprocessed time series gas load data to be predicted into a pre-trained LSTM-NN network model, and outputting a gas load prediction result; The LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed and used as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features containing attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction result. The training samples include the training time series gas load data.

2. The method for predicting the gas load of an air compressor station according to claim 1, It is characterized in that The process variable data of the air compressor system in the air compressor station under normal working conditions is used as a training set, and the training set is recorded as a matrix containing m-dimensional process variables and N training samples, as shown in the following formula: X=[x 1 x 2 x N ]∈R m×N ; Among them, X is used to represent the training set, x N Used to represent the Nth training sample, R m×N Used to represent m-dimensional process variables and N training samples; The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model, as shown in the following formula: H=[h 1 h 2 ···h N ]∈R p×N ; Among them, h N Used to represent the Nth p-dimensional hidden layer feature with time characteristics.

3. The method for predicting the gas load of an air compressor station according to claim 1, It is characterized in that The p-dimensional hidden layer features are calculated through the attention layer to obtain the dynamic time step features with attention, as shown in the following formula: HW Q =Q; HW K =K; HW V =V; Among them, Q is used to represent the query matrix, K is used to represent the key matrix, and V is used to represent the value matrix; W Q Used to represent the weight matrix between the p-dimensional hidden layer feature H and the query matrix; W K Used to represent the weight matrix between the p-dimensional hidden layer feature H and the key matrix; W V Used to represent the weight matrix between the p-dimensional hidden layer feature H and the value matrix; K T Used to represent the transpose of K; Used to indicate the length of the K vector; Softmax stands for normalized exponential function.

4. The method for predicting gas load of an air compressor station according to claim 1, It is characterized in that The dynamic time step feature is calculated through the fully connected layer, and the gas load prediction result is output, as shown in the following formula: in, is the gas load forecast matrix at each moment calculated by the fully connected layer, Used to represent the gas load matrix, W D is the weight matrix of the fully connected layer, H a Used to represent the hidden features after the attention mechanism is calculated, b D is the bias of the fully connected layer.

5. The method for predicting gas load of an air compressor station according to claim 1, It is characterized in that The loss function of the LSTM-NN network model is shown in the following formula: Among them, N is used to represent the number of samples, y i Used to indicate the true value of gas load. Used to indicate the predicted value of gas load.

6. The method for predicting gas load of an air compressor station according to claim 1, It is characterized in that The attention mechanism LSTM network model includes multiple memory units, each of which includes an input gate, a forget gate, and an output gate. The calculation formula of each memory unit is as follows: The output of the input gate is: i i =σ(W ix x i )+W hh h i-1 +b i ; Among them, i i is the value of the input gate at time i, W ix is the weight matrix between the input layer and the input gate, x i is the input at the i-th moment, W hh is the weight matrix between the hidden layer at the previous moment and the hidden layer at the current moment, b i is the bias of the input gate, σ represents the activation function; The output of the forget gate is: f i =σ(W fx x i )+W fh h i-1 +b f ; Among them, f i is the value of the forget gate at the i-th moment, W fx is the weight matrix between the input layer and the forget gate, x i is the input at the i-th moment, W fh is the weight matrix between the hidden layer and the forget gate, b f is the bias of the forget gate; The output of the output gate is: o i =(W ox x i +W hh h i-1 +W oc c i-1 +b o ); Among them, i is the value of the output gate at time i, W ox is the weight matrix between the output layer and the input gate, x i is the input at the i-th moment, W oc The weight matrix between the output gate and the memory unit at the i-th moment, b o is the bias of the input gate; The memory unit outputs a first parameter and a second parameter, where the first parameter is expressed as: c i =f i *c i-1 +i i *tanh(W cx x i +W hh h i-1 +W cc c i-1 +b c ); Among them, c i is the value of the memory unit at the i-th moment, W cx is the weight matrix between the input layer and the memory unit at the i-th moment, W cc is the weight matrix between the memory units at the current moment and the next moment, b c is the bias of the memory cell; The second parameter is expressed as: h i =o i *tanh(c i ); hi is used to represent the hidden features at the i-th moment.

7. The method for predicting gas load of an air compressor station according to claim 1, It is characterized in that The training process of the LSTM-NN network model also includes: Constructing a training set and a test set, wherein the training set includes a plurality of training samples, and the test set includes a plurality of test samples; Each of the training samples includes N consecutive training time series load data, and each of the test samples includes N consecutive test time series load data; Performing normalization processing on each of the training samples; Inputting each normalized training sample into the LSTM-NN network model to output a gas load training prediction result; In each training cycle, the LSTM-NN network model after training is tested through the test set, and the LSTM-NN network model that passes the test is used as the trained LSTM-NN network model.

8. A gas load prediction device based on an air compression station, It is characterized in that include: Acquisition module: used to acquire N consecutive time series gas load data to be predicted within the time period to be predicted of the air compressor station, where N is an integer greater than 1; Preprocessing module: used for preprocessing the gas load data of the time series to be predicted to obtain the preprocessed gas load data of the time series to be predicted; Prediction module: used to input the preprocessed time series gas load data to be predicted into the pre-trained LSTM-NN network model, and output the gas load prediction result; The LSTM-NN network model includes an attention mechanism LSTM network model, an attention layer and a fully connected layer connected in sequence. When training the LSTM-NN network model, the training samples in the training set are preprocessed and used as the input of the LSTM-NN network model. The preprocessed training time series gas load data is converted into p-dimensional hidden layer features with time characteristics through the attention mechanism LSTM network model. The p-dimensional hidden layer features are calculated through the attention layer to obtain dynamic time step features containing attention. The dynamic time step features are calculated through the fully connected layer to output the gas load prediction result. The training samples include the training time series gas load data.

9. A chip device comprising a memory, a processor and a computer program stored on the memory, It is characterized in that When the computer program is executed by the processor, the method for predicting the gas load of an air compressor station according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Air compression station tail end gas consumption load prediction method, device and equipment and storage medium

    CN122173846A

  • Air load prediction method, device and equipment for end of air compression station and storage medium

    CN122173846B

  • Air consumption load prediction method, device and equipment of air compressor and medium

    CN122198263A

  • An air consumption load prediction method, device, equipment and medium of an air compressor

    CN122198263B

  • Method and System for Controlling the Production of Industrial Gas Using Artificial Intelligence-Based Demand Forecasting

    KR102994742B1