Traffic signal lamp regulation and control method and device based on deep learning, and medium
Through deep learning -based traffic signal lighting methods, the phase duration of the traffic signal light is dynamically adjusted by deep learning algorithms and radar data, which solves the problem of phase duration in the existing technology and cannot adapt to vehicle traffic, and achieves more efficient traffic flow management.
Patent Information
- Application Number
- CN202411902452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The phase duration of existing traffic lights is fixed and cannot adapt to actual traffic flow, resulting in traffic congestion, low fluency and low traffic efficiency.
Adopting the control method based on deep learning signal lights, through the target detection algorithm and target tracking algorithm combined with radar data, obtain vehicle information in real time and dynamically adjust the phase time.
Effectively avoid traffic congestion, improve traffic fluency and traffic efficiency, and adapt to changes in different vehicle flow.
Smart Images

Figure CN119380562A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic control technology. Specifically, the present application relates to a traffic light control method, device and medium based on deep learning. Background Art
[0002] At present, with the improvement of people's living standards, cars have become people's main means of transportation. As the use of cars increases, many intersections with heavy traffic are prone to congestion. It is often seen that there is a long queue of cars on the road on the red light side, and no cars pass on the green light side. Although such intersections are equipped with traffic lights, due to the fixed phase duration of such traffic lights, it is difficult to effectively adapt to the actual traffic flow at the intersection, so it is easy to cause serious congestion in the lanes with heavy traffic, and no cars pass in other lanes, resulting in traffic congestion and reducing traffic flow and traffic efficiency. Summary of the invention
[0003] The embodiments of the present application provide a traffic light control method, device and medium based on deep learning, which can solve the problem that the phase duration of existing traffic lights is fixed, cannot adapt to the actual traffic flow, is prone to traffic congestion, has poor traffic flow and low traffic efficiency. In order to achieve this purpose, the embodiments of the present application provide the following solutions.
[0004] According to one aspect of an embodiment of the present application, a traffic light control method based on deep learning is provided, the method comprising: Determine the phase information of the traffic light, and use a preset algorithm and radar to obtain vehicle information corresponding to the phase information, wherein the phase information includes a current phase and a next phase for indicating vehicle passage, the preset algorithm includes a target detection algorithm and a target tracking algorithm based on a deep learning algorithm, and the vehicle information includes the number of vehicles and the type of vehicles; The phase duration corresponding to the current phase is determined according to the conditions satisfied by the vehicle information, wherein the conditions include any one of a phase optimization condition and an uneven traffic flow condition.
[0005] In a possible implementation, the deep learning algorithm includes a YOLOv5 algorithm and a DeepSORT algorithm, and the acquisition of the preset algorithm includes: Adjusting the YOLOv5 algorithm, and using the adjusted YOLOv5 algorithm to generate the target detection algorithm, wherein the adjustment includes: using a CARAFE upsampling operator to replace an upsampling operator in the YOLOv5 algorithm, and using Dyhead as a detection head of the YOLOv5 algorithm; The target tracking algorithm is obtained by using the DeepSORT algorithm.
[0006] In a possible implementation, the obtaining the vehicle information corresponding to the phase information by using a preset algorithm and a radar includes: Collecting images of vehicles on lanes, processing the images using the preset algorithm to obtain first vehicle information on each lane, and obtaining second vehicle information on each lane using radar; A lane corresponding to the phase information is determined, and vehicle information corresponding to the phase information is acquired according to the lane, the first vehicle information, and the second vehicle information.
[0007] In a possible implementation, the condition is a phase optimization condition, and determining the phase duration corresponding to the current phase according to the condition satisfied by the vehicle information includes: Determine the number of queued vehicles according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; Obtaining the travel time corresponding to the number of vehicles in the queue, and calculating the average travel time according to the travel time and the number of vehicles corresponding to the current phase and the next phase, wherein the time period corresponding to the average travel time includes the time period of the current phase and the next phase; The phase duration corresponding to the current phase is determined according to the average travel time and the number of vehicles corresponding to the current phase.
[0008] In a possible implementation, the condition is an uneven traffic flow condition, and determining the phase duration corresponding to the current phase according to the condition satisfied by the vehicle information includes: Determine the number of queued vehicles in the current phase and the next phase according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; The phase duration corresponding to the current phase is determined according to the number of queued vehicles, the phase transition time, and a comparison result between the number of vehicles corresponding to the next phase and the number of vehicles corresponding to the current phase.
[0009] In a possible implementation, the method includes: If it is determined that the phase duration is less than the predetermined maximum green light duration, then obtaining vehicle joining information of the vehicle formation corresponding to the current phase, the vehicle joining information including the joining time, speed, and type of the vehicle to be joined; The phase duration corresponding to the current phase is adjusted according to the vehicle joining information, the speeds of the vehicles in the vehicle formation, and the maximum green light duration.
[0010] In a possible implementation, the method includes: If it is determined that the current phase meets the idle interruption condition, the current phase is interrupted and switched to the next phase. The idle interruption condition includes at least one of the following: the actual passage time corresponding to the current phase is less than the phase time, and the number of vehicles corresponding to other phases is more than the number of vehicles in the current phase and greater than a preset number.
[0011] In a possible implementation, the method includes: Acquire vehicle monitoring information of an overflow area corresponding to the current phase, wherein the overflow area is determined based on an acquisition range of the vehicle information, and the vehicle monitoring information includes a vehicle ratio and a vehicle stay time; If it is determined that the vehicles corresponding to the overflow area meet the overflow conditions, the phase duration is adjusted according to a predetermined overflow control method. The overflow conditions include that the vehicle proportion is greater than a preset proportion and the vehicle stay time reaches a preset threshold. The overflow control method includes reducing the phase duration of the phase corresponding to the overflow area.
[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described above.
[0013] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0014] The beneficial effects of the technical solution provided by the embodiment of the present application are: The deep learning-based traffic light control method provided in the present application determines the phase information of the traffic light, and utilizes the target detection algorithm, target tracking algorithm and radar based on the deep learning algorithm to obtain the vehicle information corresponding to the phase information; the phase duration corresponding to the current phase is determined according to the conditions satisfied by the vehicle information. The embodiment of the present application can obtain the actual data of the traffic flow, and flexibly adjust the phase duration according to the actual data, so as to effectively avoid traffic congestion, improve traffic smoothness and improve traffic efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in describing the embodiments of the present application.
[0016] Figure 1 A flow chart of a traffic light control method based on deep learning provided in an embodiment of the present application; Figure 2 A flowchart of the execution of the traffic light control method based on deep learning provided in an embodiment of the present application; Figure 3 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0018] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates that it is implemented as "A", or is implemented as "A", or is implemented as "A and B".
[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0020] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0021] The deep learning-based traffic light control method, device and medium provided in this application are intended to solve at least one technical problem existing in the prior art.
[0022] A traffic light control method based on deep learning is provided in an embodiment of the present application. The method can be used in the control end of the traffic light and other terminals that can be used to obtain vehicle information at intersections and adjust phase duration according to the vehicle information. The control end can be a control module of the traffic light, a control center connected to the traffic light, a cloud, and other devices.
[0023] Alternatively, if Figure 1 , Figure 2 As shown, the traffic signal light control method based on deep learning of the present application includes: S101: Determine the phase information of the traffic light, and obtain vehicle information corresponding to the phase information using a preset algorithm and radar.
[0024] Optionally, the phase information includes a current phase and a next phase for indicating vehicle passage, the traffic light is set at an intersection, the intersection is formed by the intersection of at least two lanes, the current phase and the next phase may be green light phases corresponding to a certain direction of the intersection. The lanes available for passage indicated by the current phase and the next phase are different.
[0025] Optionally, the preset algorithm includes a target detection algorithm and a target tracking algorithm based on a deep learning algorithm, and the vehicle information includes the number of vehicles and the type of vehicles. The image captured by the camera is processed using the preset algorithm to obtain the vehicle information. The camera can be set at an intersection, and the number of the camera can be multiple, and the multiple cameras are used to collect images of vehicles in different lanes.
[0026] Optionally, the vehicle information may also include the location information of the vehicle. The target detector may be obtained by using the target detection algorithm, and the target tracker may be generated by using the target tracking algorithm. The target detector is used to detect the vehicle in the image, and the target tracker is used to identify the same vehicle in the previous and next frame images to optimize the target detector and reduce the occurrence of missed and false detection of vehicles. The radar is used to calibrate each vehicle on the lane with high precision and obtain the vehicle type and vehicle location information.
[0027] Optionally, the vehicle information may also include location information of the vehicle, and the location information of the vehicle is obtained according to the processing result of the preset algorithm or the scanning result of the radar.
[0028] In one embodiment, the target detector, target tracker, and radar point are initialized, and the traffic light is initialized. The traffic light can be initialized to a full red phase during initialization, and after the initialization is completed, the phase information is obtained. The phase change rule of the traffic light can be predetermined.
[0029] Optionally, the deep learning algorithm includes a YOLOv5 algorithm and a DeepSORT algorithm, and obtaining the preset algorithm includes: adjusting the YOLOv5 algorithm, and generating a target detection algorithm using the adjusted YOLOv5 algorithm, wherein the adjustment includes: replacing an upsampling operator in the YOLOv5 algorithm with a CARAFE upsampling operator, and using Dyhead as a detection head of the YOLOv5 algorithm; and obtaining a target tracking algorithm using the DeepSORT algorithm.
[0030] Optionally, the target detection algorithm can also be obtained based on other deep learning algorithms such as convolutional neural network (CNN), recurrent neural network (RNN), etc., and can also use optical flow method and other algorithms that can be used for vehicle detection for vehicle recognition and detection. In addition, the image used for vehicle detection can be collected by a camera, a drone or other movable or immovable device.
[0031] In one embodiment, the target detection algorithm is obtained based on the YOLOv5 algorithm. The target detection algorithm performs data enhancement processing on the image at the image input stage. The data enhancement processing includes random cropping, scaling, and mixing of labeled features to enhance detection capabilities; and the C3 bottleneck architecture is implemented in the backbone network of the target detection algorithm. The architecture includes a cross-stage part (CSP) structure, a bottleneck block, and an SPPF (spatial pyramid pool) module to solve the problem of repeated feature extraction. The Neck structure is used for feature fusion. The Neck structure combines FPN (Feature Pyramid Network) and PAN (Path Aggregation Network) to form PAFPN (Parallel and Asymmetric Feature Pyramid Network); after obtaining the features of the FPN output, the Head network of the target detection algorithm is responsible for performing the detection task and outputting the detected vehicle position, thereby improving the effectiveness of vehicle detection at different distances. In addition, in order to enhance the receptive field and improve the feature extraction effect of the long-distance and occluded parts of the vehicle, the CARAFE (Content-Aware ReAssembly of FEatures) upsampling operator is used to replace the original nearest neighbor interpolation upsampling. The operator calculates weights and performs weighted averaging while taking into account local context information to generate more refined and accurate upsampling results. At the same time, for the original Head structure of the network, Dyhead is used as the detection head. The Dyhead structure can dynamically learn and adjust the head structure within the network to adapt to the feature representation and prediction requirements of different targets.
[0032] The target tracking algorithm is implemented based on the DeepSORT algorithm. As an improved version of the SORT tracking algorithm, DeepSORT uses the same trajectory processing and Kalman filter framework as SORT. However, it introduces the target's motion and appearance information as association metrics, and combines it with a cascade matching strategy, which significantly improves the accuracy and efficiency of target tracking.
[0033] Optionally, to improve the accuracy of vehicle information, a preset algorithm and radar are used to obtain vehicle information corresponding to the phase information, including: collecting images of vehicles on lanes, processing the images using a preset algorithm to obtain first vehicle information on each lane, and using radar to obtain second vehicle information on each lane; determining the lane corresponding to the phase information, and obtaining vehicle information corresponding to the phase information based on the lane, the first vehicle information, and the second vehicle information. The vehicle information is obtained by combining the image recognition result with the radar scanning result.
[0034] Optionally, when the image recognition result is combined with the radar scanning result, the image recognition result and the radar scanning result may be weighted and the weighted processing result may be determined as the vehicle information corresponding to the phase information.
[0035] S102: Determine the phase duration corresponding to the current phase according to the conditions satisfied by the vehicle information.
[0036] Optionally, the condition includes any one of a phase optimization condition and an uneven traffic flow condition, and a corresponding phase duration acquisition method is selected according to the satisfied phase optimization condition.
[0037] Optionally, when the condition is a phase optimization condition, the phase duration corresponding to the current phase is determined according to the conditions satisfied by the vehicle information, including: determining the number of vehicles in the queue according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; obtaining the travel time corresponding to the number of vehicles in the queue, and calculating the average travel time according to the travel time and the number of vehicles corresponding to the current phase and the next phase, the time period corresponding to the average travel time includes the time period of the current phase and the next phase; determining the phase duration corresponding to the current phase according to the average travel time and the number of vehicles corresponding to the current phase.
[0038] The phase optimization condition includes that the travel time corresponding to the number of queued vehicles in the current phase and the travel time corresponding to the number of queued vehicles in the next phase are both less than the maximum green light duration. The travel time can be the time required for all queued vehicles to pass the intersection, which can be described as the expected time from the start of the first vehicle in the lane corresponding to the phase to the arrival of the last vehicle in the queue at the intersection.
[0039] In one embodiment, the queued vehicles can be determined based on the distance and speed between each vehicle in the lane and the vehicle in front. Specifically, when there is at least one vehicle within S1 meters (S1 can be defined as the length of the empty space in front and behind a car in a queue) in front of the lane where the vehicle is located. The speed of the vehicle and the vehicle in front is less than the preset speed value (which can be set to 2m / s) and tends to stop (such as the speed gradually decreases). When the vehicle is detected as a queued vehicle, the target is tracked for the vehicle, and the ID number (such as the license plate number) of the vehicle is marked as a queued vehicle.
[0040] Optionally, the number of queued vehicles indicates the number of vehicles queued in a lane to form a queue, and the number of queued vehicles corresponding to the current phase and the number of queued vehicles corresponding to the next phase are determined by vehicle information. Wherein, when there are two or more lanes corresponding to a phase, it can also be detected whether the number of vehicles in these lanes is similar (such as the difference in the number of queued lanes is less than a preset difference). If so, the largest number of queued vehicles can be determined as the number of queued vehicles corresponding to the phase, or the average number of queued vehicles can be used as the number of queued vehicles corresponding to the phase.
[0041] In one embodiment, the cameras corresponding to each direction of the intersection will collect a frame of image information at a fixed time interval Δt (the value can be set according to traffic demand or actual environment), and count the vehicles in each lane based on the image. At the same time, the radars corresponding to each direction will also count the vehicles in each lane (the algorithm and radar results can return the number and type of vehicles). Determine the release direction corresponding to the current phase and the lanes that match the release direction, and obtain the number of queued vehicles in these lanes. Number of vehicles in queue The calculation formula is as follows:
[0042] In the above formula Represents the number of queued vehicles returned by image recognition, Indicates the number of queued vehicles returned by the radar, , It represents the weighted value, the sum of the two is equal to 1, where > ( It can be 0.3, can be 0.7).
[0043] Optionally, after obtaining the number of vehicles in the queue, the travel time can be calculated based on the number of vehicles in the queue, the average time it takes for each vehicle to pass through the intersection, and the vehicle starting time.
[0044] In one embodiment, the duration of the passage may be =a +b calculates the travel time. It represents the travel time corresponding to the nth phase, a represents the average time required for each vehicle to pass the intersection (which can be 2.5s), and b represents the average vehicle reaction time, that is, the average time from the change of the traffic light to indicate the vehicle to pass to the start of the vehicle (which can be 0.5s). is the number of queued vehicles corresponding to the nth phase. Can indicate the current phase, Can indicate the next phase.
[0045] Optionally, the number of vehicles corresponding to each phase includes the number of queued vehicles corresponding to the phase and the number of vehicles not in the queue in the lane corresponding to the number of queued vehicles (which may be referred to as the number of non-queued vehicles). The predicted travel time corresponding to the number of non-queued vehicles is obtained, and the average travel time is calculated according to the number of queued vehicles, the number of non-queued vehicles, the travel time and the predicted travel time.
[0046] In one embodiment, the calculation formula for the average travel time may be:
[0047] in, represents the average travel time, Indicates the vehicle reaction time (the time from the first vehicle in the lane changing from the phase indicating passing to the vehicle starting). Indicates the duration of travel corresponding to the current phase. Indicates the duration of travel corresponding to the next phase, Indicates the travel time of vehicles not in queue. represents the i-th vehicle not in the queue, Indicates the time required for vehicles not in the queue to pass through the intersection (can be a fixed value, such as 2.5s), Indicates the number of queued vehicles corresponding to the current phase, Indicates the number of vehicles in the queue corresponding to the next phase. n indicates the number of vehicles not in the queue. Among them, to ensure that the maximum green light duration GT max Release as many vehicles as possible within the time limit to avoid a second waiting period, and ensure that the release of vehicles in the next phase is not affected. The value of is less than the first preset value, so that Under the condition that the number n of released vehicles is less than the first preset value, the phase duration is optimized.
[0048] Optionally, after obtaining the average travel time, Calculate the phase duration corresponding to the current phase, where t represents the phase duration corresponding to the current phase.
[0049] Optionally, when the condition is an uneven traffic flow condition, the phase duration corresponding to the current phase is determined according to the conditions satisfied by the vehicle information, including: determining the number of queuing vehicles in the current phase and the next phase according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; determining the phase duration corresponding to the current phase according to the number of queuing vehicles, the phase transition time, and the number of vehicles corresponding to the next phase and the number of vehicles corresponding to the current phase based on the comparison result.
[0050] Optionally, the traffic unevenness condition is applied to a scenario where the current phase corresponds to at least two lanes, which includes that among the lanes corresponding to the current phase, there is at least one lane that is far from reaching the required maximum green light time. (For example, the lane’s travel time is is less than the first preset ratio), the time required for other lanes to reach, exceed or approach the maximum green light time (For example, the travel time of other lanes The ratio of is greater than the second preset ratio, and the second preset ratio is greater than the first preset ratio), which means that the number of vehicles in the two lanes in this phase is very different. In addition, the difference in the number of vehicles between different lanes corresponding to the next phase is less than the first preset difference (that is, the number of vehicles in different lanes is uniform). For example, the current phase releases vehicles in the north-south straight direction, and the next phase releases vehicles in the east-west straight direction. If there are more vehicles in one lane in the north-south direction, the required phase time is almost reached. The other lane has fewer or almost no vehicles, far from the point where the phase duration needs to be set to If the number of vehicles on the east-west lanes is evenly distributed, then the traffic flow unevenness condition is satisfied. The maximum duration of a green light allowed at an intersection.
[0051] Optionally, when the condition satisfied is the uneven traffic flow condition, only the lane with the least number of vehicles in the lanes corresponding to the current phase can be selected, and the number of queued vehicles in the lane can be determined as the minimum number of queued vehicles. The minimum number of queued vehicles and the number of queued vehicles corresponding to the next phase are used to calculate the phase duration value of the current phase when the current phase and the next phase reach an equilibrium state (calculating the equilibrium state based on minimizing travel time). Among them, when the number of lanes corresponding to the next phase is two, the equilibrium state can be calculated by the following formula:
[0052] In this formula, t represents the phase duration value of the current phase when the equilibrium state is reached. represents the minimum number of vehicles in the queue, represents the number of queued vehicles in the two lanes corresponding to the next phase. a represents the average time it takes for queued vehicles to pass through the intersection, and b represents the average time it takes for vehicles to react. It indicates the reaction time required for the first vehicle in the lane corresponding to the current phase to start from the phase transition to the current phase to the start of the first vehicle. Indicates the phase transition time from the current phase to the next phase (can be a fixed value).
[0053] Optionally, after obtaining the phase duration value when reaching the equilibrium state, obtain the comparison result of the number of vehicles between the current phase and the next phase (such as obtaining the ratio of the number of vehicles in the lane corresponding to the current phase to the number of vehicles in the lane corresponding to the next phase). If the ratio of the number of vehicles in the lane with the largest number of vehicles in the current phase to the number of vehicles in each lane of the next phase is greater than a third preset value (that is, it is detected that all lanes corresponding to the next phase are free of vehicles or the number of vehicles is much smaller than the number of vehicles returned by the target detection result of the current phase, indicating that there are fewer vehicles in the next phase, and the third preset value is greater than 1, and can be 1.5 or other values), then the phase duration of the current phase can be If the number of vehicles in the next phase is determined to be greater according to the comparison result of the number of vehicles (for example, the ratio of the number of vehicles in the lane with the largest number of vehicles in the current phase to the number of vehicles in each lane in the next phase is less than or equal to the third preset value), then the phase duration of the current phase is less than , and is greater than the phase duration value in the equilibrium state.
[0054] Optionally, to further improve traffic efficiency, the method of the present application includes: if it is determined that the phase duration is less than a predetermined maximum green light duration, obtaining vehicle joining information of a vehicle formation corresponding to the current phase, the vehicle joining information including the joining time and speed of the vehicle to be joined; adjusting the phase duration corresponding to the current phase according to the vehicle joining information, the speed of the vehicles in the vehicle formation, and the maximum green light duration.
[0055] Optionally, the vehicle formation is a formation formed by moving vehicles, wherein if the vehicle on the lane corresponding to the phase meets any one of the formation conditions, the vehicle is determined to be a member of the vehicle formation. The formation conditions include: 1. There is at least one vehicle within S2 meters in front of the lane where the vehicle is located (the size of S2 can be determined according to the actual road condition information). 2. The vehicle was a queuing vehicle in the previous time period (the length of the time period can be a fixed value or determined according to the actual road condition information), and the current speed of the vehicle is greater than a predetermined vehicle driving threshold (that is, the vehicle is in a driving state). If it is determined that the detected vehicle is a member of the vehicle formation, the ID number of the vehicle is marked, and it can be marked as a platoon vehicle.
[0056] Optionally, the vehicle joining information can be obtained at all times, and it can be determined whether the vehicle to be joined joins the vehicle formation within the current preset time period according to the vehicle joining information. If so, the phase duration is adjusted. Alternatively, the vehicle joining information can be obtained when it is determined that the vehicle is currently in the preset time period, and the phase duration is adjusted according to the vehicle joining information. Specifically, the preset time period can be 10 seconds before the end of the current phase.
[0057] In one embodiment, if the phase duration of the current phase is determined to be less than the maximum green light duration When the vehicle formation starts to move, the phase delay mechanism is activated. When the vehicle formation starts to move, the last vehicle in the vehicle formation is continuously monitored through radar scanning and image recognition (the last vehicle is defined as the last vehicle in the vehicle formation on the road corresponding to the phase). If the current phase enters the last 10s countdown, and a new vehicle enters the queue after the last vehicle, the vehicle moves forward in sequence with the traffic flow, and the phase duration can be extended according to the type of the vehicle.
[0058] Optionally, the vehicle to be joined that is closest to the vehicle formation on the same lane can be obtained based on the vehicle joining information, and the time it takes for the vehicle to be joined to arrive at the queuing position is calculated based on the speed of the vehicle to be joined, the speed of the nearest vehicle in the vehicle formation (closest to the vehicle to be joined), and the distance between the two, and the phase duration corresponding to the current phase is adjusted based on the time.
[0059] In one embodiment, in the same lane, the speed of the vehicle closest to the vehicle formation to be added is , the speed of the nearest vehicle in the vehicle formation corresponding to the lane is , the distance between the two workshops is , then the time for the vehicle to join to arrive at the queue position can be obtained , the relevant calculation formula is:
[0060] when < hour( As the delay threshold, the delay program starts, and the phase duration is increased according to the type of vehicle to be added. For example, for each ordinary car, a smaller time such as 2s can be added, while for large trucks, buses, etc., a more generous time such as 4s can be added. At the same time, the vehicles in other lanes corresponding to the current phase are counted. This step will be executed until the phase duration (the total time refers to the green light time of the current lane) reaches the maximum green light duration until.
[0061] Optionally, the phase can also be adjusted through an idle interruption mechanism. The traffic light control method of the present application includes: if it is determined that the current phase meets the idle interruption condition, the current phase is interrupted and switched to the next phase. The idle interruption condition includes at least one of the following: the actual passage time corresponding to the current phase is less than the phase time, the number of vehicles corresponding to other phases is more than the number of vehicles corresponding to the current phase and is greater than a preset number.
[0062] Optionally, the actual travel time can be expressed as no vehicles within a preset range (such as 100m) from the current phase to all corresponding lanes, and vehicles outside the range are far away from the range (such as more than 50m). The size and position of the preset range can be determined according to the detection range of the camera or radar.
[0063] Optionally, after switching to the next phase, the phase duration of the next phase may be calculated according to the phase duration calculation method of the current phase.
[0064] Optionally, the phase duration can also be adjusted through overflow judgment and processing. Specifically, the vehicle monitoring information of the overflow area corresponding to the current phase is obtained. The overflow area is determined based on the acquisition range of the vehicle information. The vehicle monitoring information includes the vehicle proportion and the vehicle residence time. If it is determined that the vehicle corresponding to the overflow area meets the overflow conditions, the phase duration is adjusted according to a predetermined overflow control method. The overflow conditions include that the vehicle proportion is greater than the preset proportion and the vehicle residence time reaches a preset threshold.
[0065] Optionally, the acquisition range of vehicle information can be obtained according to the perception range of the camera and radar, and then the overflow area can be determined based on the acquisition range. The overflow area and the area where the queued vehicles corresponding to the phase are located are located on both sides of the intersection, and the queued vehicles passing the traffic lights enter the overflow area. Specifically, at the intersection, each perception device (including cameras and radars) is only responsible for collecting the overflow area opposite to it. The three-way intersection is not only responsible for the overflow area opposite to it, but also needs to select the camera to be responsible for its lateral area according to the viewing angle. The range of the overflow area should include both the intersection part and the exit lane part.
[0066] Optionally, the vehicle proportion can be determined by the sum of the area of the overflow region in the image captured by the camera and the area of the vehicle detection frame in the overflow region. Calculate the vehicle proportion, where the vehicle proportion is , the area of the overflow region is S, and the sum of the areas of the vehicle detection frames (vehicle detection frames) in the overflow region is V sum .when Greater than hour( is a variable parameter, which is set by the specific traffic conditions at the intersection), overflow judgment condition 1 is met. When a vehicle enters the overflow area, the vehicle is tracked according to its ID number. When it is detected that multiple vehicles (the number of vehicles can vary according to the type of vehicle) have stayed in the overflow area for a time that reaches a preset threshold, overflow judgment condition 2 is determined to be met. When condition 1 and condition 2 are met at the same time, it is determined that an overflow has occurred in this direction, and the phase duration is adjusted according to the predetermined overflow control method.
[0067] Optionally, after overflow is determined, the lane to which the vehicle passing through the overflow area arrives is obtained, the phase corresponding to the lane is determined, and the phase duration corresponding to the phase is reduced. The reduction ratio can be ( According to the proportion of vehicles etc.), or adjust the phase time to the minimum green light duration At the same time, each time when the corresponding phase is about to be switched, the overflow judgment is repeated. If it is determined to be overflow mitigation (the overflow condition is not met or only one of the overflow conditions is met), the release logic is restored (the phase duration is recalculated).
[0068] Combine the following Figure 2 The traffic signal light control method of the present application is further explained.
[0069] In one embodiment, cameras and radars are used to monitor vehicles in each lane related to the intersection. The target detector and target tracker are initialized, the signal light phase is initialized, the image of the lane taken by the camera is transmitted to the target detector, and the vehicle information in each direction is obtained based on the information returned by the target detector. The average travel time is calculated based on the vehicle information, and the phase duration of the current phase is calculated based on the average travel time. When executing the current phase, it is continuously determined whether the empty release interruption conditions are met and overflow occurs, and the phase duration is adjusted based on the judgment result. When overflow occurs, the release time of the relevant phase is reduced, and when there are 10 seconds left before the current phase ends, it is detected whether there is a vehicle entering at the end of the formation. If so, the delay mechanism is activated and the phase duration is adjusted until the current phase ends.
[0070] This application uses a deep learning algorithm to analyze the images collected by road cameras in real time, and with the help of intersection radar equipment, obtains real-time traffic situation information for each lane and each phase, thereby dynamically adjusting the phase duration of the traffic light. This dynamic optimization can respond to changes in traffic flow more flexibly and improve the adaptability and efficiency of traffic lights. Compared with the traditional phase fixed-length timing method, it has higher flexibility and can adaptively make corresponding decisions based on the road condition information at the intersection. The method of replacing the fixed-length phase with the method of variable-length phase duration can effectively reduce the queuing waiting time of vehicles at the intersection and the occurrence of secondary parking. At the same time, this application does not have the need to jump phases, which is more in line with the safety requirements and traffic rules of intersections, and better fits the driving habits of drivers. The logic of the present invention is relatively simple and has a wide range of applications, which is convenient for deployment at most intersections.
[0071] The traffic light control method based on deep learning provided by the present application can flexibly adjust the phase duration of the traffic light to adapt to different traffic flow changes by analyzing the traffic conditions in real time. The optimized phase duration allocation mechanism can reduce the waiting time of vehicles in queues and improve the traffic efficiency of intersections. By reducing secondary parking and vehicle congestion, the probability of traffic accidents can be reduced and driving safety can be improved.
[0072] In an optional embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0073] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0074] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0075] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0076] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0077] Among them, the electronic device can be any electronic product that can interact with an object, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0078] The electronic device may also include a network device and / or an object device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0079] The network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.
[0080] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0081] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0082] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0083] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0084] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A traffic light control method based on deep learning, characterized in that: The method comprises: Determine the phase information of the traffic light, and use a preset algorithm and radar to obtain vehicle information corresponding to the phase information, wherein the phase information includes a current phase and a next phase for indicating vehicle passage, the preset algorithm includes a target detection algorithm and a target tracking algorithm based on a deep learning algorithm, and the vehicle information includes the number of vehicles and the type of vehicles; The phase duration corresponding to the current phase is determined according to the conditions satisfied by the vehicle information, wherein the conditions include any one of a phase optimization condition and an uneven traffic flow condition.
2. The traffic signal light control method based on deep learning according to claim 1 is characterized in that: The deep learning algorithm includes the YOLOv5 algorithm and the DeepSORT algorithm. The acquisition of the preset algorithm includes: Adjusting the YOLOv5 algorithm, and using the adjusted YOLOv5 algorithm to generate the target detection algorithm, wherein the adjustment includes: using a CARAFE upsampling operator to replace an upsampling operator in the YOLOv5 algorithm, and using Dyhead as a detection head of the YOLOv5 algorithm; The target tracking algorithm is obtained by using the DeepSORT algorithm.
3. The traffic signal light control method based on deep learning according to claim 1 is characterized in that: The method of obtaining the vehicle information corresponding to the phase information by using a preset algorithm and a radar includes: Collecting images of vehicles on lanes, processing the images using the preset algorithm to obtain first vehicle information on each lane, and obtaining second vehicle information on each lane using radar; A lane corresponding to the phase information is determined, and vehicle information corresponding to the phase information is acquired according to the lane, the first vehicle information, and the second vehicle information.
4. The traffic signal light control method based on deep learning according to claim 1 is characterized in that: The condition is a phase optimization condition, and determining the phase duration corresponding to the current phase according to the condition satisfied by the vehicle information includes: Determine the number of queued vehicles according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; Obtaining the travel time corresponding to the number of vehicles in the queue, and calculating the average travel time according to the travel time and the number of vehicles corresponding to the current phase and the next phase, wherein the time period corresponding to the average travel time includes the time period of the current phase and the next phase; The phase duration corresponding to the current phase is determined according to the average travel time and the number of vehicles corresponding to the current phase.
5. The traffic signal light control method based on deep learning according to claim 1, characterized in that: The condition is an uneven traffic flow condition, and determining the phase duration corresponding to the current phase according to the condition satisfied by the vehicle information includes: Determine the number of queued vehicles in the current phase and the next phase according to the vehicle information corresponding to the preset algorithm and the vehicle information corresponding to the radar; The phase duration corresponding to the current phase is determined according to the number of queued vehicles, the phase transition time, and a comparison result between the number of vehicles corresponding to the next phase and the number of vehicles corresponding to the current phase.
6. The traffic signal light control method based on deep learning according to claim 1, characterized in that: The method comprises: If it is determined that the phase duration is less than the predetermined maximum green light duration, then obtaining vehicle joining information of the vehicle formation corresponding to the current phase, the vehicle joining information including the joining time, speed, and type of the vehicle to be joined; The phase duration corresponding to the current phase is adjusted according to the vehicle joining information, the speeds of the vehicles in the vehicle formation, and the maximum green light duration.
7. The traffic signal light control method based on deep learning according to claim 1 is characterized in that: The method comprises: If it is determined that the current phase meets the idle interruption condition, the current phase is interrupted and switched to the next phase. The idle interruption condition includes at least one of the following: the actual passage time corresponding to the current phase is less than the phase time, and the number of vehicles corresponding to other phases is more than the number of vehicles in the current phase and greater than a preset number.
8. The traffic light control method based on deep learning according to claim 1 is characterized in that: The method comprises: Acquire vehicle monitoring information of an overflow area corresponding to the current phase, wherein the overflow area is determined based on an acquisition range of the vehicle information, and the vehicle monitoring information includes a vehicle ratio and a vehicle stay time; If it is determined that the vehicles corresponding to the overflow area meet the overflow conditions, the phase duration is adjusted according to a predetermined overflow control method. The overflow conditions include that the vehicle proportion is greater than a preset proportion and the vehicle stay time reaches a preset threshold. The overflow control method includes reducing the phase duration of the phase corresponding to the overflow area.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Intersection signal optical control method in environment of Internet of vehicles
CN106652493A
Intelligent detection-based overflow prevention and control method for traffic flow at outlet of single-point control intersection
CN107767666A
Single intersection adaptive control method based on phase scheme decision
CN107862878A
Single-point traffic signal control method, single-point traffic signal control device, traffic signal controller and storage medium
CN109754619A
Intersection traffic signal real-time optimization control system and method thereof
CN113421445A