Pipeline alarm point three-dimensional coordinate calculation method and system based on inflection point path
Through the three-dimensional coordinate calculation method based on the inflection point path, the problem that pipeline monitoring equipment cannot provide accurate geographic coordinates is solved, high-precision and rapid alarm point positioning is achieved, and the emergency response efficiency and system automation level are improved.
Patent Information
- Application Number
- CN202510821348.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-19
AI Technical Summary
Existing pipeline monitoring equipment cannot directly provide the precise geographic coordinates of the alarm point, resulting in inefficient fault location and limiting the implementation of subsequent automation functions.
By obtaining the coordinates and numbers of multiple inflection points of the pipeline, sorting them by inflection point numbers, calculating the cumulative distance table, determining the adjacent inflection point intervals of the alarm point, and using linear interpolation to calculate the latitude, longitude and elevation of the alarm point, and outputting its geographic coordinates.
It achieves high-precision and rapid spatial positioning of alarm points, improves emergency response efficiency, and is suitable for monitoring systems of various broken line paths. It provides latitude, longitude and altitude information to facilitate subsequent system integration.
Smart Images

Figure CN120668135A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of spatial geographic information technology and intelligent pipeline monitoring, and in particular to a three-dimensional spatial coordinate calculation method based on pipeline inflection point data and alarm distance. Background Art
[0002] Pipeline monitoring equipment is crucial in scenarios like oil and gas pipeline leaks and cable failures. Its necessity lies in several key aspects: First, it can detect and locate leaks or fault points in real time or near real time, significantly shortening response time and minimizing the risk of catastrophic accidents such as explosions, fires, and environmental pollution caused by leaks, thereby protecting life, property, and the ecological environment. Second, by promptly detecting early abnormalities or minor leaks (early warnings), it can contain accidents in their infancy, significantly reducing the subsequent high costs of emergency response, production and transportation suspensions, pollution control, asset repair, and environmental damage compensation. Third, continuous monitoring of key parameters such as pipeline pressure, temperature, sound waves, vibration, current, and partial discharge helps estimate the pipeline's operating status and health, optimize maintenance strategies, extend asset life, and ensure efficient, reliable, and compliant operation. Therefore, pipeline monitoring equipment is an indispensable core line of defense for public safety, environmental protection, asset integrity, and economic operations.
[0003] However, in existing technologies, pipeline monitoring equipment (such as fiber optic vibration sensors, acoustic wave detectors, pressure monitors, etc.) can usually only obtain the linear distance between the alarm point and the monitoring starting point, but cannot directly provide the precise geographic coordinates (longitude, latitude, elevation) of the alarm point, resulting in fault location relying on manual investigation, which is inefficient.
[0004] Existing pipeline monitoring systems often detect anomalies through sensors installed in the pipeline and issue alarms based on the alarm distance (e.g., the physical distance from the starting point). However, most current systems only provide relative distances or segment numbers, making it difficult to accurately locate the geographic latitude and longitude coordinates and altitude of the alarm point. This limits the implementation of subsequent functions such as map annotation, precision drone inspections, and automated maintenance. Therefore, a method is urgently needed to quickly and accurately calculate the three-dimensional spatial location of the alarm point based on given path data and alarm distance. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for calculating the three-dimensional coordinates of pipeline alarm points based on inflection point paths, taking into account path sequence, spatial length accumulation and linear interpolation, so as to improve the practicality and automation level of the pipeline network alarm system.
[0006] To achieve the above object, the present invention provides the following technical solutions: The present invention provides a method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path, the method comprising the following steps: Step S1: Obtain the coordinates and numbers of multiple inflection points of the pipeline; Step S2: Sort by inflection point number and calculate the cumulative distance table from each inflection point to the starting point; Step S3: Determine the adjacent inflection point interval where the alarm point is located according to the cumulative distance table; Step S4: Calculating the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; Step S5: Output the geographical coordinates of the alarm point.
[0007] Furthermore, in a preferred embodiment, each of the above-mentioned inflection points includes longitude, latitude, altitude and burial depth.
[0008] Furthermore, in another preferred embodiment, the above cumulative distance table is calculated as follows: Starting from the first inflection point, the spatial three-dimensional distance from the current point to the previous inflection point is calculated point by point, and the accumulated distance table on the path is accumulated to construct a distance-coordinate mapping.
[0009] Furthermore, in a preferred embodiment, the above-mentioned alarm point section is specifically determined as follows: Find out between which two inflection points the alarm point falls from the cumulative distance table, obtain the two key points before and after, and determine the alarm point section.
[0010] Furthermore, there is a preferred embodiment in which the latitude, longitude and elevation of the alarm point are calculated as follows: According to the proportion of the alarm point distance in the alarm point section, the longitude, latitude, and ground height are calculated using the linear interpolation method.
[0011] Furthermore, in a preferred embodiment, the height interpolation is calculated based on the height difference between the starting and ending points.
[0012] Furthermore, in a preferred embodiment, the geographical coordinates of the alarm point are a three-dimensional coordinate point structure including the longitude, latitude and altitude of the alarm point.
[0013] The method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path described in the present invention can be fully implemented using computer software. Therefore, correspondingly, the present invention also provides a system for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path, the system comprising: A storage device for obtaining the coordinates of multiple inflection points of a pipeline and their numbers; A storage device for sorting by inflection point number and calculating a cumulative distance table from each inflection point to the starting point; A storage device for determining the adjacent inflection point interval where the alarm point is located based on the cumulative distance table; A storage device for calculating the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; A storage device for outputting the geographical coordinates of the alarm point.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is run by a processor, any one of the above-mentioned methods for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path is executed.
[0015] The present invention also provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes any one of the above-mentioned methods for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path.
[0016] The beneficial effects of the present invention are: The present invention provides a method for calculating the three-dimensional coordinates of pipeline alarm points based on inflection point paths. Through pipeline path inflection point data modeling and three-dimensional space interpolation algorithm, the alarm distance detected by the equipment is converted into actual geographic coordinates, solving the core problem of "distance but no coordinates" in the monitoring system. It can significantly improve the emergency response efficiency in scenarios such as oil and gas pipeline leakage, cable failure, and municipal pipeline damage.
[0017] Furthermore, the present invention has the following advantages: High-precision positioning: Ability to calculate the spatial coordinates of the alarm point with less than meter-level accuracy within any path segment; Strong real-time performance: The calculation method is simple and fast, suitable for real-time pipe network monitoring system; Strong versatility: Applicable to the spatial positioning of any broken line path (such as oil pipelines, underground pipe corridors, cable paths, etc.); Facilitates subsequent processing: Providing latitude, longitude, and altitude information facilitates subsequent system integration such as map annotation and automatic flight inspection path calculation.
[0018] The present invention is applicable to intelligent monitoring and early warning systems for linear facilities such as underground pipelines and cables. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is a flow chart of a method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path proposed by the present invention; Figure 2 This is a schematic diagram of linear interpolation of alarm points within a broken line segment according to the present invention. DETAILED DESCRIPTION
[0021] In the following description, the specific implementation details of the "Three-dimensional coordinate calculation method of pipeline alarm points based on inflection point paths" provided in this specification (such as experimental equipment, operating procedures, data processing steps and example parameters) are for illustrative purposes rather than restrictive definitions, and are intended to help those skilled in the art to thoroughly understand the principles and implementation of the present invention; however, those skilled in the art should be clear that these details only represent one of the feasible embodiments, and the core concept of the present invention can be fully implemented through other technical means or workarounds that are not fully described without departing from its spirit, and the omission of conventional experimental methods and device details known in the art in the specification is to avoid redundant information interfering with the understanding of the innovative points. This does not mean that these known technologies are not required during implementation, and technical personnel should be able to supplement and apply them on their own based on professional knowledge.
[0022] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. The following embodiments will help those skilled in the art further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that those skilled in the art may make various changes and improvements without departing from the scope of the present invention, and these are all within the scope of protection of the present invention.
[0023] Implementation Method 1: Combination Figure 1 This embodiment is described. The purpose of this embodiment is to provide a method for calculating the three-dimensional coordinates of pipeline alarm points based on inflection point paths, taking into account path sequence, spatial length accumulation and linear interpolation, so as to improve the practicality and automation level of the pipeline network alarm system.
[0024] like Figure 1 As shown, the calculation method includes the following steps: Step S1: Obtain the coordinates and numbers of multiple inflection points of the pipeline; Step S2: Sort by inflection point number and calculate the cumulative distance table from each inflection point to the starting point; Step S3: Determine the adjacent inflection point interval where the alarm point is located according to the cumulative distance table; Step S4: Calculating the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; Step S5: Output the geographical coordinates of the alarm point.
[0025] Implementation Method 2: Combination Figure 2 This embodiment is described. This embodiment specifically describes the method for calculating the three-dimensional coordinates of the pipeline alarm point based on the inflection point path proposed in the first embodiment above. Step S1: Obtain the coordinates and numbers of multiple inflection points of the pipeline; Specifically: This step is the input data preparation step, including the pipeline path inflection point set List <ardtubesdetails>The distance from the alarm point (for example, 100 meters relative to the starting point of the path); the path inflection point set includes the coordinates of multiple inflection points of the pipeline and their numbers; each inflection point includes longitude, latitude, altitude and burial depth.
[0026] Step S2: Sort by inflection point number and calculate the cumulative distance table from each inflection point to the starting point; This step is to pre-process and sort the inflection points and calculate the cumulative distance of the path, specifically: First, the pipeline path is sorted in ascending order by inflection point number to ensure the correct path sequence. Then, starting from the first inflection point, the three-dimensional spatial distance from the current point to the previous inflection point is calculated point by point, and the accumulated distance table is accumulated to form a distance-coordinate mapping. The distance calculation uses the Euclidean space distance or the approximate spherical distance algorithm.
[0027] Step S3: Determine the adjacent inflection point interval where the alarm point is located according to the cumulative distance table; This step is to determine the alarm point section, specifically: From the accumulated distance, we can find the two inflection points between which the alarm point falls, and obtain the two key points before and after, thus determining the alarm point section. In actual application, we can use TreeMap to quickly find the pipeline section where the alarm point is located.
[0028] Step S4: Calculating the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; This step involves calculating the longitude, latitude, and elevation of the alarm point using a three-dimensional interpolation method. Specifically, linear interpolation is used to calculate the longitude, latitude, and ground height based on the proportion of the alarm point's distance to the segment. The height interpolation is also calculated based on the height difference between the starting and ending points. Figure 2 It shows the interpolation of alarm points within the polyline segment.
[0029] Step S5: Output the geographical coordinates of the alarm point.
[0030] This step outputs a three-dimensional coordinate point structure GeoPoint containing the longitude, latitude, and altitude of the alarm point.
[0031] In summary, this embodiment provides a method for calculating the three-dimensional coordinates of pipeline alarm points based on inflection point paths. Through pipeline path inflection point data modeling and three-dimensional space interpolation algorithm, the alarm distance detected by the equipment is converted into actual geographic coordinates, solving the core problem of "distance but no coordinates" in the monitoring system. It can significantly improve the emergency response efficiency in scenarios such as oil and gas pipeline leaks, cable failures, and municipal pipeline damage.
[0032] Furthermore, the core of the calculation method proposed in this embodiment is: 1. Cumulative distance calculation: Calculate the cumulative distance along the pipeline inflection point and establish a distance-coordinate mapping.
[0033] 2. Interval positioning: Quickly find the pipeline interval where the alarm point is located through TreeMap.
[0034] 3. Linear interpolation: Calculate the latitude, longitude and elevation of the alarm point proportionally between adjacent inflection points.
[0035] It has the following advantages: 1. High precision: more accurate than traditional manual estimation.
[0036] 2. Automation: Applicable to intelligent pipeline monitoring system to reduce manual intervention.
[0037] 3. Efficient computing: Utilizes TreeMap to optimize search, suitable for large-scale pipeline networks.
[0038] Implementation 3: This implementation is to provide a practical explanation of the method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path described in Implementation 1 or Implementation 2 above. This embodiment uses Java pseudo code to complete the calculation of the three-dimensional coordinates of the pipeline alarm point.
[0039] The specific steps include: Step 1: Data preprocessing - inflection point sorting; Purpose: To establish a topological basis for subsequent distance calculations; The pseudo code to implement the logic is: / / Sort by inflection point number in ascending order (to ensure path continuity) ardTubesDetails.sort(Comparator.comparingInt(p -> Integer.parseInt(p.getInflectionPointNumber()))); The technical points are: use Comparator.comparingInt to implement custom sorting rules and convert string numbers into numerical comparisons.
[0040] Step 2: Distance modeling - cumulative distance table construction; Purpose: To establish a path distance reference system.
[0041] The pseudo code to implement the logic is: double distance = 0.0; / / The total length of the path is reset to zero TreeMap<Integer, Double> distanceMap = new TreeMap<>(); / / Ordered mapping of serial number → distance for (int i = 1; i < points.size(); i++) { / / Traverse adjacent points double segDist = getDistance(points[i], points[i - 1]); distance += segDist; / / Distance accumulator distanceMap.put(i, distance); / / Record the cumulative distance of the inflection point } The technical key points are: Using TreeMap to automatically maintain the order of inflection point serial numbers; Using a distance accumulator to achieve path length calculation with O(n) complexity; Key data structure: <inflection point index, cumulative distance to the starting point>.
[0042] Step 3: Section positioning - Binary search optimization; Purpose: Quickly determine the path interval where the alarm point is located The pseudo-code for the implementation logic is: int segmentIndex = 1; / / Starting inflection point index / / Linearly search for the first inflection point that exceeds the alarm distance while (distanceMap.get(segmentIndex) < alarmPointDistance) { segmentIndex++; / / Locate to the end point of the target section } The technical key points are: Optimal time complexity: O(log n) (can actually be changed to binary search); Loop termination condition: Cumulative distance ≥ alarm point distance; Output result: segmentIndex identifies the end point of the section where the alarm point is located.
[0043] Step 4: Precise positioning - Linear interpolation calculation; / / Calculate coordinates by vector interpolation GeoPoint alarmPoint = interpolateGeoPoint( points[segmentIndex - 1], / / starting point of the segment points[segmentIndex], / / segment end point offset / / The distance to move along the path ); The pseudo code of interpolation principle is: P_alarm = P_start + (P_end - P_start) * (offset / segmentLength) The key technical points are: distance compensation mechanism: total distance minus cumulative distance of previous point; spatial interpolation method: positioning along the line connecting two points according to the distance ratio; coordinate system processing: applicable to geographic coordinate systems such as WGS84 / UTM.
[0044] In summary, the method for calculating the three-dimensional coordinates of pipeline alarm points described in this embodiment completes topological preparation by sorting inflection points, establishes a distance reference system through distance modeling, locks intervals through segment positioning, and accurately outputs the geographic coordinates of the alarm point through coordinate interpolation. This effectively solves the core problem of "distance without coordinates" in monitoring systems, significantly improving emergency response efficiency for scenarios such as oil and gas pipeline leaks, cable failures, and municipal pipe network damage.
[0045] Furthermore, the following functions are also implemented: High-precision positioning function: It can calculate the spatial coordinates of the alarm point with an accuracy of less than meter level within any path segment; Strong real-time function: the calculation method is simple and fast, suitable for real-time pipe network monitoring system; Strong versatility: Applicable to the spatial positioning of any broken line path (such as oil pipelines, underground pipe corridors, cable paths, etc.); Facilitates subsequent processing functions: Providing latitude, longitude, and altitude information to facilitate subsequent system integration such as map annotation and automatic flight inspection path calculation.
[0046] Implementation 4: The method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path described in any of the above implementations can be implemented entirely using computer software. Therefore, correspondingly, this implementation provides a system for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path, the system comprising: A storage device for obtaining the coordinates of multiple inflection points of a pipeline and their numbers; A storage device for sorting by inflection point number and calculating a cumulative distance table from each inflection point to the starting point; A storage device for determining the adjacent inflection point interval where the alarm point is located based on the cumulative distance table; A storage device for calculating the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; A storage device for outputting the geographical coordinates of the alarm point.
[0047] Implementation method 5. This implementation method provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path as described in any one of the above implementation methods is executed.
[0048] Implementation method six. This implementation method provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes any one of the above-mentioned methods for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path.
[0049] This embodiment provides a computer device. The hardware devices in this part are of general models and are not shown in the form of diagrams. The system includes a processor and a memory, wherein the processor and the memory can be connected via a bus or other means. The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, and corresponding program instructions / modules. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory, so as to implement the method and steps for calculating the three-dimensional coordinates of the pipeline alarm point based on the inflection point path in the above-mentioned method embodiment.
[0050] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0051] The foregoing description is merely an embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of the claims.< / ardtubesdetails>
Claims
1. A method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path, characterized in that: The method is: S1: Get the coordinates and numbers of multiple inflection points of the pipeline; S2: Sort by inflection point number and calculate the cumulative distance table from each inflection point to the starting point; S3: Determine the adjacent inflection point interval where the alarm point is located according to the cumulative distance table; S4: Calculate the latitude, longitude and elevation of the alarm point based on the determined adjacent inflection point intervals using a linear interpolation method; S5: Output the geographical coordinates of the alarm point.
2. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 1, characterized in that: Each inflection point contains longitude, latitude, altitude and burial depth.
3. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 1, characterized in that: The cumulative distance table is as follows: Starting from the first inflection point, the spatial three-dimensional distance from the current point to the previous inflection point is calculated point by point, and the accumulated distance table on the path is accumulated to construct a distance-coordinate mapping.
4. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 1, characterized in that: S3 specifically: Find out between which two inflection points the alarm point falls from the cumulative distance table, obtain the two key points before and after, and determine the alarm point section.
5. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 1, characterized in that: S4 is specifically: According to the proportion of the alarm point distance in the alarm point section, the longitude, latitude, and ground height are calculated using the linear interpolation method.
6. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 5, characterized in that: Height interpolation is calculated based on the height difference between the starting and ending points.
7. The method for calculating the three-dimensional coordinates of pipeline alarm points based on an inflection point path according to claim 1, characterized in that: The geographic coordinates of the alarm point are a three-dimensional coordinate point structure that includes the longitude, latitude, and altitude of the alarm point.
8. A pipeline alarm point three-dimensional coordinate calculation system based on inflection point path, characterized in that: The system includes a storage device, which is used to execute the method and steps described in claim 1.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path according to any one of claims 1 to 7.
10. A computer device, characterized in that: The device includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method for calculating the three-dimensional coordinates of a pipeline alarm point based on an inflection point path as described in any one of claims 1 to 7.