A gas leak monitoring and early warning method and related device
By analyzing the environmental impact values and correcting the historical monitoring data of gas pipelines, and reconstructing the transportation matrix, the problem of false alarms in gas leak monitoring and early warning was solved, achieving more accurate early warning and safety assurance.
Patent Information
- Application Number
- CN202410625844.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Existing gas leak monitoring and early warning methods cannot effectively eliminate the influence of the external environment on monitoring data, leading to false alarms.
By acquiring historical monitoring data of gas pipelines, performing data separation analysis to obtain environmental impact values, correcting current monitoring data, constructing and reconstructing a transportation matrix, and determining target monitoring results to execute early warning actions.
It effectively eliminates the influence of the external environment on monitoring data, improves the accuracy of early warning, promptly detects safety hazards, and reduces the possibility of accidents.
Smart Images

Figure CN118245953B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline monitoring, and in particular to a gas leakage monitoring and early warning method and related devices. Background Art
[0002] Gas pipeline transportation is the transportation of energy such as natural gas and liquefied petroleum gas from the place of production to various places where they are needed, ensuring the supply of energy. This is crucial for industrial production, residents' lives and various economic activities. In order to ensure the safety of gas transportation, various sensors and detection equipment can be used to monitor gas leaks. These sensors can detect indicators such as gas concentration, temperature, humidity, and monitor the pressure and flow of gas pipelines. Artificial intelligence and machine learning algorithms are used to analyze monitoring data, identify abnormal situations and predict possible leakage risks. However, in the relevant technology, when conducting gas leak monitoring and early warning, it is impossible to exclude the influence of the external environment on the monitoring data, which makes the early warning results have the problem of false alarms, thus affecting the early warning effect. Summary of the invention
[0003] The main purpose of the embodiments of the present invention is to provide a gas leak monitoring and early warning method and related devices, aiming to solve the problem in the related technology that the influence of the external environment on the monitoring data cannot be eliminated when performing gas leak monitoring and early warning, thereby causing false alarms in the early warning results.
[0004] In a first aspect, an embodiment of the present invention provides a gas leak monitoring and early warning method, comprising:
[0005] Obtain historical monitoring data and current monitoring data corresponding to the gas pipeline;
[0006] Performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes;
[0007] Correcting the current monitoring data according to the environmental impact value to obtain target monitoring data;
[0008] Obtaining a transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with time information corresponding to the target monitoring data;
[0009] Reconstructing the transport matrix to obtain a reconstruction vector corresponding to the transport matrix;
[0010] Performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix;
[0011] A target monitoring result corresponding to the target monitoring data is determined according to the reconstruction matrix and the transportation matrix, and an early warning action is performed according to the target monitoring result.
[0012] In a second aspect, an embodiment of the present invention provides a gas leak monitoring and early warning device, comprising:
[0013] A data acquisition module is used to obtain historical monitoring data and current monitoring data corresponding to the gas pipeline;
[0014] A data separation module is used to perform data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes;
[0015] A data correction module, used to correct the current monitoring data according to the environmental impact value to obtain target monitoring data;
[0016] A matrix creation module, used to obtain a transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with time information corresponding to the target monitoring data;
[0017] A vector determination module, used for reconstructing the data of the transport matrix to obtain a reconstruction vector corresponding to the transport matrix;
[0018] A matrix reconstruction module, used for performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix;
[0019] The target early warning module is used to determine the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and perform an early warning action according to the target monitoring result.
[0020] In a third aspect, an embodiment of the present invention further provides a terminal device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one of the gas leak monitoring and early warning methods provided in the specification of the present invention are implemented.
[0021] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any gas leak monitoring and early warning method provided in the specification of the present invention.
[0022] The embodiment of the present invention provides a gas leak monitoring and early warning method and related devices, the method comprising obtaining historical monitoring data and current monitoring data corresponding to the gas pipeline; then performing data separation and analysis on the historical monitoring data to obtain the environmental impact value generated by the gas pipeline under different environmental changes; thereby correcting the current monitoring data according to the environmental impact value to obtain the target monitoring data; then obtaining the transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with the time information corresponding to the target monitoring data; thereby reconstructing the transportation matrix to obtain a reconstruction vector corresponding to the transportation matrix; performing data processing on the reconstructed vector to obtain a reconstruction matrix corresponding to the transportation matrix; finally, determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and performing early warning actions according to the target monitoring result. The present application obtains the environmental impact value generated by the environmental changes during pipeline transportation by obtaining the historical monitoring data of the gas pipeline, and then corrects the current monitoring data according to the environmental impact value to obtain the target monitoring data, so as to better understand the operation of the pipeline under different environmental conditions, and provide support for the subsequent timely discovery of safety hazards. Furthermore, by reconstructing the transport matrix, a reconstruction matrix is obtained, and then the target monitoring results corresponding to the target monitoring data are determined according to the reconstruction matrix and the transport matrix, so that it is possible to timely and accurately obtain whether an abnormality occurs during the gas transportation process, and then timely take measures to prevent potential problems from occurring, ensure the smooth progress of pipeline transportation, and minimize the possibility of accidents. It also solves the problem in related technologies that the influence of the external environment on the monitoring data cannot be excluded when performing gas leak monitoring and early warning, resulting in false alarms in the early warning results. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A flow chart of a gas leak monitoring and early warning method provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of the module structure of a gas leak monitoring and early warning device provided by an embodiment of the present invention;
[0026] Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0029] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0030] The embodiment of the present invention provides a gas leak monitoring and early warning method and related devices. The gas leak monitoring and early warning method can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The terminal device can be a server or a server cluster.
[0031] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0032] Please refer to Figure 1 , Figure 1 A flow chart of a gas leak monitoring and early warning method provided in an embodiment of the present invention.
[0033] like Figure 1 As shown, the gas leakage monitoring and early warning method includes steps S101 to S107.
[0034] Step S101: Obtain historical monitoring data and current monitoring data corresponding to the gas pipeline.
[0035] For example, a monitoring device or sensor is used to monitor the gas pipeline and collect data in real time. The historical monitoring data can be obtained from archived records or data in a database, while the current monitoring data needs to be collected in real time.
[0036] Step S102: performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes.
[0037] Exemplarily, the historical monitoring data is the historical data of the gas pipeline during normal transportation. The historical monitoring data includes data before the environmental change and data after the environmental change. The data before the environmental change and the data after the environmental change can be clearly known in the historical monitoring data, and then a regression analysis is performed on the data before the environmental change to obtain a regression function, and then the data at the corresponding time after the environmental change is predicted based on the regression function, and then the predicted data at the corresponding time after the environmental change is analyzed with the actual data after the environmental change, so as to obtain the environmental impact value of the gas pipeline under different environmental changes.
[0038] In some embodiments, the data separation and analysis of the historical monitoring data to obtain the environmental impact value generated by the gas pipeline under different environmental changes includes: identifying data changes on the historical monitoring data to obtain environmental change data and location information corresponding to the environmental change data; obtaining relevant monitoring data corresponding to the environmental change data from the historical monitoring data according to the location information; performing regression analysis on the environmental change data and the relevant monitoring data to obtain an environmental impact function corresponding to the environmental change data; and determining the environmental impact value generated by the gas pipeline under different environmental changes according to the environmental impact function.
[0039] Exemplarily, the default historical monitoring data only includes data of normal pipeline transportation, that is, the historical monitoring data is historical data when the pipeline normally transports gas.
[0040] Exemplarily, adjacent data of historical monitoring data are subtracted to obtain environmental change data corresponding to large data changes, and location information corresponding to the environmental change data. The location information is the location of the sensor that measures the environmental change data, that is, the pipeline location measured by the sensor.
[0041] For example, the relevant monitoring data collected by the sensor when the environment has not changed is obtained from the historical monitoring data according to the location information, and then an appropriate regression model is selected, such as linear regression, polynomial regression, ridge regression, etc., to perform regression analysis on the environmental change data and the relevant monitoring data to obtain the environmental impact function. That is, after obtaining the environmental impact function, the impact value of the environment on the monitoring data at different times can be obtained.
[0042] Exemplarily, the established environmental impact function is used to predict data under different environmental changes to obtain the environmental impact values of the gas pipeline under different environments.
[0043] Specifically, by identifying data changes in historical monitoring data, we can understand environmental changes in a more detailed manner. Associating environmental change data with location information can help determine environmental changes in different locations. By extracting relevant monitoring data related to environmental change data from historical monitoring data and establishing an environmental impact function through regression analysis, we can quantify the impact of environmental changes on pipeline monitoring data. This provides support for the accuracy of subsequent pipeline leak identification.
[0044] Step S103: Correct the current monitoring data according to the environmental impact value to obtain target monitoring data.
[0045] For example, the previously established environmental impact function is used to calculate the corresponding environmental impact value according to the current environmental changes. Then, the current monitoring data is corrected according to the calculated environmental impact value. The correction method can be determined according to the specific situation, which may involve simple addition and subtraction operations, or may require a more complex correction model to obtain the corrected target monitoring data.
[0046] In some embodiments, the correcting the current monitoring data according to the environmental impact value to obtain the target monitoring data includes: obtaining the monitoring location corresponding to the current monitoring data, and obtaining the environmental change quantity corresponding to the current monitoring data according to the monitoring location and the location information; correcting the current monitoring data according to the environmental change quantity and the environmental impact value to obtain the target monitoring data; wherein the target monitoring data is obtained according to the following formula:
[0047] ;
[0048] represents the i-th target monitoring data, represents the i-th current monitoring data, m represents the number of environmental changes, represents the jth environmental impact function, represents the weight coefficient corresponding to the j-th environmental impact value, represents the environmental change value generated by the i-th current monitoring data under the j-th environmental variable, Represents the j-th environmental impact value.
[0049] For example, pipeline transportation is a long-distance transportation process. When sensors are set at different locations for data monitoring during the pipeline transportation process, the measurement results of the sensors are related to the impact of the environmental changes previously involved in the location. Therefore, when monitoring the current monitoring data, it is necessary to first obtain the monitoring location corresponding to the current monitoring data, and then compare the monitoring location with the location information to obtain the number of environmental changes corresponding to the current monitoring data.
[0050] For example, if there are 8 environmental changes in the total process of pipeline transportation, and there are 5 environmental changes before the monitoring location when the current monitoring data is monitored, the number of environmental changes corresponding to the current monitoring data is 5; if there are 4 environmental changes before the monitoring location when the current monitoring data is monitored, the number of environmental changes corresponding to the current monitoring data is 4. Therefore, the correction methods of the current monitoring data collected by sensors at different monitoring locations are different, which is related to the number of environmental changes corresponding to the current monitoring data.
[0051] Exemplarily, the current monitoring data is corrected according to the environmental change quantity and the environmental impact value to obtain the target monitoring data; wherein the target monitoring data is obtained according to the following formula:
[0052] ;
[0053] represents the i-th target monitoring data, represents the i-th current monitoring data, m represents the number of environmental changes, represents the jth environmental impact function, represents the weight coefficient corresponding to the jth environmental impact value, It indicates the environmental change value generated by the i-th current monitoring data under the j-th environmental variable. Represents the jth environmental impact value.
[0054] Exemplarily, the environmental change quantity corresponding to the monitoring location is obtained according to the monitoring location, and then the environmental change values corresponding to the environmental impact function under the environmental change quantity are summed up, so as to realize the correction of the current monitoring data and obtain the target monitoring data.
[0055] For example, by obtaining the monitoring location corresponding to the current monitoring data and obtaining the amount of environmental changes based on the location information, the current monitoring data can be associated with a specific geographical location, which helps to understand the changes in monitoring data at different locations under environmental changes, and provide a more accurate basis for subsequent corrections. Therefore, according to the amount of environmental changes and the environmental impact value, the current monitoring data can be corrected, and the impact of environmental factors on the current monitoring data can be better considered. This helps to improve the accuracy and reliability of the target monitoring data and provide more reliable data support for the safe operation of the pipeline.
[0056] Step S104: Obtain a transportation matrix corresponding to the gas pipeline according to the target monitoring data and the time information corresponding to the target monitoring data.
[0057] For example, the time information corresponding to the target monitoring data can be correctly matched with the target monitoring data through the timestamp or date and time field. Thus, the target monitoring data is sorted according to the time information to obtain the sorting result from far to near in time, and then the data in different time periods are used to form the row vectors of the matrix, so as to obtain multiple time periods to obtain multiple row vectors, and then the row vectors are spliced to obtain the transportation matrix.
[0058] In some embodiments, obtaining a transportation matrix corresponding to the gas pipeline according to the target monitoring data in combination with time information corresponding to the target monitoring data includes: sorting the target monitoring data according to the time information to obtain sorted monitoring data; determining a window length, and determining the number of matrix columns corresponding to the transportation matrix according to the window length and the amount of data corresponding to the sorted monitoring data; obtaining a row vector corresponding to the transportation matrix from the sorted monitoring data according to the window length and the number of matrix columns; and determining the transportation matrix corresponding to the gas pipeline according to the row vector.
[0059] Exemplarily, the target monitoring data is sorted according to time information to ensure that the data is arranged in chronological order to obtain sorted monitoring data.
[0060] Exemplarily, the required window length, i.e., the size of the time window, is determined, and the number of columns required for the transport matrix is determined according to the amount of data of the sorted monitoring data. The window length can be determined according to specific requirements and data characteristics, and the number of matrix columns is the ratio of the amount of data to the window length.
[0061] Exemplarily, the corresponding row vector is obtained from the sorted monitoring data according to the window length and the number of matrix columns. This involves dividing the sorted monitoring data into different time windows according to the window length, and extracting the monitoring data in each time window as a row vector.
[0062] For example, the first row vector is the first sorted monitoring data to the sorted monitoring data corresponding to the number of matrix columns, the second row vector is the second sorted monitoring data to the sorted monitoring data corresponding to the number of matrix columns plus one, and so on, until the row vector corresponding to the window length is reached. Then, all the obtained row vectors are sequentially spliced to obtain the transportation matrix.
[0063] Specifically, sorting the target monitoring data according to the time information can arrange the data in chronological order, making it easier to understand and analyze the changing trend of the data. By determining the window length and the number of matrix columns based on the sorted monitoring data, the data can be effectively divided and processed according to the actual situation. This helps to control the dimension of the transportation matrix so that it can better reflect the characteristics and laws of pipeline transportation behavior. Then, by obtaining row vectors from the sorted monitoring data according to the window length and the number of matrix columns, the time series data can be effectively converted into a matrix form, which is convenient for subsequent calculations and analysis. This helps to combine time-related monitoring data with space-related pipeline transportation behavior to provide a more comprehensive data description. This helps to quantify the transportation conditions of the pipeline in different time periods and provide reliable data support for the analysis and management of pipeline transportation behavior.
[0064] Step S105: reconstruct the transport matrix to obtain a reconstructed vector corresponding to the transport matrix.
[0065] Exemplarily, a suitable data reconstruction method is selected. There are many methods for data reconstruction, including principal component analysis (PCA), singular value decomposition (SVD), autoencoder, etc. Then the transport matrix is transformed to reconstruct the data. This may involve transposing, reducing the dimension, or other operations of the matrix to adapt to the selected data reconstruction method.
[0066] Exemplarily, the converted transport matrix is reconstructed by a mathematical model or a neural network to obtain a corresponding reconstructed vector.
[0067] In some embodiments, the data reconstruction of the transport matrix to obtain the reconstruction vector corresponding to the transport matrix includes: obtaining the transposed matrix corresponding to the transport matrix, multiplying the transport matrix and the transposed matrix to obtain a result matrix; performing eigensolution on the result matrix to obtain the corresponding eigenvalues and the eigenvectors corresponding to the eigenvalues; obtaining the reconstruction vector corresponding to the transport matrix according to the eigenvalues and the eigenvectors; wherein the reconstruction vector is obtained according to the following formula:
[0068] ;
[0069] represents the i-th reconstruction vector, represents the i-th eigenvalue, represents the i-th eigenvector, B represents the transport matrix, and T represents the transpose of the matrix.
[0070] Exemplarily, the transport matrix is transposed by a conventional matrix transposition operation to obtain a transposed matrix corresponding to the transport matrix, and then the transport matrix and the transposed matrix are multiplied to obtain a result matrix.
[0071] Exemplarily, the result matrix is eigensolved to obtain the corresponding eigenvalues and eigenvectors. Eigensolved is a mathematical method used to find the eigenvalues and corresponding eigenvectors of a matrix. Thus, the reconstruction vector corresponding to the transport matrix is obtained based on the eigenvalues and eigenvectors. The eigenvalues and eigenvectors provide important information about the matrix. Through proper processing and selection, the reconstruction vector of the matrix can be obtained. Specifically, the reconstruction vector can be obtained according to the following formula:
[0072] ;
[0073] represents the i-th reconstruction vector, represents the i-th eigenvalue, represents the i-th eigenvector, B represents the transport matrix, and T represents the transpose of the matrix.
[0074] Specifically, by obtaining the transposed matrix of the transport matrix and multiplying it with the transport matrix, the information and correlation hidden in the matrix can be extracted. This operation can help discover the intrinsic relationship between data and help understand the structure and characteristics of the data. Then, by solving the eigenvalues of the result matrix, the corresponding eigenvalues and eigenvectors can be obtained. These eigenvalues and eigenvectors represent the main characteristics and directions of the data.
[0075] Specifically, by obtaining the transposed matrix of the transport matrix and multiplying it with the transport matrix, the hidden information and correlation in the matrix can be extracted. This operation can help discover the intrinsic relationship between the data and help understand the structure and characteristics of the data. Then, by performing eigensolution on the result matrix, the corresponding eigenvalues and eigenvectors can be obtained. These eigenvalues and eigenvectors represent the main characteristics and directions of the data. Performing eigensolution on the result matrix helps to reduce the dimensionality of the data and extract the most important features, thereby reducing the complexity and computational cost of the data. Finally, based on the obtained eigenvalues and eigenvectors, the corresponding reconstruction vectors can be obtained. These reconstruction vectors can be used as a compact representation of the original data, retaining the main information of the data while reducing the dimension and redundancy of the data, which is helpful for subsequent data analysis and application.
[0076] Step S106: performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix.
[0077] Exemplarily, the reconstruction vector is transformed or processed accordingly. This may involve inverse transformation, normalization, etc. of the elements of the vector to obtain the elements of the reconstruction matrix. Then, the processed reconstruction vector is used to construct the corresponding reconstruction matrix. According to the structure and characteristics of the reconstruction vector, it can be rearranged or combined into a matrix form to obtain the final reconstruction matrix.
[0078] In some embodiments, the data processing of the reconstruction vector to obtain the reconstruction matrix corresponding to the transport matrix includes: grouping the reconstruction vector to obtain multiple grouping matrices; performing diagonal averaging on the matrix elements in the grouping matrix to obtain a grouping sequence; and obtaining the reconstruction matrix corresponding to the transport matrix according to the grouping sequence.
[0079] Exemplarily, the reconstructed vectors are grouped according to certain rules or standards. This grouping process can be determined according to specific needs and data characteristics, for example, the elements in the vector can be grouped according to their positions, numerical values, or other characteristics. Thus, according to the grouping results, the elements in the reconstructed vectors are combined into multiple grouping matrices. Each grouping matrix can be regarded as a subset.
[0080] Exemplarily, the elements in each grouping matrix are subjected to diagonal averaging. This process can be achieved by calculating the average value on the diagonal of each grouping matrix. Diagonal averaging can merge and balance the information of each grouping matrix to better reflect the characteristics of the original data.
[0081] Exemplarily, a grouping sequence is constructed based on the result of the diagonal averaging process. This sequence can be regarded as a new representation of the transportation data, in which each element represents the average value of a grouping matrix. According to the grouping sequence, a reconstruction matrix corresponding to the transportation matrix is reconstructed. According to the elements in the grouping sequence, they can be placed in appropriate positions to obtain the final reconstruction matrix.
[0082] Specifically, the reconstruction vectors are grouped, averaged, and reconstructed into a matrix, which can better reflect the structure and characteristics of the transportation data and provide more useful information for further analysis.
[0083] Step S107: determining a target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and performing an early warning action according to the target monitoring result.
[0084] Exemplarily, the difference between the reconstruction matrix and the transport matrix is calculated. When the difference is greater than or equal to a preset value, it indicates that the target monitoring result is that there is an anomaly in the current monitoring data. When the difference is less than the preset value, it indicates that the target monitoring result is that there is no anomaly in the current monitoring data.
[0085] Exemplarily, when the target monitoring result is that there is an anomaly in the current monitoring data, an early warning may be triggered to notify relevant personnel or systems for further processing.
[0086] In some embodiments, determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transport matrix includes: calculating a first residual sequence between the reconstruction matrix and the transport matrix, and sorting the first residual sequence to obtain a second residual sequence; obtaining quartiles for the second residual sequence to obtain a first value, a second value, and a third value; performing abnormal statistics according to the second residual sequence, the first value, the second value, and the third value to obtain a statistical result; determining the target monitoring result corresponding to the target monitoring data according to the statistical result; wherein the statistical result is obtained according to the following formula:
[0087] ;
[0088] R represents the statistical results, represents the i-th value in the second residual sequence, c represents a constant, d1 represents the first value, d2 represents the second value, and d3 represents the third value.
[0089] Exemplarily, a first residual sequence between the reconstruction matrix and the transport matrix is calculated. This can be obtained by subtracting the transport matrix from the reconstruction matrix, that is, {first residual sequence} = {reconstruction matrix} - {transport matrix}. Then, the first residual sequence is sorted to obtain a second residual sequence. The sorting can be performed in ascending or descending order.
[0090] Exemplarily, the quartiles are calculated for the second residual sequence to obtain the first value, the second value and the third value. The quartiles are obtained by dividing the second residual sequence into four equal parts, the first value is the data in the second residual sequence arranged from small to large with a ratio of 25%, the second value is the median of the second residual sequence, and the third value is the data in the second residual sequence arranged from large to small with a ratio of 25%.
[0091] Exemplarily, the second residual sequence, the first value, the second value, and the third value are used to perform abnormal statistics to obtain a statistical result according to the following formula:
[0092] ;
[0093] R represents the statistical results, represents the value of the i-th in the second residual sequence, c represents a constant, d1 represents the first value, d2 represents the second value, and d3 represents the third value.
[0094] Exemplarily, multiple statistical results are obtained, the statistical results are compared with preset values, and the cumulative number of statistical results is greater than or equal to the preset value. When the number exceeds the preset number, it indicates that the target monitoring result is that there is an abnormality in the current monitoring data; when the number does not exceed the preset number, it indicates that the target monitoring result is that there is no abnormality in the current monitoring data.
[0095] The embodiment of the present invention provides a gas leak monitoring and early warning method and related devices, the method comprising obtaining historical monitoring data and current monitoring data corresponding to the gas pipeline; then performing data separation and analysis on the historical monitoring data to obtain the environmental impact value generated by the gas pipeline under different environmental changes; thereby correcting the current monitoring data according to the environmental impact value to obtain the target monitoring data; then obtaining the transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with the time information corresponding to the target monitoring data; thereby reconstructing the transportation matrix to obtain a reconstruction vector corresponding to the transportation matrix; performing data processing on the reconstructed vector to obtain a reconstruction matrix corresponding to the transportation matrix; finally, determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and performing early warning actions according to the target monitoring result. The present application obtains the environmental impact value generated by the environmental changes during pipeline transportation by obtaining the historical monitoring data of the gas pipeline, and then corrects the current monitoring data according to the environmental impact value to obtain the target monitoring data, so as to better understand the operation of the pipeline under different environmental conditions, and provide support for the subsequent timely discovery of safety hazards. Furthermore, by reconstructing the transport matrix, a reconstruction matrix is obtained, and then the target monitoring results corresponding to the target monitoring data are determined according to the reconstruction matrix and the transport matrix, so that it is possible to timely and accurately obtain whether an abnormality occurs during the gas transportation process, and then timely take measures to prevent potential problems from occurring, ensure the smooth progress of pipeline transportation, and minimize the possibility of accidents. It also solves the problem in related technologies that the influence of the external environment on the monitoring data cannot be excluded when performing gas leak monitoring and early warning, resulting in false alarms in the early warning results.
[0096] See also Figure 2 , Figure 2A gas leak monitoring and early warning device 200 is provided in an embodiment of the present application. The gas leak monitoring and early warning device 200 includes a data acquisition module 201, a data separation module 202, a data correction module 203, a matrix creation module 204, a vector determination module 205, a matrix reconstruction module 206, and a target early warning module 207, wherein the data acquisition module 201 is used to obtain historical monitoring data and current monitoring data corresponding to the gas pipeline; the data separation module 202 is used to perform data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes; the data correction module 203 is used to obtain the environmental impact value of the gas pipeline according to the environmental impact The current monitoring data is corrected by the value to obtain the target monitoring data; a matrix creation module 204 is used to obtain the transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with the time information corresponding to the target monitoring data; a vector determination module 205 is used to reconstruct the transportation matrix to obtain the reconstructed vector corresponding to the transportation matrix; a matrix reconstruction module 206 is used to process the reconstructed vector to obtain the reconstructed matrix corresponding to the transportation matrix; a target early warning module 207 is used to determine the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and perform an early warning action according to the target monitoring result.
[0097] In some implementations, the data separation module 202 performs, during the process of performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes:
[0098] Identify data changes on the historical monitoring data to obtain environmental change data and location information corresponding to the environmental change data;
[0099] Obtaining relevant monitoring data corresponding to the environmental change data from the historical monitoring data according to the location information;
[0100] Performing regression analysis based on the environmental change data and the relevant monitoring data to obtain an environmental impact function corresponding to the environmental change data;
[0101] The environmental impact value generated by the gas pipeline under different environmental changes is determined according to the environmental impact function.
[0102] In some implementations, the data correction module 203, during the process of correcting the current monitoring data according to the environmental impact value to obtain the target monitoring data, executes:
[0103] Obtaining a monitoring location corresponding to the current monitoring data, and obtaining the amount of environmental changes corresponding to the current monitoring data according to the monitoring location and the location information;
[0104] Correcting the current monitoring data according to the environmental change quantity and the environmental impact value to obtain the target monitoring data;
[0105] The target monitoring data is obtained according to the following formula:
[0106] ;
[0107] represents the i-th target monitoring data, represents the i-th current monitoring data, m represents the number of environmental changes, represents the jth environmental impact function, represents the weight coefficient corresponding to the j-th environmental impact value, represents the environmental change value generated by the i-th current monitoring data under the j-th environmental variable, Represents the j-th environmental impact value.
[0108] In some implementations, the matrix creation module 204, during the process of obtaining the transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with the time information corresponding to the target monitoring data, performs:
[0109] Sorting the target monitoring data according to the time information to obtain sorted monitoring data;
[0110] Determine a window length, and determine the number of matrix columns corresponding to the transportation matrix according to the window length and the amount of data corresponding to the sorted monitoring data;
[0111] Obtaining a row vector corresponding to the transportation matrix from the sorted monitoring data according to the window length and the number of matrix columns;
[0112] The transportation matrix corresponding to the gas pipeline is determined according to the row vector.
[0113] In some implementations, the vector determination module 205, during the process of reconstructing the transport matrix to obtain the reconstructed vector corresponding to the transport matrix, performs:
[0114] Obtaining a transposed matrix corresponding to the transport matrix, and multiplying the transport matrix and the transposed matrix to obtain a result matrix;
[0115] Performing eigenvalue solving on the result matrix to obtain corresponding eigenvalues and eigenvectors corresponding to the eigenvalues;
[0116] Obtain the reconstruction vector corresponding to the transport matrix according to the eigenvalue and the eigenvector;
[0117] The reconstruction vector is obtained according to the following formula:
[0118] ;
[0119] represents the i-th reconstruction vector, represents the i-th eigenvalue, represents the i-th eigenvector, B represents the transport matrix, and T represents the transpose of the matrix.
[0120] In some implementations, the matrix reconstruction module 206 performs, during the process of performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix:
[0121] Grouping the reconstructed vectors to obtain a plurality of grouping matrices;
[0122] Performing diagonal averaging processing on matrix elements in the grouping matrix to obtain a grouping sequence;
[0123] The reconstruction matrix corresponding to the transport matrix is obtained according to the grouping sequence.
[0124] In some implementations, the target early warning module 207, during the process of determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, performs:
[0125] Calculating a first residual sequence between the reconstruction matrix and the transport matrix, and sorting the first residual sequence to obtain a second residual sequence;
[0126] Calculating quartiles for the second residual sequence to obtain a first value, a second value, and a third value;
[0127] Perform abnormal statistics according to the second residual sequence, the first value, the second value, and the third value to obtain a statistical result;
[0128] Determine the target monitoring result corresponding to the target monitoring data according to the statistical result;
[0129] The statistical results are obtained according to the following formula:
[0130] ;
[0131] R represents the statistical results, represents the i-th value in the second residual sequence, c represents a constant, d1 represents the first value, d2 represents the second value, and d3 represents the third value.
[0132] In some embodiments, the gas leakage monitoring and early warning device 200 can be applied to terminal equipment.
[0133] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-mentioned gas leakage monitoring and early warning device 200 can refer to the corresponding process in the gas leakage monitoring and early warning method embodiment, and will not be repeated here.
[0134] See also Figure 3 , Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present invention.
[0135] like Figure 3 As shown, the terminal device 300 includes a processor 301 and a memory 302 , and the processor 301 and the memory 302 are connected via a bus 303 , such as an I2C (Inter-integrated Circuit) bus.
[0136] Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0137] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0138] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal device to which the embodiment of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] The processor is used to run a computer program stored in the memory, and implement any one of the gas leakage monitoring and early warning methods provided by the embodiments of the present invention when executing the computer program.
[0140] In one embodiment, the processor is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0141] Obtain historical monitoring data and current monitoring data corresponding to the gas pipeline;
[0142] Performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes;
[0143] Correcting the current monitoring data according to the environmental impact value to obtain target monitoring data;
[0144] Obtaining a transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with time information corresponding to the target monitoring data;
[0145] Reconstructing the transport matrix to obtain a reconstruction vector corresponding to the transport matrix;
[0146] Performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix;
[0147] A target monitoring result corresponding to the target monitoring data is determined according to the reconstruction matrix and the transportation matrix, and an early warning action is performed according to the target monitoring result.
[0148] In some implementations, the processor 301 performs, during the process of performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes:
[0149] Identify data changes on the historical monitoring data to obtain environmental change data and location information corresponding to the environmental change data;
[0150] Obtaining relevant monitoring data corresponding to the environmental change data from the historical monitoring data according to the location information;
[0151] Performing regression analysis based on the environmental change data and the relevant monitoring data to obtain an environmental impact function corresponding to the environmental change data;
[0152] The environmental impact value generated by the gas pipeline under different environmental changes is determined according to the environmental impact function.
[0153] In some implementations, the processor 301, during the process of correcting the current monitoring data according to the environmental impact value to obtain the target monitoring data, executes:
[0154] Obtaining a monitoring location corresponding to the current monitoring data, and obtaining the amount of environmental changes corresponding to the current monitoring data according to the monitoring location and the location information;
[0155] Correcting the current monitoring data according to the environmental change quantity and the environmental impact value to obtain the target monitoring data;
[0156] The target monitoring data is obtained according to the following formula:
[0157] ;
[0158] represents the i-th target monitoring data, represents the i-th current monitoring data, m represents the number of environmental changes, represents the jth environmental impact function, represents the weight coefficient corresponding to the j-th environmental impact value, represents the environmental change value generated by the i-th current monitoring data under the j-th environmental variable, Represents the j-th environmental impact value.
[0159] In some implementations, the processor 301, during the process of obtaining the transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with the time information corresponding to the target monitoring data, executes:
[0160] Sorting the target monitoring data according to the time information to obtain sorted monitoring data;
[0161] Determine a window length, and determine the number of matrix columns corresponding to the transportation matrix according to the window length and the amount of data corresponding to the sorted monitoring data;
[0162] Obtaining a row vector corresponding to the transportation matrix from the sorted monitoring data according to the window length and the number of matrix columns;
[0163] The transportation matrix corresponding to the gas pipeline is determined according to the row vector.
[0164] In some implementations, the processor 301, during the process of reconstructing the transport matrix to obtain a reconstruction vector corresponding to the transport matrix, executes:
[0165] Obtaining a transposed matrix corresponding to the transport matrix, and multiplying the transport matrix and the transposed matrix to obtain a result matrix;
[0166] Performing eigenvalue solving on the result matrix to obtain corresponding eigenvalues and eigenvectors corresponding to the eigenvalues;
[0167] Obtain the reconstruction vector corresponding to the transport matrix according to the eigenvalue and the eigenvector;
[0168] The reconstruction vector is obtained according to the following formula:
[0169] ;
[0170] represents the i-th reconstruction vector, represents the i-th eigenvalue, represents the i-th eigenvector, B represents the transport matrix, and T represents the transpose of the matrix.
[0171] In some implementations, the processor 301, during the process of performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix, executes:
[0172] Grouping the reconstructed vectors to obtain a plurality of grouping matrices;
[0173] Performing diagonal averaging processing on matrix elements in the grouping matrix to obtain a grouping sequence;
[0174] The reconstruction matrix corresponding to the transport matrix is obtained according to the grouping sequence.
[0175] In some implementations, during the process of determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, the processor 301 executes:
[0176] Calculating a first residual sequence between the reconstruction matrix and the transport matrix, and sorting the first residual sequence to obtain a second residual sequence;
[0177] Calculating quartiles for the second residual sequence to obtain a first value, a second value, and a third value;
[0178] Perform abnormal statistics according to the second residual sequence, the first value, the second value, and the third value to obtain a statistical result;
[0179] Determine the target monitoring result corresponding to the target monitoring data according to the statistical result;
[0180] The statistical results are obtained according to the following formula:
[0181] ;
[0182] R represents the statistical results, represents the i-th value in the second residual sequence, c represents a constant, d1 represents the first value, d2 represents the second value, and d3 represents the third value.
[0183] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the terminal equipment described above can refer to the corresponding process in the embodiment of the gas leakage monitoring and early warning method, and will not be repeated here.
[0184] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any gas leakage monitoring and early warning method provided in the description of the embodiment of the present invention.
[0185] The storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0186] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0187] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0188] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A gas leak monitoring and early warning method, It is characterized in that The method comprises: Obtain historical monitoring data and current monitoring data corresponding to the gas pipeline; Performing data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes; Correcting the current monitoring data according to the environmental impact value to obtain target monitoring data; Obtaining a transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with time information corresponding to the target monitoring data; Reconstructing the transport matrix to obtain a reconstruction vector corresponding to the transport matrix; Performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix; Determining a target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and executing an early warning action according to the target monitoring result; The determining the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix includes: Calculating a first residual sequence between the reconstruction matrix and the transport matrix, and sorting the first residual sequence to obtain a second residual sequence; Calculating quartiles for the second residual sequence to obtain a first value, a second value, and a third value; Perform abnormal statistics according to the second residual sequence, the first value, the second value, and the third value to obtain a statistical result; Determine the target monitoring result corresponding to the target monitoring data according to the statistical result; The statistical results are obtained according to the following formula: ; R represents the statistical results, represents the i-th value in the second residual sequence, c represents a constant, d1 represents the first value, d2 represents the second value, and d3 represents the third value.
2. The method according to claim 1, It is characterized in that The data separation and analysis of the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes includes: Identify data changes on the historical monitoring data to obtain environmental change data and location information corresponding to the environmental change data; Obtaining relevant monitoring data corresponding to the environmental change data from the historical monitoring data according to the location information; Performing regression analysis based on the environmental change data and the relevant monitoring data to obtain an environmental impact function corresponding to the environmental change data; The environmental impact value generated by the gas pipeline under different environmental changes is determined according to the environmental impact function.
3. The method according to claim 2, It is characterized in that The step of correcting the current monitoring data according to the environmental impact value to obtain target monitoring data includes: Obtaining a monitoring location corresponding to the current monitoring data, and obtaining the amount of environmental changes corresponding to the current monitoring data according to the monitoring location and the location information; Correcting the current monitoring data according to the environmental change quantity and the environmental impact value to obtain the target monitoring data; The target monitoring data is obtained according to the following formula: ; represents the i-th target monitoring data, represents the i-th current monitoring data, m represents the number of environmental changes, represents the jth environmental impact function, represents the weight coefficient corresponding to the j-th environmental impact value, represents the environmental change value generated by the i-th current monitoring data under the j-th environmental variable, Represents the j-th environmental impact value.
4. The method according to claim 1, It is characterized in that The step of obtaining a transportation matrix corresponding to the gas pipeline according to the target monitoring data and the time information corresponding to the target monitoring data includes: Sorting the target monitoring data according to the time information to obtain sorted monitoring data; Determine a window length, and determine the number of matrix columns corresponding to the transportation matrix according to the window length and the amount of data corresponding to the sorted monitoring data; Obtaining a row vector corresponding to the transportation matrix from the sorted monitoring data according to the window length and the number of matrix columns; The transportation matrix corresponding to the gas pipeline is determined according to the row vector.
5. The method according to claim 1, It is characterized in that The step of reconstructing the transport matrix to obtain a reconstruction vector corresponding to the transport matrix includes: Obtaining a transposed matrix corresponding to the transport matrix, and multiplying the transport matrix and the transposed matrix to obtain a result matrix; Performing eigenvalue solving on the result matrix to obtain corresponding eigenvalues and eigenvectors corresponding to the eigenvalues; Obtain the reconstruction vector corresponding to the transport matrix according to the eigenvalue and the eigenvector; The reconstruction vector is obtained according to the following formula: ; represents the i-th reconstruction vector, represents the i-th eigenvalue, represents the i-th eigenvector, B represents the transport matrix, and T represents the transpose of the matrix.
6. The method according to claim 1, It is characterized in that The step of performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix includes: Grouping the reconstructed vectors to obtain a plurality of grouping matrices; Performing diagonal averaging processing on matrix elements in the grouping matrix to obtain a grouping sequence; The reconstruction matrix corresponding to the transport matrix is obtained according to the grouping sequence.
7. A gas leak monitoring and early warning device, It is characterized in that The method for monitoring and early warning of gas leakage according to any one of claims 1 to 6 comprises: A data acquisition module is used to obtain historical monitoring data and current monitoring data corresponding to the gas pipeline; A data separation module is used to perform data separation and analysis on the historical monitoring data to obtain the environmental impact value of the gas pipeline under different environmental changes; A data correction module, used to correct the current monitoring data according to the environmental impact value to obtain target monitoring data; A matrix creation module, used to obtain a transportation matrix corresponding to the gas pipeline according to the target monitoring data combined with time information corresponding to the target monitoring data; A vector determination module, used for reconstructing the data of the transport matrix to obtain a reconstruction vector corresponding to the transport matrix; A matrix reconstruction module, used for performing data processing on the reconstruction vector to obtain a reconstruction matrix corresponding to the transport matrix; The target early warning module is used to determine the target monitoring result corresponding to the target monitoring data according to the reconstruction matrix and the transportation matrix, and perform an early warning action according to the target monitoring result.
8. A terminal device, It is characterized in that The terminal device includes a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program and implement the gas leakage monitoring and early warning method according to any one of claims 1 to 6 when executing the computer program.
9. A computer storage medium for computer storage, It is characterized in that The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the gas leak monitoring and early warning method described in any one of claims 1 to 6.
