Natural gas pipeline network intelligent operation scheduling method and system based on user priority
By combining edge computing and blockchain technology, the bottleneck of computing resources and data security issues in the natural gas pipeline network scheduling system have been solved, achieving efficient and reliable user priority scheduling and improving the efficiency and security of pipeline network operation.
Patent Information
- Application Number
- CN202510715129.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Traditional natural gas pipeline network dispatching systems suffer from bottlenecks in computing resources, lack of user priority management mechanisms, and insufficient data security, resulting in low dispatching efficiency and poor system reliability.
A user-priority-based intelligent operation and scheduling method for natural gas pipeline networks is adopted. Through distributed training of edge computing nodes and blockchain technology, computing tasks are allocated and data is securely encrypted to generate optimized control instructions.
It improves the computing efficiency and response speed of pipeline network operation, ensures data security and reliability, realizes intelligent control of natural gas pipeline network, and guarantees users' gas supply needs.
Smart Images

Figure CN120653389B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to natural gas technology, in particular to a natural gas pipeline network intelligent operation scheduling method and system based on user priority. BACKGROUND
[0002] With the widespread use of natural gas as a clean energy source, the scale of natural gas pipeline networks is continuously expanding, and the operation and management is becoming increasingly complex. Natural gas pipeline network intelligent operation scheduling is a key technology for ensuring energy supply safety and improving pipeline network operation efficiency. Traditional natural gas pipeline network scheduling mainly relies on manual experience and simple calculation models, which is difficult to adapt to the operation needs of modern complex pipeline networks. In recent years, with the development of emerging technologies such as the Internet of Things, edge computing, and blockchain, new technical means and solutions have been provided for the intelligent scheduling of natural gas pipeline networks.
[0003] In the prior art, the scheduling system of natural gas pipeline networks usually adopts a centralized computing architecture, which uniformly transmits the collected pipeline network data to a central server for processing and analysis, and then issues control instructions. This approach has many problems in practical application: first, the centralized computing architecture faces a computing resource bottleneck, when the scale of the pipeline network expands and the amount of data increases, the central server's computing burden is too heavy, it is difficult to respond to network state changes in real time, resulting in low scheduling efficiency; second, the traditional scheduling system lacks an effective user priority management mechanism, and cannot develop differentiated gas supply strategies according to the importance of different users, and cannot guarantee the gas demand of key users when gas supply is tight; finally, the existing system lacks data security protection mechanisms, pipeline network operation data is easily tampered with or lost, system reliability and security cannot be guaranteed, and cannot meet the safe operation requirements of critical infrastructure. SUMMARY
[0004] The embodiments of the present application provide a natural gas pipeline network intelligent operation scheduling method and system based on user priority, which can solve the problems in the prior art.
[0005] In a first aspect of the embodiments of the present application, a natural gas pipeline network intelligent operation scheduling method based on user priority is provided, comprising:
[0006] Collecting pressure data, flow data, temperature data, and user gas consumption data of a plurality of edge computing nodes in a natural gas pipeline network;
[0007] According to the geographical location information and network topology structure of the edge computing nodes, the edge computing nodes are divided into a plurality of computing sub-networks; based on the computing capacity and communication delay of the nodes within each computing sub-network, the computing weight coefficient of each node is set; the edge computing nodes within each sub-network are distributedly trained to obtain the computing task allocation coefficient of each node; a computing task allocation scheme is generated according to the computing task allocation coefficient and the computing weight coefficient.
[0008] According to the computing task allocation scheme, the pipe network optimization computing task is allocated to each edge computing node, parallel computing is performed to obtain a pipe network state parameter;
[0009] The computing task allocation scheme is written into a block chain to construct a computing task transaction block; the pipe network state parameter is signed and encrypted based on a timestamp, and consistency verification is performed on the encrypted pipe network state parameter through a voting mechanism;
[0010] According to the pipe network state parameter, pressure regulation parameters, flow regulation parameters and valve opening parameters of each pipe network node are calculated, pipe network optimization control instructions are generated, the pipe network optimization control instructions are executed, and intelligent control of the natural gas pipe network is realized.
[0011] Based on the computing capability and communication delay of each node in the computing subnetwork, a computing weight coefficient of each node is set; distributed training is performed on the edge computing nodes in each subnetwork to obtain a computing task allocation coefficient of each node, including:
[0012] Obtain computing resource usage data, communication performance data and running state data of the edge computing node;
[0013] Based on the computing resource usage data, a base weight value of the edge computing node is calculated according to a preset resource weight coefficient; based on the communication performance data, a communication weight value of the edge computing node is calculated using an exponential decay function; based on the running state data, a health degree value of the edge computing node is calculated through time sequence feature analysis; the base weight value, the communication weight value and the health degree value are combined by weighting to obtain a comprehensive weight value;
[0014] According to the comprehensive weight value, a training task allocation proportion of the edge computing node is calculated; based on the training task allocation proportion, training data is allocated to the edge computing node; model training is performed on the edge computing node using the training data to obtain a local training model; the local training model is weighted and aggregated according to the comprehensive weight value and the health degree value to obtain a global training model;
[0015] Based on the global training model, a dynamic load balancing factor of the edge computing node is calculated, the dynamic load balancing factor is proportional to the comprehensive weight value and the health degree value; according to the training task allocation proportion, the dynamic load balancing factor and the change rate of the health degree value, a computing task allocation coefficient of the edge computing node is generated.
[0016] Based on the training task allocation proportion, training data is allocated to the edge computing node; model training is performed on the edge computing node using the training data to obtain a local training model, including:
[0017] obtaining a feature vector and a sample weight of a training sample set, calculating a global feature representation according to the feature vector and the sample weight, training a teacher model by using the global feature representation to obtain knowledge representation data of the teacher model;
[0018] preliminarily dividing the training data based on the training task distribution ratio, calculating a correlation coefficient between the global feature representation and a local feature of each edge computing node, optimizing the preliminary division result of the training data according to the correlation coefficient and the knowledge representation data to obtain an optimized training data distribution scheme;
[0019] distributing the training data to each edge computing node according to the optimized training data distribution scheme, calculating an adaptive distillation intensity coefficient of each edge computing node based on the correlation coefficient, constructing a local training loss function by using the adaptive distillation intensity coefficient, and performing model training on each edge computing node based on the local training loss function and the knowledge representation data;
[0020] obtaining training convergence data of each edge computing node in the process of the model training, dynamically adjusting a training temperature parameter according to the training convergence data, calculating a knowledge migration degree between the teacher model and the model of each edge computing node, dynamically adjusting the optimized training data distribution scheme based on the knowledge migration degree to obtain a local training model of each edge computing node.
[0021] distributing the pipe network optimization calculation task to each edge computing node according to the calculation task distribution scheme, and performing parallel calculation to obtain the pipe network state parameter, including:
[0022] analyzing a data dependency relationship between related calculation tasks based on the calculation task distribution scheme, collecting real-time communication latency between edge computing nodes performing related calculation tasks, constructing a node communication cost matrix according to the data dependency relationship and the real-time communication latency, optimizing and adjusting the calculation task distribution scheme by using the node communication cost matrix, and generating a final calculation task distribution scheme;
[0023] downloading the final calculation task distribution scheme to each edge computing node, and each edge computing node performing parallel calculation of the pipe network state parameter according to the calculation task type and the calculation resource distribution ratio specified in the final calculation task distribution scheme, and integrating the parallel calculation results of each edge computing node to obtain complete pipe network state parameters.
[0024] writing the calculation task distribution scheme into a block chain to construct a calculation task transaction block; signing and encrypting the pipe network state parameter based on a time stamp, and verifying the consistency of the encrypted pipe network state parameter through a voting mechanism, including:
[0025] generate a task information sequence containing a task identifier, an allocation scheme, a timestamp and a previous block hash, perform a hash concatenation operation on the task information sequence, block metadata and node signatures to generate a computing task transaction block, verify the link relationship between adjacent computing task transaction blocks using a public key, and generate a blockchain integrity verification result;
[0026] confirm the validity of the computing task transaction block according to the blockchain integrity verification result, associate a state parameter with the timestamp and encrypt the state parameter using a symmetric key to obtain an encrypted state parameter, perform a hash calculation on the encrypted state parameter and generate multi-signature data using the private keys of multiple nodes, dynamically adjust the encryption key length in an exponential decay manner based on the communication time interval between nodes and the system security risk degree, and update the encryption strength of the encrypted state parameter;
[0027] obtain historical reputation values and real-time computing capability indicators of participating verification nodes, calculate node voting weights according to the historical reputation values and the real-time computing capability indicators, perform consistency voting verification on the encrypted state parameter using the node voting weights and the multi-signature data, dynamically adjust the consensus threshold of the consistency verification according to the number of faulty nodes in the system and historical consensus degree data, and generate a verification result.
[0028] generate a computing task transaction block by performing a hash concatenation operation on the task information sequence, block metadata and node signatures, verify the link relationship between adjacent computing task transaction blocks using a public key, and generate a blockchain integrity verification result, which includes:
[0029] extract feature data containing a task identifier, block metadata and node signatures from the task information sequence, calculate the computational complexity and security strength of the feature data, and generate a feature fitness evaluation value;
[0030] select a basic hash function based on the feature fitness evaluation value, dynamically optimize the basic hash function using an exponentially decaying mutation step size, introduce a random mutation factor to construct an evolutionary hash algorithm, calculate the attack resistance ability and group diversity indicators of blockchain nodes, and generate a group immunity strength based on the attack resistance ability and the group diversity indicators;
[0031] perform a hash concatenation operation on the task information sequence, the block metadata and the node signatures using the evolutionary hash algorithm, adjust the hash concatenation operation parameters according to the group immunity strength, and generate a computing task transaction block;
[0032] A block verification strategy is constructed based on the evolutionary hash algorithm and the group immunity strength, and a link relationship between adjacent computing task transaction blocks is verified by using a public key according to the block verification strategy, so as to generate a block chain integrity verification result.
[0033] The pressure regulating parameter, the flow regulating parameter and the valve opening parameter of each pipe network node are calculated according to the pipe network state parameter, and pipe network optimization control instructions are generated, including:
[0034] The pressure parameter, the flow parameter and the valve parameter of the pipe network node are feature-encoded to generate a node state vector, and a multi-mode agent including a path optimization function, a flow balance function and a collaborative optimization function is constructed based on the node state vector;
[0035] The pressure gradient and the pheromone strength are extracted from the multi-mode agent to calculate a path optimization parameter, the flow balance parameter is generated by combining the path optimization parameter and the flow deviation value of the node and the group behavior characteristics, and the collaborative decision parameter is generated by combining the flow balance parameter and the information propagation function and the exploration function;
[0036] The pressure regulating parameter, the flow regulating parameter and the valve opening parameter are calculated according to the path optimization parameter, the flow balance parameter and the collaborative decision parameter respectively, and the pipe network optimization control instructions are generated by combining the pressure regulating parameter, the flow regulating parameter and the valve opening parameter.
[0037] In a second aspect of the embodiment of the present application, a natural gas pipe network intelligent operation scheduling system based on user priority is provided, including:
[0038] A first unit is configured to collect pressure data, flow data, temperature data and user gas data of a plurality of edge computing nodes in a natural gas pipe network.
[0039] A second unit is configured to divide the edge computing nodes into a plurality of computing sub-networks according to geographical position information and network topology structure of the edge computing nodes, set a computing weight coefficient of each node based on computing capability and communication delay of nodes in each computing sub-network, perform distributed training on the edge computing nodes in each sub-network to obtain a computing task allocation coefficient of each node, and generate a computing task allocation scheme according to the computing task allocation coefficient and the computing weight coefficient.
[0040] A third unit is configured to allocate pipe network optimization computing tasks to each edge computing node according to the computing task allocation scheme, and perform parallel computing to obtain pipe network state parameters.
[0041] a fourth unit configured to write the computing task allocation scheme into a blockchain and build a computing task transaction block, sign and encrypt the pipe network state parameters based on a timestamp, and verify the consistency of the encrypted pipe network state parameters through a voting mechanism;
[0042] a fifth unit configured to calculate pressure adjustment parameters, flow adjustment parameters and valve opening parameters of each pipe network node according to the pipe network state parameters, generate pipe network optimization control instructions, execute the pipe network optimization control instructions, and realize intelligent control of the natural gas pipe network.
[0043] In a third aspect, the embodiment of the present application provides an electronic device, comprising:
[0044] a processor;
[0045] a memory for storing processor-executable instructions;
[0046] The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0047] In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.
[0048] The present application has the following advantages:
[0049] The natural gas pipe network intelligent operation scheduling method based on user priority provided by the present application realizes efficient utilization of computing resources by collecting data of multiple edge computing nodes and performing distributed computing, and improves the computing efficiency and response speed of pipe network operation scheduling.
[0050] The present application writes the computing task allocation scheme into a blockchain and verifies the consistency through a voting mechanism, ensuring the safety and reliability of data, effectively preventing data tampering and network attacks, and improving the stability and safety of pipe network operation.
[0051] The present application automatically calculates adjustment parameters according to pipe network state parameters and generates optimization control instructions, realizes intelligent control of the natural gas pipe network, reduces manual intervention, reduces operation and maintenance costs, improves the reliability and gas efficiency of pipe network operation, and guarantees the gas supply demand of users. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 The flowchart of the natural gas pipe network intelligent operation scheduling method based on user priority of the embodiment of the present application is shown in the figure.
[0053] Figure 2 The flowchart of the edge computing node distributed training and task allocation system of the embodiment of the present application is shown in the figure.
[0054] Figure 3 An adaptive distillation strength coefficient and correlation coefficient relationship analysis schematic diagram for an embodiment of the present application;
[0055] Figure 4 A blockchain consistency verification flowchart based on multiple signatures for an embodiment of the present application;
[0056] Figure 5 A pipe network optimization control method efficiency comparison analysis column chart for an embodiment of the present application. DETAILED DESCRIPTION
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in a clear, complete manner with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0058] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.
[0059] Figure 1 A flowchart of a natural gas pipe network intelligent operation scheduling method based on user priority for an embodiment of the present application, as shown in Figure 1 The method comprises the following steps.
[0060] Collecting pressure data, flow data, temperature data, and user gas data of a plurality of edge computing nodes in a natural gas pipe network;
[0061] According to geographical position information and network topology structure of the edge computing nodes, the edge computing nodes are divided into a plurality of computing sub-networks; based on computing capability and communication delay of nodes in each computing sub-network, a computing weight coefficient of each node is set; the edge computing nodes in each sub-network are distributedly trained to obtain a computing task allocation coefficient of each node; a computing task allocation scheme is generated according to the computing task allocation coefficient and the computing weight coefficient;
[0062] According to the computing task allocation scheme, a pipe network optimization computing task is allocated to each edge computing node, and a parallel computation is performed to obtain a pipe network state parameter;
[0063] Write the computing task allocation scheme into the blockchain, build a computing task transaction block; Sign and encrypt the pipe network state parameters based on the timestamp, and verify the consistency of the encrypted pipe network state parameters through a voting mechanism;
[0064] According to the pipe network state parameters, the pressure regulation parameters, the flow regulation parameters and the valve opening parameters of each pipe network node are calculated, the pipe network optimization control instruction is generated, the pipe network optimization control instruction is executed, and the intelligent control of the natural gas pipe network is realized.
[0065] In an optional implementation, based on the computing capability and communication delay of each node in each computing subnetwork, a computing weight coefficient of each node is set; the edge computing nodes in each subnetwork are distributedly trained to obtain a computing task allocation coefficient of each node, including:
[0066] Obtain the computing resource usage data, communication performance data and running state data of the edge computing node;
[0067] Based on the computing resource usage data, a base weight value of the edge computing node is calculated according to a preset resource weight coefficient; based on the communication performance data, a communication weight value of the edge computing node is calculated using an exponential decay function; based on the running state data, a health degree value of the edge computing node is calculated through time sequence feature analysis; the base weight value, the communication weight value and the health degree value are combined by weighting to obtain a comprehensive weight value;
[0068] According to the comprehensive weight value, a training task allocation proportion of the edge computing node is calculated; based on the training task allocation proportion, training data is allocated to the edge computing node; using the training data, model training is performed on the edge computing node to obtain a local training model; according to the comprehensive weight value and the health degree value, the local training model is weighted and aggregated to obtain a global training model;
[0069] Based on the global training model, a dynamic load balancing factor of the edge computing node is calculated, and the dynamic load balancing factor is proportional to the comprehensive weight value and the health degree value; according to the training task allocation proportion, the dynamic load balancing factor and the change rate of the health degree value, a computing task allocation coefficient of the edge computing node is generated.
[0070] As shown in Figure 2 The method comprises:
[0071] The computing weight coefficient of each node in each computing subnetwork is set, and then the edge computing nodes in each subnetwork are distributedly trained to finally obtain the computing task allocation coefficient of each node.
[0072] In implementation, the system collects the computing resource usage data, communication performance data and running state data of each edge computing node through the network management module. The computing resource usage data includes CPU usage, memory occupancy, storage space usage, etc.; the communication performance data includes network bandwidth, communication delay, packet loss rate, etc.; the running state data includes node online duration, failure rate, response time, etc.
[0073] Based on the collected computing resource usage data, the system calculates the basic weight value of the edge computing node according to the preset resource weight coefficient. For example, assuming that the CPU usage of a node is 60%, the memory occupancy is 40%, and the storage space usage is 30%, and the weight coefficients of the three resources are 0.5, 0.3 and 0.2 respectively, then the basic weight value of the node is calculated as: (1-0.6)×0.5+(1-0.4)×0.3+(1-0.3)×0.2=0.48, which means that the node has 48% of resources available for new tasks.
[0074] For communication performance data, the system uses an exponential decay function to calculate the communication weight value of the edge computing node. The lower the communication delay, the higher the weight value; the higher the communication delay, the weight value decreases exponentially. For example, assuming that the communication delay of a node is 50 milliseconds, the system sets the reference delay to 20 milliseconds and the decay factor to 0.05, then the communication weight value of the node can be calculated as the result of exponential decay: 0.8, which means the influence coefficient of communication performance on task allocation.
[0075] For running state data, the system calculates the health value of the edge computing node through time series feature analysis. Time series feature analysis includes observing the state changes of the node in the past 24 hours, calculating failure rate, response time fluctuation and other indicators. For example, if the node has 2 short offline in the past 24 hours, and the average response time fluctuation is within 15%, then the health value can be calculated as 0.85, which means the stability and reliability of the node.
[0076] The basic weight value, communication weight value and health value are combined by weighting to obtain the comprehensive weight value. Assuming that the combination weights of the three are 0.4, 0.3 and 0.3 respectively, then the comprehensive weight value of the node is: 0.48×0.4+0.8×0.3+0.85×0.3=0.687, which represents the comprehensive strength level of the node in the entire distributed system.
[0077] According to the calculated comprehensive weight values, the system calculates the training task allocation proportions of the edge computing nodes. For example, in a sub-network containing 5 nodes, if the comprehensive weight values of these nodes are 0.687, 0.725, 0.634, 0.712 and 0.690 respectively, then according to the weight proportions, the system allocates 19.9%, 21.0%, 18.4%, 20.6% and 20.0% of the training tasks to these nodes respectively.
[0078] Based on the training task allocation proportions, the system allocates training data to the edge computing nodes. Assuming there are 10000 training samples, the above five nodes are allocated 1990, 2100, 1840, 2060 and 2000 training samples respectively. Each node uses the allocated training data to perform model training and obtains its own local training model.
[0079] After the training is completed, the system performs weighted aggregation on the local training models according to the comprehensive weight values and health degree values of each node to obtain a global training model. The aggregation weight can be determined by the product of the comprehensive weight value and the health degree value, and after normalization processing, it is used for weighted average of model parameters. For example, if the comprehensive weight value of a node is 0.687 and the health degree value is 0.85, then its aggregation weight is 0.687 x 0.85 = 0.584, which is used for aggregation calculation of the global model after normalization processing.
[0080] Based on the global training model, the system calculates a dynamic load balancing factor for the edge computing nodes, which is proportional to the comprehensive weight value and the health degree value. For example, if the comprehensive weight value of a node is 0.687 and the health degree value is 0.85, the dynamic load balancing factor can be set to 0.687 x 0.85 x 1.2 = 0.700, where 1.2 is an adjustment coefficient used to control the flexibility of load allocation.
[0081] According to the training task allocation proportion, the dynamic load balancing factor and the change rate of the health degree value, the system generates a calculation task allocation coefficient for the edge computing nodes. For example, if the training task allocation proportion of a node is 19.9%, the dynamic load balancing factor is 0.700, and the health degree value has increased by 5% compared with the previous period, then the calculation task allocation coefficient can be calculated as: 19.9% x 0.700 x 1.05 = 14.6%. This coefficient will be used for the allocation of subsequent actual calculation tasks, ensuring that the system resources are fully utilized while maintaining the relative balance of the loads of each node.
[0082] Through the above method, the system can dynamically adjust the allocation of calculation tasks according to the actual capabilities and states of the edge computing nodes, improve the efficiency of distributed computing, reduce communication overhead, and enhance the stability and reliability of the system.
[0083] In an optional implementation, the training data is allocated to the edge computing nodes based on the training task allocation proportion; and model training is performed on the edge computing nodes using the training data to obtain a local training model, which comprises:
[0084] The feature vectors and sample weights of the training sample set are obtained, the global feature representation is calculated according to the feature vectors and the sample weights, the teacher model is trained using the global feature representation to obtain knowledge representation data of the teacher model;
[0085] The training data is preliminarily divided based on the training task allocation proportion, the correlation coefficient between the global feature representation and the local features of each edge computing node is calculated, the preliminary division result of the training data is optimized according to the correlation coefficient and the knowledge representation data to obtain an optimized training data allocation scheme;
[0086] The training data is allocated to each edge computing node according to the optimized training data allocation scheme, the adaptive distillation intensity coefficient of each edge computing node is calculated based on the correlation coefficient, the local training loss function is constructed using the adaptive distillation intensity coefficient, and model training is performed on each edge computing node based on the local training loss function and the knowledge representation data;
[0087] The training convergence data of each edge computing node is obtained in the process of model training, the training temperature parameter is dynamically adjusted according to the training convergence data, the knowledge migration degree between the teacher model and the model of each edge computing node is calculated, the optimized training data allocation scheme is dynamically adjusted based on the knowledge migration degree to obtain the local training model of each edge computing node.
[0088] A training sample set containing a plurality of samples is obtained, each sample having a corresponding feature vector and sample weight. For the training sample set, the system calculates a global feature representation. The calculation method is to perform weighted averaging on the feature vectors of all samples, and the weight is the sample weight of each sample. For example, if there are 1000 samples, each sample has a 128-dimensional feature vector and a sample weight between 0 and 1, then by performing weighted averaging on these feature vectors according to the weights, a global feature representation vector is obtained.
[0089] The teacher model is trained using the global feature representation. The training process adopts a standard deep learning model training process, including forward propagation, loss calculation and back propagation. After training, the knowledge representation data is extracted from the teacher model, including model parameters and feature representations. This knowledge representation data will be used to guide the model training of the edge nodes. For example, the teacher model can be a deep neural network with 5 million parameters, and the model parameters and the output features of each layer after training constitute the knowledge representation data.
[0090] Based on the predetermined training task allocation ratio, the system preliminarily divides the training data. For example, if there are 3 edge computing nodes and the allocation ratio is 3:4:3, then among the total of 10000 training samples, 3000 are allocated to node A, 4000 to node B, and 3000 to node C.
[0091] The correlation coefficient between the global feature representation and the local feature of each edge computing node is calculated. The specific calculation method is: for each edge node, the local feature representation of the allocated data is calculated (calculated in the same way as the global feature representation), and then the cosine similarity between the local feature representation and the global feature representation is calculated to obtain the correlation coefficient. For example, the correlation coefficient of node A is 0.85, that of node B is 0.78, and that of node C is 0.92.
[0092] Based on the correlation coefficient and the knowledge representation data, the system optimizes the preliminary division result of the training data. The optimization rule is: the higher the correlation coefficient, the more samples similar to the global feature are allocated to the node; the lower the correlation coefficient, the more samples related to the knowledge representation of the teacher model are allocated to the node to promote knowledge transfer. In this way, the preliminary division is adjusted to allocate 3200 samples to node A, 3600 samples to node B, and 3200 samples to node C.
[0093] According to the optimized training data allocation scheme, the training data is allocated to each edge computing node. At the same time, the adaptive distillation intensity coefficient of each edge computing node is calculated based on the correlation coefficient. The calculation method is: the lower the correlation coefficient, the greater the distillation intensity coefficient, to enhance the knowledge transfer strength. For example, the distillation intensity coefficient of node A is 0.3, that of node B is 0.4, and that of node C is 0.2.
[0094] The adaptive distillation intensity coefficient is used to construct a local training loss function. The loss function consists of two parts: standard task loss and knowledge distillation loss. The weight of the knowledge distillation loss is determined by the adaptive distillation intensity coefficient. For example, if the standard task loss is cross-entropy loss with a value of 1.2 and the knowledge distillation loss value is 0.8, and the distillation intensity coefficient of node A is 0.3, then the total loss of node A is 1.2+0.3×0.8=1.44.
[0095] Based on the local training loss function and the knowledge representation data, the system performs model training on each edge computing node. During the training process, the model parameters of each node are updated according to the local data and the loss function, while learning from the knowledge representation of the teacher model.
[0096] During the model training process, the system continuously obtains the training convergence data of each edge computing node, including the loss value change and model performance indicators of each training round. According to these convergence data, the system dynamically adjusts the training temperature parameter. The temperature parameter adjustment rule is: for the nodes that converge slowly, increase the temperature parameter value, so that the knowledge distillation is more "softened"; for the nodes that converge quickly, reduce the temperature parameter value. For example, the convergence speed of node A is slow, and the temperature parameter is adjusted from the initial value 2.0 to 2.5; the convergence speed of node B is moderate, and the temperature parameter 2.0 remains unchanged; the convergence speed of node C is fast, and the temperature parameter is adjusted to 1.8.
[0097] The system calculates the knowledge migration degree between the teacher model and the model of each edge computing node. The calculation method is: comparing the consistency between the output of the edge node model and the output of the teacher model under the same input. For example, for the same 100 test samples, the output consistency of the teacher model and the node A model is 85%, which indicates that the knowledge migration degree is 0.85.
[0098] Based on the knowledge migration degree, the system dynamically adjusts the optimized training data allocation scheme. The adjustment rule is: for the nodes with low knowledge migration degree, more samples similar to the knowledge representation of the teacher model are allocated; for the nodes with high knowledge migration degree, such samples can be reduced. Through this dynamic adjustment, the system ensures that each node can fully learn the knowledge of the teacher model. Finally, the system obtains local training models on each edge computing node, and these models all have good performance and similar knowledge representation to the teacher model.
[0099] Figure 3 The adaptive distillation strength coefficient and the correlation coefficient relationship analysis diagram of the embodiment of the present application is as follows:
[0100] The figure shows the performance curves of three different distillation strength strategies (adaptive distillation strength, fixed distillation strength-0.5, and fixed distillation strength-0.8) with respect to the feature correlation coefficient. The adaptive distillation strength strategy shows a stable upward trend, starting from 0.35 at a feature correlation coefficient of 0, passing through 0.67 (coefficient 0.3), 0.89 (coefficient 0.6), and finally reaching an optimal performance of 1.00 at a coefficient of 0.9. The fixed distillation strength-0.5 strategy shows a clear downward trend, starting from an initial 0.90 and gradually decreasing to 0.50, with a minimum of about 0.1 at a correlation coefficient of 0.7. The fixed distillation strength-0.8 strategy exhibits a slow growth trend, starting from 0.00 at a coefficient of 0, passing through 0.30 (coefficient 0.3), 0.60 (coefficient 0.6), and finally reaching 0.85 at a coefficient of 0.9. The data clearly shows that the adaptive distillation strength strategy performs significantly better in the high feature correlation interval (0.6-0.9), while it is relatively weak in the low correlation interval (0-0.3), but the overall performance curve is the most stable, showing good adaptability and robustness. The chart uses a line chart form, with different markers clearly distinguishing the three strategies, and intuitively showing the performance trend in the entire feature correlation range.
[0101] In an optional implementation, according to the computing task allocation scheme, the pipe network optimization computing task is allocated to each edge computing node, and parallel computing is performed to obtain the pipe network state parameter, including:
[0102] Based on the data dependency relationship between the related computing tasks, the real-time communication delay between the edge computing nodes performing the related computing tasks is collected, a node communication cost matrix is constructed according to the data dependency relationship and the real-time communication delay, the computing task allocation scheme is optimized and adjusted by using the node communication cost matrix, and a final computing task allocation scheme is generated;
[0103] The final computing task allocation scheme is issued to each edge computing node, and each edge computing node performs parallel computing of the pipe network state parameter according to the computing task type and the computing resource allocation proportion specified in the final computing task allocation scheme, and integrates the parallel computing results of each edge computing node to obtain complete pipe network state parameters.
[0104] The computation task allocation scheme optimization process begins with analyzing the data dependency relationships between computation tasks. The system first decomposes the pipe network optimization computation tasks and identifies sets of interdependent computation tasks. For example, in hydraulic computation, node pressure calculation depends on flow distribution calculation, and flow balance calculation depends on node pressure results. The system represents these dependencies by constructing a directed acyclic graph, where the graph's vertices represent computation tasks and edges represent data flow. For a specific pipe network system, assume there are five computation tasks: flow initialization (T1), node pressure calculation (T2), flow balance calculation (T3), water quality analysis (T4), and energy consumption calculation (T5). Through analysis, the data dependency relationships are obtained: T1→T2→T3, T2→T4, T3→T5.
[0105] Real-time communication latency between edge computing nodes performing related computation tasks is collected. In a distributed edge computing environment, communication latency between edge nodes has a significant impact on computation efficiency. The system deploys a network probe module to measure the round-trip time between each edge computing node by sending probe data packets. During measurement, the system performs multiple measurements at different time periods (e.g., peak and off-peak periods) to obtain more accurate latency data. For example, in a system containing four edge nodes (E1, E2, E3, E4), the measured communication latency data (in milliseconds) is: E1-E2: 15ms, E1-E3: 25ms, E1-E4: 20ms, E2-E3: 18ms, E2-E4: 22ms, E3-E4: 16ms.
[0106] Based on the data dependency relationships and real-time communication latency, the system constructs a node communication cost matrix. This matrix is an n x n matrix (n is the number of edge computing nodes), where each element in the matrix represents the communication cost required to transfer a unit of data between two nodes. The cost calculation considers factors such as communication latency, bandwidth resource occupation, and network stability. For the example of the four edge nodes mentioned above, the node communication cost matrix C can be represented as: C[i,j] represents the cost of transmitting data from node i to node j. Based on the measured latency data and considering network bandwidth conditions, the system generates the communication cost matrix, where C[1,2] = 1.5, C[1,3] = 2.5, C[1,4] = 2.0, C[2,3] = 1.8, C[2,4] = 2.2, C[3,4] = 1.6 (diagonal elements are 0, representing no cost for self-communication).
[0107] The node communication cost matrix is used to optimize and adjust the computation task allocation scheme. The system uses a heuristic algorithm for task scheduling optimization, which considers the data dependency relationships between tasks, communication costs, and the computing capabilities of each edge node. The goal of the algorithm is to minimize the overall completion time, i.e., the time from the start of the first task to the completion of the last task.
[0108] For the above pipe network calculation tasks and edge nodes, the initial allocation scheme is: T1 is allocated to E1, T2 is allocated to E2, T3 is allocated to E3, T4 is allocated to E4, and T5 is allocated to E1. By considering the node communication cost matrix, the system finds that there is data transmission between T2 and T4, and the communication cost between E2 and E4 is high. Therefore, the system adjusts the allocation scheme and allocates T4 to E2, thereby reducing the communication overhead. The adjusted scheme is: T1 is allocated to E1, T2 is allocated to E2, T3 is allocated to E3, T4 is allocated to E2, and T5 is allocated to E1.
[0109] The final calculation task allocation scheme is issued to each edge computing node. The scheme issuing process adopts a reliable communication protocol to ensure that the task allocation instructions are accurately conveyed. The instructions received by each edge computing node contain information such as the type of calculation task it needs to perform, the source of input data, the allocation proportion of computing resources, and the target of result output. For example, the instructions received by node E2 contain: perform T2 and T4 tasks, the input data of T2 comes from the calculation result of T1 of E1, allocate 60% of the computing resources to T2 and 40% to T4, the result of T2 needs to be transmitted to E3 for T3 calculation, and the result of T4 needs to be uploaded to the central server.
[0110] Each edge computing node performs parallel calculation of pipe network state parameters according to the calculation task type and computing resource allocation proportion specified in the final calculation task allocation scheme. Each node dynamically adjusts computing resources such as CPU core number and memory usage according to the characteristics of the allocated tasks. For computationally intensive tasks, the system will allocate more computing resources; for data-intensive tasks, the system will optimize data storage and access strategies. Taking node E3 performing T3 task as an example, the node will allocate 6 CPU cores for flow balance calculation and establish an efficient data caching mechanism to speed up the processing of frequently accessed data.
[0111] The complete pipe network state parameters are obtained by integrating the parallel calculation results of each edge computing node. The result integration process adopts a data aggregation method to collect the calculation results scattered in each node into the central processing unit according to the predetermined data format and protocol. The system performs consistency verification on the received results to ensure the integrity and accuracy of the data. For data loss or inconsistency, the system will trigger the corresponding error handling mechanism, such as requesting re-computation or using backup data sources.
[0112] The final integrated pipe network state parameters include pipe segment flow (e.g., a pipe segment flow of 0.8 cubic meters per second), node pressure (e.g., a node pressure of 0.6 MPa), water quality indicators (e.g., a residual chlorine content of 0.5 mg / L), and system energy consumption data (e.g., a pump station energy consumption of 85 kWh), and the like, which collectively constitute a complete description of the pipe network operating state and provide a basis for decision-making for subsequent pipe network optimization control.
[0113] In an optional embodiment, the computing task allocation scheme is written into the blockchain to construct a computing task transaction block; the pipe network state parameters are signed and encrypted based on a timestamp, and the encrypted pipe network state parameters are verified for consistency through a voting mechanism, including:
[0114] A task information sequence containing a task identifier, an allocation scheme, a timestamp, and a previous block hash is generated, the task information sequence is subjected to a hash connection operation with block metadata and node signatures to generate a computing task transaction block, a public key is used to verify the link relationship between adjacent computing task transaction blocks to generate a blockchain integrity verification result;
[0115] The validity of the computing task transaction block is confirmed according to the blockchain integrity verification result, a state parameter is associated with the timestamp and encrypted using a symmetric key to obtain an encrypted state parameter, a hash calculation is performed on the encrypted state parameter and a multi-signature data is generated using private keys of multiple nodes, an encryption key length is dynamically adjusted in an exponential decay manner based on a communication time interval between nodes and a system security risk degree to update the encryption strength of the encrypted state parameter;
[0116] A historical credit value and a real-time computing capability indicator of a participating verification node are obtained, a node voting weight is calculated according to the historical credit value and the real-time computing capability indicator, the encrypted state parameter is subjected to consistency voting verification using the node voting weight and the multi-signature data, a consensus threshold for consistency verification is dynamically adjusted according to a number of faulty nodes in the system and historical consensus degree data, and a verification result is generated.
[0117] As shown in Figure 4 the method includes:
[0118] A computing task allocation scheme is written into the blockchain to construct a computing task transaction block, and then pipe network state parameters are signed and encrypted based on a timestamp, and the encrypted pipe network state parameters are subjected to consistency verification through a voting mechanism.
[0119] In the process of constructing the computing task transaction block, the system generates a task information sequence containing the task identifier, allocation scheme, timestamp, and previous block hash. The task identifier is a unique string "Task-GWJSCN20230612001", the allocation scheme contains the node ID and task allocation relationship, such as "{Node1:TaskA, Node2:TaskB, Node3:TaskC}", the timestamp is in UTC format "2023-06-12T10:15:30Z", and the previous block hash value is a 64-bit hexadecimal string "8f7d6e5c4b3a2910".
[0120] The task information sequence is connected with the block metadata and node signature through hash connection operation to generate the computing task transaction block. The block metadata contains version number "1.0", difficulty value "3", transaction count "15", etc. The node signature is generated by the ECDSA algorithm. The connection operation generates a hash value like "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b" as the block identifier through the SHA-256 hash algorithm.
[0121] When verifying the link relationship between adjacent computing task transaction blocks using the public key, the system compares the previous block hash in the current block with the hash value of the previous block and verifies the node signature in the previous block. If the comparison result is consistent and the signature is valid, the block chain integrity verification result with value "Valid" is generated; otherwise, the value "Invalid" is generated and the abnormal reason is recorded.
[0122] According to the block chain integrity verification result, the validity of the computing task transaction block is confirmed. When the verification result is "Valid", the system associates the pipe network state parameters with the timestamp and encrypts them using the symmetric key. The pipe network state parameters include flow parameter "120.5m 3 / h", pressure parameter "0.65MPa", temperature parameter "25.3℃", etc. The system uses the AES-256 algorithm to encrypt the associated parameters with the key "k7dJq9sM3pR5tX2z" to generate encrypted state parameters. The encrypted state parameters are subjected to SHA-256 hash calculation to obtain a hash value, and the hash value is signed using the private keys of at least three nodes to generate multi-signature data.
[0123] The encryption key length is dynamically adjusted in an exponential decay manner based on the communication time interval between nodes and the system security risk degree. When the communication time interval between nodes exceeds the threshold of 500 milliseconds, or the system security risk degree is greater than 0.6, the key length increases from the original 256 bits to 512 bits; when the communication time interval between nodes is less than the threshold of 200 milliseconds, and the system security risk degree is less than 0.3, the key length returns to 256 bits. Real-time security risk degree calculation is based on a comprehensive evaluation of network congestion rate, external access request frequency, and abnormal node proportion.
[0124] When obtaining the historical reputation value of participating verification nodes and real-time computing capability indicators, the system extracts the verification accuracy, response time, and resource contribution data of each node in the past 100 block periods from the blockchain to calculate the historical reputation value. The historical reputation value of node A is 0.95 (full score 1.0), node B is 0.87, and node C is 0.92. Real-time computing capability indicators are calculated by measuring the current CPU utilization, memory occupancy, and network bandwidth of the node. Node A scores 85 (full score 100), node B scores 78, and node C scores 92.
[0125] The node voting weight is calculated based on the historical reputation value and real-time computing capability indicators. The weight calculation adopts a weighted manner with a historical reputation value proportion of 60% and a real-time computing capability indicator proportion of 40%. The voting weight of node A is 0.95 x 0.6 + 85 / 100 x 0.4 = 0.91, the voting weight of node B is 0.87 x 0.6 + 78 / 100 x 0.4 = 0.834, and the voting weight of node C is 0.92 x 0.6 + 92 / 100 x 0.4 = 0.92. The encrypted state parameters are verified for consistency using node voting weights and multiple signature data. Each node verifies the integrity and authenticity of the encrypted state parameters and votes based on the verification results.
[0126] The consensus threshold for consistency verification is dynamically adjusted based on the number of faulty nodes in the current running environment and historical consensus data. When the proportion of faulty nodes is less than 5%, the consensus threshold is set to 0.85; when the proportion of faulty nodes is between 5% and 15%, the consensus threshold is reduced to 0.75; when the proportion of faulty nodes exceeds 15%, the consensus threshold is further reduced to 0.67. Historical consensus data shows that the average consensus degree of the system in the past 24 hours is 0.92, and the proportion of faulty nodes is 3%, so the current consensus threshold is set to 0.85.
[0127] In the consistency voting verification process, each node verifies the encrypted state parameters and submits the voting results. The system aggregates the weighted voting results of all nodes, calculates the overall consistency score. For example, in a certain round of verification, node A and C vote results are "Valid", and node B vote results are "Invalid", then the overall consistency score is 0.91+0.92=1.83, the total weight of the node is 0.91+0.834+0.92=2.664, and the consistency ratio is 1.83 / 2.664=0.687. Since the consistency ratio 0.687 is less than the current consensus threshold 0.85, the verification result of this round is "Failed", and the system will trigger the re-verification process.
[0128] If the consistency ratio is greater than or equal to the consensus threshold, the verification result is "Passed", the system confirms that the current encrypted state parameter is valid, and updates it to the blockchain network, completing the entire network state parameter consistency verification process.
[0129] In an optional implementation, the task information sequence is subjected to a hash connection operation with block metadata and node signatures to generate a computing task transaction block, and the link relationship between adjacent computing task transaction blocks is verified using a public key to generate a blockchain integrity verification result, including:
[0130] Feature data containing task identification, block metadata, and node signatures are extracted from the task information sequence, the computational complexity and security strength of the feature data are calculated, and a feature fitness evaluation value is generated;
[0131] Based on the feature fitness evaluation value, a basic hash function is selected, the basic hash function is dynamically optimized using an exponentially decaying mutation step, and a random mutation factor is introduced to construct an evolutionary hash algorithm; the attack resistance ability and group diversity index of the blockchain node are calculated, and the group immunity strength is generated based on the attack resistance ability and the group diversity index;
[0132] The evolutionary hash algorithm is used to perform a hash connection operation on the task information sequence, the block metadata, and the node signatures, and the hash connection operation parameters are adjusted according to the group immunity strength to generate a computing task transaction block;
[0133] Based on the evolutionary hash algorithm and the group immunity strength, a block verification strategy is constructed, and the link relationship between adjacent computing task transaction blocks is verified using a public key according to the block verification strategy to generate a blockchain integrity verification result.
[0134] The generation and verification process of the computing task transaction block first extracts feature data from the task information sequence. The system receives a task information sequence containing detailed information of multiple computing tasks. For each task, feature data including task identification (such as task ID: "TASK-20230712-0001"), block metadata (such as timestamp: "1689129600", previous block hash: "7a8b9c0d1 e2f3g4h5 i 6j"), and node signature (such as digital signature: "5d6e7f8g9h0 i 1j2k3 l4m") are extracted.
[0135] The computational complexity of these feature data is calculated by analyzing the length of the task identification, the information entropy of the metadata, and the number of bits of the signature, resulting in a computational complexity value of 87.5. At the same time, the security strength is evaluated, considering the strength of the signature algorithm and the key length, resulting in a security strength value of 92.3. The computational complexity and security strength are calculated by weighted average (weights are 0.4 and 0.6 respectively) to obtain the feature fitness evaluation value of 90.3.
[0136] Based on the feature fitness evaluation value, the base hash function is selected. When the feature fitness evaluation value is between 85 and 95, the system selects SHA-256 as the base hash function. If the evaluation value is less than 85, MD5 with less computational overhead is selected; if it is higher than 95, SHA-384 which is more secure is selected. For the evaluation value 90.3 in this example, the system selects SHA-256 as the base hash function.
[0137] The base hash function is dynamically optimized using an exponentially decaying mutation step size. The initial mutation step size is set to 0.1, and as the number of iterations increases, the step size decreases according to an exponential decay formula. For example, after the first iteration, the step size is 0.1, after the fifth iteration, the step size is reduced to 0.06, and after the tenth iteration, the step size is further reduced to 0.036. The system introduces a random mutation factor in each iteration, with an initial value of 0.15 and a random fluctuation between 0.05 and 0.25 in each iteration. By combining the mutation step size with the random mutation factor, the parameters of the hash function (such as the initial vector value and the number of rounds) are fine-tuned to construct an evolutionary hash algorithm.
[0138] The system calculates the anti-attack capability and group diversity indicators of the blockchain nodes. The anti-attack capability is tested by simulating common attack scenarios (such as denial-of-service attacks, 51% attacks) to test the response of the nodes, generating a score. For example, for a network with 10 nodes, the anti-DoS attack capability of node 1 is 0.85, the anti-51% attack capability is 0.92, and the comprehensive anti-attack capability is calculated as 0.88. The group diversity indicator is calculated by evaluating the heterogeneity of the nodes in the network (such as operating system type, hardware configuration, geographic distribution). In the test network, the operating system diversity is 0.78, the hardware diversity is 0.65, the geographic distribution diversity is 0.82, and the comprehensive diversity indicator is 0.75. The anti-attack capability and group diversity indicators are calculated by weighted summation (weights of 0.6 and 0.4) to obtain the group immunity strength of 0.826.
[0139] The evolutionary hash algorithm is used to perform hash concatenation operations on the task information sequence, block metadata, and node signature. The system first concatenates the task information sequence (such as "TASK-20230712-0001|Calculate image processing|Priority: High"), block metadata (such as "1689129600|7a8b9c0d1 e2f3g4h5 i 6j|Difficulty: 4"), and node signature (such as "5d6e7f8g9h0i 1j2k3 l4m") into a string.
[0140] According to the group immunity strength of 0.826, the hash concatenation operation parameters are adjusted, such as increasing the number of hash iterations from the standard 64 rounds to 73 rounds, and the increased round ratio is approximately equal to the group immunity strength value. The adjusted evolutionary hash algorithm is executed to generate the hash value of the computing task transaction block: "a1 b2c3d4e5f6g7h8 i9j0k1 l 2m3n4o5p6". This hash value is combined with the block header and other information to form a complete computing task transaction block.
[0141] Based on the evolutionary hash algorithm and the group immunity strength, a block verification strategy is constructed. According to the group immunity strength of 0.826, the verification threshold is set to 0.85, and at least 85% of the verification nodes must agree to confirm the validity of the block.
[0142] The public key (such as "pub_key:8f9g0h1 i2j3k4 l5m6n") is used to verify the authenticity of the node signature, ensuring that the signature indeed comes from the claimed node. Then the link relationship between adjacent computing task transaction blocks is verified, checking whether the pre-block hash included in the current block matches the actual pre-block hash value. For example, the pre-block hash field value of block #1025 is "7a8b9c0d1 e2f3g4h5 i 6j", and the system verifies whether this value is the same as the actual hash value of block #1024.
[0143] Through the above verification steps, the system generates a blockchain integrity verification result, including a verification status ("verification passed" or "verification failed"), a consistency degree (such as "node consistency rate: 92%"), and a timestamp (such as "verification time: 1689130600"). The verification result is recorded and broadcast to other nodes in the network, ensuring that the entire network has a consistent understanding of the blockchain state.
[0144] In an optional implementation, the pressure regulation parameter, the flow regulation parameter, and the valve opening parameter of each pipe network node are calculated according to the pipe network state parameter, and generating the pipe network optimization control instruction includes:
[0145] The pressure parameter, the flow parameter, and the valve parameter of the pipe network node are feature-encoded to generate a node state vector, and a multi-mode agent including a path optimization function, a flow balance function, and a collaborative optimization function is constructed based on the node state vector;
[0146] The pressure gradient and the pheromone intensity are extracted from the multi-mode agent to calculate the path optimization parameter, the node flow deviation value is obtained based on the path optimization parameter, and the flow balance parameter is generated in combination with the group behavior characteristics, and the collaborative decision parameter is generated by combining the flow balance parameter with the information propagation function and the exploration function;
[0147] The pressure regulation parameter, the flow regulation parameter, and the valve opening parameter are calculated according to the path optimization parameter, the flow balance parameter, and the collaborative decision parameter, respectively, and the pipe network optimization control instruction is generated by combining the pressure regulation parameter, the flow regulation parameter, and the valve opening parameter.
[0148] When the pressure parameter, the flow parameter, and the valve parameter of the pipe network node are feature-encoded to generate a node state vector, real-time pressure values such as 0.45MPa, flow values such as 25m 3 / h, and valve opening degrees such as 65% are collected for each node, and these heterogeneous parameters are mapped to the [0, 1] interval through normalization processing. For example, for a certain node, the pressure parameter 0.45MPa is normalized to 0.417 in the system set [0.2MPa, 0.8MPa] range, the flow parameter 25m 3 / h is normalized to 0.25 in the [0, 100m 3 / h] range, and the valve opening degree 65% is normalized to 0.65.
[0149] The normalized values are combined to form the state vector of the node [0.417, 0.25, 0.65] by vector concatenation. Repeat this process for each node in the network to generate a complete set of node state vectors. Based on these state vectors, a multi-mode agent is constructed containing path optimization functions, flow balance functions, and collaborative optimization functions. The multi-mode agent adopts a three-layer architecture: the bottom layer implements path optimization logic, the middle layer implements flow balance calculation, and the top layer is responsible for collaborative decision-making. The three functional modules are linked through information interaction by adopting a parameter sharing mechanism within the agent.
[0150] The specific steps for extracting pressure gradient and pheromone intensity from the multi-mode agent to calculate the path optimization parameter are as follows: the agent first collects the pressure difference between adjacent nodes in the network, such as the pressure difference between node A and node B being 0.05 MPa, which is converted into a pressure gradient vector. At the same time, record the pheromone intensity on the historical optimization path, with the pheromone intensity of the optimal path set to a higher value such as 0.8, the sub-optimal path set to 0.5, and the poor path set to 0.2. By weighted combination of pressure gradient and pheromone intensity, the path optimization parameter is calculated. For example, for the path [node1→node2→node3], if the pressure gradient component is [0.07, 0.05] and the pheromone intensity is [0.7, 0.6], and the weight coefficients are set to 0.6 and 0.4, then the path optimization parameter is calculated as [0.07×0.6+0.7×0.4, 0.05×0.6+0.6×0.4] = [0.322, 0.27].
[0151] The specific implementation of obtaining node flow deviation value based on path optimization parameter and generating flow balance parameter combined with group behavior characteristics is as follows: the system compares the actual flow of each node with the expected flow to calculate the flow deviation value. For example, the actual flow of a certain node is 25m 3 / h, the expected flow is 30m 3 / h, then the deviation value is -5m 3 / h, and after normalization, it is -0.167.
[0152] The flow uniformity and aggregation degree of the node group in the entire network are analyzed, and the characteristic values are extracted. For example, the flow uniformity is 0.75 and the aggregation degree is 0.35. The flow balance parameter is generated by combining the node flow deviation value with the group behavior characteristics. For example, the flow deviation value of a certain node is -0.167, combined with the flow uniformity of 0.75 and the aggregation degree of 0.35, the flow balance parameter is calculated by weighted average as -0.167×0.5+0.75×0.3+0.35×0.2 = -0.0835+0.225+0.07 = 0.2115.
[0153] The method for generating collaborative decision parameters by combining traffic balancing parameters with information propagation and exploration functions is as follows: The system establishes an information propagation network based on the connection relationships between nodes, setting the information attenuation rate to 0.15. Starting with a node's traffic balancing parameter of 0.2115, the system calculates its impact on neighboring nodes using the information propagation function, e.g., 0.2115 × (1 - 0.15) = 0.1798. Simultaneously, the system runs an exploration function, adding a certain degree of randomness to each decision, e.g., a random disturbance value of ±0.05. The information propagation results are combined with the exploration function output to generate collaborative decision parameters, e.g., 0.1798 + 0.03 = 0.2098.
[0154] The process of calculating pressure regulation parameters, flow regulation parameters, and valve opening parameters based on path optimization parameters, flow balance parameters, and collaborative decision parameters is as follows: For pressure regulation parameters, the system converts the path optimization parameter 0.322 into an actual pressure regulation value of 0.027 MPa using a mapping function, meaning the current pressure value needs to be increased by 0.027 MPa. For flow regulation parameters, the system converts the flow balance parameter 0.2115 into a flow adjustment amount of 6.345 m³ / s. 3 / h indicates that 6.345m needs to be added. 3 / h of traffic.
[0155] For the valve opening parameter, the system converts the collaborative decision parameter 0.2098 into a valve opening adjustment of 10.49%, indicating that the valve opening needs to be increased by 10.49%. The system combines these three types of parameters into a control command package according to a preset format. The command package structure is [node identifier, pressure regulation value, flow regulation value, valve regulation value], such as [Node_A, +0.027MPa, +6.345m]. 3 / h, +10.49%. These optimization and control commands are sent to each execution unit through the communication network. After receiving the commands, the execution units perform the corresponding adjustment operations to achieve optimized operation of the pipeline network.
[0156] Figure 5 A bar chart showing the efficiency comparison of the pipeline network optimization and control methods in this invention:
[0157] This figure shows a comparison of five core performance indicators for three different control methods (traditional control method, general intelligent optimization, and multi-modal intelligent agent method). In pressure regulation optimization, the traditional method achieves 72.5%, general intelligent optimization improves to 85.6%, and the multi-modal intelligent agent method reaches the highest at 94.3%. For flow balancing efficiency, the three methods achieve 68.3%, 82.4%, and 91.7%, respectively. Valve collaborative control performance reaches 65.7%, 79.8%, and 93.2%, respectively. The optimization degree of system response time is 78.2%, 84.5%, and 92.5%. In terms of energy consumption reduction, the multi-modal intelligent agent method performs best, reaching 88.6%, far exceeding the traditional method's 59.4% and general intelligent optimization's 76.2%. The data clearly shows that the multimodal agent method significantly outperforms the other two methods across all evaluation metrics, with the most significant improvements in pressure regulation optimization and valve collaborative control, achieving increases of 21.8 and 27.5 percentage points respectively compared to traditional methods. This demonstrates the method's outstanding advantages in the field of intelligent pipeline control. The charts use bar graphs to visually illustrate the performance differences among the three methods, with grayscale indicating different methods, and the horizontal comparison highlights the comprehensive advantages of the multimodal agent method.
[0158] A second aspect of the present invention provides a natural gas pipeline network intelligent operation scheduling system based on user priority, comprising:
[0159] The first unit is used to collect pressure data, flow data, temperature data, and user gas consumption data from multiple edge computing nodes in the natural gas pipeline network.
[0160] The second unit is used to divide the edge computing nodes into multiple computing sub-networks based on the geographical location information and network topology of the edge computing nodes; set the computing weight coefficient of each node based on the computing power and communication latency of the nodes in each computing sub-network; perform distributed training on the edge computing nodes in each sub-network to obtain the computing task allocation coefficient of each node; and generate a computing task allocation scheme based on the computing task allocation coefficient and the computing weight coefficient.
[0161] The third unit is used to allocate pipeline optimization calculation tasks to each edge computing node according to the calculation task allocation scheme, and perform parallel calculations to obtain pipeline status parameters.
[0162] The fourth unit is used to write the computing task allocation scheme into the blockchain and construct a computing task transaction block; to sign and encrypt the pipeline status parameters based on the timestamp, and to verify the consistency of the encrypted pipeline status parameters through a voting mechanism.
[0163] The fifth unit is used to calculate the pressure regulation parameters, flow regulation parameters, and valve opening parameters of each pipeline node based on the pipeline status parameters, generate pipeline optimization control instructions, execute the pipeline optimization control instructions, and realize intelligent control of the natural gas pipeline network.
[0164] A third aspect of the present invention provides an electronic device, comprising:
[0165] processor;
[0166] Memory used to store processor-executable instructions;
[0167] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0168] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0169] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intelligent operation and scheduling of natural gas pipeline networks based on user priority, characterized in that: include: Collect pressure data, flow data, temperature data, and user gas consumption data from multiple edge computing nodes in the natural gas pipeline network; Based on the geographical location information and network topology of the edge computing nodes, the edge computing nodes are divided into multiple computing sub-networks; based on the computing power and communication latency of the nodes in each computing sub-network, a computing weight coefficient for each node is set. Distributed training is performed on the edge computing nodes within each sub-network to obtain the computational task allocation coefficients for each node, including: Obtain data on computing resource usage, communication performance, and operational status of edge computing nodes; Based on the computing resource usage data, the basic weight value of the edge computing node is calculated according to the preset resource weight coefficient; based on the communication performance data, the communication weight value of the edge computing node is calculated using an exponential decay function; based on the operating status data, the health value of the edge computing node is calculated through time-series feature analysis; the basic weight value, the communication weight value, and the health value are weighted and combined to obtain a comprehensive weight value. The training task allocation ratio of the edge computing node is calculated based on the comprehensive weight value; training data is allocated to the edge computing node based on the training task allocation ratio; model training is performed on the edge computing node using the training data to obtain a local training model; the local training model is weighted and aggregated based on the comprehensive weight value and the health value to obtain a global training model. The dynamic load balancing factor of the edge computing node is calculated based on the global training model. The dynamic load balancing factor is proportional to the comprehensive weight value and the health value. The computing task allocation coefficient of the edge computing node is generated according to the training task allocation ratio, the dynamic load balancing factor and the rate of change of the health value. A computational task allocation scheme is generated based on the computational task allocation coefficient and the computational weight coefficient; According to the computing task allocation scheme, the pipeline network optimization computing task is allocated to each edge computing node, and parallel computing is performed to obtain the pipeline network status parameters. The computing task allocation scheme is written into the blockchain to construct a computing task transaction block; the pipeline status parameters are signed and encrypted based on the timestamp, and the consistency of the encrypted pipeline status parameters is verified through a voting mechanism. Based on the pipeline network status parameters, the pressure regulation parameters, flow regulation parameters, and valve opening parameters of each pipeline network node are calculated, pipeline network optimization control commands are generated, and the pipeline network optimization control commands are executed to realize intelligent control of the natural gas pipeline network.
2. The method according to claim 1, characterized in that, Training data is allocated to the edge computing nodes based on the training task allocation ratio; Using the training data, model training is performed on the edge computing node to obtain a locally trained model, including: Obtain the feature vectors and sample weights of the training sample set, calculate the global feature representation based on the feature vectors and sample weights, train the teacher model using the global feature representation, and obtain the knowledge representation data of the teacher model. The training data is initially divided based on the training task allocation ratio. The correlation coefficient between the global feature representation and the local features of each edge computing node is calculated. The initial division result of the training data is optimized based on the correlation coefficient and the knowledge representation data to obtain an optimized training data allocation scheme. The training data is allocated to each edge computing node according to the optimized training data allocation scheme. The adaptive distillation intensity coefficient of each edge computing node is calculated based on the correlation coefficient. The local training loss function is constructed using the adaptive distillation intensity coefficient. Model training is performed on each edge computing node based on the local training loss function and the knowledge representation data. During the model training process, training convergence data of each edge computing node is acquired. The training temperature parameter is dynamically adjusted based on the training convergence data. The knowledge transfer degree between the teacher model and each edge computing node model is calculated. Based on the knowledge transfer degree, the optimized training data allocation scheme is dynamically adjusted to obtain the local training model of each edge computing node.
3. The method according to claim 1, characterized in that, According to the aforementioned task allocation scheme, the pipeline optimization calculation tasks are allocated to each edge computing node, and parallel computing is performed to obtain pipeline status parameters, including: Based on the computing task allocation scheme, analyze the data dependencies between related computing tasks, collect the real-time communication latency between edge computing nodes executing related computing tasks, construct a node communication cost matrix based on the data dependencies and the real-time communication latency, and use the node communication cost matrix to optimize and adjust the computing task allocation scheme to generate the final computing task allocation scheme. The final computing task allocation scheme is distributed to each edge computing node. Each edge computing node performs parallel computing of the pipeline status parameters according to the computing task type and computing resource allocation ratio specified in the final computing task allocation scheme. The parallel computing results of each edge computing node are integrated to obtain the complete pipeline status parameters.
4. The method according to claim 1, characterized in that, Write the computing task allocation scheme into the blockchain to construct a computing task transaction block; The pipeline status parameters are signed and encrypted based on timestamps, and the consistency verification of the encrypted pipeline status parameters is performed through a voting mechanism, including: Generate a task information sequence containing task identifier, allocation scheme, timestamp and previous block hash; perform hash connection operation on the task information sequence with block metadata and node signature to generate a computing task transaction block; use public key to verify the link relationship between adjacent computing task transaction blocks and generate blockchain integrity verification result. The validity of the computing task transaction block is confirmed based on the blockchain integrity verification result. The status parameter is associated with the timestamp and encrypted using a symmetric key to obtain the encrypted status parameter. A hash calculation is performed on the encrypted status parameter and multi-signature data is generated using the private keys of multiple nodes. The encryption key length is dynamically adjusted using an exponential decay method based on the inter-node communication time interval and the system security risk level to update the encryption strength of the encrypted status parameter. Obtain the historical reputation value and real-time computing power index of the participating verification nodes, calculate the node voting weight based on the historical reputation value and the real-time computing power index, use the node voting weight and the multi-signature data to perform consistency voting verification on the encryption state parameter, dynamically adjust the consensus threshold of consistency verification based on the number of faulty nodes in the system and historical consensus data, and generate the verification result.
5. The method according to claim 4, characterized in that, The task information sequence is hashed together with block metadata and node signatures to generate a computation task transaction block. The linking relationship between adjacent computation task transaction blocks is verified using a public key, generating a blockchain integrity verification result including: Extract feature data containing task identifier, block metadata and node signature from the task information sequence, calculate the computational complexity and security strength of the feature data, and generate feature fitness evaluation value; A basic hash function is selected based on the feature fitness evaluation value. The basic hash function is dynamically optimized using an exponentially decaying mutation step size. A random mutation factor is introduced to construct an evolutionary hash algorithm. The anti-attack capability and population diversity index of the blockchain nodes are calculated. The herd immunity strength is generated based on the anti-attack capability and the population diversity index. The evolutionary hashing algorithm is used to perform hash join operations on the task information sequence, the block metadata and the node signature. The hash join operation parameters are adjusted according to the herd immunity strength to generate a task transaction block. Based on the evolutionary hash algorithm and the herd immunity strength, a block verification strategy is constructed. According to the block verification strategy, the public key is used to verify the link relationship between adjacent computing task transaction blocks, and a blockchain integrity verification result is generated.
6. The method according to claim 1, characterized in that, Based on the pipeline network status parameters, calculate the pressure regulation parameters, flow regulation parameters, and valve opening parameters of each pipeline network node, and generate pipeline network optimization and control instructions, including: The pressure parameters, flow parameters, and valve parameters of the pipeline nodes are feature-encoded to generate node state vectors. Based on the node state vectors, a multi-mode intelligent agent containing path optimization function, flow balancing function, and collaborative optimization function is constructed. The pressure gradient and pheromone intensity are extracted from the multi-mode agent to calculate path optimization parameters. Based on the path optimization parameters, the node traffic deviation value is obtained and combined with the group behavior characteristics to generate traffic balance parameters. The traffic balance parameters are combined with the information propagation function and the exploration function to generate collaborative decision parameters. Based on the path optimization parameters, the flow balance parameters, and the collaborative decision parameters, pressure regulation parameters, flow regulation parameters, and valve opening parameters are calculated respectively. The pressure regulation parameters, flow regulation parameters, and valve opening parameters are then combined to generate a pipeline network optimization and control command.
7. A natural gas pipeline network intelligent operation and scheduling system based on user priority, used to implement the method of any one of claims 1-6, characterized in that, include: The first unit is used to collect pressure data, flow data, temperature data, and user gas consumption data from multiple edge computing nodes in the natural gas pipeline network. The second unit is used to divide the edge computing node into multiple computing sub-networks based on the geographical location information and network topology of the edge computing node; Based on the computing power and communication latency of each node in the computing sub-network, a computing weight coefficient is set for each node; Distributed training is performed on the edge computing nodes within each sub-network to obtain the computing task allocation coefficients for each node; A computational task allocation scheme is generated based on the computational task allocation coefficient and the computational weight coefficient; The third unit is used to allocate pipeline optimization calculation tasks to each edge computing node according to the calculation task allocation scheme, and perform parallel calculations to obtain pipeline status parameters. The fourth unit is used to write the computing task allocation scheme into the blockchain and construct a computing task transaction block; The pipeline status parameters are signed and encrypted based on timestamps, and the consistency of the encrypted pipeline status parameters is verified through a voting mechanism. The fifth unit is used to calculate the pressure regulation parameters, flow regulation parameters, and valve opening parameters of each pipeline node based on the pipeline status parameters, generate pipeline optimization control instructions, execute the pipeline optimization control instructions, and realize intelligent control of the natural gas pipeline network.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Pipeline optimizer system
CN101203871A
Unloading method for urban gas pipe network edge computing system
CN113778685A