Optimal path planning method based on fire rescue road network directed graph
By constructing a dynamic weight model based on the directed graph of the fire rescue road network and using the Dijkstra algorithm to calculate the shortest path, the problem of inaccurate fire rescue path planning in the existing technology is solved and the rescue efficiency is improved.
Patent Information
- Application Number
- CN202511171361.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-21
AI Technical Summary
The existing fire rescue path planning algorithm does not take into account the road priority of fire trucks, resulting in inaccurate path planning and affecting rescue efficiency.
Based on the directed graph of the fire rescue road network, a dynamic weight model is constructed through open street maps, remote sensing images and real-time traffic data, the road network directed graph is reconstructed, and the Dijkstra algorithm is used to calculate the shortest path.
It improves the accuracy of path planning and rescue efficiency, ensuring that fire trucks can plan routes reasonably and cover a larger area.
Smart Images

Figure CN120688717A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of emergency rescue, and in particular relates to an optimal path planning method based on a directed graph of a fire rescue road network. Background Art
[0002] In the field of emergency rescue, the rescue efficiency of fire trucks depends on the effectiveness of the path planning algorithm. Fire trucks are not restricted by speed, route, direction, or command signals when carrying out their missions, while ensuring safety. The construction and calculation of path planning algorithms generally rely on a directed graph model of the road network. The directed graph of the fire rescue road network should be different from that of ordinary vehicles. However, existing fire rescue dispatch systems often directly call the ordinary vehicle route planning API in online maps to determine the rescue path. However, this path planning method is inconsistent with actual applications. The traffic network in online maps does not take into account the right of way for rescue vehicles. The calculated driving path does not necessarily represent the actual driving path of the fire truck, and therefore cannot represent the shortest route. This method may lead to an underestimation of the fire rescue coverage area, resulting in low accuracy and restricting the improvement of fire rescue efficiency.
[0003] Patent application publication number CN114611797A provides a GIS-based path planning urban rescue assistance system, including a drone detection module, a vehicle management module, a road monitoring module, an urban construction map, a route planning module, an audit and reporting module, and a central coordination module. The drone detection module is used to survey road conditions within a 2-kilometer radius of the rescue vehicle from high altitude; the vehicle management module is used to survey all vehicle information on the rescue route using big data; the road monitoring module is used to survey all vehicle information on the rescue route using road cameras; and the urban construction map is used to present a diagram of the city's road traffic network. This patent application uses GIS path planning to achieve urban rescue assistance, but similarly does not consider the right of way for vehicles not being rescued, resulting in the same drawbacks as the existing technology.
[0004] Therefore, how to make path planning more in line with the path planning requirements in real fire rescue scenarios, accurately calculate the driving path of fire rescue, and improve the efficiency of fire rescue is an urgent problem to be solved by people in this technical field. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide an optimal path planning method based on a directed graph of a fire rescue road network, so as to solve the problem in the existing technology that the use of online map path planning cannot accurately calculate the driving path of fire rescue and the efficiency of fire rescue is low.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] The present invention provides an optimal path planning method based on a directed graph of a fire rescue road network, comprising the following steps:
[0008] S10, determine the calculation area and extract the open street map road network, complete data cleaning, obtain remote sensing images and perform preprocessing;
[0009] S20, defining dynamic edges, local dynamic edges, and common edges, identifying road types, fusing road information from remote sensing images with road network data, preprocessing the topological structure of the road network data, and unifying the spatial coordinate system;
[0010] S30. Based on road conditions, field survey data, and real-time traffic influencing factors, determine the comprehensive influencing factors for fire rescue speed to construct a dynamic weight model;
[0011] S40, defining dynamic nodes on dynamic edges, treating ordinary edges as two parallel, non-intersecting, and oppositely directed unidirectional edges, and constructing a directed graph of a fire rescue road network with road priority based on a dynamic weight model;
[0012] S50, using an adjacency list to store the fire rescue road network directed graph data, creating an array of shortest distance records for each node, and initializing a distance array and a priority queue;
[0013] S60, iteratively processing the priority queue based on the Dijkstra algorithm principle, extracting the current shortest distance node each time to perform adjacent node relaxation operation, and updating the queue until all reachable nodes are traversed;
[0014] S70: Analyze the final distance array data, trace back to determine the shortest path trajectory of each intersection node, and output the complete path sequence and its cumulative distance and time.
[0015] Furthermore, the specific steps of S10 are as follows:
[0016] S101. First, clarify the spatial scope of the target area, including a pre-set urban area or a custom arbitrary range;
[0017] S102. Obtain the regional boundaries. Call the API to obtain traffic network data from the Open Street Map for the study area of the city, including road type, length, and connectivity. Alternatively, manually select the edge coordinates of a specific area to achieve delineation based on actual needs.
[0018] S103. Determine the temporal range and spatial coverage of remote sensing images based on the research objectives, select remote sensing images through the public remote sensing data platform, pre-process the remote sensing images including radiation correction, geometric correction, and image enhancement, and perform normalization.
[0019] Furthermore, the specific steps of S20 are as follows:
[0020] S201. Define a two-way road without a fence or other obstruction in the middle as a dynamic edge; define a one-way road or a two-way road with a fence or other obstruction in the middle as a normal edge; define a two-way road with a flower bed or other obstruction in the middle as a partially dynamic road, i.e., a partially dynamic road including a portion of normal edges and a portion of dynamic edges;
[0021] S202, extracting features from the extracted road area, including geometric features of the road, texture features of the road, color features of the road, and other related features;
[0022] S203, using a deep learning algorithm to classify and identify the extracted road features, where the classification is based on identification of road status and traffic attributes;
[0023] S204. Convert the Open Street Map road network and remote sensing image data into a unified format, determine a coordinate system as the base coordinate system, and then use the coord_convert tool in the Python library to convert the coordinate systems of different data sources to the base coordinate system. Verify the accuracy of the converted coordinates and evaluate the overlap accuracy of the Open Street Map road network and remote sensing imagery.
[0024] Furthermore, the specific steps of S30 are as follows:
[0025] S301. All influencing factors are divided into fixed factors F, real-time dynamic factors D, and other special factors S, and standardized. Fixed factors include road section width f1, functional level f2, actual length f3, and capacity f4. Real-time dynamic factors include traffic flow d1, average driving speed d2, traffic control measures d3, signal light control status d4, and current weather conditions d6. Other special factors include the driver's familiarity with the road network s1.
[0026] S302. Optimize the accuracy of fire rescue routes through field research and supplement road static information. The clear height and clearance width of fire trucks are and , ensuring the road height of the road network and width and turning radius Able to meet the passage needs of fire trucks;
[0027] S303. Obtain real-time traffic data, including traffic speed and congestion conditions, through the Baidu Maps real-time traffic API;
[0028] S304. Traffic flow scores are as follows:
[0029]
[0030] Among them, k is the current traffic density, kj is the blocking density, that is, the density when the traffic is completely blocked, γ k is the coefficient;
[0031] Traffic control is scored as follows:
[0032]
[0033] The signal light control performance is scored as follows:
[0034]
[0035] Weather conditions are rated as follows:
[0036] Call the weather data API of the online map development platform to obtain the weather warning event type and warning level in the current area;
[0037]
[0038] Wherein, Wet represents the type of weather warning event, di represents the percentage of driving speed reduction caused by the i-th weather warning event;
[0039]
[0040] Among them, WL represents the level of weather warning events, and DoI represents the degree of impact of the event;
[0041] A weighted accumulation mechanism is used to calculate the comprehensive weather impact score. The formula is as follows:
[0042]
[0043] in, Indicates the average impact of the warning level corresponding to the i-th warning event type;
[0044] Set β as the comprehensive influencing factor of fire rescue speed:
[0045]
[0046] Among them, ω i is the influence weight of the i-th factor, α i is the dimensionless quantitative result of the i-th fixed factor, β i is the dimensionless quantification result of the i-th real-time dynamic factor.
[0047] Furthermore, the specific steps of S40 are as follows:
[0048] S401. Define that fire trucks can turn freely on dynamic edges. The corresponding positions are dynamic nodes. Visualize road segments in the form of points. That is, a dynamic edge consists of a series of dynamic nodes. Obtain all road segments that meet the dynamic edge conditions from the road network and discretize their set segments into a dynamic node sequence:
[0049]
[0050] Where Vd i represents the node sequence discretized by the i-th dynamic edge di;
[0051] For any moving local dynamic edge E pd ∈E, which can be expressed as the union of a finite number of line segments and a dynamic node
[0052] gather:
[0053]
[0054] in, is a normal edge, (n≥1) is the set of dynamic nodes;
[0055] Traverse each local dynamic edge, obtain its dynamic node, and add it to the total sequence set of dynamic nodes:
[0056] ;
[0057] S402: For roads with normal edges, the fire trucks and normal vehicles have the same route during travel. The original traffic network edge is defined as the original one-way edge e = (u, v). The two end nodes of the original one-way edge are shifted to the right by a fixed distance F based on the slope of the edge. d The edge formed after is called the translation unidirectional edge e′=(u′,v′):
[0058] ;
[0059] S403. Define a directed graph G = {V, E, T} for a fire rescue road network, comprising a node set V, a directed edge set E, and an edge type set T, where a node v∈V represents an intersection or endpoint of a road segment; a road segment e∈E represents a directed edge with a starting point, an end point, a road segment number, and other attributes. A road with two-way traffic is considered to be two one-way road segments; td, tds, ts∈T represent the type of the road segment, representing dynamic, locally dynamic, and static types, respectively.
[0060] Furthermore, a new directional relationship is established between the translated node (u′, v′) corresponding to each translated unidirectional edge and the original node (u, v), and their distance length is uniformly set to a fixed value of 1, and the time is 1. Each node corresponds to an integer and is unique in the entire road network, using continuous integer labels (1, 2, ..., N), where N = |V|, based on the latitude and longitude coordinates of all nodes. , compare the horizontal and vertical coordinates one by one to determine the node order:
[0061]
[0062] In order to avoid duplicate numbering caused by floating point errors in coordinates, a tolerance ε needs to be set:
[0063]
[0064] Among them, N id (vi) represents the node flag of the i-th node, with a tolerance of ε of 10 -6 Spend.
[0065] Find the smallest node coordinates and their corresponding node markers 1:
[0066] .
[0067] Furthermore, for directed roads, initial distance weights and corresponding time weights are assigned based on the coordinates. The distance weight is calculated according to the following formula:
[0068]
[0069] Where x and y are the differences between the longitude and latitude of the coordinate plane respectively;
[0070] The initial time weight is set to the travel time T of ordinary vehicles. When the travel time of fire trucks is calculated by calling the comprehensive speed influence factor of each road section, the time weight is changed to .
[0071] Furthermore, the specific steps of S50 are as follows:
[0072] S501. Use an adjacency list to store directed graph data. The distance dictionary d[] records the real-time weights from the starting point to all nodes in the graph. pb[u] indicates that if vertex u has been iteratively processed, pb[u]=1, otherwise it is 0. For the initial node pb[src]=1. The predecessor array pre[] is used to record each predecessor node in the shortest path.
[0073] S502. Initialize all elements except the starting point to a maximum value, i.e., d[else] = ∞. This means that the distances between these nodes are unknown at the beginning, and the distance from the starting point to the starting point is 0. Therefore, the starting point distance is set to d[src] = 0. Create a small root heap priority queue heap to dynamically manage the priorities of the nodes to be processed, so as to quickly insert or extract the node with the smallest current distance in logarithmic time complexity. After the initialization is completed, the starting point and its corresponding distance value are stored in the priority queue;
[0074] S503. Based on the existing data, determine each node and label the name when generating the directed graph of the fire rescue road network. Draw one-way and two-way edges according to the actual road connections, label the weights, determine the fire rescue related elements, represent the fire-related dynamic edges with dotted lines with arrows at both ends, and local dynamic edges with special lines. Mark the fire rescue nodes with dark green, and further distinguish the dynamic nodes. In this way, the drawing of the directed graph of the fire rescue road network is completed.
[0075] Furthermore, the specific steps of step S60 are as follows:
[0076] S601. If the priority queue is not empty, take the top element (d[u], u) from the priority queue, where d[u] is the weight of the current path and u is the current vertex. Check whether the vertex is marked as 1. If it has not been processed, mark it as 1 to avoid subsequent repeated operations and ensure that each node is relaxed only once. If the vertex has been processed, skip it.
[0077] S602. Traverse all adjacent outgoing edges of vertex u and perform relaxation operations. For each edge (u→v), determine whether the edge type is a dynamic edge. If it is a dynamic edge, update d[v]=d[u]+dω(u,v), where dω(u,v) represents the dynamic weight of the dynamic edge (u→v). If it is a normal edge, that is, a unidirectional edge or a bidirectional edge, update d[v]=d[u]+ω(u,v), and insert it to the end of the queue in the form of a (d[v],v) tuple to ensure that the vertex v with the smallest current distance is processed first, and record the predecessor node of v as u, where ω(u,v) represents the weight of the normal edge (u→v).
[0078] S603: Ensure that the mark of each vertex is 1, that is, the elements corresponding to all vertices in the array pb are 1, thereby ensuring that each vertex has been processed.
[0079] Furthermore, the specific steps of S70 are as follows:
[0080] S701, based on the predecessor node of each node, traverse backward from the end point to the starting point, handle the case where there is no predecessor node, and after the path is reconstructed, the order needs to be reversed to generate a forward path sequence;
[0081] S702: Take the distance corresponding to the edge of each shortest path and the travel time obtained by dividing the distance by the fire rescue vehicle speed, and output the total fire rescue travel distance and time by cumulative summation.
[0082] Compared with the prior art, the optimal path planning method based on the directed graph of the fire rescue road network provided by the present invention has at least the following beneficial effects:
[0083] Existing fire rescue dispatch systems usually directly call ordinary vehicle route planning APIs in online maps to determine rescue routes, without considering the road priority rights of rescue vehicles. This approach may lead to an underestimation of the coverage area of fire rescue, low accuracy, and also restrict the improvement of fire rescue efficiency. The present invention utilizes multi-source data such as open street map road networks, road conditions, survey data, real-time road conditions, and integrates remote sensing image data to reconstruct the road network directed graph according to the road priority principle. On this basis, based on the dynamic weight model, an optimal path planning algorithm based on the fire rescue road network directed graph is further constructed. The application of the present invention can effectively make up for the shortcomings of existing research using online map path planning, so that path planning is more in line with the path planning needs in real fire rescue scenarios. Through the present invention, the driving path of fire rescue can be accurately calculated, so that the path can be planned more reasonably and the efficiency of fire rescue can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the figures required for use in the description of the embodiments. Obviously, the figures described below are some embodiments of the present invention. For ordinary technicians in this field, other figures can be obtained based on these figures without paying any creative work.
[0085] Figure 1 A flowchart of an optimal path planning method based on a directed graph of a fire rescue road network provided by an embodiment of the present invention;
[0086] Figure 2 A remote sensing image diagram in the optimal path planning method based on a directed graph of a fire rescue road network provided by an embodiment of the present invention;
[0087] Figure 3 A schematic diagram of dynamically defining edges and nodes of a directed graph of a fire rescue road network according to road priority rights in an optimal path planning method based on a directed graph of a fire rescue road network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0088] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the accompanying drawings. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present disclosure.
[0089] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0090] The present invention provides an optimal path planning method based on a directed graph of a fire rescue road network, which is applied to the rescue path planning process of fire vehicles in the field of emergency rescue. The optimal path planning method based on the directed graph of a fire rescue road network includes the following steps:
[0091] S10. Determine the calculation area and extract the open street map road network, complete data cleaning, obtain remote sensing images and perform preprocessing; S20. Define dynamic edges, local dynamic edges and ordinary edges, identify road types, integrate road information from remote sensing images with road network data, preprocess the topological structure of road network data, and unify the spatial coordinate system; S30. Based on road conditions, field survey data and real-time traffic influencing factors, determine the comprehensive influencing factors for fire rescue speed to construct a dynamic weight model; S40. Define dynamic nodes on dynamic edges, and treat ordinary edges as two parallel, non-intersecting and oppositely directed edges. One-way edges, based on the dynamic weight model, construct a directed graph of the fire rescue road network with road priority; S50, use the adjacency list to store the directed graph data of the fire rescue road network, create an array of the shortest distance records of each node, initialize the distance array and the priority queue; S60, iteratively process the priority queue based on the principle of Dijkstra algorithm, extract the current shortest distance node each time to perform the adjacent node relaxation operation, and update the queue until all reachable nodes are traversed; S70, parse the final distance array data, trace back to determine the shortest path trajectory of each intersection node, and output the complete path sequence and its cumulative distance and time.
[0092] This method utilizes multi-source data, including open street map road networks, road conditions, survey data, and real-time traffic conditions, and integrates remote sensing image data to reconstruct a directed graph of the road network based on the principle of road priority. Based on this, an optimal path planning algorithm based on the directed graph of the fire rescue road network is constructed using a dynamic weight model. This method effectively addresses the shortcomings of existing research using online map-based path planning, making path planning more closely aligned with the path planning requirements of real-world fire rescue scenarios. The method accurately calculates fire rescue routes, enabling more rational path planning and improving fire rescue efficiency.
[0093] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0094] The present invention provides an optimal path planning method based on a directed graph of a fire rescue road network, which is applied to the rescue path planning process of fire trucks in the field of emergency rescue. Figures 1 to 3 In this embodiment, the optimal path planning method based on the fire rescue road network directed graph includes the following steps:
[0095] S10. Determine the calculation area and extract the open street map road network, complete data cleaning, obtain remote sensing images and perform preprocessing
[0096] Specifically, in this embodiment, the specific steps of step S10 are as follows:
[0097] S101. Clarify the spatial scope of the target area. This area can be a pre-set urban area or a custom arbitrary range. The specific scope needs to be pre-determined based on the research purpose and data requirements.
[0098] S102. Obtain the regional boundaries again. Call the API to obtain traffic network data from the Open Street Map for the study area of the city, including road type, length, connection relationship, etc., or manually select the edge coordinates of a specific area to achieve delineation based on actual needs.
[0099] Furthermore, in this embodiment, in order to improve data quality, the original data needs to be cleaned and roads that meet actual needs are screened out. By analyzing the road attributes in the road network data, the road type suitable for ordinary vehicles is selected.
[0100] In this example, the area surrounding a city fire station is used as the research area. The administrative boundaries of this area are obtained, and the corresponding traffic network data from OpenStreetMap is retrieved for this research area. The Overpass API can extract this road network information based on the city ID. Roads suitable for vehicle traffic are selected, such as highways, main roads, and secondary roads. These road types typically include motorway, primary, secondary, and tertiary roads. During this process, roads not suitable for general vehicle traffic, such as bus lanes, footways, and pedestrian streets, are excluded.
[0101] S103. To further supplement the traffic network data, high-resolution remote sensing images corresponding to the study area need to be obtained. The temporal range and spatial coverage of the remote sensing images should be determined according to the research objectives to ensure the temporal and spatial consistency of the remote sensing data and the traffic network data. Remote sensing images should be selected through public remote sensing data platforms, such as Jilin-1, Sentinel-2, or high-resolution commercial satellite data, Tuxin Earth, etc. Figure 2 It is a remote sensing image of the study area obtained through Tuxin Earth, focusing on key parameters such as resolution, band combination and acquisition time.
[0102] Furthermore, in this embodiment, the acquired original image needs to undergo a preprocessing process, including radiation correction, geometric correction, and image enhancement operations, to eliminate the interference of clouds, shadows, and noise, improve the visualization effect and analysis accuracy of the image, and perform normalization processing.
[0103] In this embodiment, for radiometric correction, the dark pixel method is used to eliminate the influence of atmospheric scattering; geometric correction achieves image registration through ground control points combined with a polynomial model; median filtering is used to remove salt and pepper noise, and wavelet transform is combined to reduce high-frequency noise; histogram matching is used to eliminate radiometric anomalies caused by cloud shadows, and contrast-limited adaptive histogram equalization (CLAHE) is used to enhance texture details; Min-Max normalization is used for multispectral bands to unify the values of each band to the [0,1] interval to ensure data comparability.
[0104] S20. Define dynamic edges, local dynamic edges, and common edges, identify road types, fuse road information from remote sensing images with road network data, pre-process the topological structure of the road network data, and unify the spatial coordinate system.
[0105] Specifically, in this embodiment, the specific steps of step S20 are as follows:
[0106] S201. Define two-way roads without fences or other obstructions as dynamic edges; define one-way or two-way roads with fences or other obstructions as normal edges; and define two-way roads with flower beds or other obstructions as partially dynamic edges. This includes both normal and dynamic edges. Use tools to classify and label the road types in the remote sensing image. Identify each road in the remote sensing image one by one, and label each road segment according to its type (r1, r2, r3). After each image is classified and labeled, perform a quality review to ensure accuracy and consistency.
[0107] S202: Extract features from the extracted road area, including geometric features of the road (such as the center line and width of the road), texture features of the road (such as the distribution of lane lines), color features of the road (such as grayscale and color spectrum), and other related features.
[0108] In this example, the Cannny edge check is used to extract the road boundary:
[0109]
[0110] Among them, G(x,y) is a Gaussian filter and f(x,y) is an edge intensity map.
[0111] Extract the road centerline and use a distance transformation method to calculate the road width, which is measured by the bilateral distance between the road centerline:
[0112]
[0113] Among them, the fixed point is (x, y), and the point on the road centerline is ( , ).
[0114] The eigenvector extracted for each road is expressed as:
[0115]
[0116] Among them, f1 represents geometric features, f2 represents texture features, f3 represents color features, and f4 represents other features.
[0117] S203. Use deep learning algorithms within machine learning to classify and identify the extracted road features. Classification is based on road status (e.g., intact, damaged, congested, etc.) and traffic attributes (e.g., one-way, two-way, speed limit signs, etc.). Using deep learning methods such as convolutional neural networks (CNNs) and transfer learning, the extracted features are input into a trained model to automatically classify and identify roads. A convolutional neural network (CNN) is used as the classification model, along with a ResNet pre-trained model. The extracted feature vector F is input, and the output is a probability distribution for the three road categories.
[0118]
[0119] Among them, W and b are model parameters, For road categories.
[0120] Furthermore, in this embodiment, the road information detected in the remote sensing imagery is fused with the road network data. Through comparative analysis, the consistency and differences between the two are calculated to ensure the consistency between the road information detected by the remote sensing imagery and the actual road network. Furthermore, if any discrepancies exist, data correction and optimization are performed to ensure the final road information is highly accurate and reliable.
[0121] In this example, consider a road segment. The OpenStreetMap road network information indicates that the oneway attribute for this segment is F, indicating that the segment is a two-way road. If the remote sensing imagery indicates a dynamic road, the dynamic attribute for this segment is set to TT. If it is a locally dynamic road, the dynamic attribute is set to TF; if it is an ordinary road, the dynamic attribute is set to FF. Based on the combined determination that the oneway attribute is F and the dynamic attribute is TT, the road segment is definitely a dynamic road.
[0122] Furthermore, in this embodiment, after the matching is completed, redundant information is removed and possible topological errors are repaired to ensure the accuracy and completeness of the data, the topological structure of the road network is established, rules are set for topological checking, and a geometrically consistent road network model is generated.
[0123] The rules include: there can be no wrong hanging points. A hanging point is defined as an endpoint connected to only one line segment (a node with degree 1). For any node v∈V, its degree is , the set of hanging points with degree 1 is checked to be: , process the hanging point. If the degree of the hanging point and its adjacent nodes is 1, it is considered an incorrect hanging point and the node and its connected edges are deleted; if it is the end of a real road network, it is retained and marked as a "legal hanging point".
[0124]
[0125] Overlap is prohibited, meaning that two or more line segments are located close together. If the length of the spatial overlap between two line segments L1 and L2 is greater than the product of the shortest segment length and the overlap threshold α, the two segments are considered to overlap significantly, and the shorter segment is removed. The shortest segment length is the smaller of the lengths of L1 and L2 (ratio threshold α = 0.8).
[0126] .
[0127] S204. Convert the Open Street Map network and remote sensing imagery data into a unified format. A reference coordinate system is determined. The coord_convert tool in the Python library is then used to convert the coordinate systems of the different data sources to the reference coordinate system. The converted coordinates are then verified for accuracy to assess the overlay accuracy of the Open Street Map network and remote sensing imagery. If any deviations exist, error analysis and correction are performed to ensure the spatial relationship between the two is accurate, thereby achieving precise alignment of the Open Street Map network and remote sensing imagery.
[0128] In this embodiment, the open street network and remote sensing image data of the study area are uniformly converted into shp format, and the BD09 coordinate system is used as the reference coordinate. Assuming that the WGS84 coordinates of a certain location are (lon_wgs=116.3913, lat_wgs=39.9073), the wgs84_to_gcj02 function in the coord_convert library is called to convert the longitude and latitude coordinates from WGS-84 to the GCJ-02 coordinate system. The GCJ02 is encrypted to (lon_gci=116.397627, lat_gcj=39.908656), and then the gcj02_to_bd09 function in the coord_convert library is called again. After secondary encryption, the Baidu BD09 coordinates (lon_bd=116.404044, lat_bd=39.915022) are obtained. Finally, accuracy verification and error correction are performed.
[0129] S30. Based on road conditions, field survey data, and real-time traffic influencing factors, determine the comprehensive influencing factors for fire rescue speed to construct a dynamic weight model.
[0130] Specifically, in this embodiment, the specific steps of step S30 are as follows:
[0131] S301. All influencing factors are divided into fixed factors F, real-time dynamic factors D, and other special factors S, and standardized. Fixed factors include road width f1, functional level f2, actual length f3, and capacity f4. Real-time dynamic factors include traffic flow d1, average driving speed d2, traffic control measures d3, signal light control conditions d4, and current weather conditions d6. Other special factors include the driver's familiarity with the road network s1. The number of influencing factors is l. The weight set of influencing factors for a road is established as W, W={w i |i=1, 2, …, l} and satisfy the formula:
[0132]
[0133] Then, Min-Max normalization is performed on the real-time factors and other special factors to eliminate dimensional differences:
[0134]
[0135]
[0136] Among them, w i is the historical data set of the i-th factor in the influencing factor weight set.
[0137] S302. Optimize the accuracy of fire rescue routes through field research and supplement road static information. The clear height and clearance width of fire trucks are and , ensuring the road height of the road network and width and turning radius It can meet the passage needs of fire trucks; some special sections of road such as narrow streets or height-restricted bridges are marked as impassable.
[0138]
[0139] Among them, E is the road network edge set, represents the i-th road segment, 、 Indicates the effective net width and net height, is the turning radius, v k It is a fire truck model.
[0140] For road sections that are under temporary construction, record the closed sections and estimated restoration time, and temporarily freeze traffic on the route.
[0141]
[0142] Among them, t c is the current time, [t s,t e ] is the construction time interval.
[0143] S303. Obtain real-time traffic data through Baidu Maps real-time traffic API, including dynamic information such as traffic flow rate and congestion. Store the obtained vehicle speed as v, where speed is the average speed of the current road section (unit: km / h). Fire rescue vehicles are not subject to speed restrictions, making their speed faster than that of ordinary vehicles. , {0,1,2,3,4}∈ represent the five levels of unknown road conditions, smooth traffic, slow traffic, congestion, and severe congestion respectively.
[0144] In this embodiment, taking a certain road section in a certain city from west to east as an example, after execution, the derived data is v is 1.97 km / h, which is automatically converted into the standard unit of 0.547 m / s, and the congestion level is 4.
[0145] S304. Allocate and dynamically adjust weights to establish a dynamic weight calculation model that integrates multiple factors such as road traffic difficulty and real-time traffic speed.
[0146] Traffic flow is scored as follows:
[0147]
[0148] Among them, k is the current traffic density (veh / km), kj is the congestion density (veh / km), that is, the density when the traffic is completely blocked, γ k is the coefficient;
[0149] Traffic control is scored as follows:
[0150]
[0151] The signal light control performance is scored as follows:
[0152]
[0153] Weather conditions are rated as follows:
[0154] Call the weather data API of the online map development platform to obtain the type and severity of weather warning events in the current area (such as ice and snow, typhoon, heavy rain, high winds, etc.), as well as the warning level (blue, yellow, orange, red). The impact of the warning event is represented by the warning level.
[0155]
[0156] Wherein, Wet represents the type of weather warning event, di represents the percentage of driving speed reduction caused by the i-th weather warning event;
[0157]
[0158] Among them, WL represents the level of weather warning events, and DoI represents the degree of impact of the event;
[0159] For weather conditions where multiple warnings may occur simultaneously (such as heavy rain and strong winds), the superposition effect of weather conditions needs to be considered, and a weighted accumulation mechanism is used to calculate the comprehensive weather impact score. The formula is as follows:
[0160]
[0161] in, Indicates the average impact of the warning level corresponding to the i-th warning event type;
[0162] Set β as the comprehensive influencing factor of fire rescue speed:
[0163]
[0164] Among them, ω i is the influence weight of the i-th factor, α i is the dimensionless quantitative result of the i-th fixed factor, β i is the dimensionless quantification result of the i-th real-time dynamic factor.
[0165] Let T be the time it takes for an ordinary vehicle to travel along a path, then the travel time
[0166]
[0167] The travel time of the fire truck in this section of the route is for:
[0168]
[0169] Where L is the length of the road segment, is the average speed of the road section.
[0170] S40. Define dynamic nodes on dynamic edges, process ordinary edges as two parallel, non-intersecting, and oppositely directed unidirectional edges, and construct a directed graph of a fire rescue road network with road priority based on a dynamic weight model.
[0171] Specifically, in this embodiment, the specific steps of step S40 are as follows:
[0172] S401. Define that fire trucks can turn freely on dynamic edges. The corresponding positions are dynamic nodes. Visualize road segments in the form of points. That is, a dynamic edge consists of a series of dynamic nodes. Obtain all road segments that meet the dynamic edge conditions from the road network and discretize their set segments into a dynamic node sequence:
[0173]
[0174] Where Vd i represents the node sequence discretized by the i-th dynamic edge di;
[0175] The local dynamic edge can only be turned at the position in the dynamic road in the section, and this part of the dynamic road can be directly represented by the dynamic node. pd ∈E, which can be expressed as the union of a finite number of line segments and a dynamic node
[0176] gather:
[0177]
[0178] in, is a normal edge, (n≥1) is the set of dynamic nodes;
[0179] Traverse each local dynamic edge, obtain its dynamic node, and add it to the total sequence set of dynamic nodes:
[0180] ;
[0181] S402: For roads with normal edges, the fire trucks and normal vehicles have the same route during travel. The original traffic network edge is defined as the original one-way edge e = (u, v). The two end nodes of the original one-way edge are shifted to the right by a fixed distance F based on the slope of the edge. d The edge formed after is called the translation unidirectional edge e′=(u′,v′):
[0182] ;
[0183] The direction of the parallel one-way edge is determined based on the national road traffic characteristics (such as driving on the right side of the road), while the direction of the original one-way edge is exactly the opposite.
[0184] In this embodiment, according to the characteristics of road traffic in China, people drive on the right side of the road. Therefore, for the two nodes u′ and v′ of the translated one-way edge, the one with the smaller latitude value is the starting point, and the one with the larger latitude value is the end point. For example, the longitude and latitude of the nodes u′=(116.39277,39.883716) and v′=(116.764166,40.08495) can be determined as u′ as the starting point and v′ as the end point.
[0185] S403. Define a directed graph G = {V, E, T} for a fire rescue road network, comprising a node set V, a directed edge set E, and an edge type set T, where a node v∈V represents an intersection or endpoint of a road segment; a road segment e∈E represents a directed edge with a starting point, an end point, a road segment number, and other attributes. A road with two-way traffic is considered to be two one-way road segments; td, tds, ts∈T represent the type of the road segment, representing dynamic, locally dynamic, and static types, respectively.
[0186] Furthermore, in this embodiment, a new directional relationship is established between the translated node (u′, v′) corresponding to each translated unidirectional edge and the original node (u, v), and their distance length is uniformly set to a fixed value of 1, and the time is 1. Each node corresponds to an integer and is unique in the entire road network, using continuous integer labels (1, 2, ..., N), where N = |V|, based on the latitude and longitude coordinates of all nodes. , compare the horizontal and vertical coordinates one by one to determine the node order:
[0187]
[0188] In order to avoid duplicate numbering caused by floating point errors in coordinates, a tolerance ε needs to be set:
[0189]
[0190] Among them, N id (vi) represents the node flag of the i-th node, with a tolerance of ε of 10 -6 Spend.
[0191] Find the smallest node coordinates and their corresponding node markers 1:
[0192] .
[0193] Furthermore, in this embodiment, for directed roads, an initial distance weight and a corresponding time weight are assigned according to the coordinates, and the distance weight is calculated according to the following formula:
[0194]
[0195] Where x and y are the differences between the longitude and latitude of the coordinate plane respectively;
[0196] The initial time weight is set to the travel time T of ordinary vehicles. When the travel time of fire trucks is calculated by calling the comprehensive speed influence factor of each road section, the time weight is changed to .
[0197] S50: Use the adjacency list to store the directed graph data of the fire rescue road network, create an array of shortest distance records for each node, and initialize the distance array and priority queue.
[0198] Specifically, in this embodiment, the specific steps of step S50 are as follows:
[0199] S501. Use an adjacency list to store directed graph data. The distance dictionary d[] records the real-time weights from the starting point to all nodes in the graph. pb[u] indicates that if vertex u has been iteratively processed, pb[u]=1, otherwise it is 0. For the initial node pb[src]=1. The predecessor array pre[] is used to record each predecessor node in the shortest path to facilitate subsequent path reconstruction.
[0200] S502. Initialize all elements except the starting point to a maximum value, that is, d[else]=∞, indicating that the distances of these nodes are unknown at the beginning, and the distance from the starting point to the starting point is 0, so the starting point distance is set to d[src]=0, which is the reference point for subsequent path calculations. Generally, the node represented by the fire station is used as the starting point. Create a small root heap priority queue heap to dynamically manage the priority of the nodes to be processed, so as to quickly insert or extract the node with the smallest current distance in logarithmic time complexity. After the initialization is completed, the starting point and its corresponding distance value are stored in the priority queue;
[0201] In this embodiment, the data of this directed graph is initialized into an array:
[0202] The node list is V=["v1","v2",···,"v28","vd1","vd2"]
[0203] d={v1:0,v2:float("inf"),···,"v28":float("inf"),"vd1":float("inf"),"vd2":float("inf")}
[0204] pb={"v1":1,"v2":0,···,"v28":0,"vd1":0,"vd2":0}
[0205] pre={"v1":None,"v2":None,···,"v28":None,"vd1":None,"vd2":None,}
[0206] S503. Based on the existing data, determine each node and label the name when generating a directed graph of the fire rescue road network. Draw one-way edges (solid lines with arrows) and two-way edges (solid lines with arrows at both ends) according to the actual road connections, label the weights, determine fire rescue related elements, represent fire-related dynamic edges with dotted lines with arrows at both ends, and local dynamic edges with special lines. Mark fire rescue nodes in dark green, and further distinguish dynamic nodes. In this way, the drawing of the directed graph of the fire rescue road network is completed.
[0207] In this embodiment, the data of a certain road section is stored, and part of the data is as follows, adj={
[0208] "v1":[("v3","E001","td",250,61),("v5","E002","td",232,58)],
[0209] "v7":[("v3","E003","ts",600,79),("v9","E004","td",1,1),("v5","E005","tds",250,60)],
[0210] "vd1":[("v5","E006","ts",162,32),("vd2","E007","td",1,1)]
[0211] The storage structure of the road network data adj is "node": [("adjacent node", "road section number", "road section type", fire rescue driving distance, fire rescue driving time)]. The default distance unit between dynamic nodes on the local dynamic edge and between two nodes at the same traffic intersection is 1. The directed graph of the fire rescue road network of the main roads in the study area is as follows: Figure 3 As shown, the weight is the time weight.
[0212] S60. Iteratively process the priority queue based on the Dijkstra algorithm principle, extract the current shortest distance node each time to perform adjacent node relaxation operation, and update the queue until all reachable nodes are traversed.
[0213] Specifically, in this embodiment, the specific steps of step S60 are as follows:
[0214] The specific steps of step S60 are as follows:
[0215] S601. If the priority queue is not empty, take the top element (d[u], u) from the priority queue, where d[u] is the weight of the current path and u is the current vertex. Check whether the vertex is marked as 1. If it has not been processed, mark it as 1 to avoid subsequent repeated operations and ensure that each node is relaxed only once. If the vertex has been processed, skip it.
[0216] In this embodiment:
[0217] For pb={"v1":1,"v2":1,"v3":1,"v4":0,"v5":0,···,"v28":0,"vd1":0,"vd2":0}, after traversing the node corresponding to v4, the corresponding mark is 1, that is, after marking, pb={"v1":1,"v2":1,"v3":1,"v4":1,"v5":0,···,"v11":0,"vd1":0,"vd2":0}
[0218] S602. Traverse all adjacent outgoing edges of vertex u and perform relaxation operations. For each edge (u→v), determine whether the edge type is a dynamic edge. If it is a dynamic edge, update d[v]=d[u]+dω(u,v), where dω(u,v) represents the dynamic weight of the dynamic edge (u→v). If it is a normal edge, that is, a unidirectional edge or a bidirectional edge, update d[v]=d[u]+ω(u,v), and insert it to the end of the queue in the form of a (d[v],v) tuple to ensure that the vertex v with the smallest current distance is processed first, and record the predecessor node of v as u, where ω(u,v) represents the weight of the normal edge (u→v).
[0219] S603: Ensure that the mark of each vertex is 1, that is, the elements corresponding to all vertices in the array pb are 1, thereby ensuring that each vertex has been processed.
[0220] S70: Analyze the final distance array data, trace back to determine the shortest path trajectory of each intersection node, and output the complete path sequence and its cumulative distance and time.
[0221] Specifically, in this embodiment, the specific steps of step S70 are as follows:
[0222] S701: Traverse backward from the end point to the starting point based on the predecessor node of each node, handle the case where there is no predecessor node (path is unreachable), and after the path is reconstructed, reverse the order to generate a forward path sequence;
[0223] In this embodiment:
[0224] pre={"v1":v5,"v2":v4,"v3":v1,"v4":v2,"v5":v6,"v6":v5,"v7":v9,"v8":v11,"v9":v7,"v10":v9,···})
[0225] If the reverse tracking path is: v10←v9←v6←v5←v1
[0226] The forward path is: v1→v5→v6→v9→v10
[0227] S702: Take the distance corresponding to the edge of each shortest path and the travel time obtained by dividing the distance by the fire rescue vehicle speed, and output the total fire rescue travel distance and time by cumulative summation.
[0228] In this embodiment, for example, in the optimal path v1→v5→v6→v9→v10, the distance weight of the edge from v1 to v5 is 250, the distance unit is set to m, the fire rescue vehicle speed is called to be 4.3 m / s, the fire rescue driving time is calculated to be 58 s, and the normalized unit of driving time is set to seconds (s).
[0229] The optimal path planning method based on the directed graph of the fire rescue road network described in the above embodiment is different from the existing technology. The existing fire rescue dispatch system usually directly calls the ordinary vehicle route planning API in the online map to determine the rescue path, without considering the road priority of the rescue vehicle. This method may lead to an underestimation of the fire rescue coverage area, low accuracy, and also restrict the improvement of fire rescue efficiency. The present invention utilizes multi-source data such as open street map road network, road conditions, survey data, real-time road conditions, and integrates remote sensing image data to reconstruct the road network directed graph according to the road priority principle. On this basis, based on the dynamic weight model, an optimal path planning algorithm based on the directed graph of the fire rescue road network is further constructed. The application of the present invention can effectively make up for the shortcomings of existing research using online map path planning, so that path planning is more in line with the path planning needs in real fire rescue scenarios. Through the present invention, the driving path of the fire rescue can be accurately calculated, thereby more reasonably planning the path and improving the efficiency of fire rescue.
[0230] Obviously, the embodiments described above are only preferred embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present invention specification and drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. An optimal path planning method based on a directed graph of a fire rescue road network, characterized in that: The following steps are involved: S10, determine the calculation area and extract the open street map road network, complete data cleaning, obtain remote sensing images and perform preprocessing; S20, defining dynamic edges, local dynamic edges, and common edges, identifying road types, fusing road information from remote sensing images with road network data, preprocessing the topological structure of the road network data, and unifying the spatial coordinate system; S30. Based on road conditions, field survey data, and real-time traffic influencing factors, determine the comprehensive influencing factors for fire rescue speed to construct a dynamic weight model; S40, defining dynamic nodes on dynamic edges, treating ordinary edges as two parallel, non-intersecting, and oppositely directed unidirectional edges, and constructing a directed graph of a fire rescue road network with road priority based on a dynamic weight model; S50, using an adjacency list to store the fire rescue road network directed graph data, creating an array of shortest distance records for each node, and initializing a distance array and a priority queue; S60, iteratively process the priority queue based on the Dijkstra algorithm principle, extract the current shortest distance node each time to perform adjacent node relaxation operation, and update the queue until all reachable nodes are traversed; S70: Analyze the final distance array data, trace back to determine the shortest path trajectory of each intersection node, and output the complete path sequence and its cumulative distance and time.
2. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 1 is characterized in that: The specific steps of S10 are as follows: S101. First, clarify the spatial scope of the target area, including a pre-set urban area or a custom arbitrary range; S102. Obtain the regional boundaries. Call the API to obtain traffic network data from the Open Street Map for the study area of the city, including road type, length, and connectivity. Alternatively, manually select the edge coordinates of a specific area to achieve delineation based on actual needs. S103. Determine the temporal range and spatial coverage of remote sensing images based on the research objectives, select remote sensing images through the public remote sensing data platform, pre-process the remote sensing images including radiation correction, geometric correction, and image enhancement, and perform normalization.
3. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 1 is characterized in that: The specific steps of S20 are as follows: S201. Define a two-way road without a fence or other obstruction in the middle as a dynamic edge; define a one-way road or a two-way road with a fence or other obstruction in the middle as a normal edge; define a two-way road with a flower bed or other obstruction in the middle as a partially dynamic road, i.e., a partially dynamic road including a portion of normal edges and a portion of dynamic edges; S202, extracting features from the extracted road area, including geometric features of the road, texture features of the road, color features of the road, and other related features; S203, using a deep learning algorithm to classify and identify the extracted road features, where the classification is based on identification of road status and traffic attributes; S204. Convert the Open Street Map road network and remote sensing image data into a unified format, determine a coordinate system as the base coordinate system, and then use the coord_convert tool in the Python library to convert the coordinate systems of different data sources to the base coordinate system. Verify the accuracy of the converted coordinates and evaluate the overlap accuracy of the Open Street Map road network and remote sensing imagery.
4. The optimal path planning method based on a directed graph of a fire rescue road network according to claim 1 is characterized in that: The specific steps of S30 are as follows: S301. All influencing factors are divided into fixed factors F, real-time dynamic factors D, and other special factors S, and standardized. Fixed factors include road section width f1, functional level f2, actual length f3, and capacity f4. Real-time dynamic factors include traffic flow d1, average driving speed d2, traffic control measures d3, signal light control status d4, and current weather conditions d6. Other special factors include the driver's familiarity with the road network s1. S302. Optimize the accuracy of fire rescue routes through field research and supplement road static information. The clear height and clearance width of fire trucks are and , ensuring the road height of the road network and width and turning radius Able to meet the passage needs of fire trucks; S303. Obtain real-time traffic data, including traffic speed and congestion conditions, through the Baidu Maps real-time traffic API; S304. Traffic flow scores are as follows: ; Among them, k is the current traffic density, kj is the blocking density, that is, the density when the traffic is completely blocked, γ k is the coefficient; Traffic control is scored as follows: ; The signal light control performance is scored as follows: ; Weather conditions are rated as follows: Call the weather data API of the online map development platform to obtain the weather warning event type and warning level in the current area; ; Wherein, Wet represents the type of weather warning event, di represents the percentage of driving speed reduction caused by the i-th weather warning event; ; Among them, WL represents the level of weather warning events, and DoI represents the degree of impact of the event; A weighted accumulation mechanism is used to calculate the comprehensive weather impact score. The formula is as follows: ; in, Indicates the average impact of the warning level corresponding to the i-th warning event type; Set β as the comprehensive influencing factor of fire rescue speed: ; Among them, ω i is the influence weight of the i-th factor, α i is the dimensionless quantitative result of the i-th fixed factor, β i is the dimensionless quantification result of the i-th real-time dynamic factor.
5. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 4 is characterized in that: The specific steps of S40 are as follows: S401. Define that fire trucks can turn freely on dynamic edges. The corresponding positions are dynamic nodes. Visualize road segments in the form of points. That is, a dynamic edge consists of a series of dynamic nodes. Obtain all road segments that meet the dynamic edge conditions from the road network and discretize their set segments into a dynamic node sequence: ; Where Vd i represents the node sequence discretized by the i-th dynamic edge di; For any moving local dynamic edge E pd ∈E, which can be expressed as the union of a finite number of line segments and a dynamic node gather: ; in, is a normal edge, (n≥1) is the set of dynamic nodes; Traverse each local dynamic edge, obtain its dynamic node, and add it to the total sequence set of dynamic nodes: ; S402: For roads with normal edges, the fire trucks and normal vehicles have the same route during travel. The original traffic network edge is defined as the original one-way edge e = (u, v). The two end nodes of the original one-way edge are shifted to the right by a fixed distance F based on the slope of the edge. d The edge formed after is called the translation unidirectional edge e′=(u′,v′): ; S403. Define a directed graph G = {V, E, T} for a fire rescue road network, comprising a node set V, a directed edge set E, and an edge type set T, where a node v∈V represents an intersection or endpoint of a road segment; a road segment e∈E represents a directed edge with a starting point, an end point, a road segment number, and other attributes. A road with two-way traffic is considered to be two one-way road segments; td, tds, ts∈T represent the type of the road segment, representing dynamic, locally dynamic, and static types, respectively.
6. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 5 is characterized in that: A new directional relationship is established between the translated node (u′, v′) corresponding to each translated unidirectional edge and the original node (u, v), and their distance length is uniformly set to a fixed value of 1, and the time is 1. Each node corresponds to an integer and is unique in the entire road network. It uses continuous integer labels (1, 2, ..., N), where N = |V|, according to the latitude and longitude coordinates of all nodes. , compare the horizontal and vertical coordinates one by one to determine the node order: ; In order to avoid duplicate numbering caused by floating point errors in coordinates, a tolerance ε needs to be set: ; Among them, N id (vi) represents the node flag of the i-th node, with a tolerance of ε of 10 -6 Spend; Find the smallest node coordinates and their corresponding node markers 1: 。 7. The optimal path planning method based on a directed graph of a fire rescue road network according to claim 5, characterized in that: For directed roads, the initial distance weight and corresponding time weight are assigned according to the coordinates. The distance weight is calculated according to the following formula: ; Where x and y are the differences between the longitude and latitude of the coordinate plane respectively; The initial time weight is set to the travel time T of ordinary vehicles. When the travel time of fire trucks is calculated by calling the comprehensive speed influence factor of each road section, the time weight is changed to .
8. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 7 is characterized in that: The specific steps of S50 are as follows: S501. Use an adjacency list to store directed graph data. The distance dictionary d[] records the real-time weights from the starting point to all nodes in the graph. pb[u] indicates that if vertex u has been iteratively processed, pb[u]=1, otherwise it is 0. For the initial node pb[src]=1. The predecessor array pre[] is used to record each predecessor node in the shortest path. S502. Initialize all elements except the starting point to a maximum value, i.e., d[else] = ∞. This means that the distances between these nodes are unknown at the beginning, and the distance from the starting point to the starting point is 0. Therefore, the starting point distance is set to d[src] = 0. Create a small root heap priority queue heap to dynamically manage the priorities of the nodes to be processed, so as to quickly insert or extract the node with the smallest current distance in logarithmic time complexity. After the initialization is completed, the starting point and its corresponding distance value are stored in the priority queue; S503. Based on the existing data, determine each node and label the name when generating the directed graph of the fire rescue road network. Draw one-way and two-way edges according to the actual road connections, label the weights, determine the fire rescue related elements, represent the fire-related dynamic edges with dotted lines with arrows at both ends, and local dynamic edges with special lines. Mark the fire rescue nodes with dark green, and further distinguish the dynamic nodes. In this way, the drawing of the directed graph of the fire rescue road network is completed.
9. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 8 is characterized in that: The specific steps of step S60 are as follows: S601. If the priority queue is not empty, take the top element (d[u], u) from the priority queue, where d[u] is the weight of the current path and u is the current vertex. Check whether the vertex is marked as 1. If it has not been processed, mark it as 1 to avoid subsequent repeated operations and ensure that each node is relaxed only once. If the vertex has been processed, skip it. S602. Traverse all adjacent outgoing edges of vertex u and perform relaxation operations. For each edge (u→v), determine whether the edge type is a dynamic edge. If it is a dynamic edge, update d[v]=d[u]+dω(u,v), where dω(u,v) represents the dynamic weight of the dynamic edge (u→v). If it is a normal edge, that is, a unidirectional edge or a bidirectional edge, update d[v]=d[u]+ω(u,v), and insert it to the end of the queue in the form of a (d[v],v) tuple to ensure that the vertex v with the smallest current distance is processed first, and record the predecessor node of v as u, where ω(u,v) represents the weight of the normal edge (u→v). S603: Ensure that the mark of each vertex is 1, that is, the elements corresponding to all vertices in the array pb are 1, thereby ensuring that each vertex has been processed.
10. The optimal path planning method based on the directed graph of the fire rescue road network according to claim 9 is characterized in that: The specific steps of S70 are as follows: S701, based on the predecessor node of each node, traverse backward from the end point to the starting point, handle the case where there is no predecessor node, and after the path is reconstructed, the order needs to be reversed to generate a forward path sequence; S702: Take the distance corresponding to the edge of each shortest path and the travel time obtained by dividing the distance by the fire rescue vehicle speed, and output the total fire rescue travel distance and time by cumulative summation.
Citation Information
Patent Citations
Fire rescue path optimization method based on shortest path
CN109389825A
Fire-fighting, fire-extinguishing and rescue intelligent path planning method and system
CN112556714A
Emergency lighting system and method integrated with path navigation function
CN117606482A
Fire rescue path planning method and system based on big data
CN119022952A
Intelligent robot path scheduling method and system for scenic spot tourists
CN120355048A
Cited By
Real-time planning and visualization method and system for optimal fire-fighting maintenance path
CN120907576A
Highway accident rescue resource dynamic scheduling and path optimization method
CN121305879A
Multi-source remote sensing collaborative identification method and system for road passing height-limiting obstacles
CN121354012A
Fire rescue path optimization method, equipment and medium
CN121903106A
