Natural gas flow prediction method, system and electronic equipment based on model fusion

By adopting model fusion method in natural gas flow prediction and using technologies such as segmented graph convolution modules to learn the correlation information and timing characteristics of multiple natural gas flow data, the problem of low natural gas flow prediction accuracy in the existing technology is solved, and the more Accurate prediction effect.

CN118965298BActive Publication Date: 2024-12-31HANGZHOU DIANZI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411455417.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-12-31
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively predict dynamic changes in multivariate natural gas flow data, resulting in low prediction accuracy of natural gas flow and lack of physical correlation between sensors, making it difficult to build an efficient prediction model.

Method used

Using a model fusion method, the embedded graph convolution layer, the time-expanded convolution module and the time information enhancement module are identified through the segmented graph convolution module, the time-expanded convolution module and the time information enhancement module to learn the correlation information and internal timing characteristics between the historical time series of multiple natural gas flows. , build a natural gas flow prediction model.

Benefits of technology

It realizes accurate prediction of multivariate natural gas flow data, improves prediction accuracy, can effectively capture dynamic changes between sequences and within sequences, and improves the accuracy of natural gas flow prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118965298B_ABST
    Figure CN118965298B_ABST
Patent Text Reader

Abstract

The present invention discloses a natural gas flow prediction method, system and electronic device based on model fusion, which belongs to the field of time series data prediction. The method designs a natural gas flow prediction model based on model fusion, wherein a segmented graph convolution module is used to extract dynamically changing segmented association information between sequences from a similarity-based graph structure, an open set recognition embedding graph convolution layer is used to extract category association information between sequences from a category-based graph structure, a time dilation volume module is used to extract time features within the sequence and reduce the dimensionality of the sequence, and a time information enhancement module based on a two-stage attention mechanism is designed for the output part of the natural gas flow prediction model, which is used to aggregate time series features within the sequence. Using the trained natural gas flow prediction model, the prediction of a certain time step in the future of the natural gas time series can be achieved with high prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of time series data prediction, and in particular relates to a natural gas flow prediction method, system and electronic equipment based on model fusion. Background Art

[0002] In recent years, with the development of Internet of Things technology, various sensors have the ability to upload data in a scheduled or real-time manner, generating a large amount of multivariate time series data composed of different sensors. As a monitoring device, the sequence data generated by the sensor is highly correlated with the energy equipment it monitors. In the energy field, there is often no natural physical connection between sensors. The usage patterns of the monitored equipment may change dynamically and have a high degree of time correlation. The prediction model needs to be modeled according to the characteristics of the data to improve the prediction accuracy. Realizing the prediction of energy data can analyze the usage or production patterns of energy equipment on the one hand, and provide energy procurement references for energy companies on the other hand, reduce costs, and generate economic benefits. Summary of the invention

[0003] The purpose of the present invention is to solve the problems existing in the prior art and to provide a natural gas flow prediction method, system and electronic equipment based on model fusion.

[0004] In order to achieve the above-mentioned invention object, the present invention specifically adopts the following technical solutions:

[0005] In a first aspect, the present invention provides a natural gas flow prediction method based on model fusion, comprising the following steps:

[0006] S1. For each target flow sensor that the user needs to monitor, obtain the natural gas flow historical time series recorded by each target flow sensor, normalize each natural gas flow historical time series, and form a multivariate natural gas flow historical time series from the normalized natural gas flow historical time series. Then use a fixed-length time window to perform sliding extraction on the multivariate natural gas flow historical time series. During the sliding extraction process, the multivariate natural gas flow historical time series is evenly divided into multivariate natural gas flow historical time series segments, and the natural gas flow historical time series segment in each time window is used as a training sample. The natural gas flow historical time data value at a specified time step after each time window is used as a regression label, and a training sample set is constructed using the training samples and the regression labels corresponding to each training sample;

[0007] S2. Training the natural gas flow prediction model using the training sample set obtained in S1 until the natural gas flow prediction model converges so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the input data is a multivariate natural gas flow historical time series segment;

[0008] The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedding graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation volume module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal;

[0009] S3. During actual prediction, the natural gas flow historical time series within the current most recent time window is obtained from the recorded data of each target flow sensor and a real-time multivariate natural gas flow historical time series segment is formed. The real-time multivariate natural gas flow historical time series segment is normalized and input into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

[0010] Based on the above scheme, each step can be implemented in the following preferred specific manner.

[0011] As a preferred embodiment of the above-mentioned first aspect, the natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedded graph convolution layer, a time dilation convolution module and a time information enhancement module; the segmented graph convolution module segments the input multivariate natural gas flow historical time series segments according to the time dimension to obtain the natural gas flow historical time series segments, constructs a segmented adjacency matrix according to the cosine similarity between the natural gas flow historical time series segments, and then extracts the correlation between the natural gas flow historical time series segments by the first graph convolution network, the first graph convolution network includes multiple layers of graph convolution layers and uses the segmented adjacency matrix to calculate the output of each layer of graph convolution layer, after completing the correlation extraction, the output of the first graph convolution network is used as the first output signal; the open set recognition embedded graph convolution layer uses a pre-trained open set recognition model to perform open set recognition and classification on the input multivariate natural gas flow historical time series segments, and generates a new graph adjacency matrix according to the open set recognition and classification results, and inputs the open set recognition and classification into the second graph convolution network, and the number of graph convolution layers of the second graph convolution network is the same as that of the first graph convolution network. The number of layers is the same, the second graph convolution network uses the new graph adjacency matrix to calculate the output of each graph convolution layer, and finally uses the output of the second graph convolution network as the second output signal; the time dilation convolution module adds the first output signal and the second output signal and inputs them into the multi-layer stacked threshold control unit with dilation convolution, further extracts the features in the multi-element natural gas flow historical time series segment and reduces the dimension to obtain the third output signal; the time information enhancement module inputs the input multi-element natural gas flow historical time series segment into the LSTM network, segments the output features of the LSTM network according to time, and applies the attention mechanism to each segment feature to extract the segment context vector, and then continues to apply the attention mechanism to the segment context vector to generate the time context vector, and finally splices the time context vector with the feature value of the last time step in the output feature, and passes the splicing result through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal, and finally adds the third output signal and the fourth output signal and then denormalizes them to obtain the output of the natural gas flow prediction model.

[0012] As a preferred embodiment of the first aspect, step S1 specifically includes the following sub-steps:

[0013] S11. Get the information that the user needs to monitor The natural gas flow historical time series recorded by the target flow sensors are normalized by taking their respective maximum values ​​as the scale values ​​to form a normalized natural gas flow historical time series. All normalized natural gas flow historical time series form a multivariate natural gas flow historical time series; wherein, Indicates the number of target flow sensors;

[0014] S12, performing sliding extraction on the multivariate natural gas flow historical time series according to a preset step length with a time window of fixed length, during the sliding extraction process, each time window extracts the multivariate natural gas flow historical time series segment within the time window from the multivariate natural gas flow historical time series, and extracts the multivariate natural gas flow historical time series segment located after the time window on the multivariate natural gas flow historical time series. The historical time data values ​​of natural gas flow at time steps are used as regression labels of the natural gas flow prediction model to generate a training sample set for the natural gas flow prediction model; among them, Represents the time step index following the time window.

[0015] As a preferred embodiment of the first aspect, in the natural gas flow prediction model of step S2, the specific processing flow of the segmented graph convolution module is as follows:

[0016] AS21, input the multivariate natural gas flow historical time series segments into the segmented graph convolution module, first according to the preset segment number hyperparameter The multivariate natural gas flow historical time series segments are evenly divided in the time dimension to obtain Segmentation of natural gas flow historical time series;

[0017] AS22, then The natural gas flow historical time series corresponding to each target flow sensor in the segment is a node, and the cosine similarity is used to calculate the first The adjacency of nodes in the segmented natural gas flow historical time series is obtained. The graph adjacency matrix corresponding to the segmented natural gas flow historical time series ;

[0018] AS23, then use the Softmax function to normalize each graph adjacency matrix by row, and use the normalized graph adjacency matrix as the segmented adjacency matrix;

[0019] AS24. Finally, The historical time series of natural gas flow is segmented and input into the first graph convolutional network. According to the obtained segment adjacency matrix, the first graph convolutional network performs a total of The layer graph convolution is calculated, and the output of the first graph convolution network is used as the first output signal.

[0020] Furthermore, in step AS22, the graph adjacency matrix corresponding to the k-th segment of the natural gas flow historical time series is In the example, each target flow sensor corresponds to a node, and the strength of the edge connecting any two target flow sensors in the kth segment of the natural gas flow history time series is It is expressed as:

[0021]

[0022] Where: , Respectively represent the kth segment of the natural gas flow historical time series The first , The natural gas flow history time series corresponding to each target flow sensor; , Respectively , The modulus value of .

[0023] Furthermore, in step AS23, in the segmented adjacency matrix, the segmented adjacency matrix of the kth segment of the natural gas flow historical time series segment is The strength of the connecting edge between the kth segment of the natural gas flow historical time series The corresponding adjacency The calculation formula is:

[0024]

[0025] in, Represents the graph adjacency matrix corresponding to the kth segment of the natural gas flow historical time series In , The target flow sensor is segmented into the kth segment of the natural gas flow history time series. The strength of the connecting edge.

[0026] As a preferred embodiment of the first aspect, in the first graph convolutional network of step S2, The specific processing flow of the graph convolution layer is as follows: Use the degree matrix of the segmented adjacency matrix to calculate the The first layer of the graph convolutional layer The segmented convolution results are The segmented convolution results of each layer of the graph convolution layer are reorganized and spliced ​​in the time dimension to obtain the first The intermediate output of the convolutional layer is The intermediate output of the graph convolutional layer is residually connected with the input multivariate natural gas flow historical time series segment to obtain the The final output of the graph convolutional layer.

[0027] Furthermore, in the first graph convolutional network of step S2, The first layer of the graph convolutional layer The results of the segmented convolution are expressed as follows:

[0028]

[0029] in, For the Segmented adjacency matrix of historical time series of natural gas flow The degree matrix of is the first trainable parameter matrix, Indicates -1 graph convolutional layer The segmented convolution results are The final output of the -1 graph convolutional layer is obtained after decomposition; Indicates The first layer of the graph convolutional layer The segmented convolution results are The final output of the layer graph convolution layer is obtained after decomposition; ReLU activation function. Represents the number of graph convolutional layers of the first graph convolutional network; Represents the input of the first graph convolutional network.

[0030] As a preferred embodiment of the first aspect, in the natural gas flow prediction model of step S2, the specific processing flow of the open set recognition embedding graph convolution layer is as follows:

[0031] BS21, inputting the multivariate natural gas flow historical time series segment into the pre-trained open set recognition model, and using the pre-trained open set recognition model to perform open set recognition and classification on the multivariate natural gas flow historical time series segment to obtain an open set recognition and classification result;

[0032] BS22. Calculate the graph adjacency matrix for the open set recognition and classification results to obtain a new graph adjacency matrix. Line The elements of a column are represented as follows:

[0033]

[0034] in, Represents the open set recognition model for the The open set identification classification results of the historical time series of multivariate natural gas flow; Represents the open set recognition model for the The open set identification and classification results of the historical time series of multivariate natural gas flow; Represents the index of the historical time series segment of multivariate natural gas flow; The number of known gas types representing the natural gas flow;

[0035] BS23. Finally, the open set recognition and classification results are input into the second graph convolutional network. According to the new graph adjacency matrix obtained, the second graph convolutional network performs a total of Layer graph convolution calculation, after the second graph convolution network After the graph convolution layer is processed, a new intermediate output is obtained, and the new intermediate output is residually connected with the input multivariate natural gas flow historical time series segment to obtain the output of the second graph convolution network and serve as the second output signal.

[0036] As a preferred embodiment of the first aspect, in the natural gas flow prediction model of step S2, the time dilation convolution module performs a total of The output of each threshold control unit is weighted and superimposed to obtain a weighted signal. After a convolution layer is used to reduce the dimension of the weighted signal, the output of the time dilation convolution module is obtained as the third output signal. .

[0037] Further, The processing process of dilated convolution in a threshold control unit is expressed as follows:

[0038]

[0039] in, It is The output of the threshold control unit, It is The output of a threshold control unit; Respectively represent The threshold controls the learnable parameters of the first and second convolution kernels of the dilated convolution in each unit; ⊗ represents matrix dot multiplication, represents the sigmoid activation function and * represents the dilated convolution operation.

[0040] As a preferred embodiment of the first aspect, in the natural gas flow prediction model of step S2, the specific processing flow of the time information enhancement module is as follows:

[0041] CS21, taking the multivariate natural gas flow historical time series segment as the input of the LSTM network, first The LSTM network with hidden layer units is used for feature extraction to obtain the output features of the LSTM network;

[0042] CS22, hyperparameters based on the number of segments The output features are segmented to obtain The segment features are then weighted by the third trainable parameter matrix to obtain weighted segment features. The weighted segment features are passed through the Softmax function to calculate the corresponding segment weights. The segment context vector is obtained by weighted summing the weighted segment features and the segment weights.

[0043] CS23. After the segment context vector is weighted by the fourth trainable parameter matrix, a weighted segment context vector is obtained. The weighted segment context vector contains The signal of each time step is passed through the Softmax function to calculate the corresponding time expansion step weight, and the time context vector is obtained by weighted summing the signal of each time step and the weight of each time expansion step; where Indicates the length of each natural gas flow historical time series segment;

[0044] CS24. Finally, the time context vector is concatenated with the feature value of the last time step in the output feature, and the concatenated result is passed through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal.

[0045] As a preferred embodiment of the first aspect, in the second graph convolutional network of step S2, The specific processing flow of the layer graph convolution layer is as follows:

[0046]

[0047] in, The new graph adjacency matrix is The degree matrix of is the second trainable parameter matrix, Indicates -Result of 1 graph convolutional layer; Indicates The result of the graph convolution layer; ReLU activation function. Represents the number of graph convolutional layers of the second graph convolutional network; Indicates that the open set recognition classification results As the second graph convolutional network input .

[0048] In a second aspect, the present invention provides a natural gas flow prediction system based on model fusion, comprising:

[0049] A data processing module is used to obtain the natural gas flow history time series recorded by each target flow sensor that the user needs to monitor, normalize each natural gas flow history time series, form a multivariate natural gas flow history time series from the normalized natural gas flow history time series, and then use a fixed-length time window to perform sliding extraction on the multivariate natural gas flow history time series. During the sliding extraction process, the multivariate natural gas flow history time series is evenly divided into multivariate natural gas flow history time series segments, and the natural gas flow history time series segment in each time window is used as a training sample. The natural gas flow history time data value at a specified time step after each time window is used as a regression label, and a training sample set is constructed using the training samples and the regression labels corresponding to each training sample;

[0050] A model training module is used to train a natural gas flow prediction model using a training sample set obtained by the data processing module until the natural gas flow prediction model converges so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the input data is a multivariate natural gas flow historical time series segment; the natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedding graph convolution layer, a time dilation convolution module, and a time information enhancement module;

[0051] The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedding graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation volume module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal;

[0052] The result acquisition module is used to obtain the natural gas flow historical time series within the current most recent time window from the recorded data of each target flow sensor during actual prediction and form a real-time multivariate natural gas flow historical time series segment, normalize the real-time multivariate natural gas flow historical time series segment and input it into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

[0053] In a third aspect, the present invention provides a computer electronic device comprising a memory and a processor;

[0054] The memory is used to store computer programs;

[0055] The processor is used to implement the natural gas flow prediction method based on model fusion as described in any scheme of the first aspect above when executing the computer program.

[0056] Compared with the prior art, the present invention has the following beneficial effects:

[0057] The natural gas flow prediction model designed by the present invention can learn the historical multivariate time series composed of multiple target flow sensors based on the latest historical gas flow data, use the segmented graph convolution module to learn the segmented association information between sequences, use the open set recognition embedded graph convolution layer to learn the category association information between sequences, use the time dilation convolution module and the time information enhancement module to learn the internal timing characteristics of the sequence, and accurately predict the flow value of each gas flow sensor at a certain time step in the future. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a schematic diagram of the structure of the natural gas flow prediction model proposed by the present invention;

[0059] Figure 2 Schematic diagram of the steps of the method of the present invention;

[0060] Figure 3 is a system block diagram of the present invention;

[0061] Figure 4 It is a schematic diagram of a computer electronic device of the present invention. DETAILED DESCRIPTION

[0062] In order to make the above-mentioned purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation mode of the present invention is described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The technical features in each embodiment of the present invention can be combined accordingly without conflicting with each other.

[0063] In the description of the present invention, it should be understood that the terms "first" and "second" are only used for the purpose of distinguishing descriptions, and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features.

[0064] like Figure 2As shown, as a preferred implementation of the present invention, a natural gas flow prediction method based on model fusion is provided, which includes the following steps S1 to S3.

[0065] S1. For each target flow sensor that the user needs to monitor, obtain the natural gas flow history time series recorded by each target flow sensor After normalizing each natural gas flow historical time series, the normalized natural gas flow historical time series Composition of multivariate natural gas flow historical time series Then, a fixed-length time window is used to perform sliding extraction on the multivariate natural gas flow historical time series. During the sliding extraction process, the multivariate natural gas flow historical time series is evenly divided into multivariate natural gas flow historical time series segments. , the natural gas flow historical time series segment in each time window is taken as a training sample, the natural gas flow historical time data value at the specified time step after each time window is taken as the regression label, and the training sample set is constructed with the training samples and the regression labels corresponding to each training sample.

[0066] In an embodiment of the present invention, the above step S1 specifically includes the following sub-steps:

[0067] S11. Get the information that the user needs to monitor The natural gas flow historical time series recorded by the target flow sensor is normalized by taking the maximum value of each natural gas flow historical time series as the scale value to form a normalized natural gas flow historical time series. All normalized natural gas flow historical time series form a multivariate natural gas flow historical time series. .in, Indicates the target flow sensor number.

[0068] It should be noted that in this embodiment S11, the above maximum value normalization belongs to the prior art. Natural gas flow historical time series The maximum value in , it can be used as the scale value to normalize the maximum value of each natural gas flow historical time series:

[0069]

[0070] in, Indicates Normalized natural gas flow historical time series; Indicates the target flow sensor number.

[0071] S12, with fixed length Time window in multivariate natural gas flow historical time series According to the preset step length Sliding extraction is performed. During the sliding extraction process, each time window is extracted from the multivariate natural gas flow historical time series. Extract the multivariate natural gas flow historical time series segments within the time window , and the multivariate natural gas flow historical time series The first The historical time data value of natural gas flow at the time step As the regression label of the natural gas flow prediction model, a training sample set of the natural gas flow prediction model is generated. Represents the time step index after the time window. The training sample pair constructed by each training sample and the regression label corresponding to each training sample can be expressed as { }.

[0072] In this embodiment, the length of the time window Take 168, the sliding step size of the time window Take 1.

[0073] S2. Use the training sample set obtained in S1 to train the natural gas flow prediction model until the natural gas flow prediction model converges so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the above input data is a multivariate natural gas flow historical time series segment.

[0074] The natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedded graph convolution layer, a time dilation convolution module and a time information enhancement module. The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedded graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation convolution module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal.

[0075] Specifically, the above segmented graph convolution module segments the input multivariate natural gas flow historical time series The natural gas flow history time series is segmented according to the time dimension, and the segmented adjacency matrix is ​​constructed according to the cosine similarity between the segments of the natural gas flow history time series. The correlation between the segments of the natural gas flow history time series is extracted by the first graph convolution network. The first graph convolution network contains multiple layers of graph convolution layers and uses the segmented adjacency matrix to calculate the output of each layer of graph convolution layer. After the correlation extraction is completed, the output of the first graph convolution network is used as the first output signal The above-mentioned open set recognition embedded graph convolution layer uses the pre-trained open set recognition model to perform open set recognition and classification on the input multivariate natural gas flow historical time series segment, and generates a new graph adjacency matrix based on the open set recognition and classification results, and inputs the open set recognition and classification into the second graph convolution network. The number of graph convolution layers of the second graph convolution network is the same as the number of graph convolution layers of the first graph convolution network. The second graph convolution network uses the new graph adjacency matrix to calculate the output of each graph convolution layer, and finally uses the output of the second graph convolution network as the second output signal. The time dilation convolution module converts the first output signal output by the segmented graph convolution module into The second output signal of the convolutional layer output of the embedded graph is After addition, the signal is input into the multi-layer stacked threshold control unit GLU with dilated convolution to further extract the features of the multivariate natural gas flow historical time series and reduce the dimension to obtain the third output signal. The above-mentioned time information enhancement module inputs the input multivariate natural gas flow historical time series segment into the LSTM network, segments the output features of the LSTM network according to time, and applies the attention mechanism to each segment feature to extract the segment context vector, and then continues to apply the attention mechanism on the segment context vector to generate the time context vector, and finally splices the time context vector with the feature value of the last time step in the output feature, and passes the splicing result through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal , and finally the third output signal and the fourth output signal After adding and then denormalizing, the output of the natural gas flow prediction model is obtained.

[0076] It should be noted that in the above step S2 of the embodiment of the present invention, the method of open set recognition model belongs to the prior art and will not be described in detail.

[0077] In the above step S2 of the embodiment of the present invention, if Figure 1 As shown in the figure, the specific processing of each part of the natural gas flow prediction model is as follows:

[0078] 1) In the segmented graph convolution module, the multivariate natural gas flow historical time series is segmented Input to the segmented graph convolution module ( Figure 1 In the segmented graph convolution layer in , according to the preset segment number hyperparameter Multivariate natural gas flow historical time series segment Performing average division in the time dimension, we get Segmentation of natural gas flow historical time series (i.e. Figure 1 Multivariate time series input in ), among which, The historical time series of natural gas flow can be expressed as ,in, The index representing the segment of the historical time series of natural gas flow; Indicates the length of each natural gas flow historical time series segment.

[0079] In this embodiment, the segment number hyperparameter Preferably 7.

[0080] Then, Segmentation of natural gas flow historical time series The natural gas flow history time series corresponding to each target flow sensor in the node is taken as a node, and the cosine similarity is used to calculate the Segmentation of natural gas flow historical time series The adjacency of the internal nodes is obtained Segmentation of natural gas flow historical time series The corresponding graph adjacency matrix , in Segmentation of natural gas flow historical time series The corresponding graph adjacency matrix In the example, each target flow sensor corresponds to a node, and any two target flow sensors ( and ) in the Strength of connecting edges in the segmented natural gas flow history time series It is expressed as:

[0081]

[0082] Where: Indicates Segmentation of natural gas flow historical time series The first The natural gas flow history time series corresponding to each target flow sensor; Indicates Segmentation of natural gas flow historical time series The first The natural gas flow history time series corresponding to each target flow sensor; Indicates Segmentation of natural gas flow historical time series The first The modulus of the natural gas flow historical time series corresponding to the target flow sensor, Indicates Segmentation of natural gas flow historical time series The first The modulus value of the historical time series of natural gas flow corresponding to each target flow sensor.

[0083] Then use the Softmax function to normalize each graph adjacency matrix by row, and use the normalized graph adjacency matrix as the segmented adjacency matrix; in the segmented adjacency matrix, Segmentation of natural gas flow historical time series The piecewise adjacency matrix of Middle and Segmentation of natural gas flow historical time series Strength of the connecting edge The corresponding adjacency The calculation formula is:

[0084]

[0085] in, Indicated in The graph adjacency matrix corresponding to the segmented natural gas flow historical time series In , The target flow sensor is in the Segmentation of natural gas flow historical time series The strength of the connecting edge.

[0086] Finally, the Segmentation of natural gas flow historical time series Input into the first graph convolutional network, according to the obtained segmented adjacency matrix Through the first graph convolutional network, a total of Layer graph convolution calculation, taking the output of the first graph convolution network as the first output signal .

[0087] It should be noted that in the first graph convolutional network of step S2 of this embodiment, The specific processing flow of the layer graph convolution layer is as follows:

[0088] Use the degree matrix of the piecewise adjacency matrix to calculate the The first layer of the graph convolutional layer The result of segmented convolution:

[0089]

[0090] in, For the Segmented adjacency matrix of historical time series of natural gas flow The degree matrix of is the first trainable parameter matrix; Indicates -1 graph convolutional layer The segmented convolution results are The final output of the -1 graph convolutional layer is obtained after decomposition; Indicates The first layer of the graph convolutional layer The segmented convolution results are The final output of the layer graph convolution layer is obtained after decomposition; ReLU activation function. Represents the number of graph convolutional layers of the first graph convolutional network; Represents the input of the first graph convolutional network; Represents the graph convolution layer index of the first graph convolution network; Represents the index of the segmented convolution result of each graph convolution layer.

[0091] The first The segmented convolution results of each layer of the graph convolution layer are reorganized and spliced ​​in the time dimension to obtain the first Intermediate output of the graph convolutional layer ,in, Respectively represent The first layer of the graph convolutional layer The result of piecewise convolution.

[0092] The first Intermediate output of the graph convolutional layer The input multivariate natural gas flow historical time series segment Perform residual connection to obtain The final output of the convolutional layer .

[0093] 2) In the open set recognition embedding graph convolutional layer, the multivariate natural gas flow historical time series segments are input into the pre-trained open set recognition model, and the pre-trained open set recognition model performs open set recognition and classification on the multivariate natural gas flow historical time series segments to obtain the open set recognition and classification results. .

[0094] Open set recognition and classification results Calculate the graph adjacency matrix and get the new graph adjacency matrix , the new graph adjacency matrix Middle Line The elements of a column are represented as follows:

[0095]

[0096]

[0097] in, Represents the open set recognition model for the The open set identification classification results of the historical time series of multivariate natural gas flow; Represents the open set recognition model for the The open set identification and classification results of the historical time series of multivariate natural gas flow; Represents the index of the historical time series segment of multivariate natural gas flow; The number of known gas types representing the natural gas flow.

[0098] In the embodiment of the present invention, the multi-element natural gas flow historical time series segments of the same common gas usage type constitute a known category connected subgraph in the new graph adjacency matrix, and the multi-element natural gas flow historical time series segments of unknown or special gas usage types constitute isolated nodes in the new graph adjacency matrix. At this time, if The open set identification results and the first The open set identification category results of the multivariate natural gas flow historical time series segments belong to the same known gas consumption type, then they are adjacent nodes. Otherwise, The historical time series of multivariate natural gas flow and There are no connecting edges between the historical time series segments of multivariate natural gas flow.

[0099] Finally, the open set recognition classification results Input into the second graph convolutional network, according to the new graph adjacency matrix obtained Through the second graph convolutional network, a total of Layer graph convolution calculation, after the second graph convolution network After the convolutional layer processing, the new intermediate output is obtained , the new intermediate output The input multivariate natural gas flow historical time series segment Perform residual connection to obtain the output of the second graph convolutional network as the second output signal .

[0100] It should be noted that in the second graph convolutional network of step S2 of this embodiment, The specific processing flow of the layer graph convolution layer is as follows:

[0101]

[0102] in, The new graph adjacency matrix is The degree matrix of is the second trainable parameter matrix, Indicates -Result of 1 graph convolutional layer; Indicates The result of the graph convolution layer; ReLU activation function. Represents the number of graph convolutional layers of the second graph convolutional network; Indicates that the open set recognition classification results As the second graph convolutional network input .

[0103] It should be noted that in the first and second graph convolutional networks of step S2 of this embodiment, the number of graph convolutional layers is Both are 2.

[0104] 3) In the time dilation convolution module ( Figure 1 In the time dilation convolution module layer in , the first output signal of the segmented graph convolution module is The second output signal of the convolutional layer output of the embedded graph is After adding, it is used as input, and the total The output of each threshold control unit is weighted and superimposed to obtain a weighted signal. After a convolution layer is used to reduce the dimension of the weighted signal, the output of the time dilation convolution module is obtained as the third output signal. :

[0105]

[0106] in, Indicates The output of the threshold control unit Trainable weight matrix when weighting; Indicates the threshold control unit index, Represents the trainable weight matrix of the convolutional layer.

[0107] In this embodiment, the number of convolution kernels in the last convolution layer of the time dilation convolution module is Take 1, the size of the convolution kernel Pick .

[0108] It should be noted that in the time dilation convolution module, The processing process of dilated convolution in a threshold control unit is expressed as follows:

[0109]

[0110] in, It is The output of the threshold control unit, It is The output of a threshold control unit; Respectively represent The threshold controls the learnable parameters of the first and second convolution kernels of the dilated convolution in each unit; ⊗ represents matrix dot multiplication, represents the sigmoid activation function and * represents the dilated convolution operation.

[0111] In this embodiment, the number of threshold control units is Preferably, it is 5. The number of convolution kernels in the first and second convolution layers in the dilated convolution is , the size of the convolution kernel is ,In each threshold control unit, the dilation rate of the dilated convolution is 1, 3, 6, 12, and 24 respectively.

[0112] 4) In the time information enhancement module, the multivariate natural gas flow historical time series segment As the input of the LSTM network, The LSTM network with hidden layer units is used for feature extraction to obtain the output features of the LSTM network. :

[0113]

[0114] in, Respectively represent the output features The feature value of the time step. Then according to the segment number hyperparameter For length Output characteristics Segment and obtain Segment features, The segment feature is expressed as:

[0115]

[0116]

[0117] in, Represents a segment feature index.

[0118] Then, each segment feature is weighted by the third trainable parameter matrix to obtain the weighted segment feature. Segment Features After the third trainable parameter matrix After weighting, it can be expressed as:

[0119]

[0120] The weighted segment features are passed through the Softmax function to calculate the corresponding segment weights.

[0121]

[0122] in, Indicates Segment Features The corresponding segment weights are Indicates Segmental features; Represents a segment feature index.

[0123] The segment context vector is obtained by weighted summing up each weighted segment feature and each segment weight. :

[0124]

[0125] Then the segment context vector After the fourth trainable parameter matrix After weighting, the weighted segment context vector is obtained :

[0126]

[0127] Weighted segment context vector Included The signal of each time step is passed through the Softmax function to calculate the corresponding time expansion step weight. The signal of the time step The time expansion step weight obtained after the Softmax function for:

[0128]

[0129] in, represents the time step index. Finally, the temporal context vector The signal of each time step and the weighted sum of the time expansion step weights are obtained:

[0130]

[0131] Finally, the time context vector The feature value of the last time step in the output feature The splicing is performed, and the splicing result is passed through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal :

[0132]

[0133] Where: and Represent the learnable weight matrix and bias of the fully connected layer respectively; Indicates splicing.

[0134] 5) The third output signal of the time dilation convolution module and the fourth output signal output by the time information enhancement module After adding and then denormalizing, the output of the natural gas flow prediction model is obtained;

[0135]

[0136] Where: represents the denormalized coefficient.

[0137] It should be noted that in the present invention, when the natural gas flow prediction model is trained, the loss function used is the mean absolute error, and the AdamW optimizer is used to update all trainable parameters of the natural gas flow prediction model, and the learning rate Pick , decay weight Take 0.00001.

[0138] S3. During actual prediction, the natural gas flow historical time series within the current most recent time window is obtained from the recorded data of each target flow sensor and a real-time multivariate natural gas flow historical time series segment is formed. The real-time multivariate natural gas flow historical time series segment is normalized and input into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

[0139] In order to better demonstrate the specific implementation and technical effects of the present invention, the natural gas flow prediction method based on model fusion shown in steps S1 to S3 in the above preferred implementation is applied to a specific example.

[0140] Example

[0141] The steps of this embodiment are shown in the above steps S1 to S3, and will not be repeated here. The following is a demonstration of some implementation processes and implementation results:

[0142] This embodiment selects industrial and commercial natural gas flow data from Zhejiang Cangnan Instrument Group Co., Ltd. The natural gas data set contains 52 high-frequency natural gas flow sequences from July 1, 2020 to September 5, 2021, with a sampling frequency of 10 min, and Natural-gas-2 contains 118 low-frequency natural gas flow sequences from March 9, 2020 to September 5, 2021, with a sampling frequency of 1 hour. Due to the particularity of the natural gas industry, some industrial and commercial users are in a state of suspending gas use before and after the Spring Festival, so this embodiment deletes the data of the February 2021 time period of the data set. The processed data is divided into a training set (60%), a validation set (20%) and a test set (20%) in chronological order. The model training is performed according to the method shown in S1~S3 of the present invention, and the proposed natural gas flow prediction model is trained on the training set with reference to the validation set, and finally tested with the test set according to the aforementioned S3 step.

[0143] For the sake of convenience, the natural gas flow prediction model obtained in the methods shown in S1 to S3 of the present invention is referred to as OG-SGTANN. In this embodiment, the parameters of OG-SGTANN are selected as follows: the length of the time window Take 168, the sliding step size of the time window Take 1, the number of segments is a hyperparameter Take 7, the number of graph convolution layers in the two graph convolutional networks Take 2, the number of GLUs in the time-dilated convolution module Take 5, the number of convolution kernels in each layer of dilated convolution Take 24, the size of the convolution kernel Pick , the dilation rate of the 5-layer dilated convolution The number of convolution kernels in the normal convolution layer of the time dilation convolution module is 1, 3, 6, 12, and 24 respectively. Take 1, the size of the convolution kernel Pick During the natural gas flow prediction model training process, the AdamW optimizer updates all trainable parameters of the natural gas flow prediction model, and the learning rate Pick , decay weight Take 0.00001.

[0144] The experiment of this embodiment compares OG-SGTANN with several prediction methods. The prediction methods used as comparison are: (1) GP: a regression model that uses Gaussian process to model time series. Its implementation belongs to the prior art. Please refer to the prior art literature: Frigola R. Bayesian time series learning with Gaussian processes [D]. University of Cambridge, 2015: 13-17; (2) GRU: a recurrent neural network using fully connected GRU units; (3) MTGNN: a neural network model based on GCN that uses self-learning adjacency matrix to describe the correlation between paired variables. In addition to the above prediction methods, the embodiment of the present invention conducts an ablation experiment. In the natural gas flow prediction model OG-SGTANN of the present invention, only the segmented graph convolution module, the time dilation convolution module and the time information enhancement module are retained, and the open set recognition embedding graph convolution layer is removed to construct a new natural gas flow prediction model SGTANN.

[0145] In order to verify the technical effect of the method of the present invention, the relative square root error (RSE) is selected as the evaluation index of each method, and the calculation formula is as follows:

[0146]

[0147] in, and At time step Multivariate time series variables The smaller the RSE value, the smaller the prediction error of the model for this multivariate time.

[0148] All methods were experimented on different prediction steps (i.e., h = 3, 6, 12, 24), where different prediction steps represent the value of the hth time step after the input time window as the prediction target. The experimental results of each method on the test set are shown in Table 1.

[0149]

[0150] The results of this embodiment are shown in Table 1. The RSE of each prediction method on the data set increases slowly with the increase of prediction steps, which means that the prediction ability of each prediction method including the present invention also decreases with the increase of prediction steps. Compared with OG-SGTANN and SGTANN, the average prediction error of the method of the present invention decreased by 0.6% after introducing the open set recognition embedding graph convolution layer, which shows that the introduction of external graph structure helps the natural gas flow prediction model learn the correlation information between sequences, which shows the effectiveness of the method of the present invention.

[0151] It should also be noted that the natural gas flow prediction method based on model fusion in the above embodiment can essentially be executed by a computer program or module. Therefore, similarly, based on the same inventive concept, another preferred embodiment of the present invention also provides a natural gas flow prediction system based on model fusion corresponding to the natural gas flow prediction method based on model fusion provided in the above embodiment, such as Figure 3 As shown, it includes:

[0152] A data processing module is used to obtain the natural gas flow history time series recorded by each target flow sensor that the user needs to monitor, normalize each natural gas flow history time series, form a multivariate natural gas flow history time series from the normalized natural gas flow history time series, and then use a fixed-length time window to perform sliding extraction on the multivariate natural gas flow history time series. During the sliding extraction process, the multivariate natural gas flow history time series is evenly divided into multivariate natural gas flow history time series segments, and the natural gas flow history time series segment in each time window is used as a training sample. The natural gas flow history time data value at a specified time step after each time window is used as a regression label, and a training sample set is constructed using the training samples and the regression labels corresponding to each training sample;

[0153] A model training module is used to train a natural gas flow prediction model using a training sample set obtained by the data processing module until the natural gas flow prediction model converges so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the input data is a multivariate natural gas flow historical time series segment; the natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedding graph convolution layer, a time dilation convolution module, and a time information enhancement module;

[0154] The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedding graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation volume module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal;

[0155] The result acquisition module is used to obtain the natural gas flow historical time series within the current most recent time window from the recorded data of each target flow sensor during actual prediction and form a real-time multivariate natural gas flow historical time series segment, normalize the real-time multivariate natural gas flow historical time series segment and input it into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

[0156] It is understandable that the natural gas flow prediction method based on model fusion described in S1 to S3 above can be implemented by computer programs. Therefore, based on the same inventive concept, another preferred embodiment of the present invention also provides a computer electronic device corresponding to the natural gas flow prediction method based on model fusion provided in the above embodiment, such as Figure 4 As shown, it includes a memory and a processor;

[0157] The memory is used to store computer programs;

[0158] The processor is used to implement the natural gas flow prediction method based on model fusion in the above embodiment when executing the computer program.

[0159] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0160] It is understandable that the above storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. The storage medium may also be a U disk, a mobile hard disk, a magnetic disk or an optical disk, etc., which can store program codes.

[0161] It is understandable that the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0162] It should also be noted that those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the various embodiments provided in this application, the division of steps or modules in the system and method is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or steps can be combined or integrated together, and a module or step can also be split.

[0163] The above-described embodiment is only a preferred solution of the present invention, but it is not intended to limit the present invention. A person skilled in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A natural gas flow prediction method based on model fusion, characterized in that: The following steps are involved: S1. For each target flow sensor that the user needs to monitor, obtain the natural gas flow historical time series recorded by each target flow sensor, normalize each natural gas flow historical time series, and form a multivariate natural gas flow historical time series from the normalized natural gas flow historical time series. Then use a fixed-length time window to perform sliding extraction on the multivariate natural gas flow historical time series. During the sliding extraction process, the multivariate natural gas flow historical time series is evenly divided into multivariate natural gas flow historical time series segments, and the natural gas flow historical time series segment in each time window is used as a training sample. The natural gas flow historical time data value at a specified time step after each time window is used as a regression label, and a training sample set is constructed using the training samples and the regression labels corresponding to each training sample; S2, using the training sample set obtained in S1 to train the natural gas flow prediction model until the natural gas flow prediction model converges, so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the input data is a multivariate natural gas flow historical time series segment; the natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedding graph convolution layer, a time dilation convolution module and a time information enhancement module; The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedding graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation volume module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal; S3. During actual prediction, the natural gas flow historical time series within the current most recent time window is obtained from the recorded data of each target flow sensor and a real-time multivariate natural gas flow historical time series segment is formed. The real-time multivariate natural gas flow historical time series segment is normalized and input into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

2. The natural gas flow prediction method based on model fusion according to claim 1, characterized in that: The segmented graph convolution module segments the input multivariate natural gas flow historical time series segments according to the time dimension to obtain the natural gas flow historical time series segments, constructs a segmented adjacency matrix according to the cosine similarity between the natural gas flow historical time series segments, and then extracts the correlation between the natural gas flow historical time series segments by the first graph convolution network. The first graph convolution network includes multiple graph convolution layers and uses the segmented adjacency matrix to calculate the output of each graph convolution layer. After the correlation extraction is completed, the output of the first graph convolution network is used as the first output signal; the open set recognition embedded graph convolution layer uses a pre-trained open set recognition model to perform open set recognition and classification on the input multivariate natural gas flow historical time series segments, and generates a new graph adjacency matrix according to the open set recognition and classification results, and inputs the open set recognition and classification into the second graph convolution network. The number of graph convolution layers of the second graph convolution network is the same as that of the first graph convolution network. The second graph convolution network uses the new graph adjacency matrix to calculate the output of each graph convolution layer. Finally, the output of the second graph convolution network is used as the second output signal; the time dilation convolution module adds the first output signal and the second output signal and inputs the added signal into a multi-layer stacked threshold control unit with dilation convolution, further extracts the features in the multi-element natural gas flow historical time series segment and reduces the dimension to obtain a third output signal; the time information enhancement module inputs the input multi-element natural gas flow historical time series segment into the LSTM network, segments the output features of the LSTM network according to time, applies the attention mechanism to each segment feature to extract the segment context vector, and then continues to apply the attention mechanism to the segment context vector to generate the time context vector, and finally splices the time context vector with the feature value of the last time step in the output feature, and passes the splicing result through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal, and finally adds the third output signal and the fourth output signal and then denormalizes them to obtain the output of the natural gas flow prediction model.

3. The natural gas flow prediction method based on model fusion according to claim 2, characterized in that: Step S1 specifically includes the following sub-steps: S11, obtaining natural gas flow historical time series recorded by N target flow sensors that the user needs to monitor, and performing maximum value normalization on each natural gas flow historical time series using its own maximum value as a scale value to form a normalized natural gas flow historical time series, and forming a multivariate natural gas flow historical time series from all normalized natural gas flow historical time series; wherein N represents the number of target flow sensors; S12. Sliding extraction is performed on the multivariate natural gas flow historical time series with a time window of fixed length according to a preset step length. During the sliding extraction process, each time window extracts the multivariate natural gas flow historical time series segment within the time window from the multivariate natural gas flow historical time series, and the natural gas flow historical time data value at the hth time step after the time window on the multivariate natural gas flow historical time series is used as the regression label of the natural gas flow prediction model to generate a training sample set for the natural gas flow prediction model; wherein h represents the time step index after the time window.

4. The natural gas flow prediction method based on model fusion according to claim 3, characterized in that: In the natural gas flow prediction model of step S2, the specific processing flow of the segmented graph convolution module is as follows: AS21, input the multivariate natural gas flow historical time series segment into the segmented graph convolution module, firstly divide the multivariate natural gas flow historical time series segment evenly in the time dimension according to the preset segment number hyperparameter P, and obtain P segments of natural gas flow historical time series segment; AS22, then taking the natural gas flow historical time series corresponding to each target flow sensor in the k-th natural gas flow historical time series segment as a node, using cosine similarity to calculate the adjacency of the nodes in the k-th natural gas flow historical time series segment, and obtaining the graph adjacency matrix corresponding to the k-th natural gas flow historical time series segment; AS23, then use the Softmax function to normalize each graph adjacency matrix by row, and use the normalized graph adjacency matrix as the segmented adjacency matrix; AS24. Finally, the k-th segment of the natural gas flow historical time series is segmented and input into the first graph convolutional network. According to the obtained segmented adjacency matrix, a total of G layers of graph convolution calculations are performed through the first graph convolutional network, and the output of the first graph convolutional network is used as the first output signal.

5. The natural gas flow prediction method based on model fusion according to claim 4, characterized in that: In the first graph convolutional network of step S2, The specific processing flow of the graph convolution layer is as follows: Use the degree matrix of the segmented adjacency matrix to calculate the The kth segmented convolution result of the layer graph convolution layer is The segmented convolution results of each layer of the graph convolution layer are reorganized and spliced ​​in the time dimension to obtain the first The intermediate output of the convolutional layer is The intermediate output of the graph convolutional layer is residually connected with the input multivariate natural gas flow historical time series segment to obtain the The final output of the graph convolutional layer.

6. The natural gas flow prediction method based on model fusion according to claim 2, characterized in that: In the natural gas flow prediction model of step S2, the specific processing flow of the open set recognition embedding graph convolution layer is as follows: BS21, inputting the multivariate natural gas flow historical time series segment into the pre-trained open set recognition model, and using the pre-trained open set recognition model to perform open set recognition and classification on the multivariate natural gas flow historical time series segment to obtain an open set recognition and classification result; BS22. Calculate the graph adjacency matrix for the open set recognition and classification results to obtain a new graph adjacency matrix. Line The elements of a column are represented as follows: ; in, Represents the open set recognition model for the The open set identification classification results of the historical time series of multivariate natural gas flow; Represents the open set recognition model for the The open set identification and classification results of the historical time series of multivariate natural gas flow; Represents the index of the historical time series segment of multivariate natural gas flow; The number of known gas types representing the natural gas flow; BS23. Finally, the open set recognition and classification results are input into the second graph convolutional network. According to the obtained new graph adjacency matrix, a total of G layers of graph convolution calculations are performed through the second graph convolutional network. After being processed by the G layers of graph convolutional layers of the second graph convolutional network, a new intermediate output is obtained. The new intermediate output is residually connected with the input multivariate natural gas flow historical time series segment to obtain the output of the second graph convolutional network as the second output signal.

7. The natural gas flow prediction method based on model fusion according to claim 2, characterized in that: In the natural gas flow prediction model of step S2, the time dilation convolution module performs dilation convolution processing on a total of C threshold control units, performs weighted superposition on the output of each threshold control unit to obtain a weighted signal, and then reduces the dimension of the weighted signal through a convolution layer to obtain the output of the time dilation convolution module as the third output signal.

8. The natural gas flow prediction method based on model fusion according to claim 2, characterized in that: In the natural gas flow prediction model of step S2, the specific processing flow of the time information enhancement module is as follows: CS21. Take the multivariate natural gas flow historical time series segment as the input of the LSTM network, first perform feature extraction by the LSTM network with N hidden layer units, and obtain the output features of the LSTM network; CS22. Segment the output features according to the segment number hyperparameter P to obtain P-segment segment features, then weight each segment feature by a third trainable parameter matrix to obtain a weighted segment feature, pass the weighted segment feature through a Softmax function to calculate the corresponding segment weight, and perform weighted summation of each weighted segment feature and each segment weight to obtain a segment context vector; CS23. After the segmented context vector is weighted by the fourth trainable parameter matrix, a weighted segmented context vector is obtained. The weighted segmented context vector contains signals of M time steps. The signal of each time step is subjected to the Softmax function to calculate the corresponding time expansion step weight. The signal of each time step is weighted and summed with the weight of each time expansion step to obtain the time context vector; wherein M represents the length of each natural gas flow historical time series segment; CS24. Finally, the time context vector is concatenated with the feature value of the last time step in the output feature, and the concatenated result is passed through a fully connected layer to obtain the output of the time information enhancement module as the fourth output signal.

9. A natural gas flow prediction system based on model fusion, characterized in that: include: A data processing module is used to obtain the natural gas flow history time series recorded by each target flow sensor that the user needs to monitor, normalize each natural gas flow history time series, form a multivariate natural gas flow history time series from the normalized natural gas flow history time series, and then use a fixed-length time window to perform sliding extraction on the multivariate natural gas flow history time series. During the sliding extraction process, the multivariate natural gas flow history time series is evenly divided into multivariate natural gas flow history time series segments, and the natural gas flow history time series segment in each time window is used as a training sample. The natural gas flow history time data value at a specified time step after each time window is used as a regression label, and a training sample set is constructed using the training samples and the regression labels corresponding to each training sample; A model training module is used to train a natural gas flow prediction model using a training sample set obtained by the data processing module until the natural gas flow prediction model converges so that it can predict the historical time data value of the natural gas flow at a specified time step after the time window where the input data is located, wherein the input data is a multivariate natural gas flow historical time series segment; the natural gas flow prediction model includes a segmented graph convolution module, an open set recognition embedding graph convolution layer, a time dilation convolution module, and a time information enhancement module; The segmented graph convolution module is used to extract the dynamically changing segmented association information between the multi-element natural gas flow historical time series segments from the similarity-based graph structure and finally output the first output signal; the open set recognition embedding graph convolution layer is used to extract the category association information between the multi-element natural gas flow historical time series segments from the category-based graph structure and finally output the second output signal; the time dilation volume module adds the first output signal and the second output signal as input, and is used to extract the time features within the multi-element natural gas flow historical time series segment and reduce the dimension, and finally output the third output signal; the time information enhancement module is used to aggregate the time series features within the multi-element natural gas flow historical time series segment and finally output the fourth output signal; The result acquisition module is used to obtain the natural gas flow historical time series within the current most recent time window from the recorded data of each target flow sensor during actual prediction and form a real-time multivariate natural gas flow historical time series segment, normalize the real-time multivariate natural gas flow historical time series segment and input it into the trained natural gas flow prediction model to predict the natural gas flow value corresponding to each target flow sensor at a specified time step in the future.

10. A computer electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the natural gas flow prediction method based on model fusion as described in any one of claims 1 to 8 when executing the computer program.