Method, device and equipment for determining gas supply path of natural gas pipeline network and medium

Through the A* search algorithm and Manhattan distance deviation judgment, combined with path sorting and pressure and flow judgment, the problem of fastness and accuracy of gas replenishment path determination in the natural gas pipeline network is solved, achieving the effect of rapid response and resource conservation.

CN119167568AInactive Publication Date: 2024-12-20HAOMAIQI E-COMMERCE CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411660186.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately determine the gas replenishment path in the natural gas pipeline network, especially in complex topological structures and multi-path situations, making it difficult for manual experience to ensure fastness and accuracy.

Method used

The A* search algorithm is used to combine the deviation judgment of Manhattan distance and pipeline distance, and the steps are executed cycled until the set number threshold is reached, the preferred gas replenishment path is determined, and the optimization path is judged through the ordering and monotonically decreasing pressure sequence and the difference in the distribution flow.

Benefits of technology

It realizes the rapid and accurate determination of the gas replenishment path of the natural gas pipeline network, reduces resource waste, improves the system's response speed and accuracy, and meets the rapid response of customers' needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167568A_ABST
    Figure CN119167568A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for determining a gas supply path of a natural gas pipeline network and a medium, which are used for quickly and accurately determining the gas supply path. According to the embodiment of the invention, when the path determination instruction is received, the identifier of the node to be subjected to gas supplementation carried in the path determination instruction can be identified; the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas is determined; for any candidate gas supply node, the pipeline distance between the candidate gas supply node and the to-be-supplemented gas node can be determined based on an A * search algorithm, and if the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is smaller than a set deviation threshold value, the to-be-supplemented gas node is determined. And if the candidate gas supply node is not determined, determining the optimal path from the candidate gas supply node to the to-be-supplied gas node determined based on the A * search algorithm as the optimal gas supply path suitable for the to-be-supplied gas node, so that the purpose of rapidly and accurately determining the gas supply path can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and medium for determining a gas replenishment path for a natural gas pipeline network. Background Art

[0002] The natural gas pipeline network can be used to transport natural gas from the gas supply node to the node to be replenished (gas consumption node). So far, the process of determining the pipeline path (gas replenishment path) from the natural gas pipeline network to the gas consumption node still mainly relies on manual experience. However, with the continuous construction and improvement of my country's natural gas pipelines, a natural gas pipeline network with interconnected pipelines has been formed. The topological structure of the natural gas pipeline network is complex and there are many optional paths. This method that relies on manual experience is difficult to ensure the speed and accuracy of determining the gas replenishment path suitable for the gas consumption node.

[0003] Therefore, there is an urgent need for a technical solution that can quickly and accurately determine the gas replenishment path. Summary of the invention

[0004] The present application provides a method, device, equipment and medium for determining a gas replenishment path in a natural gas pipeline network, which are used to quickly and accurately determine the gas replenishment path.

[0005] In a first aspect, the present application provides a method for determining a gas replenishment path in a natural gas pipeline network, the method comprising: receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; For each candidate gas supply node, the following operations are performed cyclically until the number of determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

[0006] In a possible implementation manner, after determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are looped for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, the method further includes: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0007] In a possible implementation manner, after determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are looped for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, the method further includes: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0008] In a possible implementation manner, before determining the preferred path from the candidate gas supply node to the node to be gas-supplemented based on the A* search algorithm as the preferred gas-supplementing path applicable to the node to be gas-supplemented, the method further includes: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

[0009] In a possible implementation manner, before determining the preferred path from the candidate gas supply node to the node to be gas-supplemented based on the A* search algorithm as the preferred gas-supplementing path applicable to the node to be gas-supplemented, the method further includes: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

[0010] In a second aspect, the present application provides a device for determining a gas supply path in a natural gas pipeline network, the device comprising: A receiving module, used for receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; The first determination module is used to respectively determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; The second determination module is used to loop the following operations for each candidate gas supply node until the number of the determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

[0011] In a possible implementation manner, the second determining module is further configured to: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0012] In a possible implementation manner, the second determining module is further configured to: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0013] In a possible implementation manner, the second determining module is further configured to: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

[0014] In a possible implementation manner, the second determining module is further configured to: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including: A memory for storing program instructions; The processor is used to call the program instructions stored in the memory and execute the steps included in the method described in the first aspect according to the obtained program instructions.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer performs the steps of the method described in the first aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the steps of the method described in the first aspect.

[0018] Because in the embodiment of the present application, when a path determination instruction is received, the identifier of the node to be gas-replenished carried in the path determination instruction can be identified; the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be gas-replenished can be determined respectively; for any candidate gas supply node, the pipeline distance between the candidate gas supply node and the node to be gas-replenished can be determined based on the A* search algorithm, if the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, the preferred path from the candidate gas supply node to the node to be gas-replenished determined based on the A* search algorithm is determined as the preferred gas replenishment path suitable for the node to be gas-replenished, based on this, the purpose of quickly and accurately determining the gas replenishment path can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0020] Figure 1 A schematic diagram of a first natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown; Figure 2A schematic diagram of a second natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown; Figure 3 A schematic diagram of a third natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown; Figure 4 A schematic diagram of a fourth natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown; Figure 5 A schematic diagram of a fifth natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown; Figure 6 A schematic diagram of a natural gas pipeline network gas replenishment path determination device provided by some embodiments is shown; Figure 7 A schematic diagram of the structure of an electronic device provided by some embodiments is shown. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0022] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.

[0023] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0024] In order to quickly and accurately determine the gas replenishment path, the embodiment of the present application proposes a method, device, equipment and medium for determining the gas replenishment path of a natural gas pipeline network.

[0025] Embodiment 1: Figure 1 A schematic diagram of a first natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown, such as Figure 1 As shown, the process includes the following steps: S101: receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented.

[0026] The method for determining the gas supply path of a natural gas pipeline network provided in the embodiment of the present application is applied to an electronic device, which may be a PC, a mobile terminal or other device, or a server or other device, and the present application does not make any specific limitation on this.

[0027] In a possible implementation, when natural gas users such as urban gas companies and industrial and commercial households have new gas demand or the pressure of a node in the natural gas pipeline network is abnormal, and the corresponding node in the natural gas pipeline network needs to be replenished (replenished with natural gas), the management personnel and the like can trigger the path determination instruction in the electronic device, and the path determination instruction can carry information such as the identification of the node to be replenished. For example, the management personnel can input or select the identification of the node to be replenished, and click the "Replenish Gas" button, etc., to trigger the path determination instruction. This application does not specifically limit the method of triggering the path determination instruction, and it can be flexibly set according to demand. When the electronic device recognizes that the "Replenish Gas" button is clicked, it can receive the path determination instruction and identify the information such as the identification of the node to be replenished carried in the path determination instruction.

[0028] S102: Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas.

[0029] In a possible implementation, after receiving the path determination instruction, the electronic device may use each gas supply node in the natural gas pipeline network as a candidate gas supply node, and determine the Manhattan distance between each candidate gas supply node and the node to be supplied with gas.

[0030] For ease of understanding, the candidate gas supply node is represented by H, and the location information of the candidate gas supply node H in the natural gas pipeline network is represented by (x 1 ,y 1 ), the node to be supplied with gas is t, and the location information of the node to be supplied with gas t in the natural gas pipeline network is (x 2 ,y 2 ) represents the Manhattan distance between the candidate gas supply node H and the gas supply node t .

[0031] S103: For each candidate gas supply node, the following operations are performed cyclically until the number of determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm (A-star Algorithm), the pipeline distance between the candidate gas supply node and the node to be gas-supplied is determined. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm is determined as the preferred gas supply path suitable for the node to be gas-supplied.

[0032] In a possible implementation, when determining the preferred gas supply path suitable for the node to be gas-supplemented, the pipeline distance L between the candidate gas supply node H and the node t to be gas-supplemented can be determined based on the A* search algorithm for any candidate gas supply node H. Ht Among them, the pipeline distance between two nodes can be considered as the length of the pipeline between two nodes in the natural gas pipeline network. Based on the A* search algorithm, the pipeline distance L between the candidate gas supply node H and the gas supply node t is determined. Ht The specific process will not be described here.

[0033] In a possible implementation, since the topological structure of the natural gas pipeline network is relatively complex and there are many optional paths, in order to reduce the complexity and improve the speed and accuracy of determining the preferred gas supply path, the preferred path from the candidate gas supply node H to the gas supply node t can be determined based on the A* search algorithm. Among them, based on the A* search algorithm, the optimal path from the candidate gas supply node H to the gas supply node t is determined Based on the heuristic search, the optimal solution (optimal path) can be quickly found in the large-scale search space (topological structure of the natural gas pipeline network). Based on the A* search algorithm, the optimal path from the candidate gas supply node H to the gas supply node t is determined. The process will be introduced later and will not be described here.

[0034] In a possible implementation, in order to determine the optimal path from the candidate gas supply node H to the gas supply node t, Whether it is credible, improve the accuracy of the determined optimal gas supply path suitable for the node to be replenished, and obtain the Manhattan distance D between the candidate gas supply node H and the node to be replenished t Ht Distance from pipeline L Ht After that, the difference between the pipeline distance and the Manhattan distance can be calculated, and then the ratio of the absolute value of the difference to the pipeline distance can be used as the deviation between the pipeline distance and the Manhattan distance, that is, the deviation can be: Afterwards, it can be determined whether the deviation is less than the set deviation threshold, where the deviation threshold can be represented by δ, which can also be called an error hyperparameter. The value of the deviation threshold δ can be flexibly set according to demand, and this application does not make specific restrictions on this. For example, the value of the deviation threshold δ can be any value between 0 and 1, that is, .

[0035] In one possible implementation, when the deviation When it is less than the set deviation threshold δ, it can be considered that the Manhattan distance D corresponding to the candidate gas supply node H (between the candidate gas supply node H and the gas supply node t) is Ht Distance from pipeline L Ht The difference is small. The optimal path from the candidate gas supply node H to the gas supply node t determined by the A* search algorithm It is credible, and the optimal path from the candidate gas supply node H to the gas supply node t determined by the A* search algorithm can be , determined as the preferred gas replenishment path suitable for the node t to be replenished with gas.

[0036] In a possible implementation, the above process may be performed on several candidate gas supply nodes respectively until the number of determined preferred gas supply paths suitable for the node to be gas-supplied reaches a set number threshold, thereby achieving the determination of a set number of preferred gas supply paths suitable for the node to be gas-supplied. Among them, the present application does not specifically limit the set number threshold, and it can be flexibly set according to demand. Exemplarily, the set number threshold can be 1, or it can be 3, 5, and other numerical values. Taking the set number threshold as 1 as an example, assuming that there are 10 candidate gas supply nodes in total, assuming that the preferred path from the first candidate gas supply node to the node to be gas-supplied can be used as the preferred gas supply path suitable for the node to be gas-supplied, then the above processes such as determining the pipeline distance between the node to be gas-supplied, determining the preferred path to the node to be gas-supplied, and judging whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold may no longer be performed on other candidate gas supply nodes.

[0037] Taking the setting quantity threshold as 3 as an example, assuming that there are 10 candidate gas supply nodes in total, assuming that the preferred path from the first candidate gas supply node to the node to be gas-replenished can be used as the preferred gas supply path for the node to be gas-replenished, and the preferred path from the second candidate gas supply node to the node to be gas-replenished cannot be used as the preferred gas supply path for the node to be gas-replenished, then the third candidate gas supply node can be subjected to the above-mentioned processes such as determining the pipeline distance between the node to be gas-replenished, determining the preferred path to the node to be gas-replenished, and judging whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold, to judge whether the preferred path from the third candidate gas supply node to the node to be gas-replenished can be used as the preferred gas supply path for the node to be gas-replenished. Assuming that the preferred path from the third candidate gas supply node to the node to be gas-replenished can be used as the preferred gas supply path for the node to be gas-replenished, The above process can be then performed on the fourth candidate gas supply node to determine whether the preferred path from the fourth candidate gas supply node to the node to be gas-replenished can be used as the preferred gas supply path for the node to be gas-replenished. Assuming that the preferred path from the fourth candidate gas supply node to the node to be gas-replenished can be used as the preferred gas supply path for the node to be gas-replenished, the preferred paths between the first candidate gas supply node, the third candidate gas supply node, and the fourth candidate gas supply node and the node to be gas-replenished can be respectively used as the three preferred gas supply paths for the node to be gas-replenished. The above processes, such as determining the pipeline distance between the node to be gas-replenished, determining the preferred path to the node to be gas-replenished, and determining whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold, may no longer be performed on the subsequent fifth candidate gas supply node to the tenth candidate gas supply node. These processes will not be repeated here.

[0038] Since the present application can identify the identifier of the node to be replenished carried in the path determination instruction when receiving the path determination instruction; determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be replenished respectively; for any candidate gas supply node, the pipeline distance between the candidate gas supply node and the node to be replenished can be determined based on the A* search algorithm. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, the preferred path from the candidate gas supply node to the node to be replenished determined based on the A* search algorithm is determined as the preferred gas replenishment path suitable for the node to be replenished. Based on this, the purpose of quickly and accurately determining the gas replenishment path can be achieved.

[0039] In addition, since the present application can accurately determine the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm, when determining the preferred gas replenishment path suitable for the node to be gas-replenished based on the preferred path, accurate gas replenishment of the node to be gas-replenished can be achieved, thereby reducing resource waste.

[0040] In addition, after the node to be replenished has been replenished and the gas supply has been increased, it can also be used as a gas supply node for other nodes to replenish gas, etc. This application can be based on the entire natural gas pipeline network, and a set number of (a set number of) preferred gas replenishment paths applicable to any node to be replenished can be planned and coordinated between nodes in the natural gas pipeline network.

[0041] Embodiment 2: In order to improve the speed (quickness) of determining the preferred pipeline network path, based on the above embodiment, in the embodiment of the present application, after respectively determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are cyclically performed for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, and the method further includes: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0042] In a possible implementation, considering that the process of calculating the Manhattan distance is simpler and less time-consuming than that of calculating the pipeline distance, in order to improve the speed (quickness) of determining the preferred pipeline network path suitable for the node to be gas-replenished, the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be gas-replenished can be determined first. After the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be gas-replenished is determined, the candidate gas supply nodes can be sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-replenished from small to large. After that, the processes of determining the pipeline distance between the node to be gas-replenished, determining the preferred path to the node to be gas-replenished, and judging whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold, etc., described in the above embodiment can be cyclically executed for each candidate gas supply node in the order of the sorting, until the number of determined preferred gas replenishment paths suitable for the node to be gas-replenished reaches the set number threshold.

[0043] For example, assuming that there are 10 candidate gas supply nodes, the Manhattan distance between each of the 10 candidate gas supply nodes and the node to be replenished can be calculated respectively, and then the 10 candidate gas supply nodes can be sorted in order from small to large according to the Manhattan distance between each of the 10 candidate gas supply nodes and the node to be replenished. The candidate gas supply node with a higher ranking has a smaller Manhattan distance with the node to be replenished, and the candidate gas supply node with a lower ranking has a larger Manhattan distance with the node to be replenished.

[0044] Generally speaking, compared with supplying the node to be supplied with gas based on a gas supply node that is farther away from the node to be supplied with gas, it is more efficient and energy-saving to supply the node to be supplied with gas based on a gas supply node that is closer to the node to be supplied with gas. Therefore, when determining the preferred gas supply path according to the order of the candidate gas supply nodes from front to back in the above sorting, the preferred gas supply path suitable for the node to be supplied with gas can be determined based on the candidate gas supply node with a smaller Manhattan distance to the node to be supplied, thereby improving the accuracy and speed of determining the preferred gas supply path suitable for the node to be supplied with gas, and meeting the requirements of quickly responding to customer needs, quickly meeting the pressure needs of nodes, having a better gas supply solution, being more energy-efficient, and avoiding waste of resources to the greatest extent.

[0045] For ease of understanding, the natural gas pipeline network gas replenishment path determination process provided by the present application is explained below through a specific embodiment. Figure 2 , Figure 2 A schematic diagram of a second natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown, and the process includes the following steps: S201: Receive a path determination instruction, which carries an identifier of a node to be gas-replenished.

[0046] S202: Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas.

[0047] S203: Sort the candidate gas supply nodes in ascending order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplied, and perform the following operations for each candidate gas supply node in a loop in order of the Manhattan distance from front to back until the number of the determined preferred gas-supplied paths suitable for the node to be gas-supplied reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, the pipeline distance between the candidate gas supply node and the node to be replenished is determined. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, the preferred path from the candidate gas supply node to the node to be replenished determined based on the A* search algorithm will be determined as the preferred gas replenishment path suitable for the node to be replenished.

[0048] Embodiment 3: In order to improve the speed (quickness) of determining the preferred pipeline network path, on the basis of the above embodiments, in the embodiment of the present application, after respectively determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are cyclically performed for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, the method further includes: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0049] In a possible implementation, considering that the gas supply nodes may include different types of gas supply nodes such as gas source points, storage stations, and pressure regulating stations, in order to be able to quickly and accurately determine the preferred gas supply path suitable for the node to be gas-replenished based on different types of gas supply nodes (candidate gas supply nodes), after determining the Manhattan distance between each candidate gas supply node and the node to be gas-replenished in the natural gas pipeline network, each type of candidate gas supply node can be sorted in the order of the Manhattan distance between each candidate gas supply node of the type and the node to be gas-replenished from small to large. After that, the processes of determining the pipeline distance between the node to be gas-replenished, determining the preferred path to the node to be gas-replenished, and judging whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold, etc., described in the above embodiments can be performed for different types of candidate gas supply nodes in the order of the sorting of the different types of candidate gas supply nodes from front to back, until the total number of determined preferred gas supply paths suitable for the nodes to be gas-replenished reaches the set number threshold.

[0050] Exemplarily, assuming that there are 10 candidate gas supply nodes, the Manhattan distances between each of the 10 candidate gas supply nodes and the node to be supplied with gas are calculated respectively. Assuming that there are 3 candidate gas supply nodes of the type of gas source point o, 3 candidate gas supply nodes of the type of gas reserve station s, and 4 candidate gas supply nodes of the type of gas regulating station r, for each type of candidate gas supply node, the candidate gas supply nodes of the type are sorted in the order of the Manhattan distances between each candidate gas supply node of the type and the node to be supplied with gas from small to large; three sortings are obtained respectively. Assuming the sorting of the candidate gas supply node of the gas source point o (Q O ) are: candidate gas supply node 1, candidate gas supply node 2, candidate gas supply node 3; the candidate gas supply node of storage station s (Q S ) are ranked as follows: candidate gas supply node 4, candidate gas supply node 5, candidate gas supply node 6. The ranking of candidate gas supply nodes of pressure regulating station r (Q R ) are: candidate gas supply node 7, candidate gas supply node 8, candidate gas supply node 9, candidate gas supply node 10.

[0051] The processes of determining the pipeline distance to the node to be gas-supplied, determining the preferred path to the node to be gas-supplied, and judging whether the deviation between the pipeline distance and the Manhattan distance is less than the set deviation threshold as described in the above embodiments can be performed in sequence according to the sorting order of each type of candidate gas supply nodes, until the number of determined preferred gas supply paths suitable for the node to be gas-supplied reaches the set number threshold.

[0052] Assume that the set number threshold of the preferred gas supply path is 3, that is, 3 preferred gas supply paths need to be selected. Assume that the candidate gas supply node 1 (o* ) as the preferred gas source point (preferred gas supply node), and the candidate gas supply node 5 (s * ) as the preferred reserve station (preferred gas supply node), and the candidate gas supply node 7 (r * ) as the preferred pressure regulating station (preferred gas supply node), and select candidate gas supply node 1 (o * ) and the optimal path between the node to be replenished ( )、Candidate gas supply node 5(s * ) and the optimal path between the node to be replenished ( )、Candidate gas supply node 7(r * ) and the optimal path between the node to be replenished ( ) are respectively used as three preferred gas replenishment paths suitable for the node to be replenished with gas. At this time, the above process of determining the preferred gas replenishment path can be ended, and the three determined preferred gas replenishment paths are output. , and .

[0053] The present application can sort each type of candidate gas supply node according to the order of the Manhattan distance between each candidate gas supply node of this type and the node to be gas-replenished from small to large; the above-mentioned steps of determining the preferred gas supply path can be performed in sequence according to the sorting order of each different type of candidate gas supply node. Based on this, not only the accuracy and speed of determining the preferred gas supply path suitable for the node to be gas-replenished can be improved, but also it can be guaranteed to the greatest extent that the preferred gas supply path suitable for the node to be gas-replenished can be determined based on different types of candidate gas supply nodes, thereby maximizing the diversity of the preferred gas supply paths.

[0054] For ease of understanding, the natural gas pipeline network gas replenishment path determination process provided by the present application is explained below through a specific embodiment. Figure 3 , Figure 3 A schematic diagram of a third natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown, and the process includes the following steps: S301: Receive a path determination instruction, which carries an identifier of a node to be gas-supplemented.

[0055] S302: Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas.

[0056] S303: For each type of candidate gas supply node, sort the candidate gas supply nodes of this type in the order of the Manhattan distance between each candidate gas supply node of this type and the node to be gas-filled from small to large. According to the sorting order of each type of candidate gas supply node, for each candidate gas supply node in turn, perform the following operations in a loop until the number of determined preferred gas-filling paths suitable for the node to be gas-filled reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, the pipeline distance between the candidate gas supply node and the node to be replenished is determined. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, the preferred path from the candidate gas supply node to the node to be replenished determined based on the A* search algorithm will be determined as the preferred gas replenishment path suitable for the node to be replenished.

[0057] Embodiment 4: In order to improve the accuracy of determining the preferred gas replenishment path applicable to the node to be gas-replenished, based on the above embodiments, in the embodiment of the present application, before determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path applicable to the node to be gas-replenished, the method further includes: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

[0058] In a possible implementation, before determining the preferred path from the candidate gas supply node H to the gas-replenished node t determined based on the A* search algorithm as the preferred gas replenishment path suitable for the gas-replenished node, it is also possible to determine whether the pressure of each node included in the preferred path from the candidate gas supply node H to the gas-replenished node t is a monotonically decreasing sequence. When the pressure of each node included in the preferred path from the candidate gas supply node H to the gas-replenished node t is a gradually decreasing monotonically decreasing sequence (pressure continues to decrease) in the direction from the candidate gas supply node H to the gas-replenished node t, it can be considered that natural gas can be transported from the candidate gas supply node H to the gas-replenished node t, and the preferred path can be determined as the preferred gas replenishment path suitable for the gas-replenished node. Among them, the pressure, instantaneous flow, temperature and other indicators of each node in the natural gas pipeline network can be obtained in real time through sensors set in various nodes such as valves and pressure regulating stations in the natural gas pipeline network, which will not be repeated here.

[0059] It can be understood that if the pressure of each node included in the preferred path from the candidate gas supply node H to the node t to be replenished with gas is not a monotonically decreasing sequence, it can be considered that natural gas is difficult to transport from the candidate gas supply node H to the node t to be replenished with gas, then the preferred path may not be determined as the preferred gas replenishment path suitable for the node to be replenished with gas.

[0060] For ease of understanding, the natural gas pipeline network gas replenishment path determination process provided by the present application is explained below through a specific embodiment. Figure 4 , Figure 4 A schematic diagram of a fourth natural gas pipeline network gas replenishment path determination process provided by some embodiments is shown, and the process includes the following steps: S401: Receive a path determination instruction, which carries an identifier of a node to be gas-supplemented.

[0061] S402: Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas.

[0062] S403: Sort the candidate gas supply nodes in ascending order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplied, and perform the following operations for each candidate gas supply node in a loop in order of the Manhattan distance from front to back until the number of the determined preferred gas-supplied paths suitable for the node to be gas-supplied reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be replenished. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, and the pressure of each node included in the preferred path from the candidate gas supply node to the node to be replenished determined based on the A* search algorithm is a monotonically decreasing sequence, then the preferred path is determined as the preferred gas replenishment path suitable for the node to be replenished.

[0063] Embodiment 5: In order to improve the accuracy of determining the preferred gas replenishment path applicable to the node to be gas-replenished, based on the above embodiments, in the embodiment of the present application, before determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path applicable to the node to be gas-replenished, the method further includes: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

[0064] In a possible implementation, before determining the preferred path from the candidate gas supply node H to the gas supply node t based on the A* search algorithm as the preferred gas supply path suitable for the gas supply node, the maximum distribution flow u of the preferred path between the candidate gas supply node H and the gas supply node t can also be obtained. max , the current instantaneous flow (instantaneous flow) v and the available transmission and distribution flow u, where the maximum transmission and distribution flow u of the preferred path is obtained max The process of calculating the current instantaneous flow v and the available transmission and distribution flow u can adopt the existing technology and will not be elaborated here.

[0065] The difference between the maximum distribution flow of the preferred path and the current instantaneous flow (u max -v) is greater than the available transmission and distribution flow u, if the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow (u max -v) is greater than the available transmission and distribution flow u, that is, u max -v>u, it can be considered that if natural gas is transported based on the preferred path, natural gas can be transported from the candidate gas supply node H to the node to be replenished with gas t, and the preferred path can be determined as the preferred gas replenishment path suitable for the node to be replenished with gas.

[0066] It can be understood that if the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is not greater than the available transmission and distribution flow u, it can be considered that natural gas cannot be transported from the candidate gas supply node H to the node to be replenished t through the preferred path, and the preferred path may not be determined as the preferred gas replenishment path suitable for the node to be replenished.

[0067] For ease of understanding, the natural gas pipeline network gas replenishment path determination process provided by the present application is explained below through a specific embodiment. Figure 5 , Figure 5 A fifth natural gas pipeline network gas replenishment path determination process schematic diagram provided in some embodiments is shown, and the process includes the following steps: S501: Receive a path determination instruction, which carries an identifier of a node to be gas-supplemented.

[0068] S502: Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas.

[0069] S503: Sort the candidate gas supply nodes in ascending order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplied, and perform the following operations for each candidate gas supply node in a loop in order of the Manhattan distance from front to back until the number of the determined preferred gas-supplied paths suitable for the node to be gas-supplied reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be replenished. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, and the pressure of each node included in the preferred path from the candidate gas supply node to the node to be replenished determined based on the A* search algorithm is a monotonically decreasing sequence, and the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow, then the preferred path is determined as the preferred gas replenishment path suitable for the node to be replenished.

[0070] For ease of understanding, the process of determining the optimal path from the candidate gas supply node to the node to be replenished with gas based on the A* search algorithm is explained below.

[0071] It is assumed that the topological structure of the natural gas pipeline network can be constructed based on the transmission and distribution nodes and pipeline information such as gate stations, pressure regulating stations, and pressure regulating cabinets in the natural gas pipeline network. When determining the optimal path from the candidate gas supply node to the node to be replenished based on the A* search algorithm, the topological structure of the natural gas pipeline network can be represented by an undirected graph G=(N, A), where N is the gas supply node in the natural gas pipeline network, and N can include different types of gas supply nodes such as gas source point o, storage station s, and pressure regulating station r. Assume that the gas source point , reserve station , pressure regulating station ,but N can be a set of {1,2,…,n} points. A is a set of pipelines in the natural gas pipeline network. Each node in the topological structure of the natural gas pipeline network can represent a pipeline intersection, and each edge can represent a section of the pipeline, where the weight of the edge can be represented by the length L, capacity, cost, etc. of the pipeline.

[0072] When determining the optimal path from the candidate gas supply node to the node to be replenished based on the A* search algorithm, the candidate gas supply node (the candidate gas supply node can also be called the starting node) can be added to the open set to calculate the objective function f, where the objective function f=g+h, g represents the actual cost from the starting node (the candidate gas supply node) to the current node (the node s located between the candidate gas supply node and the node to be replenished), and h is the estimated cost from the current node to the node to be replenished. The process of calculating the objective function can adopt the existing technology and will not be repeated here.

[0073] The preferred path from the candidate gas supply node to the node to be supplemented can be determined based on the objective function f. For example, when determining any node included in the preferred path from the candidate gas supply node to the node to be supplemented, the current node that can reach the node to be supplemented and has the smallest objective function f is used as the node included in the preferred path from the candidate gas supply node to the node to be supplemented, and all neighbor nodes of the current node with the smallest objective function f can be traversed to calculate the g value and h value of each neighbor node, thereby calculating the f value of each neighbor node, and based on the f value of each neighbor node, determine the next node located after the current node in the preferred path from the candidate gas supply node to the node to be supplemented. Among them, the process of determining the preferred path from the candidate gas supply node to the node to be supplemented based on the A* search algorithm and the objective function f can adopt the existing technology, which will not be repeated here.

[0074] Embodiment 6: Based on the same technical concept, the present application provides a natural gas pipeline network gas replenishment path determination device, see Figure 6 , Figure 6 A schematic diagram of a natural gas pipeline network gas replenishment path determination device provided by some embodiments is shown, the device comprising: A receiving module 61 is used to receive a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; A first determination module 62 is used to respectively determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; The second determination module 63 is used to loop the following operations for each candidate gas supply node until the number of the determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

[0075] In a possible implementation manner, the second determining module 63 is further configured to: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0076] In a possible implementation manner, the second determining module 63 is further configured to: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0077] In a possible implementation manner, the second determining module 63 is further configured to: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

[0078] In a possible implementation manner, the second determining module 63 is further configured to: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

[0079] Embodiment 7: Based on the same technical concept, the present application also provides an electronic device, Figure 7 A schematic diagram of the structure of an electronic device provided by some embodiments is shown. Figure 7 As shown, the electronic device includes: a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74; The memory 73 stores a computer program. When the program is executed by the processor 71, the processor 71 performs the following steps: receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; For each candidate gas supply node, the following operations are performed cyclically until the number of determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

[0080] In a possible implementation manner, the processor 71 is further configured to: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0081] In a possible implementation manner, the processor 71 is further configured to: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

[0082] In a possible implementation manner, the processor 71 is further configured to: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

[0083] In a possible implementation manner, the processor 71 is further configured to: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

[0084] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0085] The communication interface 72 is used for communication between the above electronic device and other devices.

[0086] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0087] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0088] Based on the same technical concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the program runs on the electronic device, the electronic device implements the steps described in any of the above method embodiments when executing, which will not be repeated here.

[0089] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drives (SSD), etc.

[0090] Based on the same technical concept, the present application provides a computer program product, which includes: computer program code, when the computer program code runs on a computer, the computer implements the method described in any method embodiment applied to an electronic device.

[0091] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof, and all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions, and when the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.

[0092] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0093] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0094] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0096] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for determining a gas supply path in a natural gas pipeline network, It is characterized in that The method comprises: receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; Determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; For each candidate gas supply node, the following operations are performed cyclically until the number of determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

2. The method according to claim 1, It is characterized in that After determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are performed cyclically for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, the method further includes: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

3. The method according to claim 1, It is characterized in that After determining the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplemented with gas, the following operations are performed cyclically for each candidate gas supply node until the number of determined preferred gas supplement paths applicable to the node to be supplemented with gas reaches a set number threshold, the method further includes: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

4. The method according to claim 1, It is characterized in that Before determining the preferred path from the candidate gas supply node to the node to be gas-supplemented based on the A* search algorithm as the preferred gas-supplementing path applicable to the node to be gas-supplemented, the method further includes: Determine whether the pressure of each node included in the preferred path is a monotonically decreasing sequence. If so, then proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be gas-replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be gas-replenished.

5. The method according to any one of claims 1 to 4, It is characterized in that Before determining the preferred path from the candidate gas supply node to the node to be gas-supplemented based on the A* search algorithm as the preferred gas-supplementing path applicable to the node to be gas-supplemented, the method further includes: Determine whether the difference between the maximum transmission and distribution flow of the preferred path and the current instantaneous flow is greater than the available transmission and distribution flow. If so, proceed to the subsequent step of determining the preferred path from the candidate gas supply node to the node to be replenished based on the A* search algorithm as the preferred gas replenishment path suitable for the node to be replenished.

6. A device for determining a gas supply path for a natural gas pipeline network, It is characterized in that The device comprises: A receiving module, used for receiving a path determination instruction, wherein the path determination instruction carries an identifier of a node to be gas-supplemented; The first determination module is used to respectively determine the Manhattan distance between each candidate gas supply node in the natural gas pipeline network and the node to be supplied with gas; The second determination module is used to loop the following operations for each candidate gas supply node until the number of the determined preferred gas supply paths applicable to the node to be gas-supplemented reaches a set number threshold: For any candidate gas supply node, based on the A* search algorithm, determine the pipeline distance between the candidate gas supply node and the node to be gas-supplied. If the deviation between the pipeline distance and the Manhattan distance corresponding to the candidate gas supply node is less than the set deviation threshold, then the preferred path from the candidate gas supply node to the node to be gas-supplied determined based on the A* search algorithm will be determined as the preferred gas supply path suitable for the node to be gas-supplied.

7. The device according to claim 6, It is characterized in that The second determining module is further used for: The candidate gas supply nodes are sorted in the order of the Manhattan distance between each candidate gas supply node and the node to be gas-supplemented from small to large, and the subsequent steps of looping and performing the following operations for each candidate gas supply node are performed in sequence according to the sorting order until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

8. The device according to claim 6, It is characterized in that The second determining module is further used for: For each type of candidate gas supply nodes, sort the candidate gas supply nodes of this type in ascending order of the Manhattan distance between each candidate gas supply node of this type and the node to be supplied with gas; According to the sorting order of each type of candidate gas supply nodes, the following steps are performed in sequence for each candidate gas supply node, until the number of determined preferred gas supply paths suitable for the node to be gas-supplemented reaches a set number threshold.

9. An electronic device, It is characterized in that The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of any one of the methods according to claims 1-5 when executing a computer program stored in the memory.

10. A computer-readable storage medium, It is characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Fault-tolerant Manhattan routing method for routing direction monotonous change network

    CN105591910A

  • Adaptive ant colony A-star hybrid algorithm based on target evaluation factor

    CN110686695A

  • Path planning method under partial grid orientation condition in grid space

    CN113091751A

  • Natural gas station transmission and distribution flow anomaly detection system based on machine learning and detection method thereof

    CN113987907A

  • Cable laying path optimization method based on artificial bee colony algorithm

    CN114186369A