Critical path identification method and device, storage medium and electronic equipment

By constructing a traffic operation state diagram and using pre-trained models to repair the missing features, combining path flow and ring path punishment factors, the accuracy and effectiveness of critical path identification in the existing technology in the weak data environment is solved, and the identification is improved Accuracy and reliability of results.

CN119152668APending Publication Date: 2024-12-17HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310706245.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing critical path recognition methods have low accuracy and effectiveness in weak data environments, especially due to missing data or the presence of abnormal paths, resulting in inaccurate critical paths.

Method used

By obtaining the traceable road section, direction, level and time period, building a traffic operation status chart, calculating the path flow, lane number and ring path punishment factors, using the pre-trained model to repair the missing feature nodes, comprehensively evaluate the alternative paths, and sorting and selecting the key paths.

Benefits of technology

It improves the accuracy and effectiveness of critical path identification, and can accurately identify paths with maximum traffic and multi-lane number even in weak data environments, reducing detours and enhancing the reliability of identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152668A_ABST
    Figure CN119152668A_ABST
Patent Text Reader

Abstract

The invention discloses a key path identification method, which comprises the steps of determining a road network range and a time range for detecting a key path based on an obtained traceability road section, a traceability direction, a traceability hierarchy and a time period; acquiring road network data in the corresponding road network range and the time range, and constructing a traffic operation state diagram by using the acquired road network data; in a traffic operation state, traversing all alternative paths for the key path to form an alternative path set, and calculating path flow, lane number and annular path penalty factor of each alternative path; wherein the more bypasses exist in the alternative path, the larger the annular path penalty factor of the alternative path is; and sorting all the alternative paths in the alternative path set, and selecting a key path from the sorted alternative paths. By applying the method, the recognition accuracy of the critical path can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to video surveillance technology, and in particular to a critical path identification method, device, storage medium and electronic device. Background Art

[0002] With the advancement of network technology and big data technology, intelligent traffic control systems have been increasingly widely used.

[0003] In the current traffic network system, there are often sections of road that are congested or have accidents and require traffic control. Such sections and their related sections can be identified and marked through key paths in the road network system. By identifying the key paths to or from a specified section, it is possible to intuitively present where the congested traffic comes from and where it goes, so as to provide an effective reference for subsequent signal control solutions.

[0004] Among the related critical path identification methods, some are based on vehicle GPS trajectory or driving path data. Such methods have high requirements on data quality. In real application scenarios, the detectors for driving data in some sections may be missing or damaged, and the traffic status of the entire road network cannot be observed. For such weak data environments, the recognition accuracy of the above methods for critical path identification will be greatly reduced. Among the existing critical path identification methods, some are based on search-based intersection group critical path identification, which uses turning flow and driving time for identification processing. This method cannot avoid some abnormal paths (such as circular paths), which greatly reduces the effectiveness of the identified critical paths. At the same time, such methods have relatively ideal requirements for the data environment and are also difficult to apply to weak data environments. Summary of the invention

[0005] The present application provides a critical path identification method, device, storage medium and electronic device, which can improve the accuracy of critical path identification.

[0006] To achieve the above objectives, this application adopts the following technical solutions:

[0007] A critical path identification method, comprising:

[0008] Obtain the traceability section, traceability direction, traceability level and time period; wherein the traceability level is used to indicate the traceability scope;

[0009] Determine a road network range and a time range for detecting a critical path based on the tracing section, the tracing direction, the tracing level and the time period;

[0010] Acquire road network data within the road network range and time range, and construct a traffic operation status graph using the acquired road network data; wherein the nodes in the traffic operation status graph are traffic flow directions of the road sections, and the directed edges are connection relationships between traffic flow directions;

[0011] In the traffic operation state diagram, all alternative paths for the critical path are traversed to form an alternative path set, and the path flow, the number of lanes and the loop path penalty factor of each alternative path are calculated; wherein, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path;

[0012] With the goal of having a larger path flow, a more lane number, and a smaller ring path penalty factor, all the alternative paths in the alternative path set are sorted, and a key path corresponding to the road network range and time range is selected from the sorted alternative paths.

[0013] Preferably, the node characteristics of the nodes in the traffic operation status diagram include flow direction, flow turn, number of lanes included in the flow, and flow rate;

[0014] After constructing the traffic operation state diagram and before traversing the alternative paths, the method further includes:

[0015] Determine the nodes with missing features in the traffic operation status graph and calculate the total proportion of node feature missing α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other ; wherein the α sum is the ratio of the total number of nodes with missing features to the total number of nodes, and the α cross is the ratio of the total number of nodes with missing features at all nodes in the intersection to the total number of nodes. dir is the ratio of the total number of nodes with missing features in all nodes of the same flow direction at the intersection to the total number of all nodes. other is α sum -α cros s-α dir ;

[0016] The traffic operation state graph is converted into an undirected graph and input into the α cross , α dir and α other The pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the undirected graph to obtain the first specified feature value of each node after repair;

[0017] The first designated characteristic value of each node in the traffic operation status graph is replaced by the repaired first designated characteristic value of each node to obtain an updated traffic operation status graph.

[0018] Preferably, when calculating the loop path penalty factor of the candidate path, if the candidate path is a loop path, the loop path penalty factor is set to a maximum value;

[0019] If the candidate path is not a loop path, the loop path penalty factor is calculated by:

[0020] In the node set constituting the alternative path, each current node is subjected to the first processing in turn according to the order of the nodes constituting the alternative path to obtain a penalty factor of each current node; for each node whose penalty factor is not 0, an average value of the penalty factor is calculated as the ring path penalty factor of the alternative path;

[0021] Wherein, the first process comprises:

[0022] Obtaining an M-layer node set of the current node as a first set; M is a penalty level for indicating a range of a ring path that needs to be punished, and the penalty level is less than or equal to the tracing level;

[0023] Obtaining a set of nodes after the current node in the candidate path as a second set;

[0024] If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0.

[0025] Preferably, the method further comprises:

[0026] Preset multiple alpha cross , α dir and α other The training value combination, and for each α cross , α dir and α other The training value combination of training the corresponding pre-training model;

[0027] Among them, for each α cross , α dir and α other Methods for training the corresponding pre-trained model by combining training values ​​include:

[0028] Through traffic simulation software, road network data under various road network environments are obtained to construct multiple traffic operation status training graphs; wherein the nodes in the traffic operation status training graphs are the traffic flow directions of the road sections, the directed edges are the connection relationships between the traffic flow directions, the node features of the corresponding nodes include the flow direction, the flow direction, the number of lanes included in the flow direction and the flow volume, and the node features of all nodes are complete;

[0029] Convert all traffic operation status training graphs into undirected graphs and use them as original training samples for the pre-training model;

[0030] According to each α cross , α dir and α other A training value combination of randomly selecting a node in the original training sample and deleting the second specified feature of the node to form an input training sample;

[0031] The input training sample is input and each α cross , α dir and α other The pre-training model corresponding to the training value combination of α is output after the model processing, and the difference between the first specified feature of the repaired node and the first specified feature of each node in the original training sample is used as the loss function. The training is performed on each α cross , α dir and α other A pre-trained model corresponding to the training value combination of ; wherein, in the loss function, the loss weight of the deleted feature node is greater than the loss weight of the normal node.

[0032] Preferably, the α cross , α dir and α other The methods for determining the training value combination of include:

[0033] Setting α cross , α dir and α other The initial value of α is multiplied by each item in the preset missing ratio set to obtain a set of α cross , α dir and α other The training value combination of .

[0034] Preferably, the α cross , α dir and α other The initial value of is the set value, or the α calculated based on the traffic operation state diagram for the most recent N times. cross , α dir and α otherThe average value is taken, and the average value and / or the proportional increase or decrease value of the average value is taken as the α cross , α dir and α other The initial value of .

[0035] Preferably, the encoder of the pre-trained model is composed of a plurality of graph attention networks GATs, and a residual structure is introduced between the GATs, and the decoder of the pre-trained model is a multi-layer perceptron network; wherein the number of layers of the GAT is determined based on the range of neighbor features to be obtained.

[0036] Preferably, in the encoder, the processing of each GAT includes:

[0037] Calculate the similarity between a node and its adjacent nodes Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the first activation function, Represents the set of adjacent nodes of node i;

[0038] Aggregation characteristics of computing nodes Among them, σ(·) is the second activation function, W k is the parameter to be trained, and multiple heads are used to aggregate the features of multiple nodes. k represents the sequence number of the head, and || represents the concatenation of the aggregation results of multiple heads in the feature dimension.

[0039] The loss function is Among them, ρ and are the loss weights of feature missing nodes and normal nodes respectively, and x represent the first specified feature predicted by the model and the actual first specified feature in the original training sample, respectively, and M is the mask matrix.

[0040] Preferably, the step of selecting a critical path corresponding to the road network range and time range from the sorted candidate paths includes:

[0041] Selecting a key path corresponding to the road network range and time range from the sorted candidate paths according to the target path number;

[0042] Among them, the number of target paths is positively correlated with the traceability level.

[0043] A critical path identification device comprises: an input unit, a data acquisition unit, a graph processing unit, a traversal unit and a sorting unit;

[0044] The input unit is used to obtain the tracing section, tracing direction, tracing level and time period; wherein the tracing level is used to indicate the tracing range;

[0045] The data acquisition unit is used to determine the road network range and time range for detecting the critical path based on the tracing road section, the tracing direction, the tracing level and the time period; and is also used to acquire road network data within the road network range and time range;

[0046] The graph processing unit constructs a traffic operation status graph using the acquired road network data; wherein the nodes in the traffic operation status graph are the traffic flow directions of the road sections, and the directed edges are the connection relationships between the traffic flow directions;

[0047] The traversal unit is used to traverse all alternative paths for the critical path in the traffic operation state diagram to form an alternative path set, and calculate the path flow, the number of lanes and the loop path penalty factor of each alternative path; wherein, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path;

[0048] The sorting unit is used to sort all the alternative paths in the alternative path set with the goal of the larger the path flow, the better, the more lanes, the better, and the smaller the ring path penalty factor, the better, and select the key path corresponding to the road network range and time range from the sorted alternative paths.

[0049] Preferably, a feature repair unit is further included between the graph processing unit and the traversal unit;

[0050] The graph processing unit is further used to determine nodes with missing features in the traffic operation status graph and calculate the total node feature missing ratio α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other ; wherein the α sum is the ratio of the total number of nodes with missing features to the total number of nodes, and the α cross is the ratio of the total number of nodes with missing features at all nodes in the intersection to the total number of nodes. dir is the ratio of the total number of nodes with missing features in all nodes of the same flow direction at the intersection to the total number of all nodes. other is α sum -α cross -α dir ;

[0051] The feature repair unit is used to convert the traffic operation state graph into an undirected graph and input the α cross , α dir and α dirThe pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the undirected graph to obtain the first specified feature value of each node after repair; and is also used to replace the first specified feature value of each node in the traffic operation status graph with the first specified feature value of each node after repair to obtain an updated traffic operation status graph, and output it to the traversal unit;

[0052] Among them, the node characteristics of the nodes in the traffic operation status diagram include flow direction, flow turning, the number of lanes included in the flow, and flow rate.

[0053] Preferably, in the traversal unit, when calculating the loop path penalty factor of the candidate path, if the candidate path is a loop path, the loop path penalty factor is set to a maximum value;

[0054] If the candidate path is not a loop path, the loop path penalty factor is calculated by:

[0055] In the node set constituting the alternative path, each current node is subjected to the first processing in turn according to the order of the nodes constituting the alternative path to obtain a penalty factor of each current node; for each node whose penalty factor is not 0, an average value of the penalty factor is calculated as the ring path penalty factor of the alternative path;

[0056] Wherein, the first process includes:

[0057] Obtaining an M-layer node set of the current node as a first set; M is a penalty level for indicating a range of a ring path that needs to be punished, and the penalty level is less than or equal to the tracing level;

[0058] Obtaining a set of nodes after the current node in the candidate path as a second set;

[0059] If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0.

[0060] Preferably, the device further comprises a training unit for presetting a plurality of α cross , α dir and α dir The training value combination, and for each α cross , α dir and α dir The training value combination of training the corresponding pre-training model;

[0061] Among them, for each α cross , α dir and αdir Methods for training the corresponding pre-trained model by combining training values ​​include:

[0062] Through traffic simulation software, road network data under various road network environments are obtained to construct multiple traffic operation status training graphs; wherein the nodes in the traffic operation status training graphs are the traffic flow directions of the road sections, the directed edges are the connection relationships between the traffic flow directions, the node features of the corresponding nodes include the flow direction, the flow direction, the number of lanes included in the flow direction and the flow volume, and the node features of all nodes are complete;

[0063] Convert all traffic operation status training graphs into undirected graphs and use them as original training samples for the pre-training model;

[0064] According to each α cross , α dir and α dir A training value combination of randomly selecting a node in the original training sample and deleting the second specified feature of the node to form an input training sample;

[0065] The input training sample is input and each α cross , α dir and α dir The pre-training model corresponding to the training value combination of α is output after the model processing, and the difference between the first specified feature of the repaired node and the first specified feature of each node in the original training sample is used as the loss function. The training is performed on each α cross , α dir and α dir A pre-trained model corresponding to the training value combination of ; wherein, in the loss function, the loss weight of the deleted feature node is greater than the loss weight of the normal node.

[0066] Preferably, in the training unit, the α cross , α dir and α dir The methods for determining the training value combination of include:

[0067] Setting α cross , α dir and α other The initial value of α is multiplied by each item in the preset missing ratio set to obtain a set of α cross , α dir and α other The training value combination of .

[0068] Preferably, the α cross , α dir and α otherThe initial value of is a set value, or the α calculated based on the traffic operation status graph in the graph processing unit for the most recent N times is cross , α dir and α other Take the average value, and then use the average value and / or the proportional increase or decrease value of the average value as the α cross , α dir and α other The initial value of .

[0069] Preferably, the encoder of the pre-trained model is composed of a plurality of graph attention networks GATs, and a residual structure is introduced between the GATs, and the decoder of the pre-trained model is a multi-layer perceptron network; wherein the number of layers of the GAT is determined based on the range of neighbor features to be obtained.

[0070] Preferably, in the encoder, the processing of each GAT includes:

[0071] Calculate the similarity between a node and its adjacent nodes Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the first activation function, Represents the set of adjacent nodes of node i;

[0072] Aggregation characteristics of computing nodes Among them, σ(·) is the second activation function, W k is the parameter to be trained, and multiple heads are used to aggregate the features of multiple nodes. k represents the sequence number of the head, and || represents the concatenation of the aggregation results of multiple heads in the feature dimension.

[0073] The loss function is Among them, ρ and are the loss weights of feature missing nodes and normal nodes respectively, and x represent the first specified feature predicted by the model and the actual first specified feature in the original training sample, respectively, and M is the mask matrix.

[0074] Preferably, in the sorting unit, selecting a critical path corresponding to the road network range and time range from the sorted candidate paths includes:

[0075] Selecting a key path corresponding to the road network range and time range from the sorted candidate paths according to the target path number;

[0076] Among them, the number of target paths is positively correlated with the traceability level.

[0077] A traffic signal control method, comprising:

[0078] Selecting a critical path according to any of the above critical path identification methods;

[0079] Based on the critical path, traffic signals are controlled.

[0080] A computer-readable storage medium stores computer instructions thereon, wherein the instructions, when executed by a processor, can implement any of the above-mentioned critical path identification methods.

[0081] An electronic device comprising at least a computer-readable storage medium and a processor;

[0082] The processor is used to read the executable instructions from the computer-readable storage medium and execute the instructions to implement any of the above-mentioned critical path identification methods.

[0083] It can be seen from the above technical solution that in this application, based on the traceability section, traceability direction, traceability level and time period of the critical path, relevant road network data is obtained to construct a traffic operation status diagram, so as to use a directed graph to express the traffic operation status and reflect the traffic flow direction and the connection relationship between them; next, the three indicators of the flow, number of lanes and circular path penalty factor of the alternative path are obtained from the graph, and the three indicators are used to comprehensively evaluate and sort each alternative path. The sorting position of the alternative path is positively correlated with the path flow and the number of lanes, and negatively correlated with the circular path penalty factor. In this way, it can be ensured that the alternative path (that is, the critical path) with a forward position after sorting has as large a flow as possible, as many lanes as possible, and as few detours as possible, so that the accuracy of critical path identification can be improved even in a weak data environment; at the same time, the circular path penalty factor is used to punish the alternative path that includes the detour, thereby reducing the possibility of the corresponding alternative path as a critical path, and further improving the effectiveness of critical path identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 A basic flow chart of the critical path identification method in this application;

[0085] Figure 2 A schematic diagram of the traffic operation status diagram in this application;

[0086] Figure 3 This is a schematic diagram of a specific process of a critical path identification method in a specific embodiment of the present application;

[0087] Figure 4 Schematic diagram of the training method of the pre-trained model in this application;

[0088] Figure 5 This is a schematic diagram of the architecture of the pre-trained model in this application;

[0089] Figure 6 A schematic diagram of a road network in this application example;

[0090] Figure 7 A schematic diagram of an original traffic operation state diagram in an example of this application;

[0091] Figure 8 A schematic diagram of a traffic operation status diagram after repair in an example of this application;

[0092] Fig. 9 It is a basic structural diagram of the critical path identification device in this application;

[0093] Fig.10 This is a schematic diagram of the basic structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0094] In order to make the objectives, technical means and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings.

[0095] Figure 1 The following is a basic flow chart of the critical path identification method in this application. The critical path usually refers to a combination of traffic flows with a high (potential) contribution from or to a specified section of road. The identification result of the critical path can intuitively show where the congested traffic comes from and where it goes, and can be applied to the formulation of traffic signal control plans as an effective reference for traffic signal control plans. Figure 1 As shown, the method includes:

[0096] Step 101, obtain the tracing section, tracing direction, tracing level and time period.

[0097] Among them, the tracing section can be a section specified by the user; there are usually two tracing directions, starting from the tracing section or arriving at the tracing section; the tracing level is used to indicate the tracing range, for example, a tracing level of 3 means that the critical path is determined within a range of at least 3 sections from the tracing section; the time period refers to determining the critical path using data within the specified time period.

[0098] Step 102, based on the tracing section, tracing direction, tracing level and time period, determine the road network range and time range for detecting the critical path; obtain the road network data within the corresponding road network range and time range, and use the obtained road network data to construct a traffic operation status diagram.

[0099] According to the traceability road section, traceability direction, traceability level and time period obtained in step 101, a specific road network range and time range can be determined. The purpose of this method is to detect the key path within this road network range and time range. Next, obtain the road network data within the corresponding road network range and time range, that is, obtain the road network data within the corresponding time period, centered on the traceability road section, according to the traceability direction and within the specified range of the corresponding traceability level.

[0100] In this application, a directed graph is used to represent the acquired road network data and express the traffic operation status, which is called a traffic operation status graph. The nodes in the traffic operation status graph are the traffic flow directions of the road sections, and the directed edges are the connection relationships between the traffic flow directions. The node characteristics of the nodes can basically include the flow direction, flow direction, number of lanes and flow volume contained in the flow. Preferably, the node characteristics can further include the large vehicle ratio. In order to make the traffic operation status graph more readable, a confluence node can be added to aggregate the characteristics of multiple flow directions, such as Figure 2 As shown. The flow rate and vehicle ratio in the characteristics of the confluence flow direction are the sum of the corresponding characteristics of the corresponding downstream flow direction or the average value of the corresponding characteristics. Among them, the downstream flow direction of the confluence node refers to the node flow direction connected to the outflow direction of the confluence node.

[0101] Step 103, in the traffic operation state diagram, traverse all alternative paths for the critical path to form an alternative path set, and calculate the path flow, number of lanes and loop path penalty factor of each alternative path.

[0102] In the road network data acquired in step 102, all possible paths that may serve as critical paths (or paths for critical paths) are found and referred to as candidate paths. All the candidate paths constitute a candidate path set.

[0103] For each alternative path, the path flow, number of lanes and loop path penalty factor are calculated. Among them, the path flow is the sum of the flow of each section, and the number of lanes is the sum of the number of lanes in each section. The loop path penalty factor is used to penalize alternative paths with detours (for example, the alternative path includes repeated sections, etc.) to reduce the probability that the alternative path is selected as the critical path. Based on this, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path. The specific calculation method of the loop path penalty factor can be designed according to the above requirements. A method for calculating the loop path penalty factor is given below:

[0104] If the alternative path is a loop path, the loop path penalty factor is set to the maximum value;

[0105] If the candidate path is not a loop path, the loop path penalty factor is calculated as follows:

[0106] In the node set constituting the alternative path, the first processing is performed on each current node in turn according to the order of the nodes constituting the alternative path to obtain the penalty factor of each current node; for each node whose penalty factor is not 0, the average value of the penalty factor is calculated as the ring path penalty factor of the alternative path;

[0107] The first processing for the current node includes:

[0108] Get the M-layer node set of the current node (M is the penalty level, which is used to indicate the range of the loop path that needs to be punished. The larger the penalty level, the larger the loop path that can be identified and punished. The penalty level is less than or equal to the tracing level) as the first set;

[0109] Obtain the node set after the current node in the alternative path as the second set;

[0110] If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0.

[0111] Here is a pseudocode example for calculating the circular path penalty factor:

[0112]

[0113]

[0114] Step 104, with the goal of having a larger path flow, a larger number of lanes, and a smaller circular path penalty factor, all the alternative paths in the alternative path set are sorted, and a key path corresponding to the road network range and time range is selected from the sorted alternative paths.

[0115] In this step, all the alternative paths are sorted, and the corresponding sorting results are: the order of the alternative paths from large to small or from small to large in terms of their likelihood of being the key path. Among them, the three goals are: the larger the path flow, the better, the more lanes, the better, and the smaller the circular path penalty factor, the better. In this way, the solved key path has the largest possible flow, the most possible number of lanes, and the least possible detours within the corresponding road network range and time range.

[0116] In addition, when making a specific selection, the selection can be made according to the number of target paths. The number of target paths can be set to a default number, such as 3, or can be set by the user according to specific needs, or can be set based on the traceability level. Optionally, the traceability level can be positively correlated with the number of target paths, that is, the larger the road network range corresponding to the key path selection, the more key paths are selected.

[0117] The specific sorting method can be selected according to the actual situation. For example, a non-dominated hierarchical sorting algorithm can be used. This algorithm includes very few items in each layer after sorting, and the number of critical paths to be selected is usually relatively small. Therefore, it is more appropriate to use a non-dominated hierarchical sorting algorithm for sorting.

[0118] So far, Figure 1 The method flow shown ends. Through the above critical path identification method, traffic flow directions and their connections are used to form a traffic operation status diagram, and the three indicators of flow, number of lanes and circular path penalty factor of the alternative path are obtained from the diagram to comprehensively evaluate the path, and then the three objectives are used to sort and select the critical path. In this way, even in a weak data environment, the critical path can be reasonably selected to improve the accuracy of critical path identification; at the same time, the circular path penalty factor is used to penalize the alternative path including the detour situation, reduce the possibility of the corresponding alternative path as the critical path, and further improve the accuracy of critical path identification.

[0119] In addition, preferably, in a weak data environment, the missing data can be repaired, and then the repaired data can be used to identify the critical path according to the method of the present application, which can further improve the accuracy of the critical path identification. A specific embodiment is given below to illustrate the specific implementation of the critical path identification in the present application, which includes the processing of repairing the missing data.

[0120] Figure 3 This is a schematic diagram of a specific process of the critical path identification method in a specific embodiment of the present application. Figure 3 As shown, the method includes:

[0121] Step 301, obtain the tracing section, tracing direction, tracing level and time period.

[0122] Step 302, based on the tracing section, tracing direction, tracing level and time period, determine the road network range and time range for detecting the critical path, obtain the road network data within the road network range and time range, and use the obtained road network data to construct a traffic operation status diagram.

[0123] The processing of steps 301 and 302 is the same as that of steps 101 and 102, respectively, and will not be repeated here.

[0124] Step 303: determine the nodes with missing features in the traffic operation status graph and calculate the total proportion of node feature missing α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other .

[0125] A weak data traffic environment refers to the loss of some monitoring data due to damage or loss of monitoring equipment, which means that the node features in the traffic operation status diagram of this application are missing. Usually, the loss of node features means that only part of all features are missing. Generally, some node features are fixed-state data, such as flow direction, turning direction, number of lanes included in the flow direction, etc. These features are usually not missing; some node features are dynamically changing data, such as flow rate, large vehicle ratio, etc. These features may be missing due to damage or loss of monitoring equipment. The feature-missing node in this application refers to a node in which at least one of the node features is missing.

[0126] In this step, nodes with missing features in the traffic operation status graph are screened and the missing ratio is calculated. This application introduces four types of node feature missing ratios to describe different situations of feature missing. Specifically, the total node feature missing ratio α sum It is the ratio of the total number of nodes with missing features to the total number of all nodes, which is used to describe the overall ratio of missing node features; the first node feature missing ratio α cross is the ratio of the total number of nodes with missing features in all nodes at the intersection to the total number of nodes. In other words, when calculating α cross When , the denominator is the total number of all nodes, and the numerator is the number of some nodes. If all nodes on an intersection are feature-missing nodes, then all nodes on the intersection are counted into the number of nodes in the numerator. It can be seen that α cross It is used to describe the ratio of nodes with missing features in the entire intersection, corresponding to the situation where all monitoring equipment in the entire intersection is damaged or missing; the second node feature α dir is the ratio of the total number of nodes with missing features in all nodes of the same flow direction at the intersection to the total number of nodes. In other words, when calculating α dir When , the denominator is the total number of all nodes, and the numerator is the number of some nodes. If all nodes in the same direction of an intersection are feature-missing nodes, then all nodes in that direction of the intersection are counted into the number of nodes in the numerator. It can be seen that α dir It is used to describe the ratio of nodes with missing features in a certain direction of the intersection, corresponding to the situation where all monitoring equipment in a certain direction of the entire intersection is damaged or missing; the third node feature missing ratio α other is α sum -α cross -α dir , used to describe the addition of α cross and α dir In addition, considering that the confluent node reflects the characteristic attributes of other nodes, it is preferred that the confluent node is not included in the calculation of the node missing ratio.

[0127] Step 304, convert the traffic operation state graph into an undirected graph and input the graph with α cross , α dir and α other The pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the input undirected graph to obtain the first specified feature value of each node after repair.

[0128] This application provides several pre-trained pre-training models, and different pre-training models correspond to α cross , α dir and α other The pre-trained model is used to process the input, using the features of known nodes in the graph and the feature relationship between adjacent nodes to repair one or some features (collectively referred to as the first specified features) of the nodes with missing features, and obtain the first specified feature values ​​of all nodes in the undirected graph after repair. cross , α dir and α other The value combination represents different types of node feature missing, and also corresponds to different feature prediction relationships between adjacent nodes. Therefore, corresponding to different α cross , α dir and α other The corresponding pre-trained model is trained by taking value combinations, which can better repair the first specified feature of the node for the corresponding node feature missing type. Among them, the first specified feature is a certain type of node feature that is missing. This type of node feature can generally reflect the relationship between the corresponding features of adjacent nodes through graph information. For example, a typical specified feature repair can be the repair of traffic features.

[0129] In addition, the graph input into the pre-trained model in this step is the undirected graph G converted from the traffic operation state graph G und In this way, the features between nodes can be reversely deduced and as many neighbor node features as possible can be obtained.

[0130] Step 305, the first designated feature value of each node in the traffic operation status graph G is replaced with the first designated feature value of each node after repair, so as to obtain an updated traffic operation status graph G′ and use it as updated road network data.

[0131] The repaired node features are used to replace the corresponding features of the nodes in the traffic operation status graph G. In this way, the updated traffic operation status graph G′ has no nodes with missing features, and the corresponding data is used as the updated road network data.

[0132] Step 306, in the road network data, traverse all alternative paths for the critical path to form an alternative path set, and calculate the path flow, number of lanes and loop path penalty factor of each alternative path.

[0133] In this embodiment, the road network data is always described by a traffic operation status graph. When acquiring the set of alternative paths in this step, various existing traversal algorithms can be directly used in the updated traffic operation status graph G′ to achieve this. For example, a depth-first or breadth-first traversal algorithm can be used in the graph G′ to obtain a set of all paths that reach the source section or depart from the source section in the tracing direction as a set of alternative paths. Then, the path flow, number of lanes, and circular path penalty factor are calculated for each alternative path. The specific processing is the same as in step 103, and will not be repeated here.

[0134] Step 307, with the goal of having a larger path flow, a larger number of lanes, and a smaller circular path penalty factor, all the alternative paths in the alternative path set are sorted, and a key path corresponding to the road network range and time range is selected from the sorted alternative paths.

[0135] The processing of this step is the same as step 104, and will not be repeated here. Since the data basis for critical path selection has been repaired with node features, more node features can be used to describe path information compared to the original data, so the critical path identification based on this can more effectively improve the identification effectiveness.

[0136] So far, Figure 3 The critical path identification method process in the specific embodiment shown ends.

[0137] In the above Figure 3 In the specific embodiment shown, a data set with missing partial features is constructed through simulation, which solves the problem of requiring complete real traffic data before field data repair, and constructs a pre-training model that is as unbiased as possible. The corresponding pre-training model is obtained according to the missing flow node ratio and the missing flow node distribution status, which can improve the accuracy of node repair; critical path identification based on the repaired nodes can further improve the recognition accuracy.

[0138] This application also provides a training method for a pre-trained model, which is introduced in detail below.

[0139] Figure 4 Schematic diagram of the training method of the pre-trained model in this application. Figure 4 As shown, the training method includes:

[0140] Step 401, construct a simulation environment of various road networks and obtain simulation data.

[0141] Generally, traffic simulation software (such as SUMO simulation software) can be used to construct a variety of road network environments and their traffic demands. In terms of road network structure, it should include a variety of road networks consisting of various types of intersections, number of lanes, and signal control schemes. In terms of traffic demand, it should include elements such as proportions of different sizes of vehicles, buses, non-motor vehicles, pedestrians, etc. The entire simulation model should cover the main elements of the city where the application is currently deployed. Through the simulated road network environment, simulated traffic data in various environments can be obtained. Since it is a simulation system, the full amount of data can be obtained for model training.

[0142] Step 402: construct a traffic operation status training graph using simulation data and convert it into an undirected graph.

[0143] Using simulation data, multiple traffic operation state graphs for training are constructed, which are called traffic operation state training graphs. The nodes, directed edges and node features in the traffic operation state training graphs are similar to those in the Figure 3 To achieve mutual derivation between node features, the traffic operation status training graph is converted from a directed graph to an undirected graph, and these undirected graphs are called original training samples.

[0144] Step 403, set multiple α cross , α dir and α other The training value combination of .

[0145] In this application, the α corresponding to each pre-trained model cross , α dir and α dir The value combination is called the training value combination. cross , α dir and α other The training value combination of α is used to represent various typical feature missing types and their distribution. cross , α dir and α other The training value combination can be set based on experience and actual needs. Here is an example of a setting method:

[0146] You can set α cross , α dir and α other The initial value of α is multiplied by each item in the preset missing ratio set β to obtain a set of cross , α dir and α other For example, the missing ratio set β = {0.05, 0.1, 0.15...0.7}, where 0.05 is combined with α cross , α dir and α otherMultiply the initial value of α cross , α dir and α other The training value combination of β and α cross , α dir and α other Multiply the initial value of α to get another cross , α dir and α other The training value combination of α cross , α dir and α other The training value combination of cross , α dir and α other The training value combination of .

[0147] Among them, α cross , α dir and α other The initial value of can be a preset value, or, in order to minimize the training range, if α has been calculated based on the actual road network conditions of the current city before training and pre-training the model cross , α dir and α other Three missing proportions (such as α calculated based on the traffic operation status diagram cross , α dir and α dir The value of α can be calculated for the most recent N (N is a preset positive integer) times. cross , α dir and α dir Take the average value (that is, according to Figure 3 The average value of the actual missing ratio calculated in step 303 is used as α cross , α dir and α other The initial value of α can also be used as the proportional increase or decrease value of the average value. cross , α dir and α other The initial value of .

[0148] For each α cross , α dir and α other The training value combination of α is trained to obtain a pre-trained model. cross , α dir and α other The training value combination of α and the training method of the pre-trained model are the same. cross , α dir and αother Take the pre-trained model of the training value combination as an example to illustrate the subsequent processing.

[0149] Step 404, according to α cross , α dir and α other A training value combination is used to randomly select nodes in the original training samples and delete the second specified features of the nodes to form the input training samples of the corresponding pre-training model.

[0150] The aforementioned step 402 determines a plurality of original training samples (i.e., an undirected graph). In each original training sample, according to α cross , α dir and α dir The training value combination of the node is selected to delete its second specified feature (usually dynamic feature data that may be missing features, such as traffic and large vehicle ratio), so that the feature missing node ratio after deleting the feature satisfies α cross , α dir and α dir The undirected graphs after deleting the node features are used as the input training samples of the pre-training model.

[0151] Specifically, the feature deletion to obtain the input training sample can be performed by using a mask matrix. Specifically, according to α cross , α dir and α dir The training value combination of is used to generate the corresponding mask matrix, where 0 and 1 represent that the node feature has not been deleted and deleted respectively. The mask matrix is ​​then used to process the original training sample to obtain the input training sample.

[0152] Step 405, input the input training sample into the pre-training model, output the node features of all nodes after repair after model processing, and use the difference between the repaired node features and the node features of each node in the corresponding original training sample as the loss function for training the pre-training model.

[0153] The pre-training model in this embodiment adopts the design idea based on the denoising autoencoder, introduces the graph self-attention mechanism GAT as the encoder, and the MLP multi-layer perceptron network as the decoder (for example, a combination of several ANN layers is selected), such as Figure 5 shown.

[0154] Specifically, Figure 5 As shown in the figure, in the encoder module, neighbor features are extracted by normalizing the adjacency matrix (Laplacian matrix). It is generally used in the training phase and the inference phase. Based on the same graph structure, GAT learns the aggregation method of the central node and the surrounding nodes, which can adapt to different graph structures. The calculation steps of GAT include:

[0155] 1) Calculate the similarity between a node and its adjacent nodes, that is, by concatenating the features of the two nodes, and then using a layer of ANN with shared parameters and softmax to calculate a similarity real number between 0 and 1:

[0156]

[0157] Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the activation function, e ij is the calculated similarity between two nodes, Represents the set of adjacent nodes of node i.

[0158] 2) Calculate the aggregated features of the nodes. The following formula describes the feature aggregation of node i:

[0159]

[0160] Among them, σ(·) is the activation function, W is the parameter to be trained, multiple heads are used to perform the feature aggregation process of multiple nodes, k represents the sequence number of the head, and || represents the concatenation of the aggregation results of multiple heads in the feature dimension.

[0161] In the above encoder, GAT can help feature-missing nodes obtain the features of their first-order neighbor nodes. Generally, in order to obtain features of more distant neighbors, >= 4 GAT layers can be used as encoders. At the same time, in order to solve the problem of over-smoothing in the aggregation of deep graph neural networks, which causes features to be similar and indistinguishable, a residual structure is introduced in the encoder of the pre-trained model of this embodiment, such as Figure 5 The structure between GAT layers in the network can enhance the generalization ability of the network.

[0162] In this embodiment, the loss function of the pre-trained model is designed to be the difference between the first specified feature after repair and the first specified feature in the corresponding original training sample, such as the L2 norm of the first specified feature of the node. Preferably, in order to make the pre-trained model more focused on the feature repair results of the feature-missing nodes, more weight is given to the feature-missing nodes, that is, in the loss function, the loss weight of the feature-missing nodes is greater than the loss weight of the normal nodes (i.e., the nodes without feature missing). The loss function can be specifically expressed as:

[0163]

[0164] Among them, ρ and are the loss weights of feature-missing nodes and normal nodes, for example, 0.9 and 0.1 respectively. M is the mask matrix, 0 and 1 represent nodes with features and without features respectively. and x represent the predicted first specified feature of the model and the actual first specified feature in the original training sample, such as predicted traffic and actual traffic, respectively.

[0165] The model is trained using the input training sample as the model input and the first specified feature (eg flow rate) flowing to the node as the output until the model converges.

[0166] Repeat the above steps 404-405 to train different α cross , α dir and α dir The training value combination of the corresponding pre-trained model is then solidified and stored for later use. Figure 3 The critical path identification method shown is used.

[0167] So far, Figure 4 The method flow shown ends.

[0168] A specific example is given below to illustrate the application of the above critical path identification method.

[0169] exist Figure 6 In the road network shown, the request is for a critical path of length 3 to reach R_(1-2) from 10:00 to 10:30 today. Therefore, the traceability section is R_(1-2), that is, Figure 6 For the road section between the middle intersection I1 and the intersection I2, the tracing direction is arrival, the time period is 10:00 to 10:30 today, and the tracing level is 3.

[0170] The specific processing steps include:

[0171] (1) Select the road network within the three-layer range of the intersection, and construct a directed graph with flow directions as nodes and flow connections as edges, i.e., the traffic operation status graph, as shown in Figure 7 As shown in Figure 2. The gray nodes represent nodes with missing features.

[0172] (2) After converting the traffic operation status graph into an undirected graph, the node missing ratio is calculated, and a pre-trained model corresponding to the ratio is selected (the pre-trained model in this example is used for traffic repair); then the undirected graph is input into the selected pre-trained model to obtain the repaired traffic flow, and the traffic flow in the traffic operation status graph is replaced, such as Figure 8 shown.

[0173] (3) Perform path search in the repaired traffic operation status graph and calculate the path flow, number of lanes, and circular path penalty factor. The following paths can be searched in this road network:

[0174] f 9-10_r →f 10-2_r →f 2-1_sTraffic volume 200, number of lanes 3.5, loop path penalty factor 2

[0175] f 4-3_s →f 3-2_s →f 2-1_s Traffic volume 600, number of lanes 6, loop path penalty factor 0

[0176] f 11-3_r →f 3-2_s →f 2-1_s Traffic volume 500, number of lanes 4.5, loop penalty factor 0

[0177] f 11-10_l →f 1o-2_r →f 2-1_s Traffic volume 550, number of lanes 3.5, circular path penalty factor 0;

[0178] Among them, f 9-10_r Indicates the right turn flow from intersection 9 to intersection 10, f 11-10_l Indicates the left turn flow from intersection 11 to intersection 10, f 2-1_s Indicates the straight flow direction from intersection 2 to intersection 1.

[0179] (4) Perform non-dominated hierarchical sorting and obtain the following sorting results:

[0180] f 9-10_r →f 1o-2_r →f 2-1_s Third floor

[0181] f 4-3_s →f 3-2_s →f 2-1_s First floor

[0182] f 11-3_r →f 3-2_s →f 2-1_s Second floor

[0183] f 11-10_l →f 10-2_r →f 2-1_s Second floor

[0184] Among them, the first layer is sorted at the front, and the sorting results of the same layer have the same priority; for example, when 3 key paths need to be returned, the paths of the first layer and the second layer can be returned as key paths; when 2 key paths need to be returned, the path of the first layer and any one of the paths in the second layer can be returned as key paths.

[0185] The above is the specific implementation of the critical path identification method in the present application. Based on the above critical path identification method, the present application also provides a traffic signal control method, which specifically includes: selecting a critical path according to the above critical path identification method; and controlling the traffic signal based on the selected critical path. Specifically, in the traffic signal control method, it is necessary to refer to the real-time road conditions of each intersection and related road sections. When congestion or heavy traffic is found in a certain section through the selection and marking of the critical path, the control of the traffic signal can be adjusted in time based on the critical path. For example, for the critical path, green wave control can be used as much as possible, so that the vehicle will encounter a green light as much as possible when it reaches the relevant intersection on the entire critical path, so that the traffic can flow out of the critical path as soon as possible to relieve the congestion.

[0186] It should be noted that the data involved in this manual are obtained and processed with the user's knowledge and authorization.

[0187] The present application also provides a critical path identification device, which can be used to implement the above critical path identification method. Fig. 9 Schematic diagram of the basic structure of the critical path identification device in this application. Fig. 9 As shown, the device includes: an input unit, a data acquisition unit, a graph processing unit, a traversal unit and a sorting unit.

[0188] Among them, the input unit is used to obtain the tracing section, tracing direction, tracing level and time period; the tracing level is used to indicate the tracing scope;

[0189] A data acquisition unit, used to determine the road network range and time range for detecting the critical path based on the tracing section, tracing direction, tracing level and time period, and acquire the road network data within the road network range and time range;

[0190] A graph processing unit constructs a traffic operation status graph using the acquired road network data; wherein the nodes in the traffic operation status graph are the traffic flow directions of the road sections, and the directed edges are the connection relationships between the traffic flow directions;

[0191] A traversal unit is used to traverse all alternative paths for the critical path in the traffic operation state diagram to form an alternative path set, and calculate the path flow, the number of lanes and the loop path penalty factor of each alternative path; wherein, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path;

[0192] The sorting unit is used to sort all the alternative paths in the alternative path set with the goal of the larger the path flow, the better, the more lanes, the better, and the smaller the circular path penalty factor, the better, and select the key path corresponding to the road network range and time range from the sorted alternative paths.

[0193] To achieve feature repair of missing feature nodes, optionally, a feature repair unit may be further included between the graph processing unit and the traversal unit;

[0194] The graph processing unit can also be used to determine nodes with missing features in the traffic operation status graph and calculate the total proportion of node feature missing α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other ;

[0195] The feature restoration unit can be used to convert the traffic operation state graph into an undirected graph and input the α cross , α dir and α dir The pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the undirected graph to obtain the first specified feature value of each node after repair; it is also used to replace the first specified feature value of each node in the traffic operation status graph with the first specified feature value of each node after repair to obtain an updated traffic operation status graph, and output it to the traversal unit;

[0196] Among them, the node characteristics of the nodes in the traffic operation status diagram include flow direction, flow turning, the number of lanes included in the flow, and flow rate.

[0197] Optionally, in the traversal unit, when calculating the loop path penalty factor of the candidate path, if the candidate path is a loop path, the loop path penalty factor is set to a maximum value;

[0198] If the alternative path is not a loop path, the calculation method of the loop path penalty factor includes:

[0199] In the node set constituting the alternative path, each current node is processed in turn according to the order of the nodes constituting the alternative path to obtain a penalty factor of each current node; for each node whose penalty factor is not 0, an average value of the penalty factor is calculated as the ring path penalty factor of the alternative path;

[0200] The first process may include:

[0201] Get the M-layer node set of the current node as the first set; M is the penalty used to represent the range of the ring path that needs to be punished, and the penalty level is less than or equal to the tracing level;

[0202] Obtain the node set after the current node in the alternative path as the second set;

[0203] If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0.

[0204] To implement the training of the pre-trained model, the device may optionally further include a training unit for presetting a plurality of α cross , α dir and α dir The training value combination, and for each α cross , α dir and α dir The training value combination of training the corresponding pre-training model;

[0205] Among them, for each α cross , α dir and α other The method of training the corresponding pre-trained model by combining the training values ​​may include:

[0206] Through traffic simulation software, road network data under various road network environments are obtained to construct multiple traffic operation status training graphs; the nodes in the traffic operation status training graphs are the traffic flow directions of the road sections, the directed edges are the connection relationships between the traffic flow directions, and the node features of the corresponding nodes include the flow direction, flow direction, the number of lanes included in the flow direction, and the flow volume. The node features of all nodes are complete;

[0207] Convert all traffic operation status training graphs into undirected graphs and use them as original training samples for the pre-training model;

[0208] According to each α cross , α dir and α dir A training value combination is used to randomly select a node in the original training sample and delete the second specified feature of the node to form an input training sample;

[0209] The input training sample is input and each α cross , α dir and α dir The pre-trained model corresponding to the training value combination of α is output after the model processing, and the difference between the first specified feature of the repaired node and the first specified feature of each node in the original training sample is used as the loss function. cross , α dir and α dir The pre-trained model corresponding to the training value combination of ; wherein, in the loss function, the loss weight of the deleted feature node is greater than the loss weight of the normal node.

[0210] Optionally, in a training unit, αcross , α dir and α dir Methods for determining the training value combination of may include:

[0211] Setting α cross , α dir and α dir The initial value of α is multiplied by each item in the preset missing ratio set to obtain a set of cross , α dir and α other The training value combination of .

[0212] Optionally, α cross , α dir and α other The initial value of is the set value, or the α calculated based on the traffic operation status graph in the graph processing unit for the most recent N times cross , α dir and α otherr The average value is taken, and the average value and / or the proportional increase or decrease value of the average value is taken as α cross , α dir and α other The initial value of .

[0213] Optionally, the encoder of the pre-trained model is composed of multiple graph attention networks GATs, and a residual structure is introduced between the GATs. The decoder of the pre-trained model is a multi-layer perceptron network; wherein the number of layers of the GAT is determined based on the range of neighbor features to be obtained.

[0214] Optionally, in the encoder, the processing of each GAT includes:

[0215] Calculate the similarity between a node and its adjacent nodes Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the first activation function, Represents the set of adjacent nodes of node i;

[0216] Aggregation characteristics of computing nodes Among them, σ(·) is the second activation function, W k is the parameter to be trained, and multiple heads are used to aggregate the features of multiple nodes. k represents the sequence number of the head, and | | represents the concatenation of the aggregation results of multiple heads in the feature dimension.

[0217] The loss function is Among them, ρ and are the loss weights of feature missing nodes and normal nodes respectively, and x represent the first specified feature predicted by the model and the actual first specified feature in the original training sample, respectively, and M is the mask matrix.

[0218] Optionally, in the sorting unit, the process of selecting a critical path corresponding to the road network range and the time range from the sorted candidate paths may specifically include:

[0219] Selecting a key path corresponding to the road network range and time range from the sorted candidate paths according to the target path number;

[0220] Among them, the number of target paths is positively correlated with the traceability level.

[0221] The present application also provides a traffic signal control system, comprising: the above-mentioned critical path identification device and signal control device;

[0222] The signal control device is used to control the traffic signal based on the critical path selected by the critical path identification device.

[0223] The present application also provides a computer-readable storage medium, which stores instructions, and when the instructions are executed by a processor, the steps in the critical path identification method described above can be executed. In practical applications, the computer-readable medium can be included in each device / apparatus / system in the above-mentioned embodiments, or it can exist independently without being assembled into the device / apparatus / system. Instructions are stored in the computer-readable storage medium, and when the instructions stored therein are executed by a processor, the steps in the critical path identification method described above can be executed.

[0224] According to the embodiments disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, but it is not used to limit the scope of protection of the present application. In the embodiments disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0225] Fig.10 This application also provides an electronic device. Fig.10 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0226] The electronic device may include a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 1002 is executed, the method for critical path identification may be implemented.

[0227] Specifically, in practical applications, the electronic device may further include components such as a power supply 1003, an input / output unit 1004, etc. Those skilled in the art may understand that Fig.10 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0228] Processor 1001 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in memory 1002 and calling data stored in memory 1002, thereby monitoring the electronic device as a whole.

[0229] The memory 1002 can be used to store software programs and modules, that is, the above-mentioned computer-readable storage medium. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.

[0230] The electronic device also includes a power supply 1003 for supplying power to various components, which can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0231] The electronic device may also include an input and output unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. The input unit output 1004 may also be used to display information input by the user or information provided to the user and various graphical user interfaces, which may be composed of graphics, text, icons, videos and any combination thereof.

[0232] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A critical path identification method, characterized in that: include: Obtain the traceability section, traceability direction, traceability level and time period; wherein the traceability level is used to indicate the traceability scope; Determine a road network range and a time range for detecting a critical path based on the tracing section, the tracing direction, the tracing level and the time period; Acquire road network data within the road network range and time range, and construct a traffic operation status graph using the acquired road network data; wherein the nodes in the traffic operation status graph are traffic flow directions of the road sections, and the directed edges are connection relationships between traffic flow directions; In the traffic operation state diagram, all alternative paths for the critical path are traversed to form an alternative path set, and the path flow, the number of lanes and the loop path penalty factor of each alternative path are calculated; wherein, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path; With the goal of having a larger path flow, a more lane number, and a smaller ring path penalty factor, all the alternative paths in the alternative path set are sorted, and a key path corresponding to the road network range and time range is selected from the sorted alternative paths.

2. The method according to claim 1, characterized in that The node characteristics of the nodes in the traffic operation status diagram include flow direction, flow direction turning, number of lanes included in the flow, and flow rate; After constructing the traffic operation state diagram and before traversing the alternative paths, the method further includes: Determine the nodes with missing features in the traffic operation status graph and calculate the total proportion of node feature missing α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other ; wherein the α sum is the ratio of the total number of nodes with missing features to the total number of nodes, and the α cross is the ratio of the total number of nodes with missing features at all nodes in the intersection to the total number of all nodes. dir is the ratio of the total number of nodes with missing features in all nodes of the same flow direction at the intersection to the total number of all nodes. other is α sum -α cross -α dir ; The traffic operation state graph is converted into an undirected graph and input into the graph with the α cross , α dir and α other The pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the undirected graph to obtain the first specified feature value of each node after repair; The first designated characteristic value of each node in the traffic operation status graph is replaced by the repaired first designated characteristic value of each node to obtain an updated traffic operation status graph.

3. The method according to claim 1 or 2, characterized in that: When calculating the loop path penalty factor of the candidate path, if the candidate path is a loop path, setting the loop path penalty factor to a maximum value; If the candidate path is not a loop path, the loop path penalty factor is calculated by: In the node set constituting the alternative path, each current node is subjected to the first processing in turn according to the order of the nodes constituting the alternative path to obtain a penalty factor of each current node; for each node whose penalty factor is not 0, an average value of the penalty factor is calculated as the ring path penalty factor of the alternative path; Wherein, the first process includes: Obtaining an M-layer node set of the current node as a first set; M is a penalty level for indicating a range of a ring path that needs to be punished, and the penalty level is less than or equal to the tracing level; Obtaining a set of nodes after the current node in the candidate path as a second set; If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0.

4. The method according to claim 2, characterized in that: The method further comprises: Preset multiple alpha cross , α dir and α other The training value combination, and for each α cross , α dir and α other The training value combination of training the corresponding pre-training model; Among them, for each α cross , α dir and α other Methods for training the corresponding pre-trained model by combining training values ​​include: Through traffic simulation software, road network data under various road network environments are obtained to construct multiple traffic operation status training graphs; wherein the nodes in the traffic operation status training graphs are the traffic flow directions of the road sections, the directed edges are the connection relationships between the traffic flow directions, the node features of the corresponding nodes include the flow direction, the flow direction, the number of lanes included in the flow direction and the flow volume, and the node features of all nodes are complete; Convert all traffic operation status training graphs into undirected graphs and use them as original training samples for the pre-training model; According to each α ctoss , α dir and α other A training value combination of randomly selecting a node in the original training sample and deleting the second specified feature of the node to form an input training sample; The input training sample is input and each α cross , α dir and α other The pre-training model corresponding to the training value combination of α is output after the model processing, and the difference between the first specified feature of the repaired node and the first specified feature of each node in the original training sample is used as the loss function. The training is performed on each α cross , α dir and α other A pre-trained model corresponding to the training value combination of ; wherein, in the loss function, the loss weight of the deleted feature node is greater than the loss weight of the normal node.

5. The method according to claim 4, characterized in that The α cross , α dir and α other The methods for determining the training value combination of include: Setting α cross , α dir and α other The initial value of α is multiplied by each item in the preset missing ratio set to obtain a set of α cross , α dir and α other The training value combination of .

6. The method according to claim 5, characterized in that The α cross , α dir and α other The initial value of is the set value, or the α calculated based on the traffic operation state diagram for the most recent N times. cross , α dir and α other The average value is taken, and the average value and / or the proportional increase or decrease value of the average value is taken as the α cross , α dir and α other The initial value of .

7. The method according to claim 4, characterized in that The encoder of the pre-trained model is composed of multiple graph attention networks GATs, and a residual structure is introduced between the GATs. The decoder of the pre-trained model is a multi-layer perceptron network; wherein the number of layers of the GAT is determined based on the range of neighbor features to be obtained.

8. The method according to claim 7, characterized in that In the encoder, the processing of each GAT includes: Calculate the similarity between a node and its adjacent nodes Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the first activation function, Represents the set of adjacent nodes of node i; Aggregation characteristics of computing nodes Among them, σ(·) is the second activation function, W k is the parameter to be trained, and multiple heads are used to aggregate the features of multiple nodes. k represents the sequence number of the head, and || represents the concatenation of the aggregation results of multiple heads in the feature dimension. The loss function is Among them, ρ and are the loss weights of feature missing nodes and normal nodes respectively, and x represent the first specified feature predicted by the model and the actual first specified feature in the original training sample, respectively, and M is the mask matrix.

9. The method according to claim 1, characterized in that: The step of selecting a key path corresponding to the road network range and time range from the sorted candidate paths includes: Selecting a key path corresponding to the road network range and time range from the sorted candidate paths according to the target path number; Among them, the number of target paths is positively correlated with the traceability level.

10. A critical path identification device, characterized in that: include: Input unit, data acquisition unit, graph processing unit, traversal unit and sorting unit; The input unit is used to obtain the tracing section, tracing direction, tracing level and time period; wherein the tracing level is used to indicate the tracing range; The data acquisition unit is used to determine the road network range and time range for detecting the critical path based on the tracing road section, the tracing direction, the tracing level and the time period; and is also used to acquire road network data within the road network range and time range; The graph processing unit constructs a traffic operation status graph using the acquired road network data; wherein the nodes in the traffic operation status graph are the traffic flow directions of the road sections, and the directed edges are the connection relationships between the traffic flow directions; The traversal unit is used to traverse all alternative paths for the critical path in the traffic operation state diagram to form an alternative path set, and calculate the path flow, the number of lanes and the loop path penalty factor of each alternative path; wherein, the more detours there are in the alternative path, the greater the loop path penalty factor of the alternative path; The sorting unit is used to sort all the alternative paths in the alternative path set with the goal of the larger the path flow, the better, the more lanes, the better, and the smaller the ring path penalty factor, the better, and select the key path corresponding to the road network range and time range from the sorted alternative paths.

11. The device according to claim 10, characterized in that A feature repair unit is further included between the graph processing unit and the traversal unit; The graph processing unit is further used to determine nodes with missing features in the traffic operation status graph and calculate the total node feature missing ratio α sum , the first node feature missing ratio α cross , the second node feature missing ratio α dir And the third node feature missing ratio α other ; wherein the α sum is the ratio of the total number of nodes with missing features to the total number of nodes, and the α cross is the ratio of the total number of nodes with missing features at all nodes in the intersection to the total number of all nodes. dir is the ratio of the total number of nodes with missing features in all nodes of the same flow direction at the intersection to the total number of all nodes. other is α sum -α cross -α dir ; The feature repair unit is used to convert the traffic operation state graph into an undirected graph and input the α cross , α dir and α dir The pre-trained model corresponding to the value combination of is used to repair the first specified feature of each node in the undirected graph to obtain the first specified feature value of each node after repair; and is also used to replace the first specified feature value of each node in the traffic operation status graph with the first specified feature value of each node after repair to obtain an updated traffic operation status graph, and output it to the traversal unit; Wherein, the node characteristics of the nodes in the traffic operation status diagram include flow direction, flow turn, number of lanes included in the flow and flow rate; and / or, In the traversal unit, when calculating the loop path penalty factor of the candidate path, if the candidate path is a loop path, the loop path penalty factor is set to a maximum value; If the candidate path is not a loop path, the loop path penalty factor is calculated by: In the node set constituting the alternative path, each current node is subjected to the first processing in turn according to the order of the nodes constituting the alternative path to obtain a penalty factor of each current node; for each node whose penalty factor is not 0, an average value of the penalty factor is calculated as the ring path penalty factor of the alternative path; Wherein, the first process includes: Obtaining an M-layer node set of the current node as a first set; M is a penalty level for indicating a range of a ring path that needs to be punished, and the penalty level is less than or equal to the tracing level; Obtaining a set of nodes after the current node in the candidate path as a second set; If the intersection length of the first set and the second set is greater than M, the difference between the intersection length of the first set and the second set and M is calculated, and the difference result is used as the penalty factor of the current node; otherwise, the penalty factor of the current node is set to 0; and / or, The device further includes a training unit for presetting a plurality of α cross , α dir and α dir The training value combination, and for each α cross , α dir and α dir The training value combination of training the corresponding pre-training model; Among them, for each α cross , α dir and α dir Methods for training the corresponding pre-trained model by combining training values ​​include: Through traffic simulation software, road network data under various road network environments are obtained to construct multiple traffic operation status training graphs; wherein the nodes in the traffic operation status training graphs are the traffic flow directions of the road sections, the directed edges are the connection relationships between the traffic flow directions, the node features of the corresponding nodes include the flow direction, the flow direction, the number of lanes included in the flow direction and the flow volume, and the node features of all nodes are complete; Convert all traffic operation status training graphs into undirected graphs and use them as original training samples for the pre-training model; According to each α cross , α dir and α dir A training value combination of randomly selecting a node in the original training sample and deleting the second specified feature of the node to form an input training sample; The input training sample is input and each α cross , α dir and α dir The pre-training model corresponding to the training value combination of α is output after the model processing, and the difference between the first specified feature of the repaired node and the first specified feature of each node in the original training sample is used as the loss function. The training is performed on each α cross , α dir and α dir A pre-trained model corresponding to the training value combination of; wherein, in the loss function, the loss weight of the deleted feature node is greater than the loss weight of the normal node; and / or, In the training unit, the α cross , α dir and α dir The methods for determining the training value combination of include: Setting α cross , α dir and α other The initial value of α is multiplied by each item in the preset missing ratio set to obtain a set of α cross , α dir and α other The training value combination of and / or, The α cross , α dir and α other The initial value of is a set value, or the α calculated based on the traffic operation status graph in the graph processing unit for the most recent N times is cross , α dir and α other Take the average value, and then use the average value and / or the proportional increase or decrease value of the average value as the α cross , α dir and α other The initial value of and / or, The encoder of the pre-trained model is composed of multiple graph attention networks (GATs) spliced ​​together, and a residual structure is introduced between the GATs. The decoder of the pre-trained model is a multi-layer perceptron network; wherein the number of layers of the GAT is determined based on the range of neighbor features to be obtained; and / or, In the encoder, the processing of each GAT includes: Calculate the similarity between a node and its adjacent nodes Among them, h i ,h j is the feature of two nodes, and the two nodes are adjacent, W is the shared weight parameter, is the first activation function, Represents the set of adjacent nodes of node i; Aggregation characteristics of computing nodes Among them, σ(·) is the second activation function, W k is the parameter to be trained, and multiple heads are used to aggregate the features of multiple nodes. k represents the sequence number of the head, and || represents the concatenation of the aggregation results of multiple heads in the feature dimension. The loss function is Among them, ρ and are the loss weights of feature missing nodes and normal nodes respectively, and x represent the first specified feature predicted by the model and the real first specified feature in the original training sample, respectively, and M is the mask matrix; and / or, In the sorting unit, selecting a key path corresponding to the road network range and time range from the sorted candidate paths includes: Selecting a key path corresponding to the road network range and time range from the sorted candidate paths according to the target path number; Among them, the number of target paths is positively correlated with the traceability level.

12. A traffic signal control method, characterized in that: include: Selecting a critical path according to the critical path identification method according to any one of claims 1 to 9; Based on the critical path, traffic signals are controlled.

13. A traffic signal control system, characterized in that: include: The critical path identification device and signal control device as claimed in claim 10 or 11; The signal control device is used to control the traffic signal based on the critical path selected by the critical path identification device.

14. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the critical path identification method described in any one of claims 1 to 9 can be implemented.

15. An electronic device, characterized in that: The electronic device includes at least a computer-readable storage medium and also includes a processor; The processor is used to read the executable instructions from the computer-readable storage medium and execute the instructions to implement the critical path identification method described in any one of claims 1 to 9.