CN117437329B - High-consequence region drawing method, system, readable storage medium and computer device - Google Patents
High-consequence region drawing method, system, readable storage medium and computer device Download PDFInfo
- Publication number
- CN117437329B CN117437329B CN202311695772.7A CN202311695772A CN117437329B CN 117437329 B CN117437329 B CN 117437329B CN 202311695772 A CN202311695772 A CN 202311695772A CN 117437329 B CN117437329 B CN 117437329B
- Authority
- CN
- China
- Prior art keywords
- node
- line
- pipeline
- cost
- explored
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 claims abstract description 100
- 239000003345 natural gas Substances 0.000 claims abstract description 50
- 238000010586 diagram Methods 0.000 claims abstract description 42
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 13
- 239000000872 buffer Substances 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000009877 rendering Methods 0.000 claims description 5
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000010276 construction Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims 2
- 230000006870 function Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 6
- 238000003491 array Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000012550 audit Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/203—Drawing of straight lines or curves
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/18—Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2113/00—Details relating to the application field
- G06F2113/14—Pipes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Computational Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a high-consequence region drawing method, a system, a readable storage medium and computer equipment, wherein the method comprises the steps of obtaining a line of each natural gas pipeline and a line relation between each natural gas pipeline; constructing a pipeline circuit diagram based on the circuit and the circuit relation; searching an reachable path between two points in the pipeline circuit diagram through a path searching algorithm, and calculating a combinable circuit in the pipeline circuit diagram through a graph algorithm to obtain a combined circuit path; and intercepting the path information closest to the laying point in the merged route path, and drawing a high-result area based on the path information. According to the invention, the path information in the combined line path is intercepted, and the high-result area is drawn according to the path information, so that the high-result area can be drawn quickly, the drawing efficiency is effectively improved, the drawing of the high-result area can be realized only through a pipeline line diagram, and the workload of subsequent updating is effectively reduced.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and a system for drawing a high-result region, a readable storage medium, and a computer device.
Background
With the development of life and urbanization, the natural gas pipeline industry may also face more challenges and changes as the social concerns about energy sustainability and environmental protection increase. In the area after the natural gas pipeline is mapped, the area can be set to be an influence range and an area of natural gas leakage according to the flow, the geographic environment, the social environment and other conditions of the natural gas pipeline, and then the range is called a high-consequence area. In the past, the high-consequence area with the length of hundreds of meters to more than ten kilometers is manually drawn along the pipeline on the map, and the method is not only lagging and labor-consuming, and the drawing result can cause inaccurate data and can not evaluate the affected area of the accurate high-consequence area because of the level of each drawn person. The auditor in the later period also needs to audit the drawing accuracy of the whole high-result area, a large amount of verification is also needed, and a large number of uncontrollable factors exist in the middle of the verification to unsatisfied redrawn, so that the cost is huge.
In the prior art, it is assumed that as the natural gas pipeline continues to be built and as urban areas, ecosystems, water areas, meteorological conditions, address conditions, social factors and legal permissions are changed, the high-consequence area of the natural gas pipeline also changes, and if the high-consequence area is continuously mapped manually, a great deal of time cost and labor cost are required to accurately maintain the update of the high-consequence area and the accurate area of the high-consequence area.
Disclosure of Invention
Based on this, an object of the present invention is to provide a method, a system, a readable storage medium and a computer device for drawing a high-result region, so as to at least solve the above-mentioned drawbacks of the prior art.
In a first aspect, the present invention provides a method for drawing a high-consequence region, the method comprising:
acquiring a line of each natural gas pipeline and a line relation between each natural gas pipeline;
constructing a pipeline circuit diagram based on the circuit and the circuit relation;
initializing a pipeline circuit diagram, acquiring each node in the pipeline circuit diagram, and storing each node into a node list, wherein the node list comprises an open list and a closed list;
judging each node based on estimated cost to distinguish each node to obtain a node to be explored and an explored node, storing the node to be explored into the open list, storing the explored node into the closed list, and checking whether the adjacent node of the target node to be explored is in the open list;
if the adjacent node is in the open list, checking the actual cost of the adjacent node, and if the actual cost is smaller than a preset actual cost, updating the actual cost to obtain an reachable path;
calculating combinable circuits in the pipeline circuit diagram based on a graph algorithm and the reachable paths to obtain combined circuit paths;
acquiring the position of each laying point in the combined line path;
and searching the line position closest to each laying point in the combined line path to intercept path information, and drawing a high-result area based on the path information.
Compared with the prior art, the invention has the beneficial effects that: the pipeline circuit diagram is constructed through the circuit and circuit relation, the reachable path is obtained through updating the actual cost, the merged circuit path is obtained through calculation of the reachable path in the pipeline circuit diagram, then the path information in the merged circuit path is intercepted, and the high-result area is drawn according to the path information, so that the high-result area can be drawn quickly, the drawing efficiency is improved effectively, the drawing of the high-result area can be realized only through the pipeline circuit diagram, and the workload of subsequent updating is reduced effectively.
Further, the step of obtaining the line relationship between each natural gas pipeline and each natural gas pipeline includes:
acquiring lines of each natural gas pipeline, and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
and extracting key areas of each natural gas pipeline, and generating line intersection points based on the key areas.
Further, after the step of checking whether the neighboring node of the target node to be explored is in the open list, the method further includes:
and if the adjacent node is not in the open list, adding the adjacent node to the open list, and recording path information of the adjacent node.
Further, the step of drawing the high-result area based on the path information includes:
obtaining the geometric object type of the path information, obtaining a high-result pipeline line, and obtaining a value of a high-result area based on the high-result pipeline line;
converting the geometric object type into a geometric data structure, and calculating and generating a buffer area based on the geometric data structure and the value of the high-consequence area;
and drawing a high-result area according to the buffer area.
In a second aspect, the present invention provides a high-outcome region rendering system, the system comprising:
the first acquisition module is used for acquiring the line of each natural gas pipeline and the line relation between each natural gas pipeline;
the construction module is used for constructing a pipeline circuit diagram based on the circuit and the circuit relation;
the system comprises an initialization module, a control module and a control module, wherein the initialization module is used for initializing a pipeline circuit diagram, acquiring each node in the pipeline circuit diagram, and storing each node into a node list, wherein the node list comprises an open list and a closed list;
the judging and distinguishing module is used for judging each node based on the estimated cost so as to distinguish the nodes to be explored from each other to obtain nodes to be explored, storing the nodes to be explored into the open list, storing the explored nodes into the closed list, and checking whether the adjacent nodes of the target nodes to be explored are in the open list;
the checking and updating module is used for checking the actual cost of the adjacent node if the adjacent node is in the open list, and updating the actual cost to obtain an reachable path if the actual cost is smaller than a preset actual cost;
the calculation module is used for calculating the combinable circuits in the pipeline circuit diagram based on a graph algorithm and the reachable paths to obtain combined circuit paths;
the second acquisition module is used for acquiring the positions of all paving points in the combined line path;
and the searching and drawing module is used for searching the line position closest to each laying point in the combined line path so as to intercept the path information and drawing a high-result area based on the path information.
Further, the first acquisition module includes:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the line of each natural gas pipeline and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
and the extraction unit is used for extracting the key areas of each natural gas pipeline and generating line intersection points based on the key areas.
Further, the judging and distinguishing module includes:
and the adding unit is used for adding the adjacent node to the open list and recording the path information of the adjacent node if the adjacent node is not in the open list.
Further, the searching and drawing module includes:
the second acquisition unit is used for acquiring the geometric object type of the path information, acquiring a high-result pipeline line and acquiring a value of a high-result area based on the high-result pipeline line;
a conversion unit, configured to convert the geometric object type into a geometric data structure, and calculate a generated buffer area based on the geometric data structure and the value of the high-result region;
and the drawing unit is used for drawing the high-result area according to the buffer area.
In a third aspect, the present invention also provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the high-outcome region drawing method described above.
In a fourth aspect, the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the high-result region drawing method described above when executing the computer program.
Drawings
FIG. 1 is a flow chart of a high-consequence region drawing method in a first embodiment of the invention;
fig. 2 (a) is a schematic diagram before the natural gas pipeline is combined in the first embodiment of the present invention, and fig. 2 (b) is a schematic diagram after the natural gas pipeline is combined in the first embodiment of the present invention;
FIG. 3 is a schematic diagram of a key area in a natural gas pipeline in a first embodiment of the present invention;
FIG. 4 is a schematic diagram of a pipeline diagram in a first embodiment of the present invention;
FIG. 5 is a block diagram of a high-consequence region rendering system in a second embodiment of the invention;
fig. 6 is a block diagram showing a structure of a computer device in a third embodiment of the present invention.
Description of main reference numerals:
10. a memory;
20. a processor;
30. a computer program;
11. a first acquisition module;
12. constructing a module;
13. initializing a module;
14. judging and distinguishing the module;
15. checking an updating module;
16. a computing module;
17. a second acquisition module;
18. and searching a drawing module.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
Referring to fig. 1, a high-result region drawing method according to a first embodiment of the present invention is shown, and the method includes steps S1 to S8:
s1, acquiring a line of each natural gas pipeline and a line relation between each natural gas pipeline;
specifically, the step S1 includes steps S11 to S12:
s11, acquiring lines of each natural gas pipeline, and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
it can be understood that in the process of laying the natural gas pipeline, a plurality of engineering groups are laid, and the input and input length of data of each engineering group is too long, so that the route of the natural gas pipeline is complex, the natural gas pipeline is not continuous, more lines are intermittent, the lines are required to be combined, and the continuity of the lines is ensured, and in particular, refer to fig. 2.
It is worth to say that the merging of the lines mainly ensures that the integrity of the data improves the efficiency of the subsequent path searching of the high-result area, and the merging of a plurality of lines in the later period of line planning, and the drawing of the high-result area is performed through the merged lines.
S12, extracting key areas of each natural gas pipeline, and generating line intersection points based on the key areas;
it will be appreciated that as shown in fig. 3, for a region where there are multiple pipelines passing through a certain dense area of a person's mouth or where protection is important during the laying of natural gas pipelines, for example: in the elliptical area, the tracks are not intersected with data at the logic level, so that two high-result areas need to be drawn to cover the elliptical area, if the high-result areas are intersected at more complex pipelines, the high-result areas are directly connected with a2 to b2, and the high-result areas are directly connected with a2 to b2, so that a and b are known whether intersection points exist at the logic level, and the intersection points of a and b are calculated. The line intersection between a and b can be generated by the accent region.
It should be noted that, if the intersection point exists between the two lines a and b, if so, the line a is cut into four lines a1, c, a2, b1, c and b 2.
S2, constructing a pipeline circuit diagram based on the circuit and the circuit relation;
it will be appreciated that many natural gas pipelines are known, and how each line has a relationship to a line is queried for the relationship of one point in a line to another point in other lines, so these lines are constructed as a graph, particularly as shown in fig. 4, which shows a pipeline graph.
S3, initializing a pipeline circuit diagram, acquiring each node in the pipeline circuit diagram, and storing each node into a node list, wherein the node list comprises an open list and a closed list;
it should be explained that a heuristic function is used to estimate the cost from the current node to the target node, this estimate being used to select the next node to be expanded. It is therefore necessary to initialize the pipeline graph and then acquire each node in the pipeline graph based on the pipeline graph.
It will be appreciated that an open list is used to store the nodes to be explored, and a closed list is used to store the explored nodes.
S4, judging each node based on the estimated cost to distinguish the nodes to be explored from each other to obtain nodes to be explored and explored nodes, storing the nodes to be explored into the open list, storing the explored nodes into the closed list, and checking whether adjacent nodes of the target nodes to be explored are in the open list;
it will be appreciated that the open list is used to store the nodes to be explored, and is used to store the nodes to be explored, typically a priority queue (priority queue), in which the nodes are ordered according to the estimated total cost. This ensures that each extended node is the least estimated total cost, the closed list is used to store the explored nodes, avoid repeated exploration of the same node, put the starting node into the open list, and initialize its heuristic estimate to 0.
It should be noted that the node list is used to store information about each node, including information such as a location, an actual cost (actual cost from a start point to the node), an estimated cost (estimated cost from the node to a target), a parent node (for tracking a path), and the like.
It will be appreciated that in this embodiment, assuming a node as n, for each node n, f (n) =g (n) +h (n) is calculated, where g (n) is the actual cost from the start point to the node n, h (n) is the cost estimated by the heuristic function, the node n with the smallest f (n) is selected from the open list for expansion, the neighboring nodes m of the node n are checked, g (m) and h (m) of m are calculated, if the node m is not in the open list, they are added to the open list, and n is marked as the parent node of m, g (m) and h (m) are updated at the same time, if the node m is already in the open list, it is checked whether the new g (m) is smaller than the old g (m), and if so, g (m) and the parent node are updated.
Specifically, after the step S4, step S41 is further included:
and S41, if the adjacent node is not in the open list, adding the adjacent node to the open list, and recording path information of the adjacent node.
S5, if the adjacent node is in the open list, checking the actual cost of the adjacent node, and if the actual cost is smaller than a preset actual cost, updating the actual cost to obtain an reachable path;
it will be appreciated that the node with the lowest estimated total cost (estimated total cost = actual cost + heuristic cost) is selected from the open list, the selected node is moved into the closed list, the neighbors of the selected node are checked, for each neighbor, the actual cost (typically the actual cost from the start point to the current node plus the cost from the current node to the neighbors), the heuristic cost (estimated cost from the neighbors to the target node) is calculated, and the estimated total cost is calculated, if the neighbor is not in the open list, it is added to the open list and its parent node is recorded, if the neighbor is already in the open list, it is checked whether the new actual cost is smaller, and if so, the actual cost and the parent node are updated.
It should be explained that the termination condition is that when the target node is moved into the closed list, indicating that the shortest path has been found, the path can be reconstructed from the target node back to the starting node, starting from the target node back all the way along the parent node of each node to the starting point, to reconstruct the shortest path.
It should be noted that a heuristic function is generally denoted as h (n) for estimating the cost from the current node n to the target node. This estimation function must fulfil the following condition:
h (n) should not be overestimated, i.e., h (n) should be an optimistic estimate;
h (n) does not underestimate the cost, so that the algorithm spends more time on unnecessary nodes;
typically Manhattan distance, euclidean distance, chebyshev distance, etc. are used as heuristic functions, with the specific choice depending on the nature and requirements of the problem. The key to the algorithm is its heuristic function (heuristic function). This function is used to estimate the cost from the current node to the target node, typically satisfying the following conditions;
heuristic functions do not underestimate costs, otherwise algorithms may take more time on unnecessary nodes;
the heuristic function does not overestimate the cost (i.e., it should be an optimistic estimate) otherwise the algorithm may not find the optimal path.
In addition, in the implementation, as shown in fig. 4, some lines that need to be passed from line a to line J are calculated through a graph algorithm, and the lines passed from line a to line J are combined into one line through a line combining technology.
S6, calculating combinable circuits in the pipeline circuit diagram based on a graph algorithm and the reachable paths to obtain combined circuit paths;
s7, acquiring the position of each laying point in the combined line path;
s8, searching the line position closest to each paving point in the combined line path to intercept path information, and drawing a high-result area based on the path information;
specifically, the step S8 includes steps S81 to S83:
s81, obtaining the geometric object type of the path information, and obtaining a pipeline line with high results, and obtaining a value of a high result area based on the pipeline line with high results;
it will be appreciated that the path information includes a point-to-point path information, and that the high-result area is automatically mapped based on a region of the path information, before which the geometric object type of the path information needs to be determined. It should be explained that the value of the high-consequence region is in particular the distance of the high-consequence region.
S82, converting the geometric object type into a geometric data structure, and calculating and generating a buffer area based on the geometric data structure and the value of the high-result area;
it will be appreciated that the shape of the generated buffer is calculated from the values of the aggregate object type and the high-outcome region, in particular, for points, a circle is generated whose radius is equal to the distance of the high-outcome region, for lines, parallel lines of line segments are generated from the distance of the high-outcome region, and an arc is created at each line segment end point, for polygons, an external buffer or an internal buffer of the polygon is generated, depending on the positive and negative values of the distance number of the high-outcome region. The inner buffer is typically used to create a buffer-mitigating geometry object shape, while the outer buffer is used to create an expanding geometry object shape, processing arcs and curve subdivision as needed, buffer generation may include arcs and curves. These arcs and curves may be represented by dividing them into a series of line segments for drawing or rendering on a computer. If there are overlapping portions in the generated buffers, they are merged by BufferOp to ensure that the generated geometric objects are correct.
S83, drawing a high-result area according to the buffer area;
in particular implementations, after the calculation is completed, the BufferOp returns a high-outcome region representing the geometric object that generated the buffer.
In summary, in the high-result region drawing method in the above embodiment of the present invention, a pipeline circuit diagram is constructed through a circuit-circuit relationship, an reachable path is obtained through updating an actual cost, a merged circuit path is obtained through calculation of the reachable path in the pipeline circuit diagram, then path information in the merged circuit path is intercepted, and a high-result region is drawn according to the path information, so that the high-result region can be quickly drawn, drawing efficiency is effectively improved, drawing of the high-result region can be realized only through the pipeline circuit diagram, and workload of subsequent updating is effectively reduced.
Second embodiment
Referring to fig. 5, a high-consequence region drawing system according to a second embodiment of the present invention is shown, the system comprising:
a first obtaining module 11, configured to obtain a line of each natural gas pipeline and a line relationship between each natural gas pipeline;
a construction module 12 for constructing a pipeline circuit diagram based on the circuit and the circuit relationship;
the initialization module 13 is configured to initialize a pipeline circuit diagram, acquire each node in the pipeline circuit diagram, and store each node in a node list, where the node list includes an open list and a closed list;
the judging and distinguishing module 14 is configured to judge each node based on the estimated cost, so as to distinguish the nodes to obtain a node to be explored and an explored node, store the node to be explored in the open list, store the explored node in the closed list, and check whether the neighboring node of the target node to be explored is in the open list;
a checking and updating module 15, configured to check an actual cost of the neighboring node if the neighboring node is in the open list, and update the actual cost to obtain an reachable path if the actual cost is less than a preset actual cost;
a calculation module 16, configured to calculate a combinable line in the pipeline circuit diagram based on a graph algorithm and the reachable path, to obtain a combined line path;
a second obtaining module 17, configured to obtain a position of each laying point in the merged route;
the finding and drawing module 18 is configured to find a line position closest to the paving points in the merged route to intercept route information, and draw a high-result area based on the route information.
In some alternative embodiments, the first obtaining module 11 includes:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the line of each natural gas pipeline and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
and the extraction unit is used for extracting the key areas of each natural gas pipeline and generating line intersection points based on the key areas.
In some alternative embodiments, the judgment discriminating module 14 includes:
and the adding unit is used for adding the adjacent node to the open list and recording the path information of the adjacent node if the adjacent node is not in the open list.
In some alternative embodiments, the look-up rendering module 18 includes:
the second acquisition unit is used for acquiring the geometric object type of the path information, acquiring a high-result pipeline line and acquiring a value of a high-result area based on the high-result pipeline line;
a conversion unit, configured to convert the geometric object type into a geometric data structure, and calculate a generated buffer area based on the geometric data structure and the value of the high-result region;
and the drawing unit is used for drawing the high-result area according to the buffer area.
The functions or operation steps implemented when the above modules and units are executed are substantially the same as those in the above method embodiments, and are not described herein again.
The implementation principle and the generated technical effects of the electricity purchasing management system provided by the embodiment of the invention are the same as those of the embodiment of the method, and for the sake of brief description, the corresponding contents in the embodiment of the method can be referred to for the parts of the embodiment of the system which are not mentioned.
Example III
The present invention also proposes a computer device, referring to fig. 6, which shows a computer device according to a fourth embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and capable of running on the processor 20, where the processor 20 implements the above-mentioned high-result region drawing method when executing the computer program 30.
The memory 10 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. Memory 10 may in some embodiments be an internal storage unit of a computer device, such as a hard disk of the computer device. The memory 10 may also be an external storage device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. Further, the memory 10 may also include both internal storage units and external storage devices of the computer apparatus. The memory 10 may be used not only for storing application software installed in a computer device and various types of data, but also for temporarily storing data that has been output or is to be output.
The processor 20 may be, in some embodiments, an electronic control unit (Electronic Control Unit, ECU), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, for executing program codes or processing data stored in the memory 10, such as executing an access restriction program, or the like.
It should be noted that the structure shown in fig. 6 does not constitute a limitation of the computer device, and in other embodiments, the computer device may include fewer or more components than shown, or may combine certain components, or may have a different arrangement of components.
The embodiment of the invention also provides a readable storage medium, on which a computer program is stored, which when executed by a processor implements the high-result region drawing method as described above.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.
Claims (8)
1. A method for high-outcome region rendering, the method comprising:
acquiring a line of each natural gas pipeline and a line relation between each natural gas pipeline;
constructing a pipeline circuit diagram based on the circuit and the circuit relation;
initializing a pipeline circuit diagram, acquiring each node in the pipeline circuit diagram, and storing each node into a node list, wherein the node list comprises an open list and a closed list;
judging each node based on estimated cost to distinguish each node to obtain a node to be explored and an explored node, storing the node to be explored into the open list, storing the explored node into the closed list, and checking whether adjacent nodes of the node to be explored are in the open list;
the open list is used for storing the nodes to be explored, and sorting is carried out according to estimated total cost to ensure that the nodes to be explored are stored in the open list, wherein the estimated total cost is actual cost plus heuristic cost, the actual cost is the actual cost of the current node plus the cost from the current node to the adjacent node, and the heuristic cost is the estimated cost from the adjacent node to the target node;
if the adjacent node is in the open list, checking the actual cost of the adjacent node, and if the actual cost is smaller than a preset actual cost, updating the actual cost to obtain an reachable path;
calculating combinable circuits in the pipeline circuit diagram based on a graph algorithm and the reachable paths to obtain combined circuit paths;
acquiring the position of each laying point in the combined line path;
searching the line position closest to each laying point in the combined line path to intercept path information, and drawing a high-result area based on the path information;
the step of drawing the high-result area based on the path information includes:
obtaining the geometric object type of the path information, obtaining a high-result pipeline line, and obtaining a value of a high-result area based on the high-result pipeline line;
converting the geometric object type into a geometric data structure, and calculating and generating a buffer area based on the geometric data structure and the value of the high-consequence area;
and drawing a high-result area according to the buffer area.
2. The high-consequence area mapping method according to claim 1, wherein the step of obtaining the line of each natural gas pipeline and the line relationship between each of the natural gas pipelines comprises:
acquiring lines of each natural gas pipeline, and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
and extracting key areas of each natural gas pipeline, and generating line intersection points based on the key areas.
3. The high-consequence region drawing method according to claim 1, characterized in that, after the step of checking whether the neighboring node of the node to be explored is in the open list, the method further comprises:
and if the adjacent node is not in the open list, adding the adjacent node to the open list, and recording path information of the adjacent node.
4. A high-outcome region mapping system, the system comprising:
the first acquisition module is used for acquiring the line of each natural gas pipeline and the line relation between each natural gas pipeline;
the construction module is used for constructing a pipeline circuit diagram based on the circuit and the circuit relation;
the system comprises an initialization module, a control module and a control module, wherein the initialization module is used for initializing a pipeline circuit diagram, acquiring each node in the pipeline circuit diagram, and storing each node into a node list, wherein the node list comprises an open list and a closed list;
the judging and distinguishing module is used for judging each node based on estimated cost, so as to distinguish each node to obtain a node to be explored and an explored node, storing the node to be explored into the open list, storing the explored node into the closed list, checking whether adjacent nodes of the node to be explored are in the open list, wherein the open list is used for storing the nodes to be explored, sorting is carried out according to estimated total cost so as to ensure that the nodes to be explored are stored in the open list, the estimated total cost is the actual cost plus heuristic cost, the actual cost is the actual cost of the current node plus the cost from the current node to the adjacent nodes, and the heuristic cost is the estimated cost from the adjacent nodes to the target node;
the checking and updating module is used for checking the actual cost of the adjacent node if the adjacent node is in the open list, and updating the actual cost to obtain an reachable path if the actual cost is smaller than a preset actual cost;
the calculation module is used for calculating the combinable circuits in the pipeline circuit diagram based on a graph algorithm and the reachable paths to obtain combined circuit paths;
the second acquisition module is used for acquiring the positions of all paving points in the combined line path;
the searching and drawing module is used for searching the line position closest to each laying point in the combined line path so as to intercept path information and draw a high-result area based on the path information;
the searching and drawing module comprises:
the second acquisition unit is used for acquiring the geometric object type of the path information, acquiring a high-result pipeline line and acquiring a value of a high-result area based on the high-result pipeline line;
a conversion unit, configured to convert the geometric object type into a geometric data structure, and calculate a generated buffer area based on the geometric data structure and the value of the high-result region;
and the drawing unit is used for drawing the high-result area according to the buffer area.
5. The high-outcome region drawing system of claim 4, wherein the first acquisition module comprises:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the line of each natural gas pipeline and combining the lines of each natural gas pipeline to obtain a continuous pipeline line;
and the extraction unit is used for extracting the key areas of each natural gas pipeline and generating line intersection points based on the key areas.
6. The high-outcome region drawing system according to claim 4, wherein the judgment discriminating module comprises:
and the adding unit is used for adding the adjacent node to the open list and recording the path information of the adjacent node if the adjacent node is not in the open list.
7. A readable storage medium having stored thereon a computer program, which when executed by a processor implements the high-outcome region drawing method as claimed in any one of claims 1 to 3.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the high-outcome region drawing method according to any of claims 1 to 3 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311695772.7A CN117437329B (en) | 2023-12-12 | 2023-12-12 | High-consequence region drawing method, system, readable storage medium and computer device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311695772.7A CN117437329B (en) | 2023-12-12 | 2023-12-12 | High-consequence region drawing method, system, readable storage medium and computer device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117437329A CN117437329A (en) | 2024-01-23 |
CN117437329B true CN117437329B (en) | 2024-03-01 |
Family
ID=89555579
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311695772.7A Active CN117437329B (en) | 2023-12-12 | 2023-12-12 | High-consequence region drawing method, system, readable storage medium and computer device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117437329B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103455724A (en) * | 2013-09-06 | 2013-12-18 | 西南石油大学 | Method for calculating potential affect region of leakage poisoning of sulfur-containing natural gas pipeline |
CN104751733A (en) * | 2013-12-25 | 2015-07-01 | 携程计算机技术(上海)有限公司 | Region drawing method, region drawing device, path distance classifying method and path distance classifying system for maps |
CN112257633A (en) * | 2020-10-29 | 2021-01-22 | 中国安全生产科学研究院 | Pipeline high-consequence area dynamic identification method based on image identification |
CN116486289A (en) * | 2023-06-15 | 2023-07-25 | 西南石油大学 | Gas pipeline high-consequence area identification method driven by multi-source data and knowledge |
CN116862857A (en) * | 2023-07-03 | 2023-10-10 | 智洋创新科技股份有限公司 | Method for extracting infrared image insulator rod core based on skeleton extraction and shortest path |
CN116958319A (en) * | 2023-06-15 | 2023-10-27 | 厦门汉印电子技术有限公司 | Minimum closure area determining method and device, terminal equipment and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10386260B2 (en) * | 2017-03-07 | 2019-08-20 | Accenture Global Solutions Limited | Leak detection for fluid distribution networks using hyperspectral imaging |
CN112884894B (en) * | 2021-04-28 | 2021-09-21 | 深圳大学 | Scene reconstruction data acquisition method and device, computer equipment and storage medium |
-
2023
- 2023-12-12 CN CN202311695772.7A patent/CN117437329B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103455724A (en) * | 2013-09-06 | 2013-12-18 | 西南石油大学 | Method for calculating potential affect region of leakage poisoning of sulfur-containing natural gas pipeline |
CN104751733A (en) * | 2013-12-25 | 2015-07-01 | 携程计算机技术(上海)有限公司 | Region drawing method, region drawing device, path distance classifying method and path distance classifying system for maps |
CN112257633A (en) * | 2020-10-29 | 2021-01-22 | 中国安全生产科学研究院 | Pipeline high-consequence area dynamic identification method based on image identification |
CN116486289A (en) * | 2023-06-15 | 2023-07-25 | 西南石油大学 | Gas pipeline high-consequence area identification method driven by multi-source data and knowledge |
CN116958319A (en) * | 2023-06-15 | 2023-10-27 | 厦门汉印电子技术有限公司 | Minimum closure area determining method and device, terminal equipment and readable storage medium |
CN116862857A (en) * | 2023-07-03 | 2023-10-10 | 智洋创新科技股份有限公司 | Method for extracting infrared image insulator rod core based on skeleton extraction and shortest path |
Non-Patent Citations (2)
Title |
---|
Improved quantitative risk assessment of a natural gas pipeline considering high-consequence areas;Yuanbo Yin et al.;Reliability Engineering & System Safety;20220930;第225卷;全文 * |
城市燃气钢质管道安全风险与寿命预测方法研究及实证应用;龙会成;中国博士学位论文全文数据库 工程科技Ⅱ辑;20200615;第2020卷(第06期);第C038-66页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117437329A (en) | 2024-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10147057B2 (en) | Systems and methods for flood zone modeling | |
Bader et al. | Detecting and resolving size and proximity conflicts in the generalization of polygonal maps | |
Han et al. | Approximate parameter synthesis for probabilistic time-bounded reachability | |
CN111310674B (en) | Remote sensing monitoring method and device for river ecological buffer zone based on grid division technology | |
Zhao et al. | Mathematical morphology-based generalization of complex 3D building models incorporating semantic relationships | |
CN109086291B (en) | Parallel anomaly detection method and system based on MapReduce | |
Giunchiglia et al. | Reasoning with quantified boolean formulas | |
EP3637057A1 (en) | Method, device, system and storage medium for storing and loading visual positioning map | |
CN112985443B (en) | Path planning method and device and terminal equipment | |
Pađen et al. | Towards automatic reconstruction of 3D city models tailored for urban flow simulations | |
CN113722409A (en) | Method and device for determining spatial relationship, computer equipment and storage medium | |
CN113761093A (en) | Method and device for determining space binary group, computer equipment and storage medium | |
Zhu et al. | Transportation routing map abstraction approach: Algorithm and numerical analysis | |
d’Angelo et al. | Fully dynamic maintenance of arc-flags in road networks | |
CN117437329B (en) | High-consequence region drawing method, system, readable storage medium and computer device | |
CN117521313A (en) | Method and device for leak detection of a pipeline network | |
CA2926400A1 (en) | Global grid building unfaulting sequence for complex fault-network topologies | |
CN112215864A (en) | Contour processing method and device of electronic map and electronic equipment | |
Rav et al. | Flood risk analysis on terrains | |
Wang et al. | An effective algorithm for lines and polygons overlay analysis using uniform spatial grid indexing | |
CN108733725B (en) | Method and system for establishing network semantic model of target system | |
CN114357683B (en) | Ore body modeling method and device based on cross contour line normal dynamic estimation | |
van Dijk et al. | Location‐dependent generalization of road networks based on equivalent destinations | |
CN112036030B (en) | Ore body combination constraint modeling method, device, equipment and storage medium | |
CN115209429A (en) | Method, device and equipment for evaluating signal coverage rate of positioning base station and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |