Traffic optimization method and device, equipment and storage medium
By constructing a trunk road topology map and using graphical search to optimize the absolute phase of intersections, the problems of slow calculation speed and completeness in intersection optimization in urban traffic networks are solved, and the accuracy and efficiency of regional collaborative optimization are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2026-03-10
AI Technical Summary
In urban transportation networks, existing technologies are slow to calculate and prone to missing intersections when searching for and optimizing intersections of various trunk lines within a region, resulting in incomplete calculations.
By constructing a trunk road topology map and optimizing the absolute phase of each intersection using a graph search method, the accuracy and efficiency of regional collaborative optimization are improved.
This improved the accuracy and efficiency of regional collaborative optimization, ensuring that all intersections were fully optimized, and that regional coordination was carried out based on trunk green wave optimization to maintain signal synchronization.
Smart Images

Figure CN121640732A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent transportation technology, and in particular to a traffic optimization method, apparatus, device, and storage medium. Background Technology
[0002] In order to reduce the computational load, when coordinating and optimizing the intersections in the urban traffic network, the urban traffic network is divided into multiple optimization areas for regional collaborative optimization.
[0003] However, when optimizing the intersections of various trunk lines within a region, there are many trunk lines and even more intersections in the city. Searching for and optimizing intersections within the region based on the data structure of trunk lines and intersections is not only slow, but also prone to discarding intersections, resulting in incomplete calculations. Summary of the Invention
[0004] In view of this, embodiments of this application provide a traffic optimization method, apparatus, device, and storage medium, which improves the accuracy and efficiency of regional collaborative optimization by constructing a trunk road topology map and optimizing the absolute phase of each intersection based on a graph search method.
[0005] In a first aspect, embodiments of this application provide a traffic optimization method, comprising: constructing a trunk road topology map within an optimization area, wherein, in the topology map, intersections are nodes, and the lines connecting each pair of adjacent intersections on the trunk road are edges, and the relative phase difference between adjacent intersections is added to the attributes of each edge; searching for each intersection within the optimization area using a graph search method, and obtaining the first absolute phase of each intersection according to the attributes of each edge in the topology map; using the first absolute phase of each intersection divided by the positive remainder of the trunk road signal control cycle as the second absolute phase of each intersection, and adding it to the signal control scheme of each intersection for use in the traffic light control of that intersection.
[0006] As shown above, by constructing a non-closed trunk topology map and optimizing the absolute phase of each intersection based on a graph search method, the accuracy and efficiency of regional collaborative optimization are improved.
[0007] In one possible implementation of the first aspect, the types of the optimized regions include intersecting and conflicting types and intersecting but not conflicting types; the intersecting and conflicting type is a region with at least one trunk group inside, in which each trunk has at least two overlapping intersections with other trunks; for regions of the intersecting and conflicting type, when constructing the topology map in each optimization cycle, at least one trunk is deleted from the trunk group in the region, so that the region becomes an intersecting but not conflicting type region.
[0008] As described above, by transforming regions that are both intersecting and conflicting into regions that are intersecting but not conflicting, we can optimize regions that are both intersecting and conflicting.
[0009] In one possible implementation of the first aspect, in two adjacent optimization cycles, the trunks removed from the trunk group in that region are different in each optimization cycle.
[0010] As described above, by removing different trunks from the conflicting trunk groups in two adjacent optimization cycles, full coverage optimization of trunks within the region can be achieved quickly over multiple optimization cycles.
[0011] In one possible implementation of the first aspect, constructing a trunk line topology map within the optimization region includes: selecting a trunk line within the optimization region in the current optimization cycle; adding each intersection of the trunk line as a node in the topology map and connecting the corresponding edges and configuring the attributes of each edge; wherein, if at least one trunk line in the region was deleted when constructing the topology map in the previous optimization cycle, the selected trunk line in the current optimization cycle is the deleted trunk line; selecting another trunk line within the region; adding each intersection of the trunk line as a node in the topology map and connecting the corresponding edges and configuring the attributes of each edge; determining whether the current topology map is closed based on a graph search method, wherein closure means returning to the node after several unidirectional searches starting from a node in the current topology map; if closed, deleting the intersections and edges added for the selected trunk line in the topology map; if not closed, randomly selecting a remaining unadded trunk line and performing the addition, determination, and corresponding processing until all trunk lines have been processed.
[0012] As shown above, by selecting the trunk line in the current optimization cycle that was not included in the topology map constructed in the previous optimization cycle, not only are all trunk lines in the region coordinated and optimized within several optimization cycles, but all trunk lines are included as much as possible.
[0013] In one possible implementation of the first aspect, the step of searching each intersection within the optimization area using a graph search method and obtaining the first absolute phase of each intersection based on the attributes of each edge in the topology graph includes: setting the first absolute phase of any intersection within the optimization area as a reference value; sequentially searching each other intersection within the optimization area using a graph search method, with each search direction being a unidirectional search; and obtaining the first absolute phase of each searched intersection based on the attributes of the edges in the topology graph between the searched intersection and its adjacent intersections with already determined first absolute phases.
[0014] As described above, relevant intersections can be quickly and comprehensively searched through graphical search. Phase shifting not only preserves the green wave effect of trunk lines but also coordinates the phase of trunk lines within the region, achieving rapid regional coordination and optimization.
[0015] In one possible implementation of the first aspect, a traffic optimization method further includes: for two adjacent areas, if it is determined by a graphical search that there are at least two identical nodes in the trunk topology maps of the two adjacent areas, then one of the areas is selected for optimization.
[0016] As shown above, for adjacent and conflicting regions, by selecting one region for optimization in each optimization cycle, the conflict problem is avoided and each region can be optimized.
[0017] In one possible implementation of the first aspect, the graph search includes width search and depth search.
[0018] As shown above, graph search supports multiple search methods to achieve fast searching.
[0019] In one possible implementation of the first aspect, before constructing the trunk topology map within the optimization area, the method further includes: optimizing the signal control scheme of each intersection in real time based on the traffic flow in each direction of each intersection within the optimization area; and performing bidirectional green wave optimization on each trunk line within the optimization area based on the optimized signal control scheme of each intersection of each trunk line within the optimization area to obtain the optimized relative phase difference between adjacent intersections within the optimization area.
[0020] As described above, after single-point optimization at intersections and green wave optimization on trunk lines, regional coordination optimization is then carried out, so that trunk lines within the region inherit the green wave optimization effect of trunk lines.
[0021] In one possible implementation of the first aspect, before performing bidirectional green wave optimization on each trunk line in the optimization area based on the optimized signal control scheme for each intersection of each trunk line in the optimization area, the method further includes: unifying the signal control cycle of each intersection in the optimization area, and using the unified signal control cycle as the trunk line signal control cycle; adjusting the green light time of each intersection of each trunk line in the optimization area according to the trunk line signal control cycle.
[0022] As mentioned above, a unified signal control cycle is designed to ensure that all nodes can complete their control schemes within a common cycle, thereby maintaining signal synchronization within the region.
[0023] Secondly, embodiments of this application provide a traffic optimization device, comprising: a topology construction module, used to construct a trunk road topology map within an optimization area, wherein, in the topology map, intersections are nodes, and the lines connecting each pair of adjacent intersections on the trunk road are edges, and the relative phase difference between adjacent intersections is added to the attributes of each edge; a phase optimization module, used to search for each intersection within the optimization area using a graphical search method, and obtain the first absolute phase of each intersection according to the attributes of each edge in the topology map; and a phase adjustment module, used to divide the first absolute phase of each intersection by the positive remainder of the trunk road signal control cycle to obtain the second absolute phase of each intersection, and add it to the signal control scheme of each intersection for use in the signal light control of that intersection.
[0024] As shown above, by constructing a non-closed trunk topology map and optimizing the absolute phase of each intersection based on a graph search method, the accuracy and efficiency of regional collaborative optimization are improved.
[0025] In one possible implementation of the second aspect, the types of the optimized regions include intersecting and conflicting types and intersecting but not conflicting types; the intersecting and conflicting type is a region with at least one trunk group inside, in which each trunk has at least two overlapping intersections with other trunks; for regions of the intersecting and conflicting type, when the topology building module builds the topology map in each optimization cycle, it deletes at least one trunk from the trunk group in the region, so that the region becomes an intersecting but not conflicting type region.
[0026] As described above, by transforming regions that are both intersecting and conflicting into regions that are intersecting but not conflicting, we can optimize regions that are both intersecting and conflicting.
[0027] In one possible implementation of the second aspect, in two adjacent optimization cycles, the trunks removed from the trunk group in that region are different in each optimization cycle.
[0028] As described above, by removing different trunks from the conflicting trunk groups in two adjacent optimization cycles, full coverage optimization of trunks within the region can be achieved quickly over multiple optimization cycles.
[0029] In one possible implementation of the second aspect, the topology construction module is specifically used to include: selecting a trunk line within the optimization region in the current optimization cycle, adding each intersection of the trunk line as a node in the topology graph, connecting the corresponding edges, and configuring the attributes of each edge, wherein if at least one trunk line in the region was deleted when constructing the topology graph in the previous optimization cycle, the selected trunk line in the current optimization cycle is the deleted trunk line; selecting another trunk line in the region, adding each intersection of the trunk line as a node in the topology graph, connecting the corresponding edges, and configuring the attributes of each edge; determining whether the current topology graph is closed based on a graph search method, wherein closure means returning to the node after several unidirectional searches starting from a node in the current topology graph; if closed, deleting the intersections and edges added for the selected trunk line in the current topology graph; if not closed, randomly selecting a remaining unadded trunk line, performing the addition, determination, and corresponding processing, until all trunk lines have been processed.
[0030] As described above, by selecting the trunk line in the current optimization cycle that was not included in the topology map constructed in the previous optimization cycle, not only are all trunk lines in the region coordinated and optimized within several optimization cycles, but all trunk lines are included as much as possible.
[0031] In one possible implementation of the second aspect, the phase optimization module is specifically used to include: setting the first absolute phase of any intersection within the optimization area as a reference value; sequentially searching each other intersection within the optimization area based on a graphical search method, wherein each search direction is a unidirectional search; and obtaining the first absolute phase of each searched intersection based on the attributes of the edges between the searched intersection and its adjacent intersections with already determined first absolute phases in the topology graph.
[0032] As described above, relevant intersections can be quickly and comprehensively searched through graphical search. Phase shifting not only preserves the green wave effect of trunk lines but also coordinates the phase of trunk lines within the region, achieving rapid regional coordination and optimization.
[0033] In one possible implementation of the second aspect, a traffic optimization device further includes: a region selection module, used to select one of the regions for optimization when it is determined by a graphical search that there are at least two identical nodes in the trunk topology maps of the two adjacent regions.
[0034] As shown above, for adjacent and conflicting regions, by selecting one region for optimization in each optimization cycle, the conflict problem is avoided and each region can be optimized.
[0035] In one possible implementation of the second aspect, the graph search includes width search and depth search.
[0036] As shown above, graph search supports multiple search methods to achieve fast searching.
[0037] In one possible implementation of the second aspect, a traffic optimization device further includes: an intersection optimization module, used to optimize the signal control scheme of each intersection in real time according to the traffic flow of each intersection in each direction in the optimization area; and a trunk line optimization module, used to perform bidirectional green wave optimization on each trunk line in the optimization area according to the optimized signal control scheme of each intersection in the optimization area, to obtain the optimized relative phase difference between adjacent intersections in the optimization area.
[0038] As described above, after the trunk line green wave optimization, regional coordination optimization is carried out, so that the trunk lines in the region inherit the green wave optimization effect of the trunk lines.
[0039] In one possible implementation of the second aspect, a traffic optimization device further includes: a cycle unification module, used to unify the signal control cycle of each intersection in the optimization area before performing bidirectional green wave optimization on each trunk line in the optimization area according to the optimized signal control scheme of each intersection of each trunk line in the optimization area, and to use the unified signal control cycle as the trunk line signal control cycle; and to adjust the green light time of each intersection of each trunk line in the optimization area according to the trunk line signal control cycle.
[0040] As mentioned above, a unified signal control cycle is designed to ensure that all nodes can complete their control schemes within a common cycle, thereby maintaining signal synchronization within the region.
[0041] Thirdly, embodiments of this application provide a computing device, including,
[0042] bus;
[0043] A communication interface, which is connected to the bus;
[0044] At least one processor connected to the bus; and
[0045] At least one memory is connected to the bus and stores program instructions that, when executed by the at least one processor, cause the at least one processor to perform any of the embodiments described in the first aspect of this application.
[0046] Fourthly, embodiments of this application provide a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, cause the computer to perform any of the embodiments described in the first aspect. Attached Figure Description
[0047] Figure 1This is a flowchart illustrating one embodiment of a traffic optimization method according to this application;
[0048] Figure 2 This is a schematic diagram illustrating regional conflicts in various embodiments of this application;
[0049] Figure 3 This is a flowchart illustrating a second embodiment of a traffic optimization method according to this application;
[0050] Figure 4 This is a schematic diagram of the structure of a traffic optimization device according to one embodiment of this application;
[0051] Figure 5 This is a schematic diagram of a second embodiment of a traffic optimization device according to this application;
[0052] Figure 6 This is a schematic diagram of a computing device according to various embodiments of this application. Detailed Implementation
[0053] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0054] In the following description, the terms “first, second, third, etc.” or module A, module B, module C, etc. are used only to distinguish similar objects or different embodiments, and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0055] In the following description, the labels of the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this way. The order of the steps can be interchanged or executed simultaneously if permitted.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0057] This application provides a traffic optimization method, apparatus, device, and storage medium. The method includes: constructing a trunk road topology map within an optimization area, wherein in the topology map, intersections are nodes, the lines connecting nodes corresponding to each pair of adjacent intersections are edges, and the relative phase difference between the adjacent intersections is added to the attributes of the edges; searching for each intersection within the optimization area using a graph search method, and obtaining the first absolute phase of each intersection according to the attributes of each edge in the topology map; and using the first absolute phase of each intersection divided by the positive remainder of the trunk road signal control cycle as the second absolute phase of each intersection.
[0058] The technical solution of this application improves the accuracy and efficiency of regional collaborative optimization by constructing a non-closed trunk topology map and optimizing the absolute phase of each intersection based on a graph search method.
[0059] The embodiments of this application are described below with reference to the accompanying drawings.
[0060] First, combine Figure 1 and Figure 2 This paper introduces an embodiment of a traffic optimization method based on the present application.
[0061] Figure 1 The flowchart of a traffic optimization method embodiment one is shown, including steps S110 to S130.
[0062] One embodiment of a traffic optimization method is performed once per optimization cycle. Each optimization cycle includes several trunk line signal control cycles to time-divide the traffic network and perform precise optimization at specific times. For example, each optimization cycle is 10 minutes long, consisting of approximately 3-5 trunk line signal control cycles. The trunk line signal control cycle can be the maximum value of the signal control cycles at regional intersections.
[0063] S110: Construct a trunk topology map within the optimization area.
[0064] The urban transportation network is divided into optimization regions. A trunk topology map is established in each optimization region. This trunk topology map is a transportation network map, which is a directed graph, and the edges can be unidirectional or bidirectional.
[0065] Each optimization zone includes several arterial roads to spatially divide the traffic network. The length of each arterial road does not exceed a set length, which is also the length of the green wave optimization, so that the traffic flow characteristics of intersections within the zone can be transmitted. For example, the length of each arterial road in each zone is approximately 500 meters to 1 kilometer, and the smooth flow travel time is approximately 45 to 90 seconds, slightly less than the arterial road signal control cycle length. The arterial road signal control cycle length is the unified control cycle of the traffic lights at all intersections along the arterial road.
[0066] In the trunk topology diagram of each optimization region, intersections are taken as nodes, and the lines connecting the nodes of adjacent intersections on the trunk line are taken as edges. The relative phase difference between the adjacent intersections is added to the attributes of the edges.
[0067] The types of optimized regions include intersecting and conflicting types and intersecting but not conflicting types; the regions of the intersecting and conflicting types contain at least one closed trunk group, and each trunk in the trunk group has at least 2 overlapping intersections with other trunks; if the trunk topology map includes all trunks of the trunk group, starting from a node in the trunk group, after several unidirectional searches, it returns to the node.
[0068] In this embodiment, trunk lines in the non-conflicting trunk topology map of the optimization region can be optimized simultaneously in a coordinated manner. If conflicts occur, they must be allocated to different optimization cycles for coordinated optimization. In this embodiment, the trunk lines in the trunk topology map constructed for each optimization region do not contain closed trunk line groups.
[0069] In this application, the construction of trunk topology maps and the graph library based on graph search are not limited. For example, the trunk topology map is constructed based on the NetworkX graph library in Python and nx.Graph().
[0070] In some embodiments, for regions of the intersecting but non-conflicting type, all trunk lines in the region are retained to construct the topology map in each optimization cycle; for regions of the intersecting and conflicting type, when constructing the topology map in each optimization cycle, at least one trunk line is deleted from the trunk line group of the region, so that the region becomes a region of the intersecting but non-conflicting type.
[0071] In some embodiments, within two adjacent optimization cycles, the trunks removed from the trunk group in each optimization cycle are different from those in the previous optimization cycle.
[0072] In some embodiments, constructing a trunk topology map within an optimization region includes: randomly selecting a trunk line within the optimization region during the current optimization cycle, adding the intersection of the trunk line to the trunk topology map within the optimization region, and connecting the corresponding edges; determining whether the trunk line in the current topology map is closed based on a graph search method; if closed, then there is a closed trunk line group in the current topology map, and the intersection and edge added for the previously selected trunk line are deleted from the topology map; if not closed, then another remaining unadded trunk line is randomly selected, and the process of adding, judging, and processing continues until all trunk lines have been processed.
[0073] In other embodiments, a main line is selected within the region, and each intersection of this main line is added as a node in the topology graph, with corresponding edges connected and the attributes of each edge configured. If at least one main line in the region was deleted during the construction of the topology graph in the previous optimization cycle, the selected main line in the current optimization cycle is considered the deleted main line. Another main line is selected within the region, and each intersection of this main line is added as a node in the topology graph, with corresponding edges connected and the attributes of each edge configured. A graph search method is used to determine whether the current topology graph is closed, where closure means that starting from a node in the current topology graph, after several unidirectional searches, the user returns to that node. If closed, the intersections and edges added for the currently selected main line are deleted from the topology graph. If not closed, another remaining unadded main line is randomly selected, and the addition, determination, and corresponding processing are performed until all main lines have been processed.
[0074] S120: Search for each intersection within the optimization area using a graph search method, and obtain the first absolute phase of each intersection based on the attributes of each edge in the trunk topology graph.
[0075] In some embodiments, this step includes the following process:
[0076] 1) Set the first absolute phase of any intersection within the optimization area as a reference value, for example, the reference value is 0;
[0077] 2) Based on the graphical search method, each other intersection within the optimization area is searched sequentially. This search is unidirectional in each search direction.
[0078] 3) Obtain the first absolute phase of each searched intersection based on the properties of the edges in the topology graph between the searched intersection and its adjacent intersections with already determined first absolute phases, wherein the first absolute phase of each intersection is obtained by phase translation.
[0079] The phase shift is defined as follows: In one direction of the trunk line, when two adjacent intersections are ahead of the selected intersection, the first absolute phase of the second intersection is equal to the first absolute phase of the first intersection plus the relative phase difference between the two adjacent intersections; when two adjacent intersections are behind the selected intersection, the first absolute phase of the first intersection is equal to the first absolute phase of the second intersection minus the relative phase difference between the two adjacent intersections. This not only preserves the effect of the green wave on the trunk line but also coordinates the phase of trunk lines within the region, achieving regional coordination optimization.
[0080] In some embodiments, the method further includes: for two adjacent regions, if it is determined by a graphical search that there are at least two identical nodes in the trunk topology maps of the two adjacent regions, then one of the regions is selected for optimization, i.e., the first absolute phase of each intersection in the optimized region is obtained. Wherein, when there are at least two identical nodes in the trunk topology maps of two adjacent regions, all trunk lines of the two adjacent regions form a closed graph, and the two adjacent regions conflict.
[0081] For example, Figure 2 Region B does not conflict with either Region A or C. Region A conflicts with Region C. Through graphical search, two nodes of Region A are found in Region C. All trunk lines of these two adjacent regions form a closed figure, indicating that these two adjacent regions conflict.
[0082] In some embodiments, graph search includes width search and depth search, both of which can quickly search for all nodes, i.e. all intersections, in the trunk topology graph.
[0083] In some embodiments, before constructing the trunk topology map, the method further includes: optimizing the signal control scheme of each intersection in real time according to the traffic flow of each intersection in each direction within the optimization area; and performing bidirectional green wave optimization on each trunk line within the optimization area according to the optimized signal control scheme of each intersection within the optimization area to obtain the optimized relative phase difference between adjacent intersections within the optimization area, so as to inherit the trunk line green wave optimization effect after subsequent regional optimization.
[0084] In some embodiments, before performing bidirectional green wave optimization on each trunk line within the optimization area based on the optimized signal control scheme for each intersection of each trunk line within the optimization area, the method further includes: unifying the signal control cycle of each intersection within the optimization area, and using the unified signal control cycle as the trunk line signal control cycle; adjusting the green light time of each intersection of each trunk line within the optimization area according to the trunk line signal control cycle. The unified signal control cycle can be a common multiple of the signal control cycles of each intersection, or it can be the maximum value among the signal control cycles of the intersections. Choosing the maximum value as the unified cycle ensures that all nodes can complete their control schemes within the common cycle, thereby maintaining signal synchronization within the area.
[0085] In some embodiments, before performing green wave optimization on each trunk line in the region, the method further includes: optimizing the signal control scheme for each intersection in the region based on the traffic flow in each direction. The intersection optimization is performed in real time, based on the green wave ratio, and completed on the edge server of the intersection.
[0086] S130: The second absolute phase of each intersection is the remainder of the first absolute phase of each intersection divided by the trunk signaling cycle.
[0087] The second absolute phase of each intersection is added to the signal control scheme of that intersection for use in the signal light control of that intersection.
[0088] The positive remainder means that the number is positive and less than the divisor (main line signal control cycle).
[0089] The second absolute phase of each intersection is the absolute phase of each intersection after area optimization, and is also included in the signal control scheme issued for each intersection.
[0090] In summary, the first embodiment of a traffic optimization method improves the accuracy and efficiency of regional collaborative optimization by constructing a non-closed trunk road topology map and optimizing the absolute phase of each intersection based on a graph search method.
[0091] The following is combined Figure 3 This paper introduces a second embodiment of a traffic optimization method based on the present application.
[0092] The second embodiment of the traffic optimization method is a detailed implementation of the first embodiment of the traffic optimization method. It has all the advantages of the first embodiment and includes the optimization of intersections, arterial roads and areas, and integrates the optimization of the green light ratio of intersections, the green wave of arterial roads and the coordination optimization of areas.
[0093] Figure 3 The flowchart of a second embodiment of a traffic optimization method is shown, including steps S210 to S270.
[0094] S210: Optimize the signal control scheme for each intersection in the optimization area based on the traffic flow in each direction.
[0095] This step is performed in real time, optimizing the green light ratio at each intersection so that subsequent regional optimizations already include and inherit the optimization effects of the intersections.
[0096] This step is performed on the edge server at the intersection, while other steps are performed on the edge server or cloud server in the region.
[0097] S220: Unify and optimize the signal control cycle of each intersection within the region, and use the unified signal control cycle as the trunk line signal control cycle. Adjust the green light time of each intersection of each trunk line within the region according to the trunk line signal control cycle.
[0098] The unified signal control period can be the maximum value, average value or other methods of the signal control period of each intersection in the optimization area. The preferred method is the maximum value of the signal control period of each intersection. In this embodiment, it is the maximum value of the signal control period of each intersection.
[0099] Specifically, when the maximum signal control period of each intersection within an optimization area is greater than the set maximum signal control period, the trunk line signal control period is the set maximum signal control period; when the maximum signal control period of each intersection within an optimization area is less than the set minimum signal control period, the trunk line signal control period is the set minimum signal control period; when the maximum signal control period of each intersection within an optimization area is between the set minimum signal control period and the set maximum signal control period, the trunk line signal control period is that maximum value.
[0100] Adjusting the green light times at each intersection of every main road within a region includes:
[0101] The signal control cycle of the trunk line is taken as the signal control cycle of the intersection, and the total yellow light time and all red light time are subtracted from it to obtain the remaining green light time, which is then distributed to each stage according to the proportion of green light time in the previous stages.
[0102] Determine whether the new green light time for a phase is greater than the set maximum green light time. If it is, adjust the green light time for that phase to the set maximum green light time, and proportionally redistribute the remaining green light time for that phase to other phases that have not exceeded the set maximum green light time.
[0103] S230: Based on the signal control scheme of each intersection of each trunk line in the optimization area, perform green wave optimization on each trunk line in the area to obtain the relative phase difference between adjacent intersections of each trunk line in the area.
[0104] At this point, the green light time for each intersection's signal control scheme has already been adjusted in step S220.
[0105] When optimizing a trunk line for green wave, the goal is to achieve the optimal bidirectional green wave for that trunk line, which means achieving the optimal bidirectional green wave score for the trunk line. The bidirectional green wave score of a trunk line is equal to the product of the mean and minimum values of the green wave scores in the two directions of the trunk line. The green wave score of a trunk line in one direction changes positively with the green wave width, flow rate and trunk line length in that direction.
[0106] In obtaining the optimal bidirectional green wave score for the main line, the search is performed simultaneously in both directions, instead of first achieving the optimal green wave width in one direction and then searching with the phase of the adjacent intersection at that time as the center. The latter method fails to achieve the optimal result due to the asymmetry in the green light start time or duration in the two directions.
[0107] S240: Construct a trunk topology map within the optimization region.
[0108] Among them, the trunk topology map is constructed based on the NetworkX graph library in Python and nx.Graph().
[0109] In this topology diagram, each intersection is a node, and the line connecting the corresponding nodes of adjacent intersections is an edge. The relative phase difference between the adjacent intersections is added to the attributes of the edge. The graph formed by all trunk lines is not closed.
[0110] This step includes the following process: establishing a trunk topology map, which should include all trunk lines within the region as much as possible without being closed off.
[0111] 1) In the current optimization cycle, select one trunk line in the optimization area each time, add the intersection of the trunk line to the trunk line topology graph of the optimization area, and connect the corresponding edges. If at least one trunk line in the area was deleted when the topology graph was constructed in the previous optimization cycle (that is, the area is a conflicting and intersecting area), the selected trunk line in the current optimization cycle is the deleted trunk line.
[0112] 2) Randomly select one trunk line from the trunk lines that have never been added, and add the intersections and corresponding edges of that trunk line to the trunk line topology graph.
[0113] 3) Determine whether the current topology is closed using a graph search method. If closed, remove the intersections and edges added for the previously selected trunk line from the trunk line topology. If not closed, randomly select another remaining unadded trunk line and perform the addition, closure determination, and corresponding processing of its related intersections and edges until all trunk lines have been processed. Closure is defined as returning to the same node after several unidirectional searches starting from a node in the current topology.
[0114] As described above, the trunk topology map constructed by the above method not only includes all trunks in the region as much as possible without being closed, but also, for regions with intersections and conflicts, the first trunk selected in the current optimization cycle is a trunk that was not included in the topology map constructed in the previous optimization cycle, so that each trunk can be coordinated and optimized in several optimization cycles.
[0115] S250: When the optimization region conflicts with its neighboring regions, if there is a conflict, select one region for optimization.
[0116] Specifically, when it is determined through graphical search that there are at least two identical nodes in the trunk topology of these two adjacent regions, and all trunk lines of these two adjacent regions form a closed figure, then the two adjacent regions are in conflict.
[0117] The region to be optimized can be selected through round-robin or random selection.
[0118] S260: Search for each intersection within the optimization area using a graph search method, and obtain the first absolute phase of each intersection based on the attributes of each edge in the trunk topology graph of the area.
[0119] This step includes:
[0120] 1) Use the first absolute phase of any intersection within the optimization area as the set value;
[0121] 2) Starting from the intersection, search each intersection and its adjacent edges within the optimization area using a graphical search method, with each search direction being a unidirectional search;
[0122] 3) Based on the attributes of each edge in the topology graph and the first absolute phase of the currently searched intersection and the first absolute phase of the adjacent intersections that have already obtained the first absolute phase, obtain the first absolute phase of the currently searched intersection.
[0123] S270: The second absolute phase of each intersection is the remainder of the first absolute phase of each intersection divided by the trunk signaling cycle.
[0124] The positive remainder means that the number is positive and less than the divisor (main line signal control cycle).
[0125] The second absolute phase of each intersection is added to the signal control scheme of that intersection for use in the signal light control of that intersection.
[0126] In summary, the second embodiment of the traffic optimization method, based on the graph search of the first embodiment, further optimizes the intersection self-adaptation, arterial green wave, and regional coordination in sequence, thereby improving the smoothness of the traffic network.
[0127] The following is combined Figure 4 This paper introduces an embodiment of a traffic optimization device.
[0128] An embodiment of a traffic optimization device performs a traffic optimization method described in embodiment one, and has all its advantages.
[0129] Figure 4 The structure of a traffic optimization device according to an embodiment is shown, including: a topology building module 410, a phase optimization module 420 and a phase adjustment module 430.
[0130] The topology building module 410 is used to construct a trunk topology map within the optimization area. For its working principle and advantages, please refer to step S110 of Embodiment 1 of a traffic optimization method.
[0131] The phase optimization module 420 is used to search for each intersection within the optimization area using a graphical search method, and obtains the first absolute phase of each intersection based on the attributes of each edge in the trunk road topology map. For its working principle and advantages, please refer to step S120 of Embodiment 1 of a traffic optimization method.
[0132] The phase adjustment module 430 is used to calculate the second absolute phase of each intersection by dividing the first absolute phase of each intersection by the positive remainder of the trunk line signaling cycle. For its working principle and advantages, please refer to step S130 of Embodiment 1 of a traffic optimization method.
[0133] The following is combined Figure 5 This paper introduces a second embodiment of a traffic optimization device.
[0134] A traffic optimization device embodiment two performs a traffic optimization method embodiment two of the method described therein, and has all its advantages.
[0135] Figure 5 The structure of a traffic optimization device according to a second embodiment is shown, including: an intersection optimization module 510, a cycle unification module 520, a trunk line optimization module 530, a topology construction module 540, a region selection module 550, a phase optimization module 560, and a phase adjustment module 570.
[0136] The intersection optimization module 510 is used to optimize the signal control scheme for each intersection within the optimization area based on the traffic flow in each direction. For its working principle and advantages, please refer to step S210 of Embodiment 2 of a traffic optimization method.
[0137] The cycle unification module 520 is used to unify and optimize the signal control cycles of each intersection within the area, and uses the unified signal control cycle as the trunk line signal control cycle. Based on the trunk line signal control cycle, it adjusts the green light time of each intersection on each trunk line within the area. For its working principle and advantages, please refer to step S220 of Embodiment 2 of a traffic optimization method.
[0138] The trunk line optimization module 530 is used to perform green wave optimization on each trunk line in the optimization area based on the signal control scheme of each intersection, thereby obtaining the relative phase difference between adjacent intersections of each trunk line in the area. For its working principle and advantages, please refer to step S230 of Embodiment 2 of a traffic optimization method.
[0139] The topology building module 540 is used to construct a trunk topology map within the optimization area. For its working principle and advantages, please refer to step S240 of Embodiment 2 of a traffic optimization method.
[0140] The region selection module 550 is used to select one region for optimization if there is a conflict between the optimized region and its adjacent regions. For its working principle and advantages, please refer to step S250 of Embodiment 2 of a traffic optimization method.
[0141] The phase optimization module 560 is used to search for each intersection within the optimization area using a graphical search method, and obtains the first absolute phase of each intersection based on the attributes of each edge in the trunk road topology map of the area. For its working principle and advantages, please refer to step S260 of Embodiment 2 of a traffic optimization method.
[0142] The phase adjustment module 570 is used to calculate the second absolute phase of each intersection by dividing the first absolute phase of each intersection by the positive remainder of the trunk line signaling cycle. For its working principle and advantages, please refer to step S270 of Embodiment 2 of a traffic optimization method.
[0143] This application also provides a computing device, which will be described below in conjunction with... Figure 6 Detailed introduction.
[0144] The computing device 600 includes a processor 610, a memory 620, a communication interface 630, and a bus 640.
[0145] It should be understood that the communication interface 630 in the computing device 600 shown in the figure can be used to communicate with other devices.
[0146] The processor 610 can be connected to the memory 620. The memory 620 can be used to store the program code and data. Therefore, the memory 620 can be a storage unit inside the processor 610, an external storage unit independent of the processor 610, or a component that includes both the storage unit inside the processor 610 and the external storage unit independent of the processor 610.
[0147] Optionally, the computing device 600 may also include a bus 640. The memory 620 and communication interface 630 can be connected to the processor 610 via the bus 640. The bus 640 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 640 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is used in this figure, but this does not mean that there is only one bus or one type of bus.
[0148] It should be understood that in the embodiments of this application, the processor 610 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 610 may employ one or more integrated circuits to execute related programs to implement the technical solutions provided in the embodiments of this application.
[0149] The memory 620 may include read-only memory and random access memory, and provides instructions and data to the processor 610. A portion of the processor 610 may also include non-volatile random access memory. For example, the processor 610 may also store device type information.
[0150] When the computing device 600 is running, the processor 610 executes computer execution instructions stored in the memory 620 to perform the operation steps of each method embodiment.
[0151] It should be understood that the computing device 600 according to the embodiments of this application can correspond to the corresponding subject in executing the methods according to the various embodiments of this application, and the above and other operations and / or functions of each module in the computing device 600 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.
[0152] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0153] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0154] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0157] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0158] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the operation steps of the various method embodiments.
[0159] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0160] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0161] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0162] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltank, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0163] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, all of which fall within the scope of protection of this application.
Claims
1. A traffic optimization method, characterized by, The application comprises the following steps: Constructing a trunk line topology graph in the optimization area, in which the nodes are intersections and the edges are the lines between the nodes corresponding to each pair of adjacent intersections on the trunk line, and the relative phases of the corresponding adjacent intersections are added in the attribute of each edge; Searching each intersection in the optimization area based on the graph search method, and obtaining the first absolute phase of each intersection according to the attribute of each edge in the topology graph; Dividing the first absolute phase of each intersection by the positive remainder of the trunk signal control period to obtain the second absolute phase of each intersection, and adding it to the signal control scheme of each intersection for the signal light control of the intersection.
2. The method of claim 1, wherein, The types of the optimization area include the intersection and conflict type and the intersection but no conflict type; the intersection and conflict type is that there is at least one trunk line group in the area, in which each trunk line has at least two coincident intersections with other trunk lines; For the area of the intersection and conflict type, at least one trunk line is deleted from the trunk line group in the area when the topology graph is constructed in each optimization period, so that the area becomes the area of the intersection but no conflict type.
3. The method of claim 2, wherein, For the area of the intersection and conflict type, the deleted trunk line from the trunk line group of the area is different in each optimization period.
4. The method of claim 1, wherein, The application further comprises the following steps: Selecting a trunk line in the area, adding the intersections of the trunk line as nodes in the topology graph, connecting the corresponding edges and configuring the attribute of each edge, wherein if at least one trunk line of the area is deleted when the topology graph is constructed in the last optimization period, the selected trunk line in the current optimization period is the deleted trunk line; Selecting another trunk line in the area, adding the intersections of the trunk line as nodes in the topology graph, connecting the corresponding edges and configuring the attribute of each edge; Judging whether the current topology graph is closed based on the graph search method, wherein the closure is that the node is returned after several single-direction searches from one node of the current topology graph; If it is closed, the intersections and edges added for the selected trunk line are deleted from the topology graph; if it is not closed, a remaining trunk line not added is randomly selected, the adding, the judging and the corresponding processing are continued until all the trunk lines are processed.
5. The method of claim 1, wherein, The graph search method comprises the following steps: Setting the first absolute phase of any intersection in the optimization area as a reference value; Searching each intersection in the optimization area based on the graph search method; Obtaining the first absolute phase of each searched intersection according to the attribute of the edge between the searched intersection and the intersection with the determined first absolute phase in the topology graph.
6. The method of claim 1, wherein, The application further comprises the following steps: For two adjacent areas, when it is judged by the graph search method that the trunk line topology graphs of the two adjacent areas have at least two same nodes, one of the areas is selected for the optimization.
7. The method of any one of claims 1 to 6, wherein, The graph search comprises the breadth-first search and the depth-first search.
8. The method of claim 1, wherein, Before constructing the trunk line topology graph in the optimization area, the application further comprises the following steps: According to the traffic of each intersection in the optimization area in each direction, the signal control scheme of each intersection is optimized; According to the optimized signal control scheme of each intersection of each arterial road in the optimization area, the bidirectional green wave optimization is performed on each arterial road in the optimization area, and the optimized relative phase difference between adjacent intersections in the optimization area is obtained.
9. The method of claim 8, wherein, After the optimized signal control scheme of each intersection in the optimization area is obtained and before the bidirectional green wave optimization is performed on each arterial road in the optimization area, the method further comprises: The signal control periods of the intersections in the optimization area are unified, and the unified signal control period is taken as an arterial road signal control period; According to the arterial road signal control period, the green light time of each intersection of each arterial road in the optimization area is adjusted.
10. A traffic optimization apparatus characterized by comprising: The method comprises: a topology construction module, configured to construct an arterial road topology graph in the optimization area, wherein in the topology graph, an intersection is taken as a node, a connecting line between nodes corresponding to each pair of adjacent intersections on an arterial road is taken as an edge, and the relative phase difference of the corresponding adjacent intersection is added to the attribute of each edge; a phase optimization module, configured to search each intersection in the optimization area based on a graph search method, and obtain a first absolute phase of each intersection according to the attribute of each edge in the topology graph; a phase adjustment module, configured to take the positive remainder of the first absolute phase of each intersection divided by the arterial road signal control period as a second absolute phase of each intersection, and add the second absolute phase to the signal control scheme of each intersection for signal light control of the intersection.
11. A computing device, comprising: The method comprises: a bus; a communication interface connected with the bus; at least one processor connected with the bus; and at least one memory connected with the bus and storing program instructions, the program instructions causing the at least one processor to execute the method according to any one of claims 1 to 9 when executed by the at least one processor.
12. A computer-readable storage medium, characterized in that, A computer program product, having program instructions stored thereon, the program instructions causing the computer to execute the method according to any one of claims 1 to 9 when executed by the computer.