Intelligent traffic control method and device based on AI visual analysis and medium
Through the intelligent traffic control method of dual-camera video acquisition and AI visual analysis, the intelligent grouping of electric vehicles is realized, solving the problem of confusion between right-turning vehicles and electric vehicles, and improving traffic safety and efficiency.
Patent Information
- Application Number
- CN202511188390.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-25
AI Technical Summary
In road traffic, the waiting areas for right-turning vehicles, pedestrians, electric vehicles and bicycles are not planned properly, which leads to traffic chaos, increases the risk of accidents and congestion. The existing manual guidance is inefficient and difficult to solve the problem of conflicts between people and vehicles.
By combining dual-camera video acquisition with AI visual analysis, DBSCAN density clustering and multi-dimensional grouping parameter models are used to achieve intelligent grouping traffic control for electric vehicles, notifying right-turning vehicles to stop and wait, ensuring the orderly passage of electric vehicles.
It achieves orderly coordinated control of right-turning vehicles and electric vehicles, reduces the risk of traffic accidents, improves traffic efficiency, and solves the traffic conflict problem under traditional traffic rules.
Smart Images

Figure CN120673319A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of AI visual analysis technology, and specifically to an intelligent traffic control method, device and medium based on AI visual analysis. Background Art
[0002] In the field of road transportation, national highways, as important arterial routes, carry a large amount of passenger and freight transport. Currently, many right-turn national highways have significant deficiencies in traffic infrastructure, and dedicated right-turn traffic lights are generally lacking. Furthermore, waiting areas for pedestrians, electric scooters, and bicycles are often located on the left side of the right-turn lanes. This means that pedestrians, electric scooters, and bicycles must cross the path of right-turning vehicles to enter the waiting areas.
[0003] During this process, due to the lack of corresponding traffic signal indications for right-turning vehicles, pedestrians, and electric vehicles, vehicles, pedestrians, and electric vehicles frequently compete for passage. This disorderly traffic situation not only greatly increases the risk of traffic accidents and seriously threatens the lives of road users, but also causes traffic congestion, significantly reduces road traffic efficiency, and disrupts normal traffic order.
[0004] To address these issues, existing technologies primarily rely on on-site traffic control personnel. However, this approach has significant drawbacks. Not only does it require significant manpower, but manual guidance is also inefficient in complex and changing traffic conditions, making it difficult to fundamentally resolve the conflict between pedestrians and vehicles. Therefore, there is an urgent need to develop new traffic control technologies to overcome the shortcomings of existing technologies, ensure traffic safety, and improve road efficiency. Summary of the Invention
[0005] In view of the above problems, the present application provides an intelligent traffic control method, device and medium based on AI visual analysis, which is used to solve the technical problem of confusion in the traffic of right-turning vehicles and electric vehicles and the inability to effectively guide them.
[0006] To achieve the above objectives, this application provides an intelligent traffic control method based on AI visual analysis, which is used to control the grouping of right-turning vehicles and electric vehicles, including the following steps: Step 1: Video acquisition: a first camera captures a first video of the right-turn lane, and a second camera captures a second video of the non-motorized vehicle lane on the left side of the right-turn vehicle; Step 2: AI video analysis, including: 2.1 Preprocess the second video to remove useless information and extract effective features to obtain basic data on the electric vehicle's location coordinates, motion status, waiting time, and spatial distribution; 2.2 Analyze the first video to obtain first information on the number, speed, waiting time, and time period characteristics of right-turning vehicles; further analyze the pre-processed second video data to obtain second information on the number, density, gathering area, and waiting time of electric vehicles; Determining whether to execute step 3 based on the first information and the second information; the criterion for the determination is that the number of right-turning vehicles is greater than or equal to a first threshold, or the number of electric vehicles is greater than a second threshold; Step 3: Intelligent grouping, including: 3.1 Use the DBSCAN density clustering algorithm to spatially cluster the electric vehicles in the second information to form a preliminary clustering result; 3.2 Construct a multi-dimensional grouping parameter model, where the parameters include right-turn vehicle flow, average speed, average waiting time, and current time period characteristics, and assign dynamic weights to each parameter; 3.3 Based on the dynamic weights and preliminary clustering results, electric vehicle traffic groups are generated through a multi-objective optimization algorithm; Step 4: Traffic control, according to the electric vehicle traffic grouping, control the electric vehicles to pass through the right turn lane in groups in sequence, and at the same time notify right-turning vehicles to stop and wait when the electric vehicles pass.
[0007] To solve the above technical problems, this application also provides another technical solution: An intelligent traffic control device based on AI visual analysis, comprising: A video acquisition module, which acquires a first video of the right-turn lane through a first camera, and acquires a second video of the non-motorized vehicle lane on the left side of the right-turn vehicle through a second camera; The AI video analysis module is used to pre-process the second video, remove useless information and extract effective features to obtain basic data on the location coordinates, motion status, waiting time and spatial distribution of electric vehicles; analyze the first video to obtain first information on the number, speed, waiting time and time period characteristics of right-turning vehicles; and further analyze the pre-processed second video data to obtain second information on the number, density, gathering area and waiting time of electric vehicles; a judgment module, configured to judge whether to execute step 3 based on the first information and the second information; the judgment criterion being that the number of right-turning vehicles is greater than or equal to a first threshold, or the number of electric vehicles is greater than a second threshold; an intelligent grouping module for spatially clustering the electric vehicles in the second information using a DBSCAN density clustering algorithm to form a preliminary clustering result; constructing a multidimensional grouping parameter model, wherein the parameters include the traffic volume, average speed, average waiting time, and current time period characteristics of right-turning vehicles, and assigning dynamic weights to the parameters; and generating electric vehicle traffic groups using a multi-objective optimization algorithm based on the dynamic weights and the preliminary clustering result; The traffic control module controls the electric vehicles to pass through the right-turn lane in groups according to the electric vehicle traffic grouping, and at the same time notifies right-turning vehicles to stop and wait when the electric vehicles pass.
[0008] The present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the intelligent traffic control method based on AI visual analysis described in any of the above technical solutions is executed.
[0009] Different from the existing technology, the above technical solution uses dual-camera video capture and combines AI visual analysis to accurately obtain traffic information of right-turning vehicles and electric vehicles in real time, providing data support for traffic control. In addition, in this application, the DBSCAN clustering algorithm is used to spatially group electric vehicles, and the grouping parameters are dynamically adjusted according to the real-time status of the vehicles, realizing intelligent grouping of electric vehicles, taking into account both the aggregation characteristics of electric vehicles and the fairness of waiting vehicles. By controlling the passage of electric vehicles in groups and simultaneously notifying vehicles to wait, the traffic conflict between right-turning vehicles and electric vehicles is effectively resolved, the traffic efficiency of intersections is improved, and the risk of traffic accidents is reduced.
[0010] The above-mentioned records related to the content of the invention are only an overview of the technical solution of this application. In order to enable ordinary technicians in this field to understand the technical solution of this application more clearly, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purposes and other purposes, features and advantages of this application easier to understand, the following is an explanation in combination with the specific implementation methods and drawings of this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings are only used to illustrate the principles, implementation methods, applications, features and effects of the specific embodiments of the present invention and other related contents, and are not to be considered as limiting the present application.
[0012] In the drawings of the specification: Figure 1 This is a flowchart of the intelligent traffic control method based on AI visual analysis described in the specific implementation method; Figure 2 A flowchart of the smart grouping described in the specific implementation method; Figure 3 is a flowchart of preprocessing the second video according to the specific implementation method; Figure 4 A flowchart of constructing a multidimensional grouping parameter model according to a specific embodiment; Figure 5 This is a module block diagram of the intelligent traffic control device based on AI visual analysis described in the specific implementation method; Figure 6A schematic diagram of a computer-readable storage medium according to a specific embodiment; The reference numerals in the above drawings are described as follows: 500. Intelligent traffic control device based on AI visual analysis; 501. Video acquisition module; 502. AI video analysis module; 503. Judgment module; 504. Intelligent grouping module; 505. Traffic control module; 600. Computer-readable storage medium; DETAILED DESCRIPTION
[0013] In order to explain in detail the possible application scenarios, technical principles, specific solutions that can be implemented, and the purpose and effects of this application, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of this application and are therefore only examples and are not intended to limit the scope of protection of this application.
[0014] References to "embodiments" herein mean that the specific features, structures, or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the word "embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or relevance to other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the various technical features mentioned in the embodiments can be combined in any manner to form a corresponding implementable technical solution.
[0015] Unless otherwise defined, the technical terms used herein have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms herein is only for describing specific embodiments and is not intended to limit this application.
[0016] In the description of this application, the term "and / or" is used to describe a logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and both A and B exist. In addition, the character " / " in this document generally indicates that the objects before and after are in a logical "or" relationship.
[0017] In this application, terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, priority or sequence relationship between these entities or operations.
[0018] Without further limitations, in this application, the words "include", "comprise", "have" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product that includes the elements, so that the process, method or product that includes a series of elements may include not only those defined elements, but also other elements that are not explicitly listed, or also include elements inherent to such process, method or product.
[0019] Consistent with the understanding in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceed" are understood to exclude the number itself; expressions such as "above," "below," and "within" are understood to include the number itself. Furthermore, in the description of the embodiments of this application, "multiple" means two or more (including two), and similar expressions related to "multiple," such as "multiple groups" and "multiple times," are also understood in this manner, unless otherwise specifically defined.
[0020] In the description of the embodiments of the present application, the space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, it should not be understood as a limitation on the embodiments of the present application.
[0021] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms "installed", "connected", "connected", "fixed", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For those skilled in the art of the present application, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0022] See also Figures 1 to 4This embodiment provides a smart traffic control method based on AI visual analysis. This smart traffic control method based on AI visual analysis is applied to intersections without right-turn traffic lights on urban roads to control the grouping of right-turn vehicles and electric vehicles, so as to improve the safety and traffic efficiency of electric vehicles in the right-turn lane, wherein the electric vehicle refers to a two-wheeled electric bicycle, not a four-wheeled electric vehicle. Figure 1 As shown in FIG, the intelligent traffic control method based on AI visual analysis includes the following steps: Step 1: Video capture: The first camera captures the first video of the right-turn lane, and the second camera captures the second video of the non-motorized vehicle lane to the left of the right-turning vehicle. The first camera, a Hikvision DS-2CD3T25-I5 (2 megapixels, 4mm focal length, 25fps), can be installed 5 meters in front of the stop line in the right-turn lane. It covers a 100-meter radius of the right-turn lane and the waiting area. The second camera, a Hikvision DS-2CD3T25-I5 (2 megapixels, 4mm focal length, 25fps), is installed on a light pole (3.5 meters high) on the east side of the sidewalk. It uses the same model, with its lens facing northwest, and covers a 20 x 5 meter area of the sidewalk. The edge computing device, an NVIDIA Jetson AGX Xavier (8-core ARM CPU, 512-core GPU), is responsible for video processing and algorithm execution.
[0023] Step 2: Video analysis, including: 2.1 Preprocess the second video to remove useless information and extract effective features to obtain basic data on the electric vehicle's position coordinates, motion status, waiting time, and spatial distribution.
[0024] 2.2 Analyze the first video to obtain first information on the number, speed, waiting time, and time period characteristics of right-turning vehicles; further analyze the preprocessed second video data to obtain second information on the number, density, clustering area, and waiting time of electric vehicles; and determine whether to proceed to step 3 based on the first and second information. The determination criteria are that the number of right-turning vehicles is greater than or equal to a first threshold (e.g., ≥10 right-turning vehicles) or the number of electric vehicles is greater than a second threshold (e.g., 20 vehicles). The analysis of the first video in step 2.2 utilizes the YOLOv8 model to detect right-turning vehicles, the DeepSORT algorithm to continuously track vehicles, and the actual vehicle speed is calculated using inter-frame displacement and camera calibration parameters.
[0025] Step 3: Intelligent grouping, such as Figure 2 Shown, including: 3.1 Use the DBSCAN density clustering algorithm to spatially cluster the electric vehicles in the second information to form a preliminary clustering result.
[0026] 3.2 Construct a multi-dimensional grouping parameter model, wherein the parameters include the traffic volume, average speed, average waiting time and current time period characteristics of right-turning vehicles, and assign dynamic weights to each parameter.
[0027] 3.3 Based on the dynamic weights and preliminary clustering results, electric vehicle traffic groups are generated through a multi-objective optimization algorithm.
[0028] Step 4: Traffic control, according to the electric vehicle traffic grouping, control the electric vehicles to pass through the right turn lane in groups in sequence, and at the same time notify right-turning vehicles to stop and wait when the electric vehicles pass.
[0029] In step 3.1, convert the pixel coordinates of the electric vehicles to real-world coordinates (with the camera as the origin, the X-axis along the non-motorized vehicle lane, and the Y-axis perpendicular to the X-axis). Set the DBSCAN algorithm's ε = 2.0 meters and min_samples = 3 to cluster the electric vehicles in the waiting area, resulting in three initial clusters (containing 6, 8, and 5 electric vehicles, respectively). Set the basic grouping parameters: basic group size = 6 vehicles, maximum number of groups = 3, and inter-group travel interval = 4-10 seconds.
[0030] The grouping results of intelligent grouping can be projected onto the non-motorized vehicle lane through an infrared projector, for example, by projecting rectangular frames to frame Group 1 and Group 2 respectively, so that electric vehicle riders can know their grouping results and pass through the groups according to the prompts.
[0031] During traffic control, when the first group of electric vehicles passes, the right-turn lane LED screen displays "Electric vehicles passing, please wait" and the red light illuminates. The non-motorized vehicle lane LED screen displays "First group of electric vehicles passing" for 20 seconds (calculated based on the group size and the average speed of the electric vehicles). After the first group completes its passage, the second group begins to pass after a 4-second interval, and the above display control repeats. After all three groups of electric vehicles have passed, the right-turn lane LED screen displays "Vehicles can pass," the red light turns off, and the green light illuminates, allowing vehicles to turn right.
[0032] In this embodiment, a closed-loop control system is implemented through four core steps: video capture, video analysis, intelligent grouping, and traffic control. Specifically, dual cameras are used for video capture, ensuring simultaneous coverage of right-turning vehicles and the area occupied by electric vehicles in non-motorized lanes. A targeted preprocessing step is added to the video analysis phase to address the issues of target clutter and background interference encountered in traditional methods. Intelligent grouping incorporates a multidimensional parameter model and optimization algorithm to overcome the limitations of single-factor decision-making. Traffic control achieves coordinated coordination between vehicles and electric vehicles through two-way information exchange.
[0033] This embodiment enables active coordinated control of right-turning vehicles and electric vehicles at intersections without traffic lights, fundamentally resolving traffic conflicts under traditional traffic rules and effectively reducing traffic jams at intersections. This embodiment establishes a complete AI visual analysis closed loop, with an end-to-end processing latency of ≤500ms from raw video to control commands, meeting real-time traffic control requirements.
[0034] In this embodiment, in order to obtain the second information of the electric vehicle more efficiently and accurately, such as Figure 3 As shown, the pre-processing of the second video in step 2.1 includes: 2.1.1 Target filtering: The target detection model is used to identify the electric vehicle in the second video and filter out useless targets such as pedestrians, non-motor vehicles, and stationary obstacles.
[0035] 2.1.2 Area division: The video screen is divided into waiting area, transition area and passage area through camera calibration, and only the electric vehicle data in the waiting area is retained.
[0036] 2.1.3 Feature extraction: Extract the center coordinates, motion trajectory, waiting time, and velocity vector features of the electric vehicle, and remove temporary targets with chaotic trajectories or stay times less than 3 seconds.
[0037] The target detection model in step 2.1.1 is a YOLOv8 model fine-tuned based on an electric vehicle sample set. The sample set contains images of electric vehicles under different lighting and weather conditions, and the outline and riding status of the electric vehicles are marked.
[0038] In this embodiment, YOLOv8 is used to achieve fast and accurate vehicle positioning for motor vehicle detection. The DeepSORT algorithm is combined to address vehicle occlusion and cross-frame tracking issues. Camera calibration is used to convert pixels to actual physical quantities. In this embodiment, specific sample set training (covering complex scenarios such as backlighting and rain) and feature fine-tuning are used to enhance the model's ability to identify electric vehicles, particularly its ability to distinguish between electric vehicles and other non-motor vehicles.
[0039] like Figure 4 As shown, constructing the multidimensional grouping parameter model in step 3.2 includes: 3.2.1 Determine the core parameter set: including vehicle dimension parameters (traffic flow Q, average speed V, average waiting time T) and time dimension parameters (peak coefficient S, S = 1.2 during peak hours, S = 1.0 during off-peak hours, S = 0.8 during low-peak hours).
[0040] 3.2.2 Dynamic weight allocation: The analytic hierarchy process (AHP) is used to determine the weights of each parameter, where the traffic flow weight ω1 = 0.3, the average speed weight ω2 = 0.25, the average waiting time weight ω3 = 0.3, and the peak coefficient weight ω4 = 0.15.
[0041] 3.2.3 Comprehensive score calculation: The comprehensive score of the vehicle status is calculated using the formula C=ω1×Q+ω2×(1 / V)+ω3×T+ω4×S, where a higher C value indicates greater waiting pressure on the vehicle.
[0042] The generation of electric vehicle traffic groups by the multi-objective optimization algorithm in step 3.3 specifically includes: 3.3.1 Set optimization objectives: minimize the total waiting time of electric vehicles and minimize the average waiting time of vehicles.
[0043] 3.3.2 Dynamically adjust grouping parameters based on the comprehensive score C: When C ≥ 80, the upper limit of group size is 10 vehicles, the maximum number of groups is 2 groups, and the interval between groups is 4 seconds; when 50 ≤ C < 80, the upper limit of group size is 15 vehicles, the maximum number of groups is 3 groups, and the interval between groups is 7 seconds; when C < 50, the upper limit of group size is 20 vehicles, the maximum number of groups is 5 groups, and the interval between groups is 10 seconds.
[0044] 3.3.3 A genetic algorithm is used to optimize the preliminary clustering results, prioritizing the allocation of electric vehicles with the longest waiting time to the early passage group, while ensuring that the spatial aggregation degree of each group is ≥ 0.8 (aggregation degree = average distance of electric vehicles within a group / average distance between groups).
[0045] In this embodiment, video data processing and intelligent grouping mechanisms are optimized, resulting in more rational and accurate grouping of electric vehicles. A multidimensional parameter model breaks through the limitations of traditional single-factor decision-making by quantifying traffic volume, speed, waiting time, and time of day into a computable comprehensive score, enabling a precise depiction of traffic conditions. Furthermore, a multi-objective optimization algorithm (genetic algorithm), based on spatial clustering, achieves a triple balance of "efficiency, fairness, and safety" through dynamic parameter adjustment and priority sorting.
[0046] The fitness function of the genetic algorithm is F = α × (1 / total waiting time of electric vehicles) + β × (1 / average waiting time of vehicles), where α and β are weight coefficients, and α + β = 1, which is dynamically adjusted according to the peak coefficient S (α = 0.4, β = 0.6 during peak hours; α = 0.5, β = 0.5 during off-peak hours).
[0047] In this embodiment, the core component of the genetic algorithm, the fitness function, is further optimized, and differentiated optimization goals for different traffic periods are achieved through dynamic weight coefficients α and β: during peak hours (S=1.2), the vehicle traffic weight (β=0.6) is increased to prioritize the traffic efficiency of vehicles on main roads; during off-peak hours (S=1.0), a balanced weight (α=0.5, β=0.5) is used to balance the traffic rights and interests of vehicles and electric vehicles.
[0048] like Figure 5 As shown, in one embodiment, a smart traffic control device 500 based on AI visual analysis is provided. This smart traffic control device based on AI visual analysis is used to control the grouping of right-turning vehicles and electric vehicles, thereby improving the safety and efficiency of electric vehicle traffic. This smart traffic control device based on AI visual analysis 500 includes: a video acquisition module 501, an AI video analysis module 502, a judgment module 503, an intelligent grouping module 504, and a traffic control module 505.
[0049] The video acquisition module 501 acquires a first video of the right-turn lane through a first camera, and acquires a second video of the non-motorized vehicle lane on the left side of the right-turn vehicle through a second camera.
[0050] The AI video analysis module 502 is used to pre-process the second video, remove useless information and extract effective features, and obtain basic data on the position coordinates, motion status, waiting time and spatial distribution of electric vehicles; analyze the first video to obtain first information on the number, speed, waiting time and time period characteristics of right-turning vehicles; further analyze the pre-processed second video data to obtain second information on the number, density, gathering area and waiting time of electric vehicles.
[0051] The judgment module 503 is used to judge whether to execute step 3 based on the first information and the second information; the judgment standard is that the number of right-turning vehicles is greater than or equal to a first threshold, or the number of electric vehicles is greater than a second threshold.
[0052] The intelligent grouping module 504 is used to spatially cluster the electric vehicles in the second information using the DBSCAN density clustering algorithm to form a preliminary clustering result; construct a multidimensional grouping parameter model, wherein the parameters include the traffic flow, average speed, average waiting time and current time period characteristics of right-turning vehicles, and assign dynamic weights to each parameter; based on the dynamic weights and the preliminary clustering results, generate electric vehicle traffic groups through a multi-objective optimization algorithm.
[0053] The traffic control module 505 controls the electric vehicles to pass through the right-turn lane in groups according to the traffic grouping of the electric vehicles, and at the same time notifies right-turning vehicles to stop and wait when the electric vehicles pass.
[0054] In this embodiment, the YOLOv8 model is used to analyze the first video to detect right-turning vehicles, the DeepSORT algorithm is used to continuously track the vehicle, and the actual vehicle speed is calculated through the inter-frame displacement and camera calibration parameters.
[0055] like Figure 6 As shown, in another embodiment, a computer-readable storage medium 600 is provided, which stores a computer program. When the computer program is run by a processor, it executes the intelligent traffic control method based on AI visual analysis described in the above embodiment.
[0056] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory may be a magnetic disk memory or a magnetic tape memory.
[0057] The volatile memory may be a random access memory (RAM) that is used as an external cache memory. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SR AM), synchronous static random access memory (SSR AM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct rambus random access memory (DRRAM). The computer-readable storage medium described in the embodiments of the present invention is intended to include these and any other suitable types of memory.
[0058] In some embodiments, the processor can be implemented by software, hardware, firmware or a combination thereof, and can use circuits, single or multiple application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), central processing units (CPU), controllers, microcontrollers, and at least one of microprocessors, so that the processor can execute some or all of the steps or any combination of the steps in the intelligent traffic control method based on AI visual analysis in various embodiments of the present application.
[0059] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concepts of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. A smart traffic control method based on AI visual analysis, used to control the grouping of right-turning vehicles and electric vehicles, characterized in that: The following steps are involved: Step 1: Video acquisition: a first camera captures a first video of the right-turn lane, and a second camera captures a second video of the non-motorized vehicle lane on the left side of the right-turn vehicle; Step 2: AI video analysis, including: 2.1 Preprocess the second video to remove useless information and extract effective features to obtain basic data on the electric vehicle's location coordinates, motion status, waiting time, and spatial distribution; 2.2 Analyze the first video to obtain first information on the number, speed, waiting time, and time period characteristics of right-turning vehicles; further analyze the pre-processed second video data to obtain second information on the number, density, gathering area, and waiting time of electric vehicles; Determining whether to execute step 3 based on the first information and the second information; the criterion for the determination is that the number of right-turning vehicles is greater than or equal to a first threshold, or the number of electric vehicles is greater than a second threshold; Step 3: Intelligent grouping, including: 3.1 Use the DBSCAN density clustering algorithm to spatially cluster the electric vehicles in the second information to form a preliminary clustering result; 3.2 Construct a multi-dimensional grouping parameter model, where the parameters include right-turn vehicle flow, average speed, average waiting time, and current time period characteristics, and assign dynamic weights to each parameter; 3.3 Based on the dynamic weights and preliminary clustering results, electric vehicle traffic groups are generated through a multi-objective optimization algorithm; Step 4: Traffic control, according to the electric vehicle traffic grouping, control the electric vehicles to pass through the right turn lane in groups in sequence, and at the same time notify right-turning vehicles to stop and wait when the electric vehicles pass.
2. The intelligent traffic control method based on AI visual analysis according to claim 1, wherein the pre-processing of the second video in step 2.1 comprises: 2.1.1 Object Filtering: Use the object detection model to identify the electric vehicle in the second video and filter out pedestrians, non-motor vehicles, and stationary obstacles; 2.1.2 Area Division: The video screen is divided into waiting area, transition area and passage area through camera calibration, and only the electric vehicle data in the waiting area is retained; 2.1.3 Feature extraction: Extract the center coordinates, motion trajectory, waiting time, and velocity vector features of the electric vehicle, and remove temporary targets with chaotic trajectories or stay times less than 5 seconds.
3. The intelligent traffic control method based on AI visual analysis according to claim 1 is characterized in that: The step 3.2 of constructing the multidimensional grouping parameter model includes: 3.2.1 Determine the core parameter set: including vehicle dimension parameters and time dimension parameters. The vehicle dimension parameters include traffic flow Q, average speed V, and average waiting time T; 3.2.2 Dynamic Weight Allocation: The analytic hierarchy process is used to determine the weights of each parameter, where the weight of traffic flow is ω1 = 0.3, the weight of average speed is ω2 = 0.25, the weight of average waiting time is ω3 = 0.3, and the weight of peak coefficient is ω4 = 0.15; 3.2.3 Comprehensive score calculation: The comprehensive score of vehicle status is calculated using the formula C=ω1×Q+ω2×(1 / V)+ω3×T+ω4×S, where a higher C value indicates greater waiting pressure on the vehicle, Q is the traffic volume, V is the average speed, T is the average waiting time, and S is the time dimension parameter. During peak hours, S=1.2, during off-peak hours, S=1.0, and during low-peak hours, S=0.
8.
4. The intelligent traffic control method based on AI visual analysis according to claim 3 is characterized in that: The generation of electric vehicle traffic groups by the multi-objective optimization algorithm in step 3.3 specifically includes: 3.3.1 Set optimization goals: minimize the total waiting time of electric vehicles and minimize the average waiting time of vehicles; 3.3.2 Dynamically adjust grouping parameters based on the comprehensive score C: When C ≥ 80, the maximum group size is 10 vehicles, the maximum number of groups is 2, and the interval between groups is 4 seconds; when 50 ≤ C < 80, the maximum group size is 15 vehicles, the maximum number of groups is 3, and the interval between groups is 7 seconds; when C < 50, the maximum group size is 20 vehicles, the maximum number of groups is 5, and the interval between groups is 10 seconds; 3.3.3 A genetic algorithm is used to optimize the preliminary clustering results, prioritizing the allocation of electric vehicles with the longest waiting times to the early passage group, while ensuring that the spatial aggregation degree of each group is ≥ 0.8; aggregation degree = average distance between electric vehicles within a group / average distance between groups.
5. The intelligent traffic control method based on AI visual analysis according to claim 1 is characterized in that: The analysis of the first video in step 2.2 uses the YOLOv8 model to detect right-turning vehicles, uses the DeepSORT algorithm to continuously track the vehicles, and calculates the actual vehicle speed through the inter-frame displacement and camera calibration parameters.
6. The intelligent traffic control method based on AI visual analysis according to claim 2 is characterized in that: The target detection model in step 2.1.1 is a YOLOv8 model fine-tuned based on an electric vehicle sample set. The sample set contains images of electric vehicles under different lighting and weather conditions, and the outline and riding status of the electric vehicles are marked.
7. The intelligent traffic control method based on AI visual analysis according to claim 4 is characterized in that: The fitness function of the genetic algorithm is F=α×(1 / total waiting time of electric vehicles)+β×(1 / average waiting time of vehicles), where α and β are weight coefficients, and α+β=1. It is dynamically adjusted according to the peak coefficient S. During peak hours, α=0.4 and β=0.6; during off-peak hours, α=0.5 and β=0.
5.
8. An intelligent traffic control device based on AI visual analysis, characterized in that: include: A video acquisition module, which acquires a first video of the right-turn lane through a first camera, and acquires a second video of the non-motorized vehicle lane on the left side of the right-turn vehicle through a second camera; The AI video analysis module is used to pre-process the second video, remove useless information and extract effective features to obtain basic data on the electric vehicle's position coordinates, motion status, waiting time and spatial distribution; analyze the first video to obtain first information on the number of right-turning vehicles, vehicle speed, waiting time and time period characteristics; Further analyzing the pre-processed second video data to obtain second information on the number, density, gathering area, and waiting time of electric vehicles; a judgment module, configured to judge whether to execute step 3 based on the first information and the second information; the judgment criterion being that the number of right-turning vehicles is greater than or equal to a first threshold, or the number of electric vehicles is greater than a second threshold; an intelligent grouping module for spatially clustering the electric vehicles in the second information using a DBSCAN density clustering algorithm to form a preliminary clustering result; constructing a multidimensional grouping parameter model, wherein the parameters include the traffic volume, average speed, average waiting time, and current time period characteristics of right-turning vehicles, and assigning a dynamic weight to each parameter; Based on the dynamic weights and preliminary clustering results, generating electric vehicle traffic groups through a multi-objective optimization algorithm; The traffic control module controls the electric vehicles to pass through the right-turn lane in groups according to the electric vehicle traffic grouping, and at the same time notifies right-turning vehicles to stop and wait when the electric vehicles pass.
9. The intelligent traffic control device based on AI visual analysis according to claim 8 is characterized in that: The analysis of the first video uses the YOLOv8 model to detect right-turning vehicles, the DeepSORT algorithm to continuously track the vehicles, and the actual vehicle speed is calculated through the inter-frame displacement and camera calibration parameters.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the intelligent traffic control method based on AI visual analysis according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Expressway bottleneck section emergency lane management and control system
CN117612378A
Intelligent traffic control method and device based on AI visual analysis and medium
CN117727191A
AI-based security and protection monitoring video analysis method and system
CN120495963A
Traffic behavior detection method and apparatus, electronic device, storage medium, and computer program product
WO2023124133A1