A path planning method fusing edge computing and anomaly detection

By constructing a path planning method that integrates road network triples and a spatiotemporal generator and discriminator, the problem of lagging road anomaly detection in existing technologies is solved. This enables early identification of road traffic and accurate assessment of edge computing capabilities, thereby improving the real-time performance and reliability of path planning.

CN120764814BActive Publication Date: 2025-11-11TONGJI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511186992.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-11-11
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing technologies struggle to identify early signs of spatiotemporal evolution and precursory anomalies in road traffic, leading to missed detections and delayed responses to emerging congestion or accident signs. Furthermore, the assessment of edge computing capabilities is not accurate enough, affecting the real-time performance and reliability of route planning.

Method used

A road network triplet is constructed, and a spatiotemporal generator and discriminator are combined to generate predicted road traffic data through a graph convolutional network and a gated recurrent unit model. Candidate paths are generated using the KSP algorithm, and the optimal path is evaluated based on the computing power of the edge server.

Benefits of technology

It improves the ability to detect road anomalies early, enhances the robustness and safety of path planning, reduces travel time loss and safety risks caused by delayed identification, and ensures that path selection meets real-time computing requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120764814B_ABST
    Figure CN120764814B_ABST
Patent Text Reader

Abstract

This invention discloses a path planning method integrating edge computing and anomaly detection, comprising: constructing a road network triplet containing intersection information, edge server information, and distance weights between intersections; establishing a road accident detection model including a spatiotemporal generator and a discriminator; training the model using historical traffic data and the road network; generating a set of reachable paths based on the road network using the KSP algorithm; performing anomaly detection using the trained model combined with current real traffic data to exclude paths containing abnormal road segments, thereby obtaining a set of passable paths; extracting edge server information of passable paths using the road network triplet, evaluating the edge computing capabilities of the paths, and selecting the path with the strongest edge computing capabilities as the optimal path. This method can avoid accident or congested road segments in dynamic traffic environments, fully utilize edge computing resources, reduce task latency, and improve the accuracy and timeliness of path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent transportation technology, specifically relating to a path planning method that integrates edge computing and anomaly detection. Background Technology

[0002] With the rapid development of intelligent connected vehicles and vehicle-road cooperative technologies, road traffic systems are gradually evolving towards more comprehensive perception, faster decision-making, and more real-time services. In urban road networks, abnormal events such as traffic accidents, road surface damage, or severe weather often trigger local or regional congestion within a short period, significantly increasing vehicle travel time and impacting time-sensitive operations such as logistics and emergency rescue. Therefore, timely and accurate identification of road traffic anomalies and route replanning based on anomaly perception have become crucial for ensuring driving safety and travel efficiency.

[0003] Furthermore, as vehicles become increasingly intelligent, they require the execution of numerous computationally intensive tasks (such as multi-sensor data fusion, real-time anomaly detection, and path planning). However, onboard computing resources are limited, and centralizing all computation in the remote cloud is constrained by network latency and bandwidth limitations. Edge computing, by deploying computing resources on the roadside or near the vehicle, provides low-latency computing capabilities, becoming a crucial means to meet the real-time requirements of autonomous driving and vehicle-to-everything (V2X) communication. A key challenge in improving overall system performance is how to integrate road anomaly detection results with the actual service capabilities of edge servers into path planning.

[0004] In the prior art, Chinese patent CN116678432A discloses a real-time vehicle path planning method based on edge services, including: acquiring the data required for path planning; constructing a deployment point matrix and storing the latitude and longitude of the deployment points in the deployment point matrix; creating a path planning intersection set; performing real-time accident detection on the road based on the traffic flow data to obtain several accident intersections; taking the starting intersection as the current intersection, determining the intersection capacity of several connected intersections of the current intersection, and if the intersection capacity exceeds the capacity threshold, then not considering the connected intersection; calculating the intersection priority of connected intersections, selecting the connected intersection with the highest priority that is not an accident intersection as the transit intersection, and storing the transit intersection in the path planning intersection set; when the transit intersection is the target intersection, outputting the path planning intersection set to obtain the vehicle planning path.

[0005] However, this method has the following limitations: 1. It relies on real-time traffic flow statistics and threshold judgment to mark accident intersections, and does not make full use of the spatiotemporal correlation information of historical time series and road network topology. Therefore, it is difficult to detect early, subtle or developing anomalies (such as the initial stage of congestion or accident causes), and it is easy to miss or delay the response; 2. It only uses the accident rate or capacity threshold as the basis for judgment, which has weak noise resistance and does not have good adaptability to sensor missing, sampling interval changes or sudden disturbances, and is prone to misjudgment or false triggering of replanning; 3. Although factors such as deployment point, load and computing power are considered, existing public solutions do not explicitly model the task transmission delay and task processing delay based on task volume and network / location information, making it difficult to accurately assess the actual feasibility of a certain path in meeting the real-time computing needs of vehicles (such as low-latency decision-making).

[0006] Therefore, there is an urgent need for a technical solution that can integrate spatiotemporal prediction and topological features into an anomaly detection mechanism, generate multiple candidate paths, and incorporate the end-to-end service capabilities of edge computing into path planning. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a path planning method that integrates edge computing and anomaly detection.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] This invention provides a path planning method that integrates edge computing and anomaly detection, comprising the following steps:

[0010] A road network and road accident detection model are constructed. Based on the road network, a road network triplet is constructed, which includes intersection information, edge server information, and distance weights between intersections in the road network. The road accident detection model includes a spatiotemporal generator and a discriminator.

[0011] The road accident detection model is trained based on historical real road traffic data and the road network.

[0012] Based on the road network, the KSP algorithm is used to obtain the set of reachable paths from the starting point to the destination;

[0013] Anomaly detection is performed based on the trained road accident detection model and current real traffic data. Abnormal road segments are excluded from the set of reachable paths to obtain a set of passable paths.

[0014] Edge server information is obtained based on road network triples, and the path with the strongest edge computing capability is selected as the optimal path from the set of passable paths based on the edge server information.

[0015] Furthermore, the expression for the road network is as follows: The expression for the road network triple is: ;

[0016] in, This represents information about all intersections in the road network. Represents the first in the road network i Each intersection The node feature vector includes the intersection state vector at each time step. The intersection state vector includes traffic flow, vehicle speed, and road occupancy.

[0017] This represents information about all edge servers in the road network. Indicates the first [location] deployed at or near the corresponding intersection. i The location information and edge computing information of each edge server, wherein the edge computing information includes the CPU frequency of the edge server;

[0018] and These represent the total number of intersections and the total number of edge servers, respectively.

[0019] The distance weight between two intersections in a road network is used to determine the distance between them. Adjacent, then It is the distance between the two intersections; otherwise... The value is 0.

[0020] Furthermore, the spatiotemporal generator generates predicted road traffic data based on real road traffic data and the road network to deceive the discriminator, and inputs the real road traffic data and the predicted road traffic data into the discriminator;

[0021] The discriminator identifies real road traffic data and predicted road traffic data through adversarial training with the spatiotemporal generator.

[0022] The spatiotemporal generator comprises a cascaded graph convolutional network and a gated recurrent unit model;

[0023] The graph convolutional network consists of two layers, expressed as follows: ;

[0024] in, For time t Real road traffic data at each intersection Indicates in t Intersection The intersection state vector includes traffic flow, vehicle speed, and road occupancy. Indicates the total number of intersections; This indicates the data extracted by the graph convolutional network. t The high-dimensional spatial feature matrix of the time-space road network. This represents a feature extraction function consisting of two layers of graph convolutional networks;

[0025] Let be the adjacency matrix of the road network. If two intersections in the road network... Adjacent elements have a value of 1; otherwise, the value is 0.

[0026] For the execution process, It is a self-linked structure matrix. It is the identity matrix. = It is a degree matrix. Here are the weight matrices for the first and second layers of the graph convolutional network. and () represents the activation matrix;

[0027] The output of the graph convolutional network is input into the gated recurrent unit model to obtain predicted road traffic data. .

[0028] Furthermore, the discriminator's processing includes:

[0029] A first weighted undirected graph is constructed based on the road network, historical real road traffic data, and predicted road traffic data.

[0030] A second weighted undirected graph is constructed based on the road network, historical real road traffic data, and current real road traffic data.

[0031] The first weighted undirected graph and the second weighted undirected graph are respectively processed by the DeepWalk algorithm to obtain two... A matrix of size D, where D is the dimension of the eigenvectors;

[0032] Based on two The size of the matrix is ​​used to obtain the discriminator anomaly score.

[0033] Furthermore, the construction of the first weighted undirected graph based on the road network, historical real road traffic data, and predicted road traffic data specifically includes:

[0034] Based on the road network, historical real road traffic data and predicted road traffic data are extracted to obtain historical real intersection status information and predicted intersection status information.

[0035] Based on the historical real intersection state information and the predicted intersection state information, the predicted correlation coefficient between intersections is calculated, and a predicted intersection similarity matrix is ​​constructed based on the predicted correlation coefficient.

[0036] A first weighted undirected graph is constructed based on historical real intersection state information and predicted intersection similarity matrix;

[0037] The construction of the second weighted undirected graph based on the intersection similarity matrix of road network, historical real road traffic data, and current real road traffic data includes:

[0038] Based on the road network, extract historical real intersection status information and current real intersection status information;

[0039] The correlation coefficient between intersections is calculated based on the historical real intersection status information and the current intersection status information, and a real intersection similarity matrix is ​​constructed based on the real correlation coefficient.

[0040] A second weighted undirected graph is constructed based on the historical real intersection status information and the current real intersection similarity matrix.

[0041] Furthermore, the first weighted undirected graph and the second weighted undirected graph are represented as follows:

[0042] in, express t A weighted undirected graph at time points. It is the set of all intersections in the road network. for t Similarity matrix between intersections at different times.

[0043] Furthermore, the similarity matrix is ​​formulated as follows:

[0044]

[0045] in, The first in the similarity matrix i Line 1 j The elements of the column, i.e., intersections The correlation coefficient between them; Indicates the current time t Within the historical time window ending at the end, the first i Intersection state vector time series of intersections, For the current moment t The intersection state vector, when calculating the predicted intersection similarity matrix, For the current moment generated by the spacetime generator tThe predicted road traffic data is obtained when calculating the similarity matrix of actual intersections. This information is obtained through real intersection status information. This represents the Pearson correlation coefficient.

[0046] Furthermore, the set of reachable paths from the origin to the destination, obtained using the KSP algorithm based on the road network, includes:

[0047] Based on the road network, the shortest path from the starting point to the ending point is calculated using Dijkstra's algorithm.

[0048] The distance between adjacent nodes of the shortest path node is set to infinity in the order of the nodes. After each setting, a deviation path is calculated using Dijkstra. The shortest path is selected from the multiple deviation paths calculated. This step is repeated until only one path or several paths of the same length remain.

[0049] The shortest path from the starting point to the destination and the shortest path among all the multiple deviation paths are sorted by distance to obtain the set of reachable paths from the starting point to the destination.

[0050] Furthermore, the anomaly detection based on the trained road accident detection model and current real traffic data, excluding abnormal road segments from the set of reachable paths to obtain a set of passable paths, specifically includes:

[0051] The status information of each intersection in the road network is organized into a sequence according to time, and the current time is extracted. t A sequence of intersection state information over several consecutive historical time periods, with the endpoint being [missing information]. This sequence of intersection state information is input into the spatiotemporal generator, and the gated cyclic unit model of the spatiotemporal generator [missing information] at time [missing information]. t The corresponding predicted road traffic data is generated at the location;

[0052] Based on the predicted road traffic data output by the spatiotemporal generator and the current real traffic data, the anomaly score of the spatiotemporal generator at each intersection is calculated. The anomaly score of the spatiotemporal generator is obtained by measuring the difference between the real road traffic data and the predicted road traffic data. The difference is characterized by the square of the L2 norm of the vector difference to represent the magnitude of the prediction error.

[0053] The anomaly scores of each intersection obtained by the spatiotemporal generator and the corresponding anomaly scores of the intersections calculated by the discriminator are weighted and synthesized according to preset weights to obtain the anomaly score of each intersection at time [time value missing]. t The overall abnormal score;

[0054] Set the intersection anomaly threshold as wThe intersection state vector is obtained based on the comprehensive anomaly score and anomaly threshold:

[0055]

[0056] in, For the current moment t The intersection state vector, Intersection At the present moment t The overall abnormal score, Indicates an intersection At the present moment t The intersection status value, 1 indicates the intersection If deemed abnormal, 0 indicates an intersection. It was determined to be normal;

[0057] Based on the intersection state vector A set of intersection states is constructed, and the set of intersection states is compared one by one with the set of intersections corresponding to each path in the set of reachable paths. For a path that contains at least one intersection that is marked as abnormal, the path is removed from the set of reachable paths.

[0058] After removing paths containing abnormal intersections, the remaining paths constitute a set of passable paths between the starting point and the destination.

[0059] Furthermore, the step of obtaining the path with the strongest edge computing capability from the set of accessible paths based on edge server information as the optimal path specifically includes:

[0060] Based on the road network triples, obtain the edge server information in the set of passable paths;

[0061] Based on the location information and CPU frequency of each edge server in the edge server information, the task transmission time and task processing time in the passable path are calculated using the following formula:

[0062]

[0063]

[0064] in, Indicates from the intersection Transmit to the first accessible path j Edge servers Task transmission time, Indicates an intersection Transmit to the first accessible path j One edge server Task processing time, Baseline delay factor Distance is the influencing factor. Indicates an intersection The first of the accessible paths Location The geographical distance between edge servers is calculated using a semi-positive vector formula. This indicates the amount of data or computation involved in the task. Indicates the number of paths that can be traversed. j One edge server CPU frequency;

[0065] Based on the task transmission time and task processing time, the edge computing capability of the designated edge server at the designated intersection is obtained, and the calculation formula is as follows:

[0066]

[0067] in, Indicates the first j One edge server At the intersection The edge computing capability value at the location; the larger the value, the stronger the service capability.

[0068] Based on the edge computing capabilities of the designated edge servers at the designated intersection, the edge server with the greatest edge computing capability at the designated intersection is calculated.

[0069] The path with the highest edge computing capability among the available paths is selected as the optimal path.

[0070] Compared with the prior art, the present invention has the following advantages:

[0071] (1) Existing technologies based on instantaneous traffic statistics or threshold judgments struggle to capture the spatiotemporal evolution patterns and early warning anomalies of road traffic, leading to missed detections and delayed responses to developing congestion or accident signs. Consequently, timely route adjustment or scheduling measures cannot be taken in the early stages of anomaly formation. This invention constructs and trains a spatiotemporal generator to generate predicted road traffic data at each moment using spatial topology encoded by an adjacency matrix and multi-time-segment sequence inputs. This generates a larger generator anomaly score in the early stages when actual observations significantly deviate from predictions, thus identifying early warning anomalies in advance. This significantly improves the early detection capability and sensitivity of anomalies, reduces missed detections / delayed replanning, thereby providing longer warning time for route replanning and emergency response, and reducing travel time losses and safety risks caused by delayed identification.

[0072] (2) The discriminator anomaly score of this invention converts the "who changes simultaneously with whom" in the time series into structural semantics on the graph, and then uses graph embedding to encode local and higher-order topological relationships into vectors, thereby quantifying "structural deviation" into comparable vector differences: Specifically, a weighted graph representing expected synergy is constructed using history + prediction, and a weighted graph representing observed synergy is constructed using history + reality. Node vectors are obtained using DeepWalk, and the differences between the two are compared. The larger the difference, the more significant the deviation of the node from the normal pattern in the network semantic space. The discriminator anomaly score represents the degree to which the intersection deviates from the normal pattern at the level of topological semantics and neighborhood synergy—it is not a numerical residual at a single time point, but rather reflects structural anomaly evidence of multi-hop neighborhood and group linkage. It solves the problem that existing methods relying solely on single-point statistics or thresholds are insufficient to detect propagational, collaborative, or topology-related anomalies, and also reduces false alarms caused by single-point noise or sudden jitter. It is more sensitive and robust in capturing anomalies caused by neighborhood linkage or network-level propagation, and can complement the residuals of the time series generator to improve the accuracy and stability of anomaly detection. It also provides more discriminative and interpretable evidence for subsequent path elimination and priority decision-making, thereby enhancing the reliability and safety of path planning under complex traffic disturbances.

[0073] (3) Existing technologies employ a greedy path construction method with node-by-node priority, which lacks a candidate path set. If the preferred node or road segment becomes abnormal or unavailable, it is difficult to quickly switch or find a globally better alternative path. This invention adopts a K-shortest path (KSP) generation strategy. It provides an ordered set of candidate paths for path selection, improving the redundancy and robustness of the planning: after detecting anomalies in real time, paths containing abnormal nodes can be quickly removed from the candidate set and a suboptimal solution can be selected, avoiding planning recalculation delays or path unavailability caused by the failure of a single path, thereby improving path availability and system response speed.

[0074] (4) Existing technologies typically use static weighting or empirical functions to measure edge computing capabilities, without directly evaluating end-to-end task latency. This fails to guarantee that the selected path meets the real-time requirements of the task level. This invention directly establishes edge computing capabilities based on the physical modeling of task transmission time and task processing time as a service capability indicator for path ranking. By closely linking path evaluation with the actual latency capability of edge computing for task completion, path selection simultaneously considers both accessibility and computational latency guarantee, thereby significantly reducing task processing timeouts or decision lags caused by insufficient edge computing power or network latency, and improving the success rate and driving safety of task-level real-time services.

[0075] (5) The path method provided in this embodiment of the invention uses loss prediction by a spatiotemporal generator and anomaly scores of road intersections obtained by a discriminator to more accurately identify road anomalies, overcoming the problem of scarce abnormal events. By evaluating the edge computing capabilities of areas on the path where edge computing accident detection pressure is relatively concentrated, better accident avoidance effects and acquired edge computing capabilities are achieved. Attached Figure Description

[0076] Figure 1 A detailed flowchart of the path planning method provided in an embodiment of the present invention is shown.

[0077] Figure 2 A block diagram of the path planning system provided in an embodiment of the present invention is shown. Detailed Implementation

[0078] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0079] Mainstream methods for traffic anomaly detection analyze the spatiotemporal characteristics of traffic flow, learning features from traffic flow data to determine whether anomalies exist in the target area. Alternatively, they utilize data collected by the perception module and maps gathered by the positioning module to perform deep learning and analysis of the surrounding environment, thereby formulating corresponding decisions and plans. However, these methods, based on historical assessments, lack real-time performance and accuracy, and do not consider complex path planning methods, especially the edge computing capabilities required for autonomous driving technologies that heavily rely on real-time traffic condition assessments.

[0080] To address the aforementioned problems, the path planning method and system provided by this invention, by constructing a road network matrix including intersection information, edge server information, and distance weights between the intersections, as well as a trained road accident detection model incorporating a spatiotemporal generator and a discriminator, more accurately identifies road anomalies, overcoming the problem of scarce abnormal events. Furthermore, by evaluating the edge computing capabilities in areas along the path where edge computing accident detection pressure is concentrated, better accident avoidance effects and the acquired edge computing capabilities are achieved.

[0081] Based on the above technical background and ideas, the specific implementation of the present invention includes the following:

[0082] Example 1:

[0083] refer to Figure 1This embodiment provides a path planning method, the method comprising:

[0084] S1: Construct a road network and road accident detection model. Based on the road network, construct a road network triplet, which includes intersection information, edge server information, and distance weights between intersections in the road network. The road accident detection model includes a spatiotemporal generator and a discriminator.

[0085] S2: Train the road accident detection model based on historical real road traffic data and road network;

[0086] S3: Based on the road network, use the KSP algorithm to obtain the set of reachable paths from the starting point to the destination;

[0087] S4: Based on the road accident detection model and current real traffic data, anomaly detection is performed to exclude abnormal road segments from the set of reachable paths and obtain the set of passable paths.

[0088] S5: Obtain edge server information based on road network triples, and select the path with the strongest edge computing capability from the set of passable paths based on the edge server information as the optimal path.

[0089] The expression for the road network triplet constructed in step S1 of this embodiment is:

[0090]

[0091] Without considering edge servers, the above road network triples are used in the road network. express.

[0092] in, This represents information about all intersections in the road network. Represents the first in the road network i Each intersection The node feature vector includes the intersection state vector at each time step. The intersection state vector includes traffic flow, vehicle speed, and road occupancy.

[0093] This represents information about all edge servers in the road network. Indicates the first [location] deployed at or near the corresponding intersection. i The location information and edge computing information of each edge server, including the CPU frequency of the edge server;

[0094] and These represent the total number of intersections and the total number of edge servers, respectively.

[0095] The distance weight between two intersections in a road network is used to determine the distance between them. Adjacent, then It is the distance between the two intersections; otherwise... The value is 0.

[0096] In this embodiment, the road accident detection model includes a spatiotemporal generator and a discriminator. The spatiotemporal generator generates predicted road traffic data based on real road traffic data and the road network to deceive the discriminator, and inputs the real road traffic data and the predicted road traffic data into the discriminator.

[0097] Specifically, in this embodiment, the spatiotemporal generator may include a cascaded graph convolutional network (GCN) and a gated recurrent unit (GRU) model. The GCN obtains the spatial information of the intersection by aggregating the traffic dynamics of nearby intersections, and the GRU captures the temporal information by the traffic dynamics of the intersection in the near time period. The spatiotemporal generator integrates the temporal and spatial information of the intersection to generate accurate road traffic data. In this embodiment, the road traffic data may refer to the number of vehicles leaving the intersection.

[0098] The graph convolutional network mentioned above includes two layers for extracting the road network. In time period The spatial characteristics at time t, expressed mathematically as:

[0099]

[0100] in, For time t Real road traffic data at each intersection Indicates in t Intersection The intersection state vector includes traffic flow, vehicle speed, and road occupancy. Indicates the total number of intersections; This indicates the data extracted by the graph convolutional network. t The high-dimensional spatial feature matrix of the time-space road network. This represents a feature extraction function consisting of two layers of graph convolutional networks;

[0101] For the execution process, It is a self-linked structure matrix. It is the identity matrix. = It is a degree matrix. The weight matrices for the first and second layers of the graph convolutional network are obtained through pre-training. and () represents the activation matrix; Let be the adjacency matrix of the road network. If two intersections in the road network... Adjacent elements have a value of 1; otherwise, the value is 0.

[0102] The output of the graph convolutional network is input into the gated recurrent unit model to obtain predicted road traffic data. .

[0103] The loss function of the spatiotemporal generator consists of prediction error and discriminator loss, and its expression is:

[0104]

[0105] in, The loss function of the spacetime generator. and The parameter is The spacetime generator and parameters are The discriminator, Hyperparameters are used to control the balance between prediction error and discriminator loss. To predict road traffic data, This is real road traffic data. For the intersection information at time t, This is real road traffic data at intersections; These are the parameters for the spacetime generator.

[0106] The loss function of the discriminator is:

[0107]

[0108] in, The loss function of the discriminator; These are the parameters of the discriminator;

[0109] The training process for the aforementioned spatiotemporal generator and discriminator is as follows: real road traffic data... Input the spacetime generator to obtain the generated data. Then the data The input discriminator obtains the first A matrix of size, containing the data { The input discriminator obtains the second... A matrix of size DThe discriminator outputs the feature vector dimension for each intersection in the matrix. The two matrices are then concatenated and input into the fully connected layer to obtain outliers. The generator's loss function, combined with the discriminator's anomaly detection, adjusts the generator parameters to ensure the generated data has a structure similar to real data. This data can then be considered a prediction of the road network at the next time point under normal traffic conditions. The discriminator, adjusted through feedback from the loss function, accurately identifies the differences between real and predicted data, thus identifying outliers and distinguishing between real and predicted road traffic data.

[0110] For step S2, the road accident detection model is trained based on historical real road traffic data and the road network. The aforementioned historical real road data may include historical traffic data from the road network obtained through sensors from traffic management agencies, vehicle-mounted sensors, etc., such as information on traffic congestion locations, times, and durations. The KSP algorithm in this embodiment, also known as the K-shortest path algorithm, is used to find the Kth shortest path from the starting point to the ending point in a graph. In many application scenarios, it can not only calculate the shortest path but also obtain the second shortest path, the third shortest path, etc. The core of the algorithm is to construct a candidate path set by recursively searching for deviation paths based on the known shortest path, and then select the shortest deviation path as the next path.

[0111] The specific calculation steps are as follows:

[0112] Initialization: First, calculate the shortest path A1 from the starting point to the ending point, which can be done using Dijkstra's algorithm or other algorithms.

[0113] Construct candidate paths: For the known shortest path A k-1 Treat all nodes except the destination as deviation nodes, calculate the shortest path from each deviation node to the destination, and compare it with A. k-1 The paths from the starting node to the offset node are concatenated to form candidate paths.

[0114] Select the shortest deviation path: Choose the shortest path from the candidate path set as A. k .

[0115] Repeat the steps: Repeat the above steps until the Kth shortest path is found.

[0116] Specifically, in step S3 of this embodiment: based on the road network, the KSP algorithm is used to obtain the set of reachable paths from the starting point to the destination. The steps include:

[0117] Based on the road network, determine the starting intersection. and the final intersection The shortest path from the starting point to the ending point is calculated using Dijkstra's algorithm.

[0118] The KSP algorithm, optimized using Dijkstra's algorithm, is analyzed by setting the distance between adjacent nodes of the shortest path node to infinity sequentially according to the node order. After each setting, a deviation path is calculated using Dijkstra's algorithm. The shortest path is selected from the multiple deviation paths calculated. This step is repeated until only one path or several paths of the same length remain.

[0119] The shortest path from the starting point to the destination, calculated from the shortest path among all the multiple deviation paths, is sorted by distance to obtain the set of reachable paths from the starting point to the destination; that is, the paths a vehicle can take from the starting point to the destination. The set of shortest reachable paths The above set of reachable paths is sorted in ascending order of distance, i.e. ,in Indicates the first i The total length of the reachable paths.

[0120] For step S4: Based on the road accident detection model and current real traffic data, anomaly detection is performed to exclude abnormal road segments from the set of reachable paths, thereby obtaining a set of passable paths, including:

[0121] Intersection status information is extracted from the current real traffic data, and the intersection status information is input into the road accident detection model to obtain the anomaly score of the spatiotemporal generator and the anomaly score of the discriminator.

[0122] The anomaly score of the intersection is obtained based on the anomaly score of the spatiotemporal generator and the anomaly score of the discriminator;

[0123] Set the intersection anomaly threshold as The intersection state vector is obtained based on the comprehensive anomaly score and anomaly threshold:

[0124]

[0125] in, For the current moment t The intersection state vector, Intersection At the present moment t The overall abnormal score, Indicates an intersection At the present moment t The intersection status value, 1 indicates the intersection If deemed abnormal, 0 indicates an intersection. It was determined to be normal;

[0126] Based on the intersection state vector Construct an intersection state set, and compare the intersection state set with the intersection set corresponding to each path in the reachable path set one by one. For a path that contains at least one intersection marked as abnormal, remove the path from the reachable path set.

[0127] After removing paths containing abnormal intersections, the remaining paths constitute a set of passable paths between the starting point and the destination.

[0128] The method for obtaining the anomaly score of the spatiotemporal generator is as follows: the set of time periods is represented as... The traffic characteristics of the road network in each time period are represented as follows: , This represents the length of the time period set. In this embodiment, the number of units in the GRU model is set to 5, therefore the current time... Road network spatial characteristics in five adjacent time periods Input into GRU to generate real-time road traffic data Road traffic data It is derived by combining normal time and space information, and is a prediction of traffic dynamics under normal circumstances. Therefore, if and If the deviation is small, the current road network can be considered to be without anomalies; otherwise, anomalies exist. Therefore, the spatiotemporal generator at the intersection... , t The outlier score at time point is calculated as follows:

[0129]

[0130] in, Indicates at the intersection At the moment t The spatiotemporal generator anomaly score is used to measure the degree of deviation between predicted traffic conditions and actual observed conditions. Indicates an intersection At any moment t The real road traffic data is derived from real-time observations. Indicates an intersection At any moment t The predicted road traffic data is generated by a spatiotemporal generator after inputting the spatial characteristics of the intersection and its adjacent time periods, reflecting the traffic conditions predicted under normal circumstances.

[0131] The method for obtaining the discriminator's anomaly score is as follows:

[0132] A first weighted undirected graph is constructed based on the road network, historical real road traffic data, and predicted road traffic data.

[0133] A second weighted undirected graph is constructed based on the road network, historical real road traffic data, and current real road traffic data.

[0134] The first and second weighted undirected graphs were respectively processed using the DeepWalk algorithm to obtain two... A matrix of size, where, The number of intersections The dimension of the feature vector;

[0135] Based on two The size of the matrix is ​​used to obtain the discriminator anomaly score.

[0136] The first weighted undirected graph is constructed based on the road network, historical real road traffic data, and predicted road traffic data, specifically including:

[0137] Based on the road network, historical real road traffic data and predicted road traffic data are extracted to obtain historical real intersection status information and predicted intersection status information.

[0138] Based on historical real intersection status information and predicted intersection status information, the prediction correlation coefficient between intersections is calculated, and a prediction intersection similarity matrix is ​​constructed based on the prediction correlation coefficient.

[0139] A first weighted undirected graph is constructed based on historical real intersection state information and predicted intersection similarity matrix;

[0140] A second weighted undirected graph is constructed based on the intersection similarity matrix of road network, historical real road traffic data, and current real road traffic data, including:

[0141] Based on the road network, extract historical real intersection status information and current real intersection status information;

[0142] The correlation coefficient between intersections is calculated based on historical and current intersection status information, and a real intersection similarity matrix is ​​constructed based on the real correlation coefficient.

[0143] A second weighted undirected graph is constructed based on the historical real intersection status information and the current real intersection similarity matrix.

[0144] The first weighted undirected graph and the second weighted undirected graph are represented as follows:

[0145] in, express t A weighted undirected graph at time points. It is the set of all intersections in the road network. for t Similarity matrix between intersections at different times.

[0146] The similarity matrix is ​​calculated using the following formula:

[0147]

[0148] in, The first in the similarity matrix i Line 1 j The elements of the column, i.e., intersections The correlation coefficient between them; Indicates the current time t Within the historical time window ending at the end, the first i Time series of traffic intersection state vectors at several intersections For the current moment t The traffic intersection state vector, when calculating the predicted intersection similarity matrix, For the current moment generated by the spacetime generator t The predicted road traffic data is obtained when calculating the similarity matrix of actual intersections. This information is obtained through real intersection status information. This represents the Pearson correlation coefficient.

[0149] Specifically, the first weighted undirected graph and the second weighted undirected graph are respectively calculated using the DeepWalk algorithm to obtain two... Matrix of size, specifically including:

[0150] The DeepWalk algorithm is used to perform multiple random walks in the first and second weighted undirected graphs to obtain trajectory data. Starting point, intersection The probability of being selected is The higher the probability, the more likely it is to be selected as the next intersection. Repeat the above steps ten times to obtain the starting point. A trajectory of length 10 is represented as The trajectory The intersection is obtained by inputting it into the skip-gram algorithm. In time period t Similar features, represented as Finally, The input is fed into a pre-trained MLP model to obtain a scalar in the range [0,1]. This scalar represents the data point. The degree of abnormality is such that the closer the scalar value is to 1, the greater the degree of abnormality.

[0151] For step S5: obtaining the path with the strongest edge computing capability from the set of accessible paths based on edge server information as the optimal path, including:

[0152] Based on the road network triples, obtain the edge server information in the set of passable paths;

[0153] Based on the location information and CPU frequency of each edge server in the edge server information, the path with the highest edge computing capability in the set of passable paths is selected as the optimal path, including:

[0154] Based on the location information and CPU frequency of each edge server, the task transmission time and task processing time in the passable path are calculated. Specifically, the intersection is obtained. The latitude and longitude information is recorded as Then, obtain the intersection. The set of Elasticsearch (ES) edge servers that can be connected to is denoted as... , express The first in One Elasticsearch server, The location information and CPU frequency of each ES are represented by a matrix. sum vector express, yes The matrix, yes The vector.

[0155] By combining task transmission time and task processing time, the calculation is performed from... to the intersection Edge computing capability, the formula is:

[0156]

[0157]

[0158] in, Indicates from the intersection Transmit to the first accessible path j Edge servers Task transmission time, Indicates an intersection Transmit to the first accessible path j One edge server Task processing time, Baseline delay factor Distance is the influencing factor. Indicates an intersection The first of the accessible paths Location The geographical distance between edge servers is calculated using a semi-positive vector formula. This indicates the amount of data or computation involved in the task. Indicates the number of paths that can be traversed. j One edge server CPU frequency;

[0159] In this embodiment, the task size is set to a fixed value. Based on the task transmission time and task processing time, the edge computing capability of the designated edge server at the designated intersection is obtained. The calculation formula is as follows:

[0160]

[0161] in, Indicates the first j One edge server At the intersection The edge computing capability value at the location; the larger the value, the stronger the service capability.

[0162] The optimal path is the one with the highest edge computing capability among the available paths. Since edge computing capability is typically determined by Elasticsearch (ES), the server with the highest service capability within the range, it is necessary to consider... The maximum edge computing capability is selected as the [value]. Edge computing capabilities:

[0163]

[0164] in, Indicates an intersection The edge computing capabilities available within its communication / service range can be used to determine the service capacity value of the best edge server to meet the task at that intersection; the larger the value, the better the edge computing power and latency guarantee available near the intersection. Indicates deployment at intersections The set of all available edge servers in the area or within its communication coverage area; express The number of edge servers.

[0165] The formula for edge computing power along the entire path can be expressed as follows: , For path j The first i At the intersection, For path jThe total number of intersections. The optimal path between the starting intersection and the destination intersection is the path with the highest edge computing power in the set of passable paths, denoted as max( ,…, By following the steps described above, the vehicle's ability to access edge computing resources while in motion can be effectively enhanced.

[0166] Example 2:

[0167] like Figure 2 As shown, based on the above path planning method, the present invention also provides a path planning system, the system comprising:

[0168] The construction module is used to build a road network and a road accident detection model. Based on the road network, a road network triplet is constructed, which includes intersection information, edge server information, and distance weights between the intersections in the road network. The road accident detection model includes a spatiotemporal generator and a discriminator.

[0169] The training module is used to train the road accident detection model based on historical real road traffic data and the road network;

[0170] The reachable path acquisition module is used to obtain a set of reachable paths from the starting point to the destination based on the road network using the KSP algorithm;

[0171] The passable path acquisition module is used to perform anomaly detection based on the road accident detection model and current real traffic data, exclude abnormal road segments from the set of reachable paths, and obtain a set of passable paths.

[0172] The optimal path acquisition module is used to obtain the path with the strongest edge computing capability from the set of accessible paths based on edge server information as the optimal path.

[0173] The specific implementation method of this embodiment is the same as that of Embodiment 1, and will not be repeated here. Please refer to the description of Embodiment 1 for details.

[0174] The method and system described in the above embodiments sequentially perform reachable path retrieval, passable path selection, and optimal path selection. In reachable path retrieval, the KSP algorithm is used to identify k reachable paths to ensure the vehicle can reach its destination. In the passable path selection module, a pre-trained anomaly detection model is used to identify abnormal intersections, and then a passable path set is selected from the reachable path set, thereby helping the vehicle avoid potential accident sections. In the optimal path selection step, the optimal path for the vehicle is determined based on an edge computing capability evaluation method. The aforementioned path planning algorithm, which integrates traffic data and edge server location information, achieves more accurate real-time road anomaly detection through loss prediction by a spatiotemporal generator and evaluation by a discriminator, overcoming the problem of scarce anomaly events and improving the overall efficiency of anomaly event detection. Simultaneously, this invention evaluates the edge computing capability along the path as a whole, thereby alleviating the problem of unstable or even insufficient real-time path planning efficiency on the vehicle path, and reducing the complexity of the method while ensuring evaluation accuracy, effectively improving the operating efficiency of intelligent connected vehicles.

[0175] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0176] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A path planning method integrating edge computing and anomaly detection, characterized in that, Includes the following steps: A road network and road accident detection model are constructed. Based on the road network, a road network triplet is constructed, which includes intersection information, edge server information, and distance weights between intersections in the road network. The road accident detection model includes a spatiotemporal generator and a discriminator; The road accident detection model is trained based on historical real road traffic data and the road network. Based on the road network, the KSP algorithm is used to obtain the set of reachable paths from the starting point to the destination; Anomaly detection is performed based on the trained road accident detection model and current real traffic data. Abnormal road segments are excluded from the set of reachable paths to obtain a set of passable paths. Based on the road network triplet, edge server information is obtained, and based on the edge server information, the path with the strongest edge computing capability is obtained from the set of accessible paths as the optimal path. The spatiotemporal generator generates predicted road traffic data based on real road traffic data and the road network to deceive the discriminator, and inputs the real road traffic data and the predicted road traffic data into the discriminator; The discriminator identifies real road traffic data and predicted road traffic data through adversarial training with the spatiotemporal generator. The spatiotemporal generator comprises a cascaded graph convolutional network and a gated recurrent unit model; The graph convolutional network consists of two layers, expressed as follows: ; in, For time t Real-world traffic data at each intersection Indicates in t Intersection The intersection state vector includes traffic flow, vehicle speed, and road occupancy. Indicates the total number of intersections; This indicates the data extracted by the graph convolutional network. t The high-dimensional spatial feature matrix of the time-space road network. This represents a feature extraction function consisting of two layers of graph convolutional networks; Let be the adjacency matrix of the road network. If two intersections in the road network are... Adjacent elements have a value of 1; otherwise, the value is 0. For the execution process, It is a self-linked structure matrix. It is the identity matrix. = It is a degree matrix. Here are the weight matrices for the first and second layers of the graph convolutional network. and () represents the activation matrix; The output of the graph convolutional network is input into the gated recurrent unit model to obtain predicted road traffic data. .

2. The path planning method integrating edge computing and anomaly detection according to claim 1, characterized in that, The expression for the road network is: The expression for the road network triple is: ; in, This represents information about all intersections in the road network. Represents the first in the road network i There are several intersections, each intersection The node feature vector includes the intersection state vector at each time step. The intersection state vector includes traffic flow, vehicle speed, and road occupancy. This represents information about all edge servers in the road network. Indicates the first [location] deployed at or near the corresponding intersection. i The location information and edge computing information of each edge server, wherein the edge computing information includes the CPU frequency of the edge server; and These represent the total number of intersections and the total number of edge servers, respectively. The distance weight between two intersections in a road network is used to determine the distance between them. Adjacent, then It is the distance between the two intersections; otherwise... The value is 0.

3. The path planning method integrating edge computing and anomaly detection according to claim 1, characterized in that, The discriminator's processing includes: A first weighted undirected graph is constructed based on the road network, historical real road traffic data, and predicted road traffic data. A second weighted undirected graph is constructed based on the road network, historical real road traffic data, and current real road traffic data. The first weighted undirected graph and the second weighted undirected graph are respectively processed by the DeepWalk algorithm to obtain two... A matrix of size D, where D is the dimension of the eigenvectors; Based on two The size of the matrix is ​​used to obtain the discriminator anomaly score.

4. The path planning method integrating edge computing and anomaly detection according to claim 3, characterized in that, The construction of the first weighted undirected graph based on road network, historical real road traffic data, and predicted road traffic data specifically includes: Based on the road network, historical real road traffic data and predicted road traffic data are extracted to obtain historical real intersection status information and predicted intersection status information. Based on the historical real intersection state information and the predicted intersection state information, the prediction correlation coefficient between intersections is calculated, and a prediction intersection similarity matrix is ​​constructed based on the prediction correlation coefficient. A first weighted undirected graph is constructed based on historical real intersection state information and predicted intersection similarity matrix; The construction of the second weighted undirected graph based on the intersection similarity matrix of road network, historical real road traffic data, and current real road traffic data includes: Based on the road network, extract historical real intersection status information and current real intersection status information; Based on the historical real intersection status information and the current intersection status information, the correlation coefficient between intersections is calculated, and a real intersection similarity matrix is ​​constructed based on the real correlation coefficient. A second weighted undirected graph is constructed based on the historical real intersection status information and the current real intersection similarity matrix.

5. The path planning method integrating edge computing and anomaly detection according to claim 4, characterized in that, The first weighted undirected graph and the second weighted undirected graph are represented as follows: in, express t A weighted undirected graph at time points. It is the set of all intersections in the road network. for t Similarity matrix between intersections at different times.

6. The path planning method integrating edge computing and anomaly detection according to claim 5, characterized in that, The similarity matrix is ​​formulated as follows: in, The first element in the similarity matrix i Line number j The elements of the column, i.e., intersections The correlation coefficient between them; Indicates the current time t Within the historical time window ending at the end, the first i Intersection state vector time series of intersections, For the current moment t The intersection state vector, when calculating the predicted intersection similarity matrix, For the current moment generated by the spacetime generator t The predicted road traffic data is obtained when calculating the similarity matrix of actual intersections. This information is obtained through real intersection status information. This represents the Pearson correlation coefficient.

7. The path planning method integrating edge computing and anomaly detection according to claim 1, characterized in that, The set of reachable paths from the starting point to the destination, obtained using the KSP algorithm based on the road network, includes: Based on the road network, the shortest path from the starting point to the ending point is calculated using Dijkstra's algorithm. The distance between adjacent nodes of the shortest path node is set to infinity in the order of the nodes. After each setting, a deviation path is calculated using Dijkstra. The shortest path is selected from the multiple deviation paths calculated. This step is repeated until only one path or several paths of the same length remain. The shortest path from the starting point to the destination and the shortest path among all the multiple deviation paths are sorted by distance to obtain the set of reachable paths from the starting point to the destination.

8. The path planning method integrating edge computing and anomaly detection according to claim 1, characterized in that, The anomaly detection based on the trained road accident detection model and current real traffic data, excluding abnormal road segments from the reachable path set to obtain a passable path set, specifically includes: The status information of each intersection in the road network is organized into a sequence according to time, and the current time is extracted. t A sequence of intersection state information over several consecutive historical time periods, with the endpoint being [missing information]. This sequence of intersection state information is input into the spatiotemporal generator, and the gated cyclic unit model of the spatiotemporal generator [missing information] at time [missing information]. t The corresponding predicted road traffic data is generated at the location; Based on the predicted road traffic data output by the spatiotemporal generator and the current real traffic data, the anomaly score of the spatiotemporal generator at each intersection is calculated. The anomaly score of the spatiotemporal generator is obtained by measuring the difference between the real road traffic data and the predicted road traffic data. The difference is characterized by the square of the L2 norm of the vector difference to represent the magnitude of the prediction error. The anomaly scores of each intersection obtained by the spatiotemporal generator and the corresponding anomaly scores of the intersections calculated by the discriminator are weighted and synthesized according to preset weights to obtain the anomaly score of each intersection at time [time value missing]. t The overall abnormal score; Set the intersection anomaly threshold as w The intersection state vector is obtained based on the comprehensive anomaly score and anomaly threshold: in, For the current moment t The intersection state vector, Intersection At the present moment t The overall abnormal score, Indicates an intersection At the present moment t The intersection status value, 1 indicates the intersection If deemed abnormal, 0 indicates an intersection. It was determined to be normal; Based on the intersection state vector A set of intersection states is constructed, and the set of intersection states is compared one by one with the set of intersections corresponding to each path in the set of reachable paths. For a path that contains at least one intersection that is marked as abnormal, the path is removed from the set of reachable paths. After removing paths containing abnormal intersections, the remaining paths constitute a set of passable paths between the starting point and the destination.

9. The path planning method integrating edge computing and anomaly detection according to claim 1, characterized in that, The step of obtaining the path with the strongest edge computing capability from the set of accessible paths based on edge server information as the optimal path specifically includes: Based on the road network triples, obtain the edge server information in the set of passable paths; Based on the location information and CPU frequency of each edge server in the edge server information, the task transmission time and task processing time in the passable path are calculated using the following formula: in, Indicates from the intersection Transmit to the first accessible path j Edge servers Task transmission time, Indicates an intersection Transmit to the first accessible path j Edge servers Task processing time, Baseline delay factor Distance is the influencing factor. Indicates an intersection The first of the accessible paths Location The geographical distance between edge servers is calculated using a semi-positive vector formula. This indicates the amount of data or computation involved in the task. Indicates the number of paths that can be traversed. j Edge servers CPU frequency; Based on the task transmission time and task processing time, the edge computing capability of the designated edge server at the designated intersection is obtained, and the calculation formula is as follows: in, Indicates the first j Edge servers At the intersection The edge computing capability value at the location; the larger the value, the stronger the service capability. Based on the edge computing capabilities of the designated edge servers at the designated intersections, the edge server with the greatest edge computing capabilities at the designated intersections is calculated. The path with the highest edge computing capability among the available paths is selected as the optimal path.

Citation Information

Patent Citations

  • Vehicle real-time path planning method based on edge service

    CN116678432A

  • Machine control using predictive maps

    CN114419454A

  • Reversible lane traffic flow prediction method based on edge calculation

    CN120375606A