Lane and traffic light association method and device, storage medium, and electronic device
By identifying and filtering traffic light and lane information for autonomous vehicles in urban areas and establishing a correlation method, the problem of vehicles being unable to recognize traffic lights at intersections other than the current one is solved, enabling safe and efficient passage through intersections.
Patent Information
- Application Number
- CN202510054411.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In urban autonomous driving, vehicles have difficulty effectively identifying and filtering traffic lights that are not at the current intersection, leading to failure to comply with traffic rules and affecting safe passage through intersections.
By identifying traffic lights and lane information of vehicles at the current intersection, a vehicle coordinate system is established, traffic lights are abstracted as points and lanes as centerlines, attribute information is configured, traffic lights that are not at the current intersection are filtered, the distance between the centroid position and the lane centerline is calculated, the matching traffic lights and lanes are bound together, and a passage instruction is generated.
It effectively filters traffic lights from roads and intersections other than the current vehicle's current route, ensuring that vehicles comply with traffic rules and pass through intersections safely and efficiently.
Smart Images

Figure CN119905003B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic driving, in particular to a lane and traffic light association method and device, a storage medium and an electronic device. BACKGROUND
[0002] In related technologies, urban automatic driving refers to the application of automatic driving technology in urban environments. The importance and significance of urban automatic driving are reflected in many aspects, from technical innovation to social impact, to economic benefits, and its application prospects are very broad. However, compared with automatic driving on highways and urban expressways, urban automatic driving faces more complex challenges. In urban environments, there are usually more complex and dynamic traffic conditions, including complex road types, numerous and different types of traffic participants, complex and frequent traffic signals and traffic signs, traffic congestion and building obstructions, and other uncertain factors, which make it difficult for vehicles to effectively identify and filter traffic signals at non-current traffic intersections, thereby ensuring that vehicles can comply with traffic rules and safely drive through intersections.
[0003] In view of the above problems in the related art, there is no efficient and accurate solution. SUMMARY
[0004] The present application provides a lane and traffic light association method and device, a storage medium and an electronic device to solve the technical problems in the related art.
[0005] According to an embodiment of the present application, a lane and traffic light association method is provided, comprising: identifying traffic light information and lane information of a vehicle at a current traffic intersection; filtering traffic lights at non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection; and associating each lane of the current traffic intersection to a matched traffic light in the target traffic light group.
[0006] Optionally, identifying traffic light information and lane information of a vehicle at a current traffic intersection comprises: acquiring a visual image collected by the vehicle at the current traffic intersection; establishing a vehicle coordinate system with a center point of the vehicle as the origin in the visual image; abstracting each traffic light as a point and each lane as a lane center line in the visual image, and acquiring point coordinates of each traffic light and point cloud coordinates of each lane center line in the vehicle coordinate system; configuring first attribute information of each traffic light and second attribute information of each lane; determining the first attribute information and the point coordinates of all traffic lights as traffic light information, and determining the point cloud coordinates and the second attribute information of all lanes as lane information.
[0007] Optionally, the first attribute information of each traffic light comprises: for each traffic light, the following first attribute information: traffic light ID, control type, wherein the control type is used to indicate the lane type and the passing direction of the traffic light control.
[0008] Optionally, the second attribute information of each lane comprises: for each lane, the following second attribute information: lane ID, passing type, wherein the passing type is used to indicate the lane type and the passing direction of the lane guide.
[0009] Optionally, filtering the traffic lights of non-current traffic intersection according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection comprises: filtering the traffic lights of non-motor lane and pedestrian lane in all traffic light sets to obtain a first traffic light set for controlling the motor lane; clustering the first traffic light set according to the spatial position to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road section, and a road section comprises a plurality of lanes in the same direction; calculating the centroid position of each traffic light group; filtering the traffic light groups of non-current traffic intersection in the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection.
[0010] Optionally, filtering the traffic light groups of non-current traffic intersection in the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection comprises: for each traffic light group in the plurality of traffic light groups, calculating the average distance from the centroid position to all lane center lines, wherein the lane information comprises the lane center line; selecting a traffic light group set with an average distance less than a first preset distance; for each traffic light group in the traffic light group set, calculating the distance between the centroid position and the vehicle; selecting a target traffic light group with the smallest distance in the traffic light group set.
[0011] Optionally, calculating the average distance from the centroid position to all lane center lines comprises: calculating the lateral distance from all lanes to the vehicle, and calculating the longitudinal distance from all lanes to the vehicle; selecting a plurality of adjacent lanes in all lanes with a lateral distance less than a first threshold value and a longitudinal distance less than a second threshold value; for each adjacent lane, selecting two lane points in the lane center line close to the stop line; calculating the minimum distance from the centroid position to the straight line where the two lane points are located; calculating the average value of the minimum distances of all adjacent lanes to obtain the average distance.
[0012] Optionally, the binding of each traffic light of the target traffic light group to a matching lane comprises: classifying all lanes according to a passing type, and sorting the classified lane classes in a longitudinal direction to obtain a first sequence; classifying the target traffic light group according to a control type, and sorting the classified traffic light classes in the longitudinal direction to obtain a second sequence; and associating each lane of the current traffic intersection to a matching traffic light in the target traffic light group by using the first sequence and the second sequence.
[0013] Optionally, the associating of each lane of the current traffic intersection to a matching traffic light in the target traffic light group by using the first sequence and the second sequence comprises: for each lane class in the first sequence, selecting a traffic light class with the same element position in the second sequence; determining whether the number of elements in the second sequence is equal to the number of elements in the first sequence; and if the number of elements in the second sequence is equal to the number of elements in the first sequence, binding the lane ID of each lane class in the first sequence to the traffic light ID of the traffic light class with the same element position.
[0014] Optionally, after determining whether the number of elements in the second sequence is equal to the number of elements in the first sequence, the method further comprises: if the number of elements in the second sequence is not equal to the number of elements in the first sequence, calculating the distance between each lane in the first sequence and each traffic light in the second sequence; and binding the lane ID of each lane in the first sequence to the traffic light ID of the target traffic light with the smallest distance.
[0015] Optionally, after associating each lane of the current traffic intersection to a matching traffic light in the target traffic light group, the method further comprises: determining a target lane in which the vehicle is currently located; finding a target traffic light corresponding to the target lane; and generating a passing instruction for the vehicle at the current traffic intersection according to the color of the target traffic light, wherein the passing instruction is used to indicate whether the vehicle is allowed to pass through the current traffic intersection.
[0016] According to another embodiment of the present application, there is provided a lane and traffic light association device, comprising: an identification module configured to identify traffic light information and lane information of a vehicle at a current traffic intersection; a filtering module configured to filter traffic lights of non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matching the current traffic intersection; and an association module configured to associate each lane of the current traffic intersection to a matching traffic light in the target traffic light group.
[0017] Optionally, the identification module comprises: a first acquisition unit, configured to acquire a visual image collected by the vehicle at a current traffic intersection; a construction unit, configured to construct a vehicle body coordinate system with a center point of the vehicle as an origin in the visual image; a first acquisition unit, configured to abstract each traffic light as a point and each lane as a lane center line in the visual image, and acquire point coordinates of each traffic light and point cloud coordinates of each lane center line in the vehicle body coordinate system; a configuration unit, configured to configure first attribute information of each traffic light and second attribute information of each lane; and a determination unit, configured to determine the first attribute information and the point coordinates of all traffic lights as traffic light information, and determine the point cloud coordinates and the second attribute information of all lanes as lane information.
[0018] Optionally, the configuration unit comprises: a first configuration sub-unit, configured to, for each traffic light, configure the following first attribute information: a traffic light ID and a control type, wherein the control type is used to indicate a lane type and a passing direction controlled by the traffic light.
[0019] Optionally, the configuration unit comprises: a second configuration sub-unit, configured to, for each lane, configure the following second attribute information: a lane ID and a passing type, wherein the passing type is used to indicate a lane type and a passing direction guided by the lane.
[0020] Optionally, the association module comprises: a first filtering unit, configured to filter traffic lights of non-motor vehicle lanes and sidewalks in a set of all traffic lights to obtain a first set of traffic lights for controlling motor vehicle lanes; a clustering unit, configured to cluster the first set of traffic lights according to spatial positions to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road segment, and a road segment comprises a plurality of lanes in the same direction; a calculation unit, configured to calculate a centroid position of each traffic light group; and a second filtering unit, configured to filter traffic light groups of non-current traffic intersections according to the centroid positions and the lane information in the plurality of traffic light groups to obtain a target traffic light group matched with the current traffic intersection.
[0021] Optionally, the second filtering unit comprises: a first calculation sub-unit, configured to, for each traffic light group in the plurality of traffic light groups, calculate an average distance from the centroid position to all lane center lines, wherein the lane information comprises the lane center lines; a first selection sub-unit, configured to select a set of traffic light groups with an average distance less than a first preset distance; a second calculation sub-unit, configured to, for each traffic light group in the set of traffic light groups, calculate a distance between the centroid position and the vehicle; and a second selection sub-unit, configured to select a target traffic light group with a minimum distance in the set of traffic light groups.
[0022] Optionally, the first calculation subunit is further configured to: calculate the lateral distance of all lanes to the vehicle and the longitudinal distance of all lanes to the vehicle; select several adjacent lanes in all lanes, wherein the lateral distance of the lanes is less than a first threshold value and the longitudinal distance of the lanes is less than a second threshold value; select two lane points in the lane center line close to the stop line for each adjacent lane; calculate the minimum distance from the centroid position to the straight line where the two lane points are located; and calculate the average value of the minimum distances of all adjacent lanes to obtain an average distance.
[0023] Optionally, the association module comprises: a classification unit configured to classify all lanes according to a passing type, and sort several lane classes after classification in the longitudinal direction to obtain a first sequence; and classify the target traffic light group according to a control type, and sort several traffic light classes after grouping in the longitudinal direction to obtain a second sequence; and an association unit configured to associate each lane of the current traffic intersection to a matching traffic light in the target traffic light group by using the first sequence and the second sequence.
[0024] Optionally, the association unit comprises: a selection subunit configured to select, for each lane class in the first sequence, a traffic light class with the same element position in the second sequence; a judgment subunit configured to judge whether the number of elements in the second sequence is equal to the number of elements in the first sequence; and a first association subunit configured to, if the number of elements in the second sequence is equal to the number of elements in the first sequence, bind the lane ID of each lane class in the first sequence to the traffic light ID of the traffic light class with the same element position.
[0025] Optionally, the association unit further comprises: a calculation subunit configured to, after the judgment subunit judges whether the number of elements in the second sequence is equal to the number of elements in the first sequence, calculate the distance between each lane in the first sequence and each traffic light in the second sequence if the number of elements in the second sequence is not equal to the number of elements in the first sequence; and a second association subunit configured to bind the lane ID of each lane in the first sequence to the traffic light ID of the target traffic light with the minimum distance.
[0026] Optionally, the device further comprises: an association module configured to, after the association module associates each lane of the current traffic intersection to a matching traffic light in the target traffic light group, determine a target lane where the vehicle is currently located; a search module configured to search for a target traffic light corresponding to the target lane; and a generation module configured to generate a passing instruction of the vehicle at the current traffic intersection according to the color of the target traffic light, wherein the passing instruction is used to indicate whether the vehicle is allowed to pass through the current traffic intersection.
[0027] According to another aspect of the embodiments of the present application, a storage medium is also provided, which comprises a stored program, and the program performs the steps described above when running.
[0028] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; and the memory is used to store a computer program, and the processor is used to perform the steps in the above method by running the program stored in the memory.
[0029] The embodiments of the present application also provide a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the steps in the above method.
[0030] The beneficial effects of the present application are as follows:
[0031] 1. The method does not depend on the Internet of Things devices in the environment, can effectively filter the traffic lights that are not on the current road of the vehicle and not at the current intersection, and effectively solves the problem of association between the traffic light and the lane at the intersection.
[0032] 2. The method provides a necessary premise for the vehicle to pass through the intersection safely and efficiently while complying with traffic rules, thereby ensuring that the vehicle can comply with traffic rules and safely and automatically drive through the intersection. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application in any way. In the drawings:
[0034] Figure 1 is a hardware structure block diagram of a vehicle according to an embodiment of the present application;
[0035] Figure 2 is a flowchart of a lane and traffic light association method according to an embodiment of the present application;
[0036] Figure 3 is a schematic diagram of a traffic intersection in an embodiment of the present application;
[0037] Figure 4 is a schematic diagram of a vehicle body coordinate system in an embodiment of the present application;
[0038] Figure 5 is a flowchart of traffic light filtering in an embodiment of the present application;
[0039] Figure 6 is a schematic diagram of a lane and traffic signal light according to an embodiment of the present application;
[0040] Figure 7 Another schematic diagram of a lane and a traffic signal lamp provided by an embodiment of the present application;
[0041] Figure 8 Another schematic diagram of a lane and a traffic signal lamp provided by an embodiment of the present application;
[0042] Figure 9 A flowchart of the association between a traffic signal lamp and a lane in an embodiment of the present application;
[0043] Figure 10 A structural block diagram of an association device of a lane and a traffic signal lamp according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable persons skilled in the art to better understand the schemes of the present application, the technical schemes in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should belong to the protection scope of the present application. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0045] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, product, or device that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0046] Embodiment 1
[0047] The method embodiment provided by the embodiment of the present application can be executed in a car, a server, a processor, an automatic driving / assisted driving / intelligent driving controller, or a similar processing device. Taking the case of running on a car as an example, Figure 1 is a hardware structural block diagram of a car according to an embodiment of the present application. As shown in Figure 1 , the car can include one or more Figure 1The vehicle shown in FIG. 1 includes only one processor 102 (the processor 102 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally includes a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art can understand that Figure 1 The structure shown in FIG. 1 is only schematic and does not limit the structure of the vehicle. For example, the vehicle can include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG. 1. Figure 1 The vehicle shown in FIG. 1 includes only one processor 102 (the processor 102 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally includes a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art can understand that Figure 1 The vehicle shown in FIG. 1 includes only one processor 102 (the processor 102 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally includes a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art can understand that
[0048] The memory 104 can be used to store vehicle programs, such as software programs of application software and modules, such as the vehicle program corresponding to the lane and traffic light association method of the vehicle in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the vehicle programs stored in the memory 104, i.e., implements the method described above. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and these remote memories can be connected to the vehicle through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication service provider of the vehicle. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module which is used to communicate with the Internet in a wireless manner.
[0050] In the embodiment, a lane and traffic light association method is provided, Figure 2 The flowchart of the lane and traffic light association method according to the embodiment of the present application is shown in FIG. 2, and the flow includes the following steps: Figure 2
[0051] In step S202, traffic light information and lane information of a vehicle at a current intersection are identified.
[0052] The traffic light in the embodiment is also called a traffic signal lamp, which indicates the traffic signal of vehicles at an intersection through color (red, yellow, and green) signals.
[0053] Figure 3 Fig. 1 is a schematic diagram of a traffic intersection in an embodiment of the present application, the traffic intersection is a cross intersection, each intersection is drawn with a zebra crossing, a stop line, a lane arrow, a lane line, and each intersection is equipped with a traffic light.
[0054] In step S204, the traffic lights of non-current traffic intersections are filtered according to the traffic light information and the lane information, to obtain a target traffic light group matched with the current traffic intersection.
[0055] The target traffic light group in this embodiment is composed of one or more traffic lights.
[0056] In step S206, each lane of the current traffic intersection is associated with a matched traffic light in the target traffic light group.
[0057] Optionally, the association operation between the lane and the traffic signal light is completed before the stop line in the lane, and the correct traffic light association needs to be performed for each lane with a clear traffic type that can be visually seen by the current vehicle, so as to ensure that the vehicle can change lanes and pass through the intersection scene with traffic lights.
[0058] In the present application, one lane can be associated with multiple traffic lights, for example, the lane traffic type is straight and left turn, the lane can be associated with the left turn light and the straight light, and the specific use of which traffic light needs to be determined by the downstream module (such as the automatic driving module) according to the target direction of the vehicle. Multiple lanes can be associated with the same traffic light, for example, only one straight traffic light is controlled, and the straight lane and the straight left turn lane can be associated with the traffic light.
[0059] Through the above steps, the traffic light information and the lane information of the vehicle at the current traffic intersection are recognized, the traffic lights of non-current traffic intersections are filtered according to the traffic light information and the lane information, to obtain a target traffic light group matched with the current traffic intersection, and each lane of the current traffic intersection is associated with a matched traffic light in the target traffic light group. Through the recognition of the traffic light information and the lane information of the current traffic intersection, the traffic signal lights of non-current vehicle driving roads and non-current intersections can be effectively filtered, and the technical problem of inaccurate association between the traffic light and the lane in the related art is solved.
[0060] In one embodiment of the present embodiment, identifying traffic light information and lane information of the vehicle at the current traffic intersection includes: acquiring a visual image collected by the vehicle at the current traffic intersection; establishing a vehicle body coordinate system with the center point of the vehicle as the origin in the visual image; abstracting each traffic light as a point and each lane as a lane center line in the visual image, and acquiring the point coordinates of each traffic light and the point cloud coordinates of each lane center line in the vehicle body coordinate system; configuring first attribute information of each traffic light, and configuring second attribute information of each lane; determining the first attribute information and the point coordinates of all traffic lights as the traffic light information, and determining the point cloud coordinates and the second attribute information of all lanes as the lane information.
[0061] In the present embodiment, in addition to determining the traffic light information based on the visual image collected by the camera of the vehicle, the traffic information transmitted by the roadside equipment (such as the traffic signal pole) or the city police system can be further combined to obtain the final traffic light information. The lane information can also be combined with the lane information in the map information of the current position and the visual image collected by the vehicle camera to obtain the final accurate lane information.
[0062] In the present embodiment, the positions of the traffic signal and the lane are both in a three-dimensional Cartesian coordinate system, each signal position is represented as a point in a three-dimensional space, and each lane is abstracted as a lane center line represented by continuous points. The origin (0, 0, 0) of the coordinate system is the center of the rear axle of the vehicle, forming a vehicle body coordinate system. The X direction is the forward direction of the vehicle, the Y direction is perpendicular to the X direction and points to the left side (i.e., left positive and right negative), and the Z direction is perpendicular to the ground and points to the sky. Figure 4 FIG. 1 is a schematic diagram of the vehicle body coordinate system in the present embodiment.
[0063] The perception information obtained by the vehicle in the present embodiment is collected by a visual sensor, which can include two front-view cameras, four surround-view cameras, and one rear-view camera. After the input image is processed by a model and other algorithm modules, traffic signal input (point coordinates of the traffic light) and lane input (point cloud coordinates of the lane center line) in the vehicle body coordinate system are obtained.
[0064] In one example, configuring the first attribute information of each traffic light includes: for each traffic light, configuring the following first attribute information: traffic light ID, control type, wherein the control type is used to indicate the lane type and the passing direction controlled by the traffic light.
[0065] The traffic signal in the embodiment has attribute information such as ID, position, orientation, control type and color. The ID is the unique digital identifier of a signal lamp in the current frame of input, because there can be multiple sets of traffic lights in a frame of input; the three-dimensional position is the spatial coordinate in the vehicle coordinate system, identified by X-Y-Z; the control type attribute refers to the traffic direction or shape controlled by the traffic signal, such as the round traffic light in reality, which generally controls straight, left turn, U-turn and other traffic behaviors at a simple intersection, and at a complex intersection, each light in a set of traffic lights independently controls straight, left turn, U-turn or right turn. In the present application, the traffic signal control type is defined as follows: round light, straight light, left turn light, right turn light, U-turn light, pedestrian light, non-motor vehicle light, timing light, left turn and U-turn light, straight and left turn light, straight and right turn light, prohibited passing light, and allowed passing light. The color attribute is green, red and yellow.
[0066] In one example, configuring the second attribute information of each lane includes: for each lane, configuring the following second attribute information: lane ID, and traffic type, wherein the traffic type is used to indicate the lane type and the traffic direction of the lane guide.
[0067] The lane in the embodiment is represented by a lane center line, which is composed of point clouds, and has attributes such as ID, position and traffic type. The ID is the unique digital identifier of each lane in a set of lanes. The position is the coordinate of the lane center line point cloud. The traffic type indicates the lane type, including motor lane, pedestrian lane and non-motor lane, and the traffic direction of the lane guide, including the following: straight, right turn, right turn and straight, left turn, left turn and straight, left turn and right turn, U-turn, straight and U-turn, left turn and U-turn, straight, left turn and right turn, straight, left turn and U-turn, U-turn and right turn, left merging, right merging, prohibited left turn, prohibited right turn, prohibited U-turn, prohibited straight, prohibited left merging and prohibited right merging.
[0068] In one embodiment of the present embodiment, filtering traffic lights of non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection includes: filtering traffic lights of non-motor lanes and pedestrian lanes from all traffic light sets to obtain a first traffic light set for controlling motor lanes; clustering the first traffic light set according to spatial positions to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road segment, and a road segment includes a plurality of lanes in the same direction; calculating the centroid positions of each traffic light group; and filtering traffic light groups of non-current traffic intersections from the plurality of traffic light groups according to the centroid positions and the lane information to obtain a target traffic light group matched with the current traffic intersection.
[0069] The center of mass position of the embodiment is the center position of the traffic light group, and the center of mass position is a three-dimensional coordinate point in the vehicle coordinate system. Alternatively, the center of mass position can also be the center position of the geometric shape of the traffic light group, or the feature point position of the key feature (such as the circular light in the traffic light group) of the traffic light group.
[0070] Since the automatic driving vehicle has a wide field of view, the detected traffic lights can contain traffic lights controlling the roads in other directions at the intersection, and traffic lights at the next intersection can be detected, which should not be associated with the road in the driving direction of the vehicle and need to be checked and filtered. The filtering of the embodiment includes: filtering out the lights controlling non-motor vehicles or sidewalks in advance. For the lights controlling vehicles, first, all the traffic lights are subjected to spatial position-based clustering processing, and the traffic lights are grouped, and each group of lights controls the lanes of a certain road direction; for the clustering grouping result, the center of mass coordinates of each group of lights are calculated. Then filter the lights on the Y direction (the driving direction of the vehicle) of the intersection, that is, the lights on the transverse road, calculate the average distance from the center of mass coordinates to the center lines of the lanes, that is, the distance from the point to the straight line, obtain a group of lights with the smallest distance, and for other light groups, if the distance is more than five meters larger than the minimum distance, filter them out, and for the light group within five meters of the minimum distance, keep it, which can be considered as the light of the next intersection in the X direction. Next, filter the lights on the X direction (perpendicular to the driving direction of the vehicle), and calculate and select the light group with the smallest distance to the vehicle, and finally obtain a group of target traffic lights.
[0071] In one example, filtering the traffic light groups of non-current traffic intersection from the plurality of traffic light groups according to the center of mass position and the lane information to obtain a target traffic light group matched with the current traffic intersection includes: calculating, for each traffic light group in the plurality of traffic light groups, an average distance from the center of mass position to all lane center lines, wherein the lane information includes the lane center lines; selecting a traffic light group set with an average distance less than a first preset distance; calculating, for each traffic light group in the traffic light group set, a distance from the center of mass position to the vehicle; and selecting, from the traffic light group set, a target traffic light group with the smallest distance.
[0072] Alternatively, when filtering the transverse traffic light group, in addition to calculating the average distance from the center of mass position to all lane center lines, the orientation of the traffic light group can also be used for filtering, and the traffic light group set opposite to the vehicle is retained, and the traffic light group with the same orientation as the vehicle is filtered.
[0073] Figure 5 The flowchart of traffic light filtering in the embodiment of the application includes the following steps:
[0074] If there are multiple traffic lights, according to the coordinates of the traffic lights, spatial position-based clustering processing is performed to obtain different groups; the centroid coordinates of each group of traffic lights are calculated, and the centroid coordinates can represent the average position of the group of traffic lights; an effective lane on a vehicle driving road is selected, and multiple lanes are selected to represent the road; the distance in the Y direction is less than twenty meters, and the distance in the X direction is less than sixty meters; the straight line of each lane is calculated, and the two points in the lane center line that are closer to the stop line are selected to represent the straight line of the lane; the distance from the centroid coordinates of the traffic light to each lane is calculated, and the average distance is finally calculated; according to the average distance from the traffic light group to the lane, the Y-direction lights are filtered to obtain the traffic lights of the current road section; according to the group of lights with the minimum distance obtained, if the distance of other light groups is more than five meters greater than the minimum distance, the light groups are filtered out, and if the distance of the light groups is within five meters of the minimum distance, the light groups are retained, which can be considered as the lights of the next intersection in the X direction; the lights in the X direction are filtered to obtain the traffic lights of the current traffic intersection, and currently, the light group with the minimum distance from the centroid of the light group to the vehicle can be directly selected; the best group of traffic signal lights (target traffic light group) is obtained.
[0075] Optionally, the calculating the average distance from the centroid position to all lane center lines comprises: calculating the lateral distance from all lanes to the vehicle, and calculating the longitudinal distance from all lanes to the vehicle; selecting a plurality of adjacent lanes from all lanes, wherein the lateral distance is less than a first threshold value, and the longitudinal distance is less than a second threshold value; for each adjacent lane, selecting two lane points in the lane center line that are closer to the stop line; calculating the minimum distance from the centroid position to the straight line on which the two lane points are located; and calculating the average of the minimum distances of all adjacent lanes to obtain the average distance.
[0076] In the process of filtering the traffic lights, multiple lanes are selected to calculate the average distance from the traffic lights to the lanes. Based on the vehicle body coordinate system, the vehicle driving direction is the X direction, and the Y direction is perpendicular to the vehicle driving direction. According to the road width, the lanes with a lateral distance less than twenty meters (first threshold value) in the Y direction can be selected, and the lanes with a longitudinal distance less than sixty meters (second threshold value) in the X direction can be selected, so as to obtain multiple lanes. For each lane, a straight line equation needs to be constructed, and two lane points in the lane center line that are closer to the stop line are selected. A straight line is generated by fitting the two lane points, which is used to represent the straight line of the lane. The minimum projection distance (perpendicular distance) from the centroid position of each traffic light group to the straight line is calculated, which further supports the calculation of the distance from the light to the lane center line. The reason for selecting the two points closer to the stop line is that the road may be curved within a certain distance before the intersection.
[0077] In one embodiment of the present embodiment, the binding of each traffic light of the target traffic light group to a matching lane comprises: classifying all lanes according to traffic types, and sorting the classified lane classes in a longitudinal direction to obtain a first sequence; classifying the target traffic light group according to control types, and sorting the grouped traffic light classes in a longitudinal direction to obtain a second sequence; and associating each lane of the current traffic intersection to a matching traffic light in the target traffic light group by using the first sequence and the second sequence.
[0078] After obtaining a set of target traffic light groups, the control types of each traffic light in the target traffic light group are classified based on the control range and function of the light group in the traffic light information, and the traffic types of the lanes are classified according to the guide lines on the lanes. According to traffic laws and regulations, for the case of only one round light, the light controls all lanes in the intersection except for right turns, i.e. the round light control range is expanded to U-turn, left turn, and straight ahead; if there is no U-turn light in a group of lights, the U-turn light is expressed by a left turn light, i.e. the left turn light control range is expanded to left turn and U-turn, and if there is also no left turn light, the U-turn is expressed by a straight ahead light, which also expresses control of the left turn, i.e. the straight ahead light expands the control range to U-turn, left turn, and straight ahead. Figure 6 A lane and traffic signal light diagram is provided for the present embodiment, and the target traffic light group has only round lights; Figure 7 Another lane and traffic signal light diagram is provided for the present embodiment, and the target traffic light group includes U-turn, left turn, right turn, and straight ahead traffic lights; Figure 8 Another lane and traffic signal light diagram is provided for the present embodiment, and the target traffic light group includes left turn and straight ahead lights.
[0079] In some intersections, there is no right turn traffic light, so a traffic light for controlling right turn is added to the target traffic light group, and the signal color is always green.
[0080] In one example, the association of each lane of the current traffic intersection to a matching traffic light in the target traffic light group by using the first sequence and the second sequence comprises: for each lane class in the first sequence, selecting a traffic light class with the same element position in the second sequence; determining whether the number of elements in the second sequence is equal to the number of elements in the first sequence; and if the number of elements in the second sequence is equal to the number of elements in the first sequence, binding the lane ID of each lane class in the first sequence to the traffic light ID of the traffic light class with the same element position.
[0081] The same type of lane is put into a group, and is sorted according to the value of Y direction, so as to ensure the consistency with the actual space position. The same processing is also made for traffic lights, that is, the same type of traffic light is put into a group, and is sorted according to the value of Y direction, so as to ensure the consistency with the actual space position.
[0082] In one implementation scenario in this example, the first sequence includes three elements: left-turn lane 1; straight lane 2, straight lane 3; right-turn lane 4, and lane 2 and lane 3 are of the same lane class, and the second sequence also includes three elements: left-turn traffic light 1; straight traffic light 2; right-turn traffic light 3. In the matching binding, the left-turn lane 1 is bound to the left-turn traffic light 1, the straight lane 2 and the straight lane 3 are both bound to the straight traffic light 2, and the right-turn lane 4 is bound to the right-turn traffic light 3.
[0083] In another example, after judging whether the number of elements in the second sequence and the number of elements in the first sequence are equal, it further includes: if the number of elements in the second sequence and the number of elements in the first sequence are not equal, calculating the distance between each lane in the first sequence and each traffic light in the second sequence; and binding the lane ID of each lane in the first sequence to the traffic light ID of the target traffic light with the minimum distance.
[0084] In one implementation scenario in this example, the number of elements in the second sequence and the number of elements in the first sequence are not equal, for example, the first sequence includes three elements: left-turn lane 1; straight lane 2, straight lane 3; right-turn lane 4, and lane 2 and lane 3 are of the same lane class, and the second sequence includes four elements: left-turn traffic light 1; straight left-turn traffic light 2; straight traffic light 3; right-turn traffic light 4. Then, according to the distance, the target traffic light with the minimum distance from the current lane is bound to the current lane.
[0085] Figure 9 The flowchart for the association of traffic lights and lanes in the embodiments of the present application includes: setting the control range of each light according to the number and type of traffic signal groups; grouping the lane types and sorting them according to the spatial position; grouping the traffic light types and sorting them according to the spatial position; traversing all lane groups and associating them with traffic lights: judging whether the types match; if the types match successfully, judging whether the number of lanes and the number of traffic lights are equal; if the numbers are equal, associating them one by one according to the positional relationship; if the numbers are not equal, associating each lane with the light with the closest distance; and obtaining the association relationship between all lanes and traffic lights.
[0086] In one application scenario of the embodiment, after associating each lane of the current traffic intersection to a matching traffic light in the target traffic light group, the method further comprises: determining a target lane where the vehicle is currently located; searching for a target traffic light corresponding to the target lane; and generating a passing instruction of the vehicle at the current traffic intersection according to a color of the target traffic light, wherein the passing instruction is used to indicate whether the vehicle is allowed to pass through the current traffic intersection.
[0087] By using the scheme of the embodiment, in view of the needs of urban automatic driving and the deficiencies of the prior art, the application provides a lane-associated traffic light method applied to automatic driving, which uses real-time perception data collected by a vehicle vision sensor, including traffic signals and lanes and lane attributes, to realize an automatic, efficient and correct lane-traffic signal association. The application can effectively deal with various unstructured intersection scenarios, including simple intersections, complex intersections, roundabouts, etc., and can effectively filter traffic signals that are not on the current vehicle driving road and not at the current traffic intersection, thereby ensuring that the vehicle can comply with traffic rules and safely and efficiently drive through the intersection.
[0088] The scheme of the embodiment does not rely on devices in the environment, effectively solves the problem of associating traffic lights with lanes at intersections, and provides a necessary prerequisite for the vehicle to safely and efficiently drive through the intersection while complying with traffic rules.
[0089] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a necessary general hardware platform, and of course, it can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods described in the various embodiments of the application.
[0090] Embodiment 2
[0091] In the embodiment, a lane-traffic light association device is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.
[0092] Figure 10is a structural block diagram of a lane and traffic light association device according to an embodiment of the present application, as shown in the figure, the device comprises: Figure 10
[0093] an identification module 100, configured to identify traffic light information and lane information of a current traffic intersection of a vehicle;
[0094] a filtering module 102, configured to filter traffic lights of non-current traffic intersections according to the traffic light information and the lane information, to obtain a target traffic light group matched with the current traffic intersection;
[0095] an association module 104, configured to associate each lane of the current traffic intersection to a matched traffic light in the target traffic light group.
[0096] Optionally, the identification module comprises: a first acquisition unit, configured to acquire a visual image collected by the vehicle at the current traffic intersection; a construction unit, configured to construct a vehicle body coordinate system with a center point of the vehicle as an origin in the visual image; a first acquisition unit, configured to abstract each traffic light as a point and each lane as a lane center line in the visual image, and acquire point coordinates of each traffic light and point cloud coordinates of each lane center line in the vehicle body coordinate system; a configuration unit, configured to configure first attribute information of each traffic light and second attribute information of each lane; and a determination unit, configured to determine the first attribute information and the point coordinates of all traffic lights as the traffic light information, and determine the point cloud coordinates and the second attribute information of all lanes as the lane information.
[0097] Optionally, the configuration unit comprises: a first configuration sub-unit, configured to configure the following first attribute information for each traffic light: a traffic light ID and a control type, wherein the control type is used to indicate a lane type and a passing direction controlled by the traffic light.
[0098] Optionally, the configuration unit comprises: a second configuration sub-unit, configured to configure the following second attribute information for each lane: a lane ID and a passing type, wherein the passing type is used to indicate a lane type and a passing direction guided by the lane.
[0099] Optionally, the associating module comprises: a first filtering unit, configured to filter traffic lights of non-motor vehicle lanes and sidewalks from all traffic light sets to obtain a first traffic light set for controlling motor vehicle lanes; a clustering unit, configured to cluster the first traffic light set according to spatial positions to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road segment, and a road segment comprises a plurality of lanes in the same direction; a calculation unit, configured to calculate a centroid position of each traffic light group; and a second filtering unit, configured to filter traffic light groups of non-current traffic intersections from the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection.
[0100] Optionally, the second filtering unit comprises: a first calculation sub-unit, configured to calculate, for each traffic light group in the plurality of traffic light groups, an average distance from the centroid position to all lane center lines, wherein the lane information comprises the lane center lines; a first selection sub-unit, configured to select a traffic light group set with an average distance less than a first preset distance; a second calculation sub-unit, configured to calculate, for each traffic light group in the traffic light group set, a distance from the centroid position to the vehicle; and a second selection sub-unit, configured to select, from the traffic light group set, a target traffic light group with a minimum distance.
[0101] Optionally, the first calculation sub-unit is further configured to: calculate a lateral distance of all lanes to the vehicle, and calculate a longitudinal distance of all lanes to the vehicle; select, from all lanes, a plurality of adjacent lanes with a lateral distance less than a first threshold value and a longitudinal distance less than a second threshold value; select, for each adjacent lane, two lane points in a lane center line close to a stop line; calculate a minimum distance from the centroid position to a straight line on which the two lane points are located; and calculate an average value of the minimum distances of all adjacent lanes to obtain an average distance.
[0102] Optionally, the associating module comprises: a classification unit, configured to classify all lanes according to a passing type, and sort a plurality of lane classes after classification in a longitudinal direction to obtain a first sequence, and classify the target traffic light group according to a control type, and sort a plurality of traffic light classes after classification in the longitudinal direction to obtain a second sequence; and an associating unit, configured to associate each lane of the current traffic intersection to a matched traffic light in the target traffic light group by using the first sequence and the second sequence.
[0103] Optionally, the associating unit comprises: a selecting subunit, configured to select, for each lane class in the first sequence, a traffic light class with the same element position in the second sequence; a judging subunit, configured to judge whether the number of elements in the second sequence is equal to the number of elements in the first sequence; and a first associating subunit, configured to, if the number of elements in the second sequence is equal to the number of elements in the first sequence, bind the lane ID of each lane class in the first sequence to the traffic light ID of the traffic light class with the same element position.
[0104] Optionally, the associating unit further comprises: a calculating subunit, configured to, after the judging subunit judges whether the number of elements in the second sequence is equal to the number of elements in the first sequence, calculate the distance between each lane in the first sequence and each traffic light in the second sequence if the number of elements in the second sequence is not equal to the number of elements in the first sequence; and a second associating subunit, configured to bind the lane ID of each lane in the first sequence to the traffic light ID of the target traffic light with the minimum distance.
[0105] Optionally, the device further comprises: an associating module, configured to, after the associating module associates each lane of the current traffic intersection to the matching traffic light in the target traffic light group, determine a target lane where the vehicle is currently located; a searching module, configured to search for a target traffic light corresponding to the target lane; and a generating module, configured to generate a passing instruction of the vehicle at the current traffic intersection according to the color of the target traffic light, wherein the passing instruction is used to indicate whether the vehicle is allowed to pass through the current traffic intersection.
[0106] It should be noted that the above various modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above modules are located in the same processor; or the above various modules are located in different processors in any combination.
[0107] Embodiment 3
[0108] The embodiments of the present application also provide a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0109] Optionally, in the present embodiment, the above storage medium can be configured to store a computer program for executing the following steps:
[0110] S1, identifying traffic light information and lane information of a vehicle at a current traffic intersection;
[0111] S2, filtering traffic lights of non-current traffic intersection according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection;
[0112] S3, associating each lane of the current traffic intersection to the matched traffic light in the target traffic light group.
[0113] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk and various computer program storage media.
[0114] The embodiment of the application further provides an electronic device including a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
[0115] Optionally, the electronic device can further include a transmission device and an input-output device, wherein the transmission device is connected with the processor, and the input-output device is connected with the processor.
[0116] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program:
[0117] S1, identifying traffic light information and lane information of a vehicle at a current traffic intersection;
[0118] S2, filtering traffic lights of non-current traffic intersection according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection;
[0119] S3, associating each lane of the current traffic intersection to the matched traffic light in the target traffic light group.
[0120] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here.
[0121] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment.
[0122] Those skilled in the art can clearly understand the implementation of the embodiments by the description of the above embodiments. The embodiments can be implemented by means of software plus a general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0123] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has", "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described unless specifically indicated as such. It is also to be understood that additional or alternative steps can be employed.
[0124] The above description is merely that of specific embodiments of the present application, and thus is not intended to limit the present application. From the above description, one skilled in the art can clearly understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the application. Accordingly, the present application is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of associating a lane and a traffic light, characterized by, The method comprises the following steps: identifying traffic light information and lane information of a vehicle at a current traffic intersection; filtering traffic lights of non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection; associating each lane of the current traffic intersection with a matched traffic light in the target traffic light group; wherein filtering traffic lights of non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection comprises: filtering traffic lights of non-motor vehicle lanes and sidewalks from all traffic light sets to obtain a first traffic light set for controlling motor vehicle lanes; clustering the first traffic light set according to spatial positions to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road segment, and a road segment comprises a plurality of lanes in the same direction; calculating a centroid position of each traffic light group; filtering traffic light groups of non-current traffic intersections from the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection; wherein filtering traffic light groups of non-current traffic intersections from the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection comprises: for each traffic light group in the plurality of traffic light groups, calculating an average distance from the centroid position to all lane centerlines, wherein the lane information comprises the lane centerlines; selecting a traffic light group set with an average distance less than a first preset distance; for each traffic light group in the traffic light group set, calculating a distance from the centroid position to the vehicle; selecting a target traffic light group with the smallest distance from the traffic light group set; wherein calculating the average distance from the centroid position to all lane centerlines comprises: calculating a lateral distance from all lanes to the vehicle, and calculating a longitudinal distance from all lanes to the vehicle; selecting a plurality of adjacent lanes with a lateral distance less than a first threshold value and a longitudinal distance less than a second threshold value from all lanes; for each adjacent lane, selecting two lane points in the lane centerline close to a stop line; calculating a minimum distance from the centroid position to a straight line passing through the two lane points; calculating an average value of the minimum distances of all adjacent lanes to obtain the average distance.
2. The method of claim 1, wherein, The method comprises the following steps: acquiring a visual image collected by the vehicle at the current traffic intersection; establishing a vehicle body coordinate system with a center point of the vehicle as an origin in the visual image; abstracting each traffic light as a point and each lane as a lane centerline in the visual image, and acquiring point coordinates of each traffic light and point cloud coordinates of each lane centerline in the vehicle body coordinate system; configuring first attribute information of each traffic light and second attribute information of each lane; determining the first attribute information and the point coordinates of all traffic lights as the traffic light information, and determining the point cloud coordinates and the second attribute information of all lanes as the lane information.
3. The method of claim 2, wherein, The method comprises the following steps: configuring first attribute information of each traffic light comprises: For each traffic light, the following first attribute information is configured: traffic light ID, control type, wherein the control type is used to indicate the lane type and the passing direction of traffic light control.
4. The method of claim 2, wherein, The second attribute information of each lane is configured, including: For each lane, the following second attribute information is configured: lane ID, passing type, wherein the passing type is used to indicate the lane type and the passing direction of lane guidance.
5. The method of claim 1, wherein, Binding each traffic light of the target traffic light group to the matching lane includes: Classifying all lanes according to the passing type, and sorting the classified lane classes in the longitudinal direction to obtain a first sequence, and classifying the target traffic light group according to the control type, and sorting the classified traffic light classes in the longitudinal direction to obtain a second sequence; Associating each lane of the current traffic intersection to the matching traffic light in the target traffic light group by using the first sequence and the second sequence.
6. The method of claim 5, wherein, Associating each lane of the current traffic intersection to the matching traffic light in the target traffic light group by using the first sequence and the second sequence includes: For each lane class in the first sequence, selecting a traffic light class with the same element position in the second sequence; Judging whether the number of elements in the second sequence and the number of elements in the first sequence are equal; If the number of elements in the second sequence and the number of elements in the first sequence are equal, binding the lane ID of each lane class in the first sequence to the traffic light ID of the traffic light class with the same element position.
7. The method of claim 6, wherein, After judging whether the number of elements in the second sequence and the number of elements in the first sequence are equal, the method further includes: If the number of elements in the second sequence and the number of elements in the first sequence are not equal, calculating the distance between each lane in the first sequence and each traffic light in the second sequence; Binding the lane ID of each lane in the first sequence to the traffic light ID of the target traffic light with the minimum distance.
8. The method of claim 5, wherein, After associating each lane of the current traffic intersection to the matching traffic light in the target traffic light group, the method further includes: Determining the target lane where the vehicle is currently located; Finding the target traffic light corresponding to the target lane; Generating a passing instruction of the vehicle at the current traffic intersection according to the color of the target traffic light, wherein the passing instruction is used to indicate whether the vehicle is allowed to pass through the current traffic intersection.
9. A lane and traffic light association apparatus, characterized by, Including: An identification module is configured to identify traffic light information and lane information of a vehicle at a current traffic intersection; A filtering module is configured to filter traffic lights of non-current traffic intersections according to the traffic light information and the lane information to obtain a target traffic light group matched with the current traffic intersection; An association module is configured to associate each lane of the current traffic intersection to the matching traffic light in the target traffic light group. The association module comprises: a first filtering unit configured to filter traffic lights of non-motor vehicle lanes and sidewalks from all traffic light sets to obtain a first traffic light set for controlling motor vehicle lanes; a clustering unit configured to cluster the first traffic light set according to spatial positions to obtain a plurality of traffic light groups, wherein each traffic light group corresponds to a road segment, and one road segment comprises a plurality of lanes in the same direction; a calculation unit configured to calculate a centroid position of each traffic light group; and a second filtering unit configured to filter traffic light groups of non-current traffic intersections from the plurality of traffic light groups according to the centroid position and the lane information to obtain a target traffic light group matched with the current traffic intersection; the second filtering unit comprises: a first calculation subunit configured to calculate, for each traffic light group in the plurality of traffic light groups, an average distance from the centroid position to all lane centerlines, wherein the lane information comprises the lane centerlines; a first selection subunit configured to select a traffic light group set with an average distance less than a first preset distance; a second calculation subunit configured to calculate, for each traffic light group in the traffic light group set, a distance between the centroid position and the vehicle; and a second selection subunit configured to select, from the traffic light group set, a target traffic light group with the smallest distance.
10. A storage medium, characterized by The storage medium stores a computer program, wherein the computer program is configured to execute the method in any one of claims 1 to 8 when running. 11.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the computer program to execute the method in any one of claims 1 to 8.
Citation Information
Patent Citations
Traffic light control method and optimal vehicle speed determination method
CN108629971A
Allocation of traffic light to associated lanes
CN110634284A