An analysis system for the operation and management of gas enterprises
By designing an analysis system for gas enterprise operation and management, data is collected and preprocessed in real time, three-dimensional models are generated and machine learning prediction is carried out, and the configuration scheme of genetic algorithms is optimized, the problem of difficult to guarantee real-time and accuracy of data in gas enterprise operation and management is solved, and the safety and stability of the pipeline network is improved.
Patent Information
- Application Number
- CN202510191785.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-02-21
AI Technical Summary
The operation and management of gas enterprises faces the problem of difficult data real-time and accuracy. Traditional methods rely on manual inspections and regular data collection, and lack effective data preprocessing mechanisms, resulting in noise and outliers affecting the data analysis effect.
Design an analysis system for gas enterprise operation management, including data acquisition module, data processing module and optimization module. The data acquisition module acquires the operating parameters, gas usage data and meteorological data of the gas transmission and distribution network in real time and performs pre-processing. The data processing module uses preprocessed data to generate a three-dimensional model and predicts the future operating status of the pipeline through machine learning prediction models. The optimization module optimizes the configuration scheme through genetic algorithms to generate the final configuration scheme.
The safety and stability of the gas transmission and distribution pipeline network are improved, and through real-time and accurate data collection and processing, the future operating status of the pipeline network is accurately predicted, the operation configuration plan is optimized, the operational risks are reduced, and the system stability and reliability are improved.
Smart Images

Figure CN119692870B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent control, and particularly to an analysis system for the operation and management of gas enterprises. Background Art
[0002] The operation and management of gas enterprises are facing increasingly complex challenges, including ensuring the safe and stable operation of gas transmission and distribution pipe networks, meeting the growing gas consumption demands of users, and coping with changing meteorological conditions, etc. Traditional methods for the operation and management of gas enterprises are based on manual experience and simple data analysis. Therefore, the following defects may exist:
[0003] 1. Relying on manual inspections and regular data collection, this method is not only inefficient, but also the real-time and accuracy of data are difficult to guarantee. In addition, the lack of an effective data preprocessing mechanism results in a large amount of noise and outliers in the original data, affecting the subsequent data analysis effect.
[0004] 2. Some use two-dimensional plane graphs, which cannot truly reflect the complex spatial structure and operating status of the pipe network. Therefore, it is difficult to accurately predict the future operating status of the pipe network. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an analysis system for the operation and management of gas enterprises, which can improve the safety and stability of gas transmission and distribution pipe networks.
[0006] To solve the above technical problems, the technical solution of the present invention is as follows:
[0007] An analysis system for the operation and management of gas enterprises, comprising:
[0008] A data collection module, configured to obtain in real time the operation parameters of key nodes of the gas transmission and distribution pipe network, the gas consumption data of user terminals, and the meteorological data of environmental monitoring points, and perform preprocessing to obtain preprocessed data;
[0009] A data processing module, configured to generate a three-dimensional model of the gas transmission and distribution pipe network by using the preprocessed data; according to the three-dimensional model, use a machine learning prediction model to predict the future operating status of the gas transmission and distribution pipe network to obtain a prediction result, where the prediction result includes the layout of the pipe network, the positions of key nodes, and the interaction relationship with meteorological conditions; according to the prediction result, generate a preliminary configuration plan;
[0010] An optimization module, configured to encode the parameters of the preliminary configuration plan into "genes" by using a genetic algorithm, and create an initial set of "populations", that is, multiple possible configuration plans; perform iterative evolution on the population, and in each iteration, evaluate the fitness of each individual; select the corresponding individuals for crossover to generate a new population, and after multiple iterations, obtain a final configuration plan.
[0011] Further, using the preprocessed data, a three-dimensional model of the gas transmission and distribution network is generated, including:
[0012] Regarding each network node as a particle, initialize the position of the particle as a combination of two-dimensional coordinates and elevation data, and assign a velocity vector to each particle. The initial velocity is set to zero, indicating the moving direction and rate of the particle in three-dimensional space;
[0013] Define a fitness function, which is used to evaluate each particle, that is, the quality of the position of the node in three-dimensional space;
[0014] In each iteration, evaluate the fitness value of each particle according to the fitness function, update the velocity and position of the particle. After the iteration of the particle swarm optimization algorithm ends, map the finally optimized particle positions into three-dimensional space to determine the positions of each node in the three-dimensional coordinate system;
[0015] According to the positions of each node in the three-dimensional coordinate system and the known pipeline information, create a three-dimensional network element model, including pipelines, valves, and joints;
[0016] According to the actual connection relationships between the network elements, assemble each element into a three-dimensional network model.
[0017] Further, based on the three-dimensional model, use a machine learning prediction model to predict the future operating state of the gas transmission and distribution network to obtain prediction results. The prediction results include the layout of the network, the positions of key nodes, and the interaction relationship with meteorological conditions, including:
[0018] Extract the network layout information from the three-dimensional model, including the length, diameter, material, and connection method of the pipeline; determine and extract the positions of key nodes in the network. The key nodes are branch points, control valves, or pressure regulating stations;
[0019] Obtain and process the historical operating data of the key nodes, including pressure, flow rate, and temperature data;
[0020] Obtain real-time meteorological data related to gas transmission and distribution from environmental monitoring points, including temperature, humidity, wind speed, and wind direction, so that the time stamps of the real-time meteorological data match those of the network operating data;
[0021] Fuse the network layout information, key node position data extracted from the three-dimensional model with the historical operating data to form a preliminary data set;
[0022] Fuse the meteorological data with the preliminary data set so that the network operating data at each time point corresponds to the corresponding meteorological conditions to obtain a fused data set;
[0023] Preprocess the fused dataset and divide the preprocessed dataset into a training set, a validation set, and a test set;
[0024] Use the training set to train the neural network model and optimize the performance of the neural network model by adjusting the hyperparameters of the neural network model; Use the validation set to evaluate the performance of the neural network model during the training process to obtain the final prediction model;
[0025] Input the current 3D model data and real-time environmental meteorological data into the final prediction model to obtain the predicted operating states of each key node of the pipe network within a future period of time, including the predicted values of pressure and flow rate.
[0026] Furthermore, fuse the meteorological data with the preliminary dataset so that the pipe network operation data at each time point corresponds to the corresponding meteorological conditions to obtain the fused dataset, including:
[0027] Determine the number of time points of the pipe network operation data, denoted as M; Determine the number of time points of the meteorological data, denoted as N; Create a two-dimensional matrix with M rows and N columns to store the similarity between time points;
[0028] Initially, set all elements in the matrix to a default value;
[0029] For each time point of the pipe network operation data, denoted as i; For each time point of the meteorological data, denoted as j; Set the initial distance to 0 at the upper left corner of the DTW matrix, i.e., the starting point; Set the first row and the first column of the DTW matrix to infinity, indicating the inaccessibility between the starting point and the remaining points; Starting from the first time point i of the pipe network operation data and the first time point j of the meteorological data, gradually traverse all pairs of time points; For each pair of time points (i, j), extract the corresponding pipe network operation data parameters and meteorological data parameters; Calculate the Euclidean distance between the pipe network operation data parameters and the meteorological data parameters;
[0030] Update the value of the current cell according to the Euclidean distance between the pipe network operation data parameters and the meteorological data parameters and the values of the adjacent cells filled in the DTW matrix, and move to the next pair of time points until all pairs of time points are traversed;
[0031] Find the final Euclidean distance value at the lower right corner of the DTW matrix, which represents the similarity between the entire pipe network operation data sequence and the entire meteorological data sequence;
[0032] Fill the similarity between i and j into the corresponding position of the two-dimensional matching matrix, i.e., the i-th row and the j-th column; Create a dynamic programming table of the same size as the two-dimensional matching matrix; Starting from the upper left corner, gradually fill each element in the dynamic programming table, and the value of each element represents the minimum cumulative similarity from the starting point to the current position;
[0033] Update the value at the current position according to the minimum cumulative similarity at the previous position and the similarity at the current position. Starting from the lower right corner of the dynamic programming table, gradually trace back to the upper left corner. During the backtracking process, record the grid path passed through, which is the final matching path between the time points of the pipeline network operation data and the meteorological data time points;
[0034] Determine the meteorological data time points corresponding to each pipeline network operation data time point according to the final matching path;
[0035] For each matched pipeline network operation data time point, merge it with the corresponding meteorological data time point into a record to obtain a fused data set.
[0036] Furthermore, according to the prediction result, generate a preliminary configuration plan, including:
[0037] Identify the parameters important for the operation of the pipeline network from the prediction result;
[0038] Set the goals of the configuration plan according to the operation requirements of the gas enterprise;
[0039] Based on the parameters important for the operation of the pipeline network and the set configuration goals, construct a preliminary configuration plan.
[0040] Furthermore, the parameters of the preliminary configuration plan include the pressure setting values and flow distribution of the pipeline network nodes.
[0041] Furthermore, the parameters important for the operation of the pipeline network include the pressure and flow change trends of key nodes, and the areas affected by meteorological conditions.
[0042] In a second aspect, an analysis method for the operation management of a gas enterprise, which is used to execute the above-mentioned system. The method includes:
[0043] Real-time obtain the operation parameters of the key nodes of the gas transmission and distribution pipeline network, the gas consumption data of the user terminals, and the meteorological data of the environmental monitoring points and perform preprocessing to obtain preprocessed data;
[0044] Generate a three-dimensional model of the gas transmission and distribution pipeline network by using the preprocessed data; according to the three-dimensional model, use a machine learning prediction model to predict the future operation state of the gas transmission and distribution pipeline network to obtain a prediction result. The prediction result includes the layout of the pipeline network, the positions of key nodes, and the mutual relationship with meteorological conditions; according to the prediction result, generate a preliminary configuration plan;
[0045] The parameters of the preliminary configuration scheme are encoded as "genes" through a genetic algorithm, and a set of initial "populations", that is, multiple possible configuration schemes, are created; the population is iteratively evolved, and in each iteration, the fitness of each individual is evaluated; the corresponding individuals are selected for crossover to generate a new population, and after multiple iterations, the final configuration scheme is obtained.
[0046] In a third aspect, a computing device includes:
[0047] One or more processors;
[0048] A storage device for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method described above.
[0049] In a fourth aspect, a computer-readable storage medium stores a program that, when executed by a processor, implements the method described above.
[0050] The above solution of the present invention has at least the following beneficial effects:
[0051] Through the data acquisition module, the system can real-time obtain the operation parameters of the key nodes of the gas transmission and distribution network, the gas consumption data of the user terminals, and the meteorological data of the environmental monitoring points, and perform preprocessing. This method significantly improves the efficiency and accuracy of data acquisition. The data processing module uses the preprocessed data to generate a three-dimensional model of the gas transmission and distribution network, making the layout of the network and the positions of the key nodes more visually visible. At the same time, combined with the machine learning prediction model, it can accurately predict the future operation state of the gas transmission and distribution network, including the interaction with meteorological conditions, thus helping the enterprise to make more accurate decisions.
[0052] The optimization module encodes and optimizes the parameters of the preliminary configuration scheme through a genetic algorithm, and can generate a more scientific and reasonable final configuration scheme. This optimization method not only improves the quality of the configuration scheme, but also makes the gas transmission and distribution network operate more efficiently and safely, thereby improving the overall operation efficiency of the gas enterprise. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a schematic diagram of an analysis system for the operation management of a gas enterprise provided by an embodiment of the present invention.
[0054] Figure 2 is a schematic diagram of the flow of an analysis method for the operation management of a gas enterprise provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0056] As Figure 1 shown, an embodiment of the present invention provides an analysis system for the operation and management of gas enterprises, including:
[0057] A data acquisition module, configured to obtain in real time the operation parameters of key nodes of the gas transmission and distribution pipeline network, the gas consumption data of user terminals, and the meteorological data of environmental monitoring points, and perform preprocessing to obtain preprocessed data;
[0058] A data processing module, configured to generate a three-dimensional model of the gas transmission and distribution pipeline network by using the preprocessed data; according to the three-dimensional model, use a machine learning prediction model to predict the future operation state of the gas transmission and distribution pipeline network to obtain a prediction result, where the prediction result includes the layout of the pipeline network, the positions of key nodes, and the interaction relationship with meteorological conditions; according to the prediction result, generate a preliminary configuration plan;
[0059] An optimization module, configured to encode the parameters of the preliminary configuration plan as "genes" through a genetic algorithm and create an initial set of "populations", that is, multiple possible configuration plans; perform iterative evolution on the population, and in each iteration, evaluate the fitness of each individual; select the corresponding individuals for crossover to generate a new population, and after multiple iterations, obtain a final configuration plan.
[0060] In the embodiments of the present invention, by obtaining the operation parameters of the key nodes of the gas transmission and distribution network, the gas consumption data of the user terminals, and the meteorological data of the environmental monitoring points in real time, the timeliness and accuracy of the data are ensured; preprocessing the data can effectively remove noise, outliers, and duplicate data, improve the data quality, and provide a more accurate and clean data set for subsequent data analysis and model prediction. Generating a three-dimensional model of the gas transmission and distribution network realizes the visual management of the network, which helps to more intuitively understand the complex structure and layout of the network, and improve the efficiency and accuracy of operation management. Using a machine learning prediction model to predict the future operation state of the gas transmission and distribution network helps the enterprise to make operation plans and risk responses in advance. This prediction ability can significantly reduce the operation risk and improve the stability and reliability of the system. Generating a preliminary configuration plan according to the prediction results provides a data- and prediction-based starting point for the enterprise, which helps to quickly respond to market demands and system changes. Encoding and optimizing the parameters of the preliminary configuration plan through a genetic algorithm can search for a better configuration plan. This method can handle complex optimization problems and find the global optimal solution or an approximate optimal solution. By iteratively evolving the population and evaluating the individual fitness, the configuration plan is continuously optimized. This iterative process can ensure that the final configuration plan better meets the actual requirements and improves the efficiency and safety of the gas transmission system. The final configuration plan obtained after multiple iterative optimizations is the best result based on data and algorithm optimization, which helps the enterprise to achieve higher efficiency and lower costs in actual operation, while enhancing the stability and reliability of the system.
[0061] In another preferred embodiment of the present invention, the above-mentioned real-time acquisition of the operation parameters of the key nodes of the gas transmission and distribution network, the gas consumption data of the user terminals, and the meteorological data of the environmental monitoring points and preprocessing them to obtain preprocessed data may include:
[0062] Identify the key nodes in the gas transmission and distribution network. These nodes are important parts of the network, such as pressure regulating stations, valves, sensors, etc. Their operating parameters are crucial for the stable operation of the entire network. Secondly, identify the user terminals, that is, the gas consumption data collection points of gas users, which helps to understand the gas consumption needs and patterns of users. Finally, identify the environmental monitoring points to collect meteorological data, such as temperature, humidity, wind speed, etc. These data have an important impact on predicting gas demand and the operating status of the network. Install corresponding sensors and data collection devices at each collection point, such as pressure sensors, flow meters, temperature sensors, etc., for real-time measurement and recording of operating parameters, gas consumption, and meteorological data. Ensure smooth communication between the data collection devices and the central data processing system for real-time data transmission. The sensors and data collection devices collect data at a set frequency (such as per second, per minute, or per hour) and send the data to the central data processing system, which is responsible for receiving data from each collection point and performing preliminary data integration and storage; Data preprocessing is an essential step in the data collection module, which involves operations such as cleaning, transforming, and standardizing the raw data; Cleaning the data mainly removes outliers, noise data, and duplicate records to ensure the accuracy and consistency of the data. Transforming the data is to convert the raw data into a format suitable for subsequent analysis and processing, such as unifying the data units, converting non-numerical data into numerical data, etc. Standardizing the data is to eliminate the influence of different dimensions and value ranges on the data analysis results and make the data comparable. The preprocessed data will be output to the next module (such as the data processing module) for further analysis and processing. The output format and quality of the preprocessed data will directly affect the accuracy and effectiveness of subsequent analysis.
[0063] In summary, through steps such as determining data collection points, building a data collection system, obtaining data in real time, performing data preprocessing, and outputting preprocessed data, the data collection module realizes the comprehensive, accurate, and efficient collection of the operating parameters of the key nodes in the gas transmission and distribution network, the gas consumption data of user terminals, and the meteorological data of environmental monitoring points.
[0064] In a preferred embodiment of the present invention, a three-dimensional model of the gas transmission and distribution network is generated using the preprocessed data, including:
[0065] Each pipe network node is regarded as a particle. Initialize the position of the particle as a combination of two-dimensional coordinates and elevation data. Assign a velocity vector to each particle, and the initial velocity is set to zero, indicating the moving direction and rate of the particle in three-dimensional space. Specifically, it includes: determining the pipe network nodes, identifying which points are the nodes in the pipe network, and these nodes may be key positions such as pipe connection points, valves, sensors, etc.; initializing the position of each node as a combination containing two-dimensional coordinates (x, y) and elevation data z, which is based on actual measurements or Geographic Information System (GIS) data; assigning a three-dimensional velocity vector to each node, and its initial value is set to zero, which means that at the beginning of the optimization process, the particle (node) does not move.
[0066] Define the fitness function. The fitness function is used to evaluate each particle, that is, the quality of the position of the node in three-dimensional space. Among them, the calculation formula of the fitness function is:
[0067] ;
[0068] Among them, , where, ( , , ) represents the three-dimensional coordinates of the current node; ( , , ) represents the three-dimensional coordinates of the target node (based on actual measurements); n represents the total number of nodes; represents the actual connection length (the connection distance between the current node and other nodes); represents the expected connection length (the expected distance based on the actual pipe network layout); m represents the total number of connections; represents the angle between the current node and adjacent nodes (such as the pipe bending angle); represents the average angle of adjacent nodes; p represents the number of pairs of adjacent nodes; represents the th connection, which is used to traverse the connection relationships between all nodes; represents the th pair of adjacent nodes, which is used to traverse all pairs of adjacent nodes; , and represent the weight coefficients.
[0069] In each iteration, the fitness value of each particle is evaluated according to the fitness function, and the velocity and position of the particle are updated. After the iteration of the particle swarm optimization algorithm ends, the finally optimized particle position is mapped into the three-dimensional space to determine the position of each node in the three-dimensional coordinate system. Specifically, in each iteration, the defined fitness function is used to evaluate the current position of each particle. Based on the fitness evaluation result, the velocity vector and position of each particle are adjusted, where the particle updates its velocity and position according to its own historical best position and the group historical best position. Set the conditions for terminating the iteration, such as reaching the maximum number of iterations. After the iterative optimization ends, the finally optimized particle position (i.e., the position of the pipe network node) is mapped from the algorithm space to the actual three-dimensional coordinate system.
[0070] The velocity of each particle Is updated in each generation (iteration), and the update formula is as follows:
[0071] ;
[0072] Where, Represents the velocity of particle i at time t; w represents the inertia weight, which is used to control the jump of the particle search space; And Represent the learning factors, which respectively control the attraction of the particle to its personal best position And the group best position; And These two are random numbers, between [0, 1]; Represents the historical best position of particle i; Represents the historical best position in the group; Represents the current position of particle i at time t;
[0073] ;
[0074] Where, Represents the position of particle i at time ; Represents the velocity of particle i at time ;
[0075] According to the position of each node in the three-dimensional coordinate system and the known pipeline information, a three-dimensional pipe network element model is created, including pipes, valves and joints. Specifically, according to the position of each node in the three-dimensional coordinate system and the known pipeline information (such as length, diameter, material, etc.), various elements of the pipe network are created using three-dimensional modeling software, including pipes, valves, joints, etc. Corresponding physical properties and parameters are assigned to each element to ensure that the model is consistent with the characteristics of the actual pipe network.
[0076] According to the actual connection relationships among pipeline network elements, assemble each element into a three-dimensional pipeline network model, specifically including: According to the actual connection relationships among pipeline network elements (such as which valve is connected to which section of pipeline), assemble these elements into a complete pipeline network model in three-dimensional space. After completion of the assembly, verify the model to ensure its accuracy and integrity, which includes checking whether the connection points are correct, whether the pipelines intersect, etc.
[0077] In the embodiments of the present invention, by treating each pipeline network node as a particle and initializing its position and velocity, basic data is provided for subsequent three-dimensional model reconstruction. This particle representation method simplifies the complex pipeline network structure, facilitating optimization. The fitness function is the key to evaluating the quality of the position of each particle (i.e., node) in three-dimensional space. By reasonably defining the fitness function, it can be ensured that the generated three-dimensional model better conforms to the layout and characteristics of the actual pipeline network, improving the accuracy and practicality of the model. By continuously updating the velocity and position of the particles during the iterative optimization process, the optimal node layout can be found. This method can ensure that the positions of the nodes in the three-dimensional model are more accurate, thereby enhancing the accuracy and reliability of the entire model. Mapping the optimized particle positions into three-dimensional space can intuitively display the spatial distribution of the pipeline network nodes, which not only helps to understand and analyze the complex structure of the pipeline network but also provides accurate spatial positioning information for subsequent three-dimensional model construction. According to the positions of the nodes in the three-dimensional coordinate system and the known pipeline information, create a three-dimensional model including elements such as pipelines, valves, and joints, which enables the various components of the pipeline network to be realistically reproduced in three-dimensional space, improving the visualization degree and fidelity of the model. Assemble each element into a complete three-dimensional pipeline network model according to the actual connection relationships among pipeline network elements, which helps to comprehensively display the overall structure and layout of the pipeline network. Through the display of the three-dimensional model, the operating state and potential problems of the pipeline network can be more intuitively understood, improving the efficiency and accuracy of operation and management.
[0078] The fitness function comprehensively considers three key factors, namely distance, connection length, and angle between nodes, in a weighted manner, making the evaluation more comprehensive and accurate, which helps to find node positions that perform well in multiple dimensions. By adjusting the weight coefficients w 1 、w 2 and w 3 , the importance of different factors in the evaluation can be flexibly adjusted. This flexibility enables the function to adapt to different application scenarios and requirements. The D part in the function clearly considers the distance between the node and the target node, helping to guide the particle towards the target position. By calculating the difference between the actual connection length and the expected connection length , the function can evaluate the degree of coincidence between the current node layout and the expected pipeline network layout, thereby optimizing the overall layout effect. By considering the angle between nodes ( And the difference), which helps optimize the bending degree and smoothness of the pipe network; by quantifying and weighted summing multiple consideration factors, this function provides a clear numerical index to evaluate the advantages and disadvantages of the node positions, facilitating comparison and selection.
[0079] In a preferred embodiment of the present invention, according to the three-dimensional model, a machine learning prediction model is used to predict the future operating state of the gas transmission and distribution pipe network to obtain a prediction result, and the prediction result includes the layout of the pipe network, the positions of key nodes, and the mutual relationship with meteorological conditions, including:
[0080] Extract the pipe network layout information from the three-dimensional model, including the length, diameter, material, and connection method of the pipeline; determine and extract the positions of key nodes in the pipe network. The key nodes are branch points, control valves, or pressure regulating stations, specifically including:
[0081] According to the Canny edge detection algorithm, set the recognition parameters, which include the length of the shape, diameter range, curvature threshold, etc., to ensure that the algorithm can accurately recognize the shape characteristics unique to pipelines such as linear and tubular; preprocess the three-dimensional model, such as removing noise and simplifying geometric details, to improve the recognition accuracy; start traversing each element in the three-dimensional model. These elements can be polygon meshes, and the traversal can be achieved through a recursive method to ensure that each element is checked; initialize the parameters of the Canny edge detection algorithm, including the size and standard deviation of the Gaussian filter, which are used to smooth the image and reduce noise, and set two thresholds (high threshold and low threshold) for hysteresis threshold processing during the edge detection process; convert the currently traversed three-dimensional model element into a two-dimensional image, and apply the Gaussian filter to smooth the image to reduce the impact of noise on edge detection; use the Sobel operator to calculate the gradient magnitude and direction of each pixel point in the image. The gradient magnitude represents the intensity of the edge, and the gradient direction represents the direction of the edge; traverse each pixel of the image. For each pixel point, compare its gradient magnitude with the gradient magnitudes of adjacent pixels along the gradient direction, retain the pixel point with the largest local gradient magnitude, and suppress other non-maximum points to refine the edge; perform threshold processing on the gradient magnitude using the high threshold and low threshold. Pixel points higher than the high threshold are considered definite edge points, pixel points lower than the low threshold are discarded, and pixel points between the two thresholds are considered edge points if they are connected to the definite edge points, otherwise they are discarded.
[0082] Extract shape features from the detected edge image, such as length (obtained by calculating the number of edge pixels or the total length of the edge curve), diameter (for tubular objects, the diameter may need to be estimated by fitting a circle or an ellipse), curvature (obtained by calculating the rate of change of the tangent direction of the edge points); compare the extracted shape features with the preset pipe shape features, which can be set based on actual requirements. The comparison can be achieved by calculating the degree of difference between the features, such as calculating the Euclidean distance between the shape features. According to the comparison result, if the shape features of the current element match the preset pipe shape features (the degree of difference is less than a certain threshold), then mark the element as a pipe. The marking can be achieved by changing the color, transparency, adding a label, or displaying it in a specific way in the model. Record the elements marked as pipes and their related information, such as position, shape feature values, etc.; continue to traverse the next element and repeat the above process until all elements are processed. If all elements have been traversed and processed, then end the entire process.
[0083] For each identified pipe element, use its unique identifier (such as ID, name, etc.) to query the corresponding attribute information in the metadata. The queried attributes include key information such as length, diameter, material, etc. Store the queried attribute information in the attribute record of the pipe element. If some attributes are missing in the metadata (i.e., the query result is empty or does not exist), then record the missing situation; for the missing length information in the metadata, deduce it through the following steps:
[0084] a. Obtain the three-dimensional coordinate data of the pipe element, which includes the coordinates of the two endpoints of the pipe.
[0085] b. Use the distance formula in three-dimensional space (such as the Euclidean distance formula) to calculate the straight-line distance between the two endpoints.
[0086] c. Take the calculated straight-line distance as the length of the pipe and supplement it to the attribute record of the pipe.
[0087] Verify the deduced length information to ensure its reasonableness and accuracy. For example, it can be compared with other known attributes (such as diameter) to check if there are obvious logical errors. If the verification passes, then officially update the deduced length information to the attribute record of the pipe; if the verification fails, then record the problem and conduct further investigation.
[0088] During the whole process, record the processing log of each pipe element, including query results, missing attribute situations, deduction processes, and any abnormal or error information.
[0089] If there are still unprocessed pipeline elements, continue to process them according to the above steps. When all the identified pipeline elements have been processed, end the entire process.
[0090] Obtain all the identified pipeline elements and their attribute information. By calculating the distances between the endpoints of the pipeline elements, determine which pipelines are adjacent. Set a distance threshold. If the distance between two pipeline endpoints is less than this threshold, they are considered adjacent. Extract the three-dimensional coordinates of the adjacent pipeline endpoints and calculate the orientations of the pipelines, which can be obtained through the tangents or normal vectors near the pipeline endpoints. Compare the coordinates of the adjacent pipeline endpoints to determine if they are aligned. If the coordinate differences are within the allowed error range, the endpoints are considered aligned.
[0091] For each pair of adjacent pipeline elements, determine a search area in the three-dimensional space based on their endpoint positions and orientations. This area is the space between the two pipeline endpoints and can be slightly expanded to accommodate possible connectors. In the determined search area, use edge detection algorithms to find possible connector models to identify specific shapes, such as the circular contour of a flange or the specific structure of a joint. Filter the results of the shape recognition to remove low-confidence identifications to reduce false identifications. Other information, such as the size and positional relationship of the connectors, can be combined for further verification. Based on the alignment of the adjacent pipeline endpoints and the identification results of the connectors, comprehensively judge the connection method. If the pipeline endpoints are aligned and no connectors are identified, it is determined as a direct connection. If specific connectors such as flanges are identified, it is determined as the corresponding connection method, such as flange connection. Record the determined connection method information in the attributes of the pipeline elements, which can be directly added to the metadata of the pipeline, or these information can be stored in a separate database table. This table should contain fields to record the ID of the pipeline element, the ID of the adjacent pipeline element, the type of connection method, etc. Repeat the above steps for each pair of adjacent pipeline elements until the connection methods of all adjacent pipelines are determined and recorded.
[0092] Define a data structure that includes the definition of key node types, determine the attributes of key nodes, such as types, features, recognition rules, etc. Define features and recognition rules for each key node type (such as branch points, control valves, pressure regulating stations, etc.). Features can include shape, size, positional relationship, etc. The recognition rules can be algorithms based on shape matching. Use the actual three-dimensional model data to test the accuracy and integrity of the knowledge base. Adjust and optimize the recognition rules and feature definitions according to the test results. Combine the key node knowledge base with the analysis process of the pipeline element connection method. Use the knowledge base to identify and classify key nodes during the analysis process. Regularly update the knowledge base as new types of key nodes appear or recognition technologies are improved.
[0093] Initialize the shape matching algorithm, traverse the elements in the 3D model, match each element with the shape template, identify the elements with high similarity to the shape template, and mark them as key nodes of the corresponding type. For example, locate control valves and pressure regulating stations by identifying specific shapes (such as the handle of a valve, the appearance features of a pressure regulating station, etc.). For the identified key nodes, utilize the spatial positioning function of the 3D model to obtain their precise spatial coordinates, and store the spatial coordinate information of the key nodes for integration with other pipeline network data. Create a data structure (such as a database table or object model) to store the integrated information, fill in the position and type information of the key nodes into this data structure, record the status information (such as open / closed status) for control valves, and record the relevant parameters (such as pressure regulating range, set value, etc.) for pressure regulating stations.
[0094] Obtain and process the historical operation data of key nodes, including pressure, flow rate, and temperature data; obtain real-time meteorological data related to gas transmission and distribution from environmental monitoring points, including temperature, humidity, wind speed, and wind direction, so that the time stamps of the real-time meteorological data match those of the pipeline network operation data; fuse the pipeline network layout information and key node position data extracted from the 3D model with the historical operation data to form a preliminary data set, specifically including:
[0095] Locate the database or data warehouse storing the historical operation data of key nodes, use SQL queries or other data extraction tools to retrieve the historical data of pressure, flow rate, and temperature from the data source, clean the extracted data to remove duplicate, abnormal, or invalid data points, and convert the cleaned data into a unified format; determine the location and access interface of the environmental monitoring points providing real-time meteorological data, connect to the data interface of the environmental monitoring points through API calls, data stream subscriptions, or file transfers, and regularly (such as every minute or every hour) obtain the real-time data of temperature, humidity, wind speed, and wind direction from the environmental monitoring points to ensure that the obtained real-time meteorological data contains accurate time stamps; import the 3D model data containing the pipeline network layout information and key node positions into the data processing environment so that the key node positions in the 3D model data correspond to the node identifiers in the historical operation data.
[0096] Read the preprocessed historical data from a specified data storage location (such as a database, file, etc.). This data is stored in a structured format (such as CSV, JSON) and contains fields such as timestamps, critical node identifiers (IDs), pressure, flow rate, and temperature. Load the 3D model file and parse the critical node information in the model, including the node's position, identifier, etc. The 3D model uses a specific file format (such as OBJ, FBX, etc.) and requires corresponding parsing libraries or tools to read. Traverse each record in the historical data, extract the identifier of the critical node, and then search for the node with the same identifier in the 3D model data. Establish a mapping relationship between the successfully matched historical data records and the 3D model nodes. This can be achieved by creating a mapping table or dictionary, where the key is the node identifier and the value is the corresponding historical data record. According to the preset visualization rules, determine the display of the historical data time series in the 3D model. For example, a floating window containing a time series chart can be selected to be displayed near the node. Prepare the corresponding visualization components according to the determined overlay method, which can include chart libraries, color mapping functions, etc. For each node with an established mapping relationship, obtain its corresponding historical data record, use the prepared visualization components to generate a time series chart based on the historical data, and the chart clearly shows the changes in the node's pressure, flow rate, and temperature over time. Overlay the generated time series chart onto the corresponding 3D model node.
[0097] Fuse the meteorological data with the preliminary dataset so that the pipeline network operation data at each time point corresponds to the corresponding meteorological conditions to obtain a fused dataset;
[0098] Preprocess the fused dataset and divide the preprocessed dataset into a training set, a validation set, and a test set; Use the training set to train the neural network model and optimize the performance of the neural network model by adjusting the hyperparameters of the neural network model; Use the validation set to evaluate the performance of the neural network model during the training process to obtain the final prediction model, specifically including:
[0099] Use the random partitioning algorithm to divide the preprocessed dataset into a training set, a validation set, and a test set. The training set is used for model training, the validation set is used for model selection and hyperparameter tuning, and the test set is used to evaluate the final performance of the model. The partitioning ratio is 70% for the training set, 15% for the validation set, and 15% for the test set; Define the input layer, hidden layer, and output layer of the convolutional neural network model, and set the initial hyperparameters, such as the learning rate, batch size, optimizer (such as Adam, SGD, etc.), loss function, etc.; Use the training set to train the neural network model, update the model weights through the backpropagation algorithm and gradient descent optimizer, and based on the performance evaluation results of the validation set, adjust the hyperparameters and use the grid search method for hyperparameter tuning until a satisfactory combination of hyperparameters is found; Use the validation set to evaluate the performance of the model under different hyperparameter combinations, and select evaluation metrics, such as accuracy and precision; Based on the performance evaluation results on the validation set, select the model with the best performance as the final prediction model.
[0100] Input the current 3D model data and real-time environmental meteorological data into the final prediction model to obtain the predicted operating states of each key node of the pipe network over a period of time in the future, including the predicted values of pressure and flow rate. Specifically, it includes:
[0101] Integrate the preprocessed 3D model data and real-time environmental meteorological data into an appropriate input format, such as tensors, data frames, etc. For time series prediction, construct a time window containing historical data as the input; Load the trained prediction model and configure the running parameters of the model, such as the batch size, prediction step, etc., pass the prepared input data to the prediction model, perform forward propagation to obtain the prediction output of the model, and perform multiple inferences to obtain more stable prediction results, such as through Monte Carlo simulation or ensemble methods. Extract the predicted operating states of each key node of the pipe network from the output of the model, including the predicted values of pressure and flow rate.
[0102] In the embodiments of the present invention, by integrating the pipeline network layout information, key node location data, historical operation data, and real-time meteorological data in the three-dimensional model, a comprehensive and detailed prediction model can be constructed. This multi-dimensional data fusion can significantly improve the accuracy of prediction, helping managers to more precisely grasp the future operation status of the pipeline network. The accurate prediction results provide strong support for the pipeline network operation decision-making. Managers can adjust the pipeline network operation strategy in a timely manner according to the predicted key indicators such as pressure and flow rate, such as adjusting the valve opening and optimizing the pressure regulating station settings, to ensure the safe and stable operation of the pipeline network. By predicting the future operation status, potential safety hazards and risk points can be detected in a timely manner, which helps managers to take preventive measures in advance to avoid or reduce the occurrence of safety accidents such as gas leakage and pipeline rupture, thereby ensuring public safety and environmental protection. Based on the accurate prediction data, the pipeline network operation can be carried out more efficiently. For example, by predicting the flow rate changes at each key node, the gas resources can be reasonably dispatched to reduce unnecessary energy waste and operation costs. The introduction of machine learning technology realizes the intelligent management of the pipeline network operation. The automated data collection, processing, and prediction processes reduce the burden of manual operations and improve work efficiency. At the same time, the intelligent prediction system can continuously learn and optimize to adapt to various changes and challenges in the pipeline network operation. Considering the impact of meteorological conditions on the pipeline network operation makes the prediction model more robust and reliable. Under different climate conditions, the operation status of the pipeline network may change significantly. By combining meteorological data with operation data, the prediction model can better capture these changes and provide corresponding prediction results.
[0103] In a preferred embodiment of the present invention, meteorological data is fused with the preliminary data set so that the pipeline network operation data at each time point corresponds to the corresponding meteorological conditions to obtain a fused data set, including:
[0104] Determine the number of time points of the pipeline network operation data, denoted as M; determine the number of time points of the meteorological data, denoted as N; create a two-dimensional matrix with M rows and N columns for storing the similarity between time points, specifically including:
[0105] For the pipeline network operation data, traverse the entire data set and count the number of unique time points it contains, denoted as M. These time points can be recorded at fixed intervals (such as every minute, every hour), or they may be non-uniform; similarly, for the meteorological data, count the number of unique time points it contains, denoted as N; Initialize a two-dimensional matrix with M rows and N columns using an appropriate data structure (such as an array, a list of lists, etc.). This matrix will be used to store the similarity values between the time points of the pipeline network operation data and the time points of the meteorological data. M is the number of time points of the pipeline network operation data, and N is the number of time points of the meteorological data; Initially, all elements in the matrix can be set to a default value, such as 0, infinity (indicating not calculated or unreachable); After completing the above steps, a ready two-dimensional matrix is obtained, which will be used in the subsequent DTW algorithm to calculate and store the similarity between the time points of the pipeline network operation data and the time points of the meteorological data.
[0106] Initially, set all elements in the matrix to a default value; for each time point of the pipeline network operation data, denoted as i; for each time point of the meteorological data, denoted as j; set the initial distance to 0 at the upper left corner of the DTW matrix, i.e., the starting point; set the first row and the first column of the DTW matrix to infinity, indicating the unreachability between the starting point and the remaining points; starting from the first time point i of the pipeline network operation data and the first time point j of the meteorological data, gradually traverse all pairs of time points; for each pair of time points (i, j), extract the corresponding pipeline network operation data parameters and meteorological data parameters; calculate the Euclidean distance between the pipeline network operation data parameters and the meteorological data parameters, specifically including:
[0107] Set the element at the upper left corner of the DTW matrix (i.e., the element in the first row and the first column, corresponding to the starting time points of the pipeline network operation data and the meteorological data) to 0, indicating that the initial distance between the starting points is 0; set all elements in the first row (except the starting point at the upper left corner) and the first column of the DTW matrix to infinity, which indicates the unreachability between the starting time point and the remaining time points, because in the matching process of the time series, the starting point can only correspond to the starting point and cannot skip any time points;
[0108] Starting from the first time point of the pipeline network operation data (let's set it as i = 1) and the first time point of the meteorological data (let's set it as j = 1), gradually traverse all pairs of time points. For each pair of time points (i, j), extract the data parameters corresponding to time point i from the pipeline network operation dataset (such as flow rate, pressure, etc.), and extract the data parameters corresponding to time point j from the meteorological dataset (such as temperature, humidity, etc.). Calculate the Euclidean distance between these two data points. The Euclidean distance is a common similarity measure, which is based on the straight-line distance of data points in a multi-dimensional space. For each parameter, calculate the square of its difference, then sum up the squared differences of all parameters and take the square root to obtain the Euclidean distance. Use the calculated Euclidean distance and the rules in the DTW algorithm to update the value at position (i, j) in the current DTW matrix; the DTW algorithm takes into account the time warping between time series, so the value at position (i, j) depends not only on the similarity of the current time point pair but also on the similarity of its adjacent time point pairs. Specifically, the value at position (i, j) is calculated based on the values of its three adjacent positions: the upper left corner (i - 1, j - 1), the left (i, j - 1), and the upper (i - 1, j), and the Euclidean distance of the current time point pair; repeat the above process until all pairs of time points (i, j) are traversed, where i ranges from 1 to M and j ranges from 1 to N.
[0109] Update the value of the current cell according to the Euclidean distance between the pipeline network operation data parameters and the meteorological data parameters and the values of the adjacent cells filled in the DTW matrix, and move to the next pair of time points until all pairs of time points are traversed; at the lower right corner of the DTW matrix, that is, the end point, find the final Euclidean distance value, which represents the similarity between the entire pipeline network operation data sequence and the entire meteorological data sequence, specifically including:
[0110] Starting from the upper left corner (starting point) of the DTW matrix, the value at this point has been set to 0. For each pair of time points (i, j), the Euclidean distance between the pipeline network operation data parameters and the meteorological data parameters has been calculated; use this Euclidean distance and the values of the adjacent cells filled in the DTW matrix (i.e., the cells in the upper left corner, the left, and the upper) to update the value of the current cell (i, j). The update rule is to take the minimum value among the values of the three adjacent cells in the upper left corner, the left, and the upper, and then add the Euclidean distance of the current time point pair. This is done to find a path with the minimum cumulative distance.
[0111] After updating the value of the current cell (i, j), move to the next time point pair, which usually means incrementing i or j by 1, depending on the selected traversal strategy (such as row-by-row or column-by-column traversal). Repeat the above process until all time point pairs are traversed, that is, the entire DTW matrix is traversed; when all time point pairs are traversed and updated, the bottom right corner of the DTW matrix, i.e., the end point, will be reached. The value in this cell represents the similarity between the entire pipeline network operation data sequence and the entire meteorological data sequence. Specifically, this value is the minimum cumulative distance from the starting point to the end point, taking into account the time warping between time series. The smaller the similarity value, the more similar the two time series are; the larger the value, the greater the difference between them. This value can be used to evaluate the correlation degree between the pipeline network operation data and the meteorological data, or to compare the data similarity in different time periods.
[0112] Fill the similarity between i and j into the corresponding position of the two-dimensional matching matrix, that is, the i-th row and the j-th column; create a dynamic programming table of the same size as the two-dimensional matching matrix; starting from the upper left corner, gradually fill each element in the dynamic programming table. The value of each element represents the minimum cumulative similarity from the starting point to the current position, specifically including:
[0113] According to the above two-dimensional matching matrix, its size is M rows and N columns, where M is the number of time points of the pipeline network operation data and N is the number of time points of the meteorological data. For each pair of time points (i, j), the similarity (Euclidean distance) between the pipeline network operation data and the meteorological data has been calculated; fill this similarity value into the i-th row and the j-th column of the two-dimensional matching matrix. In this way, each element in the two-dimensional matching matrix represents the similarity between the corresponding time point pair; create a dynamic programming table of the same size as the two-dimensional matching matrix, that is, a table with M rows and N columns. This dynamic programming table will be used to store the minimum cumulative similarity from the starting point (upper left corner) to each position (i, j).
[0114] Set the top-left element of the dynamic programming table (corresponding to the starting point) to 0, indicating that the cumulative similarity from the starting point to the starting point is 0. Starting from the top-left corner of the dynamic programming table, gradually fill each element towards the bottom-right. For each position (i, j), the calculation of its minimum cumulative similarity is based on the values of the following three adjacent positions: top-left (i - 1, j - 1), left (i, j - 1), and above (i - 1, j). Select the value with the minimum cumulative similarity among these three adjacent positions, and then add the similarity of the current position (i, j) (obtained from the two-dimensional matching matrix) to get the minimum cumulative similarity of the current position. Fill this minimum cumulative similarity into the current position (i, j) of the dynamic programming table. Repeat the above process until all positions in the dynamic programming table are filled. During the filling process, a minimum cumulative similarity path from the starting point to each position is actually constructed; when the dynamic programming table is filled, the bottom-right element represents the minimum cumulative similarity between the entire pipeline network operation data sequence and the entire meteorological data sequence. This value can be used as a measure of the similarity between the two time series for subsequent data analysis, comparison, or classification tasks.
[0115] Update the value of the current position according to the minimum cumulative similarity of the previous position and the similarity of the current position. Starting from the bottom-right corner of the dynamic programming table, gradually trace back to the top-left corner. During the backtracking process, record the grid path passed through, which is the final matching path of the pipeline network operation data time point and the meteorological data time point, specifically including:
[0116] The starting point of backtracking is the lower right corner of the dynamic programming table, which is the intersection point of the last pipeline network operation data time point and the last meteorological data time point. Record the position of this point, which will be the end point of the matching path. Starting from the lower right corner of the dynamic programming table, check the value at the current position and its possible previous positions (upper left corner, left side, and upper side). According to the filling rule of DTW, usually choose the one with the smallest value among the three positions in the upper left corner, left side, and upper side as the next point for backtracking. This is because when the DTW algorithm fills the dynamic programming table, the value of each cell is calculated based on the minimum value of its adjacent cells plus the similarity of the current cell. After determining the next point for backtracking, record it as part of the matching path, which means adding the time point pair (pipeline network operation data time point and meteorological data time point) at the current position to the matching path list, move to the previous position determined in the previous step, and repeat the above process to continue searching and recording the points on the backtracking path. During the backtracking process, always choose the previous position that results in the minimum cumulative similarity. Keep backtracking until reaching the upper left corner (starting point) of the dynamic programming table. In this process, a complete grid path from the lower right corner to the upper left corner is obtained, and this path is the final matching path between the pipeline network operation data time point and the meteorological data time point. The finally obtained matching path represents the optimal alignment method of time points between the two time series. This path not only considers the similarity between time points but also ensures the minimization of the overall cumulative similarity through dynamic programming.
[0117] According to the final matching path, determine the meteorological data time point corresponding to each pipeline network operation data time point; for each matched pipeline network operation data time point, merge it with the corresponding meteorological data time point into a single record to obtain a fused dataset, specifically including:
[0118] Create an empty result list or data frame to store the fused records. Starting from the matching path obtained by DTW backtracking before, this path is a list containing pairs of time points (time points of pipeline network operation data and time points of meteorological data). Traverse this list and process each pair of matching time points one by one; for each pair of matching time points, extract all relevant data (such as flow rate, pressure, etc.) corresponding to this time point from the pipeline network operation dataset. At the same time, extract all relevant data (such as temperature, humidity, wind speed, etc.) corresponding to the time point from the meteorological dataset; merge the data of the time point of the pipeline network operation data extracted with the data of the corresponding time point of the meteorological data into a record, which can be achieved by creating a new dictionary or data row that contains all fields of the corresponding time points in the two datasets; add the merged record to the previously prepared result list or data frame. Repeat the above steps until all pairs of time points in the matching path are traversed. When all pairs of matching time points are processed and added to the result list, this list represents the fused dataset.
[0119] In the embodiment of the present invention, by corresponding meteorological data with pipeline network operation data, the relationship between the pipeline network operation status and meteorological conditions can be analyzed more accurately. This fused dataset helps to reveal the direct impact of meteorological factors on the pipeline network operation status, thereby improving the accuracy of pipeline network performance evaluation. Based on the fused dataset, decision-makers can more comprehensively understand the pipeline network operation status under specific meteorological conditions, and thus make more reasonable resource allocation, maintenance plan, and emergency response decisions. Using historical fused data, a more accurate prediction model can be constructed to predict the pipeline network operation status under different meteorological conditions, which helps to prevent potential problems and plan in advance. Through the analysis of the fused data, the bottlenecks and optimization points of the pipeline network operation can be found, thereby improving the operation efficiency of the entire pipeline network. Meteorological conditions are one of the important factors affecting the pipeline network operation. Through data fusion, the risks of the pipeline network under adverse weather conditions can be identified and evaluated, so as to take preventive measures and reduce the possibility of accidents.
[0120] In a preferred embodiment of the present invention, according to the prediction result, a preliminary configuration plan is generated, including:
[0121] Identify the parameters important for the pipeline network operation from the prediction result, specifically including: conduct a comprehensive data analysis of the prediction result, which includes checking the pressure prediction values and flow prediction values of each node and their change trends over time. By analyzing the data, identify the parameters crucial for the pipeline network operation. These key parameters include the pressure peak value of a specific node, the seasonal variation of the flow rate, or the performance of certain nodes under specific meteorological conditions. Pay special attention to the areas significantly affected by meteorological conditions (such as temperature, wind speed, humidity), and record the changes in the pipeline network performance of these areas under different meteorological conditions.
[0122] According to the operation requirements of gas enterprises, set the goals of the configuration plan, specifically including: determining the operation requirements and goals of the enterprise, which may include improving gas supply stability, reducing energy losses, optimizing operation costs, etc. Based on the demand assessment, set clear and quantifiable configuration goals. For example, set the pressure fluctuation range of key nodes, improve the gas supply reliability of specific areas, etc.
[0123] Based on the parameters important for pipeline network operation and the set configuration goals, construct a preliminary configuration plan; the parameters of the preliminary configuration plan include the pressure setting values and flow distribution of pipeline network nodes; the parameters important for pipeline network operation include the pressure and flow change trends of key nodes, and the areas affected by meteorological conditions, specifically including: combining the identified key parameters and the set goals, design a preliminary configuration plan framework, which covers the pressure setting values of each key node in the pipeline network, the flow distribution strategy, and the adjustment measures for different meteorological conditions; according to the historical data and prediction results of key nodes, set a reasonable pressure range for each node to ensure that these setting values can meet the gas supply requirements without causing excessive pressure on the pipeline network; according to the prediction results of flow and the operation requirements of the enterprise, formulate a flow distribution strategy, which involves adjusting the gas supply volume in different areas to ensure that the flow can be effectively distributed during peak demand periods or specific meteorological conditions. For areas affected by meteorological conditions, formulate special response measures. For example, in high-temperature weather, it may be necessary to increase the gas supply volume in certain areas to ensure the satisfaction of user needs; in extreme weather conditions, it may be necessary to adjust the operation strategy of the pipeline network to ensure safety; use historical data to verify the preliminary configuration plan, check whether the plan can achieve the set goals, and identify possible problems. According to the results of simulation tests, adjust and optimize the plan, which may involve modifying the pressure setting values of some nodes, adjusting the flow distribution strategy, or improving the measures for dealing with meteorological conditions.
[0124] In the embodiments of the present invention, by accurately configuring the pressure and flow of pipeline network nodes, unnecessary energy losses can be reduced, thereby improving the operation efficiency of the entire pipeline network. A reasonable configuration plan can reduce the failure risk of the pipeline network caused by pressure fluctuations or uneven flow, and enhance the stability and reliability of the system; adjusting the flow distribution according to the prediction results can ensure that resources can be effectively utilized during peak demand periods or adverse meteorological conditions, avoiding waste. The pre-planned configuration plan enables the pipeline network to quickly adjust its operation state in the face of emergencies (such as extreme weather, equipment failures), improving the response speed and response ability. By reducing unnecessary pressure fluctuations and flow impacts, the service life of pipeline network equipment can be extended, thereby reducing long-term maintenance costs.
[0125] In a preferred embodiment of the present invention, the parameters of the preliminary configuration scheme are encoded as "genes" by a genetic algorithm, and a set of initial "populations", that is, multiple possible configuration schemes, are created; the population is iteratively evolved, and in each iteration, the fitness of each individual is evaluated; the corresponding individuals are selected for crossover to generate a new population. After multiple iterations, the final configuration scheme can be obtained, which may include:
[0126] The parameters of the preliminary configuration scheme (such as the pressure setting values and flow rate distributions of the pipe network nodes) are encoded as "genes" in the genetic algorithm, which is achieved by converting continuous parameter values into discrete binary, integer, or floating-point number sequences; the parameter set of each configuration scheme (i.e., a set of specific pressure and flow rate values) is encoded as a "gene string" or "chromosome", representing an individual in the genetic algorithm; according to the scale and complexity of the problem, a set of initial "populations" are randomly generated, and each individual is a possible configuration scheme, represented by a randomly generated gene string; ensure that the initial population has sufficient diversity to cover different regions of the solution space, thereby increasing the possibility of finding the global optimal solution.
[0127] Define a fitness function to evaluate the quality of each individual (i.e., the configuration scheme); for each individual in the population, use the fitness function to calculate its fitness value, which will be used as the basis for the probability of the individual being selected in the selection process; according to the fitness values of the individuals, adopt a certain selection mechanism (such as roulette wheel selection, tournament selection, etc.) to select the individuals that will participate in the reproduction of the next generation. The individuals with higher fitness have a greater probability of being selected. Optionally, a part of the individuals with the highest fitness (i.e., elite individuals) can be retained to ensure that they can be directly passed on to the next generation, thereby accelerating the convergence speed of the algorithm; randomly select a pair of individuals in the population as parents, and randomly determine one or more crossover points, which will be used to exchange the gene information of both parents. Through the crossover operation, the gene characteristics of both parents are combined to generate new individuals (i.e., offspring). This new individual inherits some characteristics of both parents and may have better fitness.
[0128] Set a small mutation probability (this probability value is usually very small, such as 0.01 or 0.001, to ensure that mutations do not occur too frequently, thus maintaining the stability of the population), which is used to introduce new gene mutations during the breeding process. This helps increase the diversity of the population, prevent the algorithm from prematurely falling into local optimal solutions, randomly change the gene values of some individuals with a certain probability, thereby introducing new search directions, and repeat the steps until the termination condition is met; in each iteration, a new population is generated and its fitness is evaluated to find a better configuration plan. Set a maximum number of iterations. When the maximum number of iterations is reached or an individual that meets the fitness threshold is found, the algorithm stops running. After the algorithm terminates, select the individual with the highest fitness from the current population as the final configuration plan, decode the gene string of the optimal individual back to the actual parameter values (such as pressure and flow rate settings), and implement the final configuration plan according to these parameters.
[0129] Among them, the calculation formula of the fitness function is:
[0130] ;
[0131] Among them, is the fitness value, and the larger the value, the better the configuration plan; is the economic cost of the pipeline network operation; is the penalty term for violating the pipeline network operation constraint conditions; , , and are the weight coefficients, which are used to balance the influence of each item; represents the actual pressure value of the i-th node; represents the target pressure value of the i-th node; represents the total number of nodes in the pipeline network, which is used to measure the deviation between the node pressure and the target pressure in the pipeline network. The smaller the deviation, the higher the fitness; represents the actual flow value of the j-th pipeline; represents the target flow value of the j-th pipeline; represents the total number of pipelines in the pipeline network.
[0132] ;
[0133] Among them, represents the unit length construction cost of the j-th pipeline; represents the length of the k-th pipeline; represents the unit time operation cost of the l-th device; represents the operation time of the l-th device; represents the operation time of the m-th device; represents the total number of pipes in the pipe network; represents the total number of devices in the pipe network.
[0134] ;
[0135] Among them, represents the maximum allowable pressure of the i-th node; represents the maximum allowable flow rate of the j-th pipe, and penalizes the configuration scheme that violates the operating constraints of the pipe network. The higher the degree of violation, the greater the penalty and the lower the fitness; represents the actual pressure value of the i-th node; represents the actual flow rate value of the j-th pipe; n represents the total number of nodes in the pipe network; m represents the total number of pipes in the pipe network; i represents the index of the node, and the value range is 1 ≤ i ≤ n, which is used to traverse all nodes in the pipe network; represents the index of the pipe, and the value range is 1 ≤ j ≤ m, which is used to traverse all pipes in the pipe network.
[0136] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle described in the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An analysis system for gas enterprise operation management, characterized in that: include: The data acquisition module is used to obtain the operating parameters of key nodes of the gas transmission and distribution network, the gas consumption data of the user terminal and the meteorological data of the environmental monitoring point in real time and pre-process them to obtain pre-processed data; The data processing module is used to generate a three-dimensional model of the gas transmission and distribution network using preprocessed data, including: treating each network node as a particle, initializing the position of the particle as a combination of two-dimensional coordinates and elevation data, assigning a velocity vector to each particle, and setting the initial velocity to zero, indicating the moving direction and speed of the particle in the three-dimensional space; defining a fitness function based on the distance between the current node and the target node, the difference between the actual connection length and the expected connection length, the angle between the current node and the adjacent node, and the average angle of the adjacent nodes, and the fitness function is used to evaluate the position of each particle, that is, the node in the three-dimensional space; in each iteration, evaluating the fitness value of each particle according to the fitness function, Update the speed and position of the particles. After the iteration of the particle swarm optimization algorithm is completed, the final optimized particle position is mapped to the three-dimensional space to determine the position of each node in the three-dimensional coordinate system; create a three-dimensional pipe network element model, including pipes, valves and joints, based on the position of each node in the three-dimensional coordinate system and the known pipeline information; assemble the elements into a three-dimensional pipe network model based on the actual connection relationship between the pipe network elements; use the machine learning prediction model to predict the future operation status of the gas transmission and distribution network based on the three-dimensional model to obtain the prediction results, which include the layout of the pipe network, the location of key nodes and the relationship with meteorological conditions; generate a preliminary configuration plan based on the prediction results; The optimization module is used to encode the parameters of the preliminary configuration scheme as "genes" through the genetic algorithm and create a set of initial "populations", that is, multiple possible configuration schemes; iteratively evolve the population, and in each iteration, evaluate the fitness of each individual, where the fitness is determined based on the economic cost of the pipeline network operation, the penalty item for violation of the pipeline network operation constraint conditions, the actual pressure value of the node, the target pressure value of the node, the actual flow value of the pipeline, and the target flow value of the pipeline; select the corresponding individuals for crossover to generate a new population, and after multiple iterations, obtain the final configuration scheme.
2. The analysis system for gas enterprise operation management according to claim 1, characterized in that: Based on the three-dimensional model, the machine learning prediction model is used to predict the future operation status of the gas transmission and distribution network to obtain the prediction results. The prediction results include the layout of the pipeline network, the location of key nodes, and the relationship with meteorological conditions, including: Extract the pipe network layout information from the 3D model, including the length, diameter, material and connection method of the pipes; determine and extract the key node locations in the pipe network, which are branch points, control valves or pressure regulating stations; Acquire and process historical operating data of key nodes, including pressure, flow and temperature data; Obtain real-time meteorological data related to gas transmission and distribution from environmental monitoring points, including temperature, humidity, wind speed and direction, so that the real-time meteorological data can be matched with the timestamps of the pipeline network operation data; The network layout information and key node location data extracted from the 3D model are integrated with the historical operation data to form a preliminary data set; The meteorological data are fused with the preliminary data set so that the pipeline network operation data at each time point correspond to the corresponding meteorological conditions to obtain a fused data set; Preprocess the fused data set and divide the preprocessed data set into a training set, a validation set, and a test set; Use the training set to train the neural network model, and adjust the hyperparameters of the neural network model to optimize the performance of the neural network model; use the validation set to evaluate the performance of the neural network model during the training process to obtain the final prediction model; Input the current three-dimensional model data and real-time environmental meteorological data into the final prediction model to obtain the predicted operating status of each key node of the pipeline network in the future, including the predicted values of pressure and flow.
3. The analysis system for gas enterprise operation management according to claim 2, characterized in that: The meteorological data are fused with the preliminary data set so that the network operation data at each time point corresponds to the corresponding meteorological conditions to obtain a fused data set, including: Determine the number of time points of pipeline operation data, set to M; determine the number of time points of meteorological data, set to N; create a two-dimensional matrix with M rows and N columns to store the similarities between time points; Initially, all elements in the matrix are set to a default value; For each time point of the pipe network operation data, set it to i; for each time point of the meteorological data, set it to j; set the initial distance to 0 at the upper left corner of the DTW matrix, i.e. the starting point; set the first row and the first column of the DTW matrix to infinity, indicating the unreachability between the starting point and the remaining points; starting from the first time point i of the pipe network operation data and the first time point j of the meteorological data, gradually traverse all pairs of time points; for each pair of time points (i, j), extract the corresponding pipe network operation data parameters and meteorological data parameters; calculate the Euclidean distance between the pipe network operation data parameters and the meteorological data parameters; According to the Euclidean distance between the pipe network operation data parameters and the meteorological data parameters and the values of the adjacent cells filled in the DTW matrix, the value of the current cell is updated and moved to the next time point pair until all time point pairs are traversed; The final Euclidean distance value is found at the lower right corner of the DTW matrix, i.e. the end point, which represents the similarity between the entire pipeline network operation data sequence and the entire meteorological data sequence; Fill the similarity between i and j into the corresponding position of the two-dimensional matching matrix, i.e., row i, column j; create a dynamic programming table of the same size as the two-dimensional matching matrix; starting from the upper left corner, gradually fill each element in the dynamic programming table, and the value of each element represents the minimum cumulative similarity from the starting point to the current position; Update the value of the current position according to the minimum cumulative similarity of the previous position and the similarity of the current position, starting from the lower right corner of the dynamic planning table and gradually backtracking to the upper left corner. During the backtracking process, record the grid path passed, which is the final matching path between the pipe network operation data time point and the meteorological data time point; According to the final matching path, determine the meteorological data time point corresponding to each pipe network operation data time point; For each matched pipe network operation data time point, it is merged with the corresponding meteorological data time point into one record to obtain a fused data set.
4. The analysis system for gas enterprise operation management according to claim 3, characterized in that: Based on the prediction results, a preliminary configuration plan is generated, including: Identify parameters important to the operation of the network from the prediction results; Set the goals of the configuration plan according to the operational needs of the gas company; Construct a preliminary configuration plan based on the parameters important to the operation of the pipeline network and the set configuration goals.
5. The analysis system for gas enterprise operation management according to claim 4, characterized in that: The parameters of the preliminary configuration plan include the pressure set points and flow distribution of the pipeline network nodes.
6. The analysis system for gas enterprise operation management according to claim 5, characterized in that: Parameters important to pipeline network operation include pressure at key nodes, flow rate trends, and areas affected by meteorological conditions.
7. An analysis method for gas enterprise operation management, characterized in that: The method is used to execute the system according to any one of claims 1 to 6, and the method comprises: Real-time acquisition of operating parameters of key nodes of the gas transmission and distribution network, gas consumption data of user terminals, and meteorological data of environmental monitoring points, and pre-processing to obtain pre-processed data; Using the preprocessed data, a three-dimensional model of the gas transmission and distribution network is generated; based on the three-dimensional model, a machine learning prediction model is used to predict the future operation status of the gas transmission and distribution network to obtain prediction results, including the layout of the network, the location of key nodes, and the relationship with meteorological conditions; based on the prediction results, a preliminary configuration plan is generated; The parameters of the preliminary configuration scheme are encoded as "genes" through the genetic algorithm, and a set of initial "populations", that is, multiple possible configuration schemes, are created; the population is iteratively evolved, and in each iteration, the fitness of each individual is evaluated, where the fitness is determined based on the economic cost of the pipeline network operation, the actual pressure value of the node, the penalty item for violation of the pipeline network operation constraints, the target pressure value of the node, the actual flow value of the pipeline, and the target flow value of the pipeline; the corresponding individuals are selected for crossover to generate a new population, and after multiple iterations, the final configuration scheme is obtained.
8. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to claim 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, which implements the method according to claim 7 when executed by a processor.
Citation Information
Patent Citations
Method for optimizing gravity flow water conveying pipeline valve closing scheme screening based on genetic algorithm
CN113887042A
Municipal pipe network health degree online monitoring system based on big data
CN118014185A
Network fault tracing method based on large model knowledge enhancement
CN118337609A