Method and device for determining period duration of traffic light, electronic equipment and system
By identifying and analyzing the position and status information in the traffic light image, the period length of the traffic light is calculated, and sent to the vehicle through V2X technology, the problem of large traffic light cycle error in the existing technology is solved, and high-precision unmanned vehicle navigation route planning is achieved.
Patent Information
- Application Number
- CN202311616531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-06-06
AI Technical Summary
The existing traffic light cycle mining method is based on the behavior of the user's vehicle, resulting in large cycle errors, making it difficult to meet the speed planning needs of high-precision unmanned vehicles.
By obtaining the traffic light images collected by the current base station, identifying the traffic light position information and status information, recording the status information switching time of each type of traffic light, calculating the cycle time of various types of traffic lights, and sending it to the vehicle through V2X technology.
It realizes periodic mining with high real-time performance and high cycle time determination accuracy, reduces dynamic interference factors, and improves the navigation route planning accuracy of driverless vehicles.
Smart Images

Figure CN120108170A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of traffic light cycle mining, and in particular, relates to a method, device, electronic equipment and system for determining the cycle duration of a traffic light. Background Art
[0002] Providing accurate waiting time for traffic lights to vehicles during driving helps vehicles make driving decisions during driving and also helps generate the best navigation route. Existing traffic light cycle mining methods are based on the behavior of user vehicles, resulting in large errors in the obtained cycles, which will cause large errors in the high-precision planning speed of unmanned vehicles. Therefore, it is urgent to provide a method for determining the cycle duration of traffic lights to achieve cycle mining with high real-time performance and high cycle duration determination accuracy. Summary of the invention
[0003] The embodiments of the present application provide a method, device, electronic device and system for determining the cycle duration of a traffic light, which can achieve cycle mining with high real-time performance and high cycle duration determination accuracy.
[0004] In a first aspect, an embodiment of the present application provides a method for determining a cycle duration of a traffic light, the method for determining a cycle duration comprising:
[0005] Get the traffic light image collected by the current base station;
[0006] According to the traffic light image, identifying the traffic light position information and corresponding status information in the traffic light image;
[0007] According to the corresponding state information of the traffic light at each position in the traffic light image, recording the switching time of the corresponding state information of each type of traffic light;
[0008] According to the switching time, the cycle duration of various traffic lights at the intersection where the current base station is located is determined.
[0009] In a possible implementation manner of the first aspect, the method for determining a cycle duration further includes:
[0010] When a vehicle is detected passing through the current base station, the switching time of each type of traffic light is determined according to the cycle length of each type of traffic light and the time when the vehicle passes through the current base station;
[0011] The switching time of various traffic lights is sent to the vehicle through the base station and V2X, so that the vehicle can determine the switching time of the target traffic light according to the switching time of various traffic lights and the current driving lane.
[0012] In a possible implementation manner of the first aspect, determining, according to the switching time, the cycle durations of various types of traffic lights at the intersection where the current base station is located includes:
[0013] According to the switching time corresponding to each type of traffic light, the target cycle of each type of traffic light is calculated;
[0014] According to the calculated target period for the cyclic display of each type of traffic light, the cycle duration of each type of traffic light at the intersection where the current base station is located is determined.
[0015] In a possible implementation of the first aspect, calculating a target period for cyclic display of each type of traffic light according to the switching time corresponding to each type of traffic light includes:
[0016] Extract the switching time corresponding to each type of traffic light;
[0017] For any type of traffic lights, the time when the yellow light switches to the red light is determined in sequence as the first switching time, the time when the red light switches to the green light is determined as the second switching time, the time when the green light switches to the yellow light is determined as the third switching time, and the time when the next yellow light switches to the red light is determined as the fourth switching time;
[0018] The average duration of the total durations of all first switching times to fourth switching times within the target time period is determined as the target cycle of the traffic light of this type.
[0019] In a possible implementation manner of the first aspect, the method for determining a cycle duration further includes:
[0020] Determine the average value of the difference between all the second switching times and the first switching times within the target time period as the red light cycle length;
[0021] Determine the average value of the difference between all the third switching times and the second switching times within the target time period as the green light cycle length;
[0022] An average value of the differences between all fourth switching times and the third switching times within the target time period is determined as the yellow light cycle duration.
[0023] In a possible implementation of the first aspect, the target time period is divided according to the congestion situation of the driving environment; or the target time period is evenly divided according to the target duration; the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in different time periods are the same or different.
[0024] In a possible implementation manner of the first aspect, the method for determining a cycle duration further includes:
[0025] According to the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in each target time period of a day, the operating cycle pattern of each type of traffic light in each target time period is determined.
[0026] In a possible implementation manner of the first aspect, recording, according to the corresponding state information of the traffic light at each position in the traffic light image, the switching time of the corresponding state information of each type of traffic light includes:
[0027] According to the traffic light at each position in the traffic light image, determining the category to which each traffic light in the traffic light image belongs;
[0028] According to the category and corresponding status information of each traffic light in the traffic light image, determining corresponding status information of each type of traffic light;
[0029] Based on the corresponding status information of each type of traffic light, the switching time of the corresponding status information of each type of traffic light is recorded.
[0030] In a possible implementation manner of the first aspect, the category of the traffic light includes at least one of a straight-ahead light, a left-turn light, and a right-turn light.
[0031] In a possible implementation manner of the first aspect, the current base station includes an image acquisition device, and acquiring a traffic light image acquired by the current base station includes:
[0032] Control the current base station to collect the traffic light image at the intersection where the current base station is located through the image acquisition device;
[0033] Receive the traffic light image of the intersection where the current base station is located, which is captured by the image capture device.
[0034] In a possible implementation manner of the first aspect, identifying, according to the traffic light image, traffic light position information and corresponding state information in the traffic light image includes:
[0035] The traffic light image is input into the target detection network, which outputs the location information and corresponding status information of each traffic light; the target detection network is trained based on multiple sampled traffic light images.
[0036] In a second aspect, an embodiment of the present application provides a device for determining a cycle duration of a traffic light, wherein the device for determining a cycle duration of a traffic light comprises:
[0037] An acquisition module is used to acquire the traffic light image collected by the current base station;
[0038] A recognition module, used for recognizing the traffic light position information and corresponding status information in the traffic light image according to the traffic light image;
[0039] A recording module, used for recording the switching time of the corresponding state information of each type of traffic light according to the corresponding state information of the traffic light at each position in the traffic light image;
[0040] The duration determination module is used to determine the cycle duration of various traffic lights at the intersection where the current base station is located according to the switching time.
[0041] In a possible implementation manner of the second aspect, the apparatus for determining a cycle duration further includes:
[0042] A detection module, for determining the switching time of various traffic lights according to the cycle length of various traffic lights and the time when the vehicle passes the current base station when detecting that the vehicle passes the current base station;
[0043] The switching time sending module is used to send the switching time of various traffic lights to the vehicle through the base station and V2X, so that the vehicle can determine the switching time of the target traffic light according to the switching time of various traffic lights and the current driving lane.
[0044] In a possible implementation manner of the second aspect, the duration determination module includes:
[0045] A first calculation unit is used to calculate a target period for cyclic display of each type of traffic light according to the switching time corresponding to each type of traffic light;
[0046] The first determining unit is used to determine the cycle duration of each type of traffic light at the intersection where the current base station is located according to the calculated target cycle of the cyclic display of each type of traffic light.
[0047] In a possible implementation manner of the second aspect, the first computing unit is configured to:
[0048] Extract the switching time corresponding to each type of traffic light;
[0049] For any type of traffic lights, the time when the yellow light switches to the red light is determined in sequence as the first switching time, the time when the red light switches to the green light is determined as the second switching time, the time when the green light switches to the yellow light is determined as the third switching time, and the time when the next yellow light switches to the red light is determined as the fourth switching time;
[0050] The average duration of the total durations of all first switching times to fourth switching times within the target time period is determined as the target cycle of the traffic light of this type.
[0051] In a possible implementation manner of the second aspect, the apparatus for determining a cycle duration further includes:
[0052] A second determining unit, configured to determine an average value of the difference between all second switching times and the first switching times within the target time period as the red light cycle length;
[0053] A third determining unit, configured to determine an average value of the difference between all third switching times and the second switching times within the target time period as the green light cycle duration;
[0054] The fourth determining unit is used to determine an average value of the differences between all fourth switching times and the third switching times within the target time period as the yellow light cycle duration.
[0055] In a possible implementation of the second aspect, the target time period is divided according to the congestion situation of the driving environment; or the target time period is evenly divided according to the target duration; the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in different time periods are the same or different.
[0056] In a possible implementation manner of the second aspect, the apparatus for determining a cycle duration further includes:
[0057] The rule determination module is used to determine the operating cycle rule of each type of traffic light in each target time period according to the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in each target time period within a day.
[0058] In a possible implementation manner of the second aspect, the recording module includes:
[0059] a fifth determining unit, configured to determine the category to which each traffic light in the traffic light image belongs according to the traffic light at each position in the traffic light image;
[0060] a sixth determining unit, configured to determine corresponding status information of each type of traffic light according to the type and corresponding status information of each traffic light in the traffic light image;
[0061] The first recording unit is used to record the switching time of the corresponding state information of each type of traffic light based on the corresponding state information of each type of traffic light.
[0062] In a possible implementation manner of the second aspect, the category of the traffic light includes at least one of a straight-ahead light, a left-turn light, and a right-turn light.
[0063] In a possible implementation manner of the second aspect, the current base station includes an image acquisition device, and the acquisition module includes:
[0064] A control unit, used to control the current base station to collect a traffic light image at the intersection where the current base station is located through an image acquisition device;
[0065] The receiving unit is used to receive the traffic light image of the intersection where the current base station is located, which is acquired by the image acquisition device.
[0066] In a possible implementation manner of the second aspect, the identification module includes:
[0067] The detection unit is used to input the traffic light image into the target detection network, and the target detection network outputs the position information and corresponding status information of each traffic light; the target detection network is trained based on multiple sampled traffic light images.
[0068] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned cycle duration determination method when executing the computer program.
[0069] In a fourth aspect, an embodiment of the present application provides a system for determining a cycle duration of a traffic light, the cycle duration determination system comprising an electronic device and a plurality of base stations, the base stations being installed at a traffic light intersection, each base station corresponding to a traffic light intersection;
[0070] An electronic device, configured to execute the method according to the first aspect;
[0071] The base station is used to collect traffic light images at the intersection and send the traffic light images to the electronic device.
[0072] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the method for determining the cycle duration as described above is implemented.
[0073] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the above-mentioned method for determining the period duration.
[0074] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0075] In the embodiment of the present application, the traffic light position information and corresponding status information in the traffic light image can be identified through the traffic light image collected by the current base station, and the switching time of the corresponding status information of each type of traffic light is recorded according to the corresponding status information of the traffic light at each position in the traffic light image. According to the switching time, the cycle duration of each type of traffic light at the intersection where the current base station is located can be determined. Determining the cycle duration of the traffic light at the intersection where the base station is located based on the traffic light image collected by the base station can reduce dynamic interference factors, such as the determination of the traffic light position information, and thus achieve cycle mining with high real-time performance and high cycle duration determination accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0077] Figure 1 It is a flowchart of a method for determining the cycle duration of a traffic light provided in an embodiment of the present application;
[0078] Figure 2 is a flow chart of a method for determining a cycle duration of a traffic light provided by another embodiment of the present application;
[0079] Figure 3 It is a structural schematic diagram of a device for determining the cycle duration of a traffic light provided in one embodiment of the present application;
[0080] Figure 4 It is a structural schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0081] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0082] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0083] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0084] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0085] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0086] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0087] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0088] Providing accurate waiting time for traffic lights to vehicles during driving helps vehicles make driving decisions during driving and also helps generate the best navigation route. Existing traffic light cycle mining methods are based on the behavior of user vehicles, resulting in large errors in the obtained cycles, which will cause large errors in the high-precision planning speed of unmanned vehicles. Therefore, it is urgent to provide a method for determining the cycle duration of traffic lights to achieve cycle mining with high real-time performance and high cycle duration determination accuracy.
[0089] In order to solve the above problems, the present application provides a method for determining the cycle duration of a traffic light. Through the traffic light image collected by the current base station, the traffic light position information and corresponding status information in the traffic light image can be identified. According to the corresponding status information of the traffic light at each position in the traffic light image, the switching time of the corresponding status information of each type of traffic light is recorded. According to the switching time, the cycle duration of each type of traffic light at the intersection where the current base station is located can be determined. Determining the cycle duration of the traffic light at the intersection where the base station is located based on the traffic light image collected by the base station can reduce dynamic interference factors, such as the determination of the traffic light position information, and thus achieve cycle mining with high real-time performance and high cycle duration determination accuracy.
[0090] The following describes in detail the method, device, electronic device, system, storage medium and computer program for determining the cycle duration of a traffic light provided in the present application with reference to the accompanying drawings.
[0091] Figure 1 A schematic flow chart of a method for determining a traffic light cycle duration provided in an embodiment of the present application is shown.
[0092] Step 101, obtaining a traffic light image collected by a current base station.
[0093] It should be noted that the method for determining the cycle duration of a traffic light in the embodiment of the present application can be executed by the device for determining the cycle duration of a traffic light in the embodiment of the present application. The device for determining the cycle duration of a traffic light in the embodiment of the present application can be configured in any electronic device to execute the method for determining the cycle duration of a traffic light in the embodiment of the present application. For example, the device for determining the cycle duration of a traffic light in the embodiment of the present application can be configured in a base station to perform edge computing, so as to determine the cycle duration of the traffic light at the target intersection and send it to each vehicle passing through the target intersection through V2X (Vehicle-to-Everything).
[0094] The traffic light image may refer to a traffic light image collected by a vehicle-mounted camera or other equipment.
[0095] In an embodiment of the present application, a smart base station is installed at each intersection, and the smart base station can collect traffic light images. The electronic equipment configured in the base station can obtain the traffic light image currently collected by the base station.
[0096] In a possible implementation, the current base station includes an image acquisition device, and acquiring a traffic light image acquired by the current base station includes:
[0097] Control the current base station to collect the traffic light image at the intersection where the current base station is located through the image acquisition device;
[0098] Receive the traffic light image of the intersection where the current base station is located, which is captured by the image capture device.
[0099] In an embodiment of the present application, the image acquisition device in the current base station can collect traffic light images throughout the day to facilitate subsequent analysis of the cycle duration of the traffic light at the current intersection.
[0100] Step 102: Identify the traffic light position information and corresponding status information in the traffic light image according to the traffic light image.
[0101] In an embodiment of the present application, computer vision technology can be used to identify traffic lights in a traffic light image and extract traffic light position information and corresponding status information in the traffic light image.
[0102] Specifically, each base station can identify the traffic light position information and corresponding status information in the traffic light image based on the acquired traffic light image, wherein the traffic light position information is used to determine the category of the traffic light, and the corresponding status information is used to determine the color of the traffic light.
[0103] The category of the traffic light includes at least one of a straight-ahead light, a left-turn light, and a right-turn light.
[0104] In a possible implementation, identifying traffic light position information and corresponding state information in the traffic light image according to the traffic light image includes:
[0105] The traffic light image is input into the target detection network, which outputs the location information and corresponding status information of each traffic light; the target detection network is trained based on multiple sampled traffic light images.
[0106] Among them, the target detection network is trained based on multiple sampled traffic light images.
[0107] In the embodiment of the present application, before each traffic light image is input into the target detection network, each traffic light image may be preprocessed, that is, image size adjustment, denoising and other operations may be performed to improve the accuracy of subsequent recognition. After processing each input image, the target detection network outputs the location information and corresponding status information of each traffic light, where the location information is given in the form of a bounding box or coordinates, and the status information indicates the current status of the traffic light.
[0108] Step 103 : recording the switching time of the corresponding status information of each type of traffic light according to the corresponding status information of the traffic light at each position in the traffic light image.
[0109] In an embodiment of the present application, the switching time of the corresponding status information of each type of traffic light can be specifically recorded as: recording the switching time of the straight light from yellow to red, the switching time from red to green, the switching time from green to yellow, and the switching time of the yellow light to red again in each cycle; recording the switching time of the left turn light from yellow to red, the switching time from red to green, the switching time from green to yellow, and the switching time of the yellow light to red again in each cycle; recording the switching time of the right turn light from yellow to red, the switching time from red to green, the switching time from green to yellow, and the switching time of the yellow light to red again in each cycle.
[0110] In a possible implementation, recording the switching time of the corresponding state information of each type of traffic light according to the corresponding state information of the traffic light at each position in the traffic light image includes:
[0111] According to the traffic light at each position in the traffic light image, determining the category to which each traffic light in the traffic light image belongs;
[0112] According to the category and corresponding status information of each traffic light in the traffic light image, determining corresponding status information of each type of traffic light;
[0113] Based on the corresponding status information of each type of traffic light, the switching time of the corresponding status information of each type of traffic light is recorded.
[0114] In an embodiment of the present application, the category of the traffic light can be determined based on the traffic light position information in the traffic light image, for example, the category of the traffic light can be determined based on the image coordinates of the traffic light in the traffic light image.
[0115] The corresponding status information of each type of traffic light refers to the color status change information of each type of traffic light.
[0116] Step 104, determining the cycle duration of each type of traffic light at the intersection where the current base station is located according to the switching time.
[0117] The cycle duration of a traffic light may refer to the time required for the traffic light to pass through all states (red light, green light, yellow light) in a complete cycle.
[0118] In an embodiment of the present application, the traffic lights at each intersection may include multiple types, such as a straight-ahead light, a left-turn light, or a right-turn light. Therefore, determining the cycle duration of the traffic lights at the intersection includes determining the cycle duration of each type of traffic lights, i.e., the cycle duration of the straight-ahead light, the cycle duration of the left-turn light, and the cycle duration of the right-turn light.
[0119] The switching time may refer to the switching time of the corresponding status information of the straight-ahead light, the left-turn light and the right-turn light. The time interval is calculated based on the switching time to determine the cycle duration of various traffic lights at the intersection where the current base station is located.
[0120] In a possible implementation, the cycle durations of various traffic lights at the intersection where the current base station is located are determined according to the switching time, including:
[0121] According to the switching time corresponding to each type of traffic light, the target cycle of each type of traffic light is calculated;
[0122] According to the calculated target period for the cyclic display of each type of traffic light, the cycle duration of each type of traffic light at the intersection where the current base station is located is determined.
[0123] For example, a cycle is straight ahead - right turn - left turn - straight ahead. Assuming that the switching time corresponding to the straight ahead light switching to the right turn light is the first time, the switching time corresponding to the right turn light switching to the left turn light is the second time, and the switching time corresponding to the left turn light switching to the straight ahead light is the third time, then the target cycle of the straight ahead light cyclic display can be obtained as: the time difference between the first time and the time when the left turn light switches to the straight ahead light in the previous cycle, the target cycle of the right turn light cyclic display is the time difference between the second time and the first time, and the target cycle of the left turn light cyclic display is the time difference between the third time and the second time. Then, according to the corresponding time difference, the cycle length of each type of traffic light at the current intersection can be determined.
[0124] In a possible implementation, according to the switching time corresponding to each type of traffic light, the target period of cyclic display of each type of traffic light is calculated, including:
[0125] Extract the switching time corresponding to each type of traffic light;
[0126] For any type of traffic lights, the time when the yellow light switches to the red light is determined in sequence as the first switching time, the time when the red light switches to the green light is determined as the second switching time, the time when the green light switches to the yellow light is determined as the third switching time, and the time when the next yellow light switches to the red light is determined as the fourth switching time;
[0127] The average duration of the total durations of all first switching times to fourth switching times within the target time period is determined as the target cycle of the traffic light of this type.
[0128] In the embodiment of the present application, the cycle duration of each type of traffic light can be determined by extracting the state switching time of each type of traffic light.
[0129] Specifically, taking the straight light as an example, when the straight light is identified to switch from yellow to red, the current time is recorded as the first switching time t1, when the red light is identified to switch from green, the current time is recorded as the second switching time t2, when the green light is identified to switch from yellow, the current time is recorded as the third switching time, and when the yellow light is identified to switch from red again, the current time is recorded as the fourth switching time t4. This is a cycle, and the cycle length is t4-t1.
[0130] And since the set duration of the cycle in different time periods may be different, for example, the morning rush hour and evening rush hour cycles are shorter, and other time cycles are longer, the average duration of the total duration of all first switching times to the fourth switching times in the target time period can be determined as the target cycle duration of this type of traffic light in the target time period.
[0131] In a possible implementation, the method for determining the cycle duration of a traffic light further includes:
[0132] Determine the average value of the difference between all the second switching times and the first switching times within the target time period as the red light cycle length;
[0133] Determine the average value of the difference between all the third switching times and the second switching times within the target time period as the green light cycle length;
[0134] An average value of the differences between all fourth switching times and the third switching times within the target time period is determined as the yellow light cycle duration.
[0135] Specifically, according to the above example, the red light cycle duration is the average value of all t2-t1 in the target time period, the green light cycle duration is the average value of all t3-t2 in the target time period, and the yellow light cycle duration is the average value of all t4-t3 in the target time period.
[0136] Exemplarily, assuming that the target time period includes n cycle durations, the target cycle duration within the target time period can be L=(L1+L2+L3+L4+…+Ln) / n, where L1, L2, L3…Ln are all corresponding values of t4-t1 identified. Correspondingly, the red light cycle duration within the target time period can be Lr=(Lr1+Lr2+Lr3+Lr4+…+Lrn) / n, where Lr1, Lr2, Lr3…Lrn are all corresponding values of t2-t1 identified. The green light cycle duration within the target time period can be Lg=(Lg1+Lg2+Lg3+Lg4+…+Lgn) / n, where Lg1, Lg2, Lg3…Lgn are all corresponding values of t3-t2 identified. The duration of the yellow light cycle within the target time period may be Ly=(Ly1+Ly2+Ly3+Ly4+…+Lyn) / n, wherein Ly1, Ly2, Ly3…Lyn are all values corresponding to the identified t4-t3.
[0137] In a possible implementation, the target time period is divided according to the congestion situation of the driving environment; or the target time period is evenly divided according to the target duration; the target cycle duration, red light cycle duration, green light cycle duration and yellow light cycle duration in different time periods are the same or different.
[0138] In a possible implementation, the operating cycle regularity of each type of traffic light at the target intersection in each target time period is determined based on the target cycle duration, red light cycle duration, green light cycle duration and yellow light cycle duration in each target time period of a day.
[0139] Exemplarily, a day may be divided into 24 time periods, and then the operating cycle rules of the red, green, and yellow lights of each type of traffic light in each time period may be determined.
[0140] In the embodiment of the present application, the traffic light position information and corresponding status information in the traffic light image can be identified through the traffic light image collected by the current base station, and the switching time of the corresponding status information of each type of traffic light is recorded according to the corresponding status information of the traffic light at each position in the traffic light image. According to the switching time, the cycle duration of each type of traffic light at the intersection where the current base station is located can be determined. Determining the cycle duration of the traffic light at the intersection where the base station is located based on the traffic light image collected by the base station can reduce dynamic interference factors, such as the determination of the traffic light position information, and thus achieve cycle mining with high real-time performance and high cycle duration determination accuracy.
[0141] Combine the following Figure 2 , the method for determining the cycle duration of a traffic light provided in an embodiment of the present application is further explained.
[0142] Figure 2 A schematic flow chart of a method for determining a traffic light cycle duration provided in another embodiment of the present application is shown.
[0143] like Figure 2 As shown, the method for determining the cycle duration of the traffic light comprises the following steps:
[0144] Step 201, obtaining a traffic light image collected by the current base station.
[0145] Step 202: Identify the traffic light position information and corresponding status information in the traffic light image according to the traffic light image.
[0146] Step 203 : recording the switching time of the corresponding status information of each type of traffic light according to the corresponding status information of the traffic light at each position in the traffic light image.
[0147] Step 204: Determine the cycle duration of each type of traffic light at the intersection where the current base station is located according to the switching time.
[0148] The specific implementation process and principle of the above steps 201-204 can refer to the detailed description of the above embodiment, which will not be repeated here.
[0149] Step 205, when it is detected that a vehicle passes through the current base station, the switching time of each type of traffic light is determined according to the cycle length of each type of traffic light and the time when the vehicle passes through the current base station.
[0150] In the embodiment of the present application, when a vehicle passes the current base station, the on-board device (V2X) interacts with the base station to record the time when the vehicle passes. This recorded time is performed at the moment when the vehicle passes the base station. In addition, the on-board device will obtain the cycle duration information of various traffic lights near the current base station, including the time required for each traffic light to complete a cycle, including the duration of the red light, green light and yellow light.
[0151] Among them, V2X refers to the communication technology between vehicles and the outside world. It is a technology based on the mutual communication between vehicles and traffic infrastructure, aiming to improve the safety, efficiency and intelligence of road traffic.
[0152] Step 206, the switching time of each type of traffic light is sent to the vehicle through the base station and V2X, so that the vehicle determines the switching time of the target traffic light according to the switching time of each type of traffic light and the current driving lane.
[0153] In an embodiment of the present application, the switching time of each type of traffic lights is sent to the vehicle through the base station and V2X. The vehicle can determine the switching time period of the target traffic light to be used according to its current driving lane, and determine the switching time of the target traffic light according to the target switching time period and the current time, and display the countdown to the switching time.
[0154] The switching time is the specific moment when the light switches from one state (such as a red light) to the next state (such as a green light).
[0155] In an embodiment of the present application, the V2X software installed on the vehicle can be used to automatically obtain the switching time of various traffic lights at the current intersection when the vehicle passes through the base station, so that the vehicle can determine the switching time of the target traffic light according to the switching time of various traffic lights and the current driving lane, making the use of V2X software more convenient.
[0156] Corresponding to the method for determining the cycle duration of a traffic light in the above embodiment, Figure 3 The following is a schematic diagram showing the structure of a traffic light cycle duration determination device provided by an embodiment of the present application. For ease of description, only the parts related to the embodiment of the present application are shown.
[0157] See also Figure 3, the cycle duration determining device 300 comprises:
[0158] An acquisition module 301 is used to acquire a traffic light image currently collected by a base station;
[0159] The recognition module 302 is used to recognize the traffic light position information and corresponding status information in the traffic light image according to the traffic light image;
[0160] The recording module 303 is used to record the switching time of the corresponding state information of each type of traffic light according to the corresponding state information of the traffic light at each position in the traffic light image;
[0161] The duration determination module 304 is used to determine the cycle duration of various traffic lights at the intersection where the current base station is located according to the switching time.
[0162] In the embodiment of the present application, the cycle duration determination device 300 further includes:
[0163] A detection module, for determining the switching time of various traffic lights according to the cycle length of various traffic lights and the time when the vehicle passes the current base station when detecting that the vehicle passes the current base station;
[0164] The switching time sending module is used to send the switching time of various traffic lights to the vehicle through the base station and V2X, so that the vehicle can determine the switching time of the target traffic light according to the switching time of various traffic lights and the current driving lane.
[0165] In the embodiment of the present application, the duration determination module 304 includes:
[0166] A first calculation unit is used to calculate a target period for cyclic display of each type of traffic light according to the switching time corresponding to each type of traffic light;
[0167] The first determining unit is used to determine the cycle duration of each type of traffic light at the intersection where the current base station is located according to the calculated target cycle of the cyclic display of each type of traffic light.
[0168] In the embodiment of the present application, the first calculation unit is used to:
[0169] Extract the switching time corresponding to each type of traffic light;
[0170] For any type of traffic lights, the time when the yellow light switches to the red light is determined in sequence as the first switching time, the time when the red light switches to the green light is determined as the second switching time, the time when the green light switches to the yellow light is determined as the third switching time, and the time when the next yellow light switches to the red light is determined as the fourth switching time;
[0171] The average duration of the total durations of all first switching times to fourth switching times within the target time period is determined as the target cycle of the traffic light of this type.
[0172] In the embodiment of the present application, the cycle duration determination device 300 further includes:
[0173] A second determining unit, configured to determine an average value of the difference between all second switching times and the first switching times within the target time period as the red light cycle length;
[0174] A third determining unit, configured to determine an average value of the difference between all third switching times and the second switching times within the target time period as the green light cycle duration;
[0175] The fourth determining unit is used to determine an average value of the differences between all fourth switching times and the third switching times within the target time period as the yellow light cycle duration.
[0176] In an embodiment of the present application, the above-mentioned target time period is divided according to the congestion situation of the driving environment; or the above-mentioned target time period is evenly divided according to the target duration; the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in different time periods are the same or different.
[0177] In the embodiment of the present application, the cycle duration determination device 300 further includes:
[0178] The rule determination module is used to determine the operating cycle rule of each type of traffic light in each target time period according to the target cycle, red light cycle duration, green light cycle duration and yellow light cycle duration in each target time period within a day.
[0179] In the embodiment of the present application, the recording module 303 includes:
[0180] a fifth determining unit, configured to determine the category to which each traffic light in the traffic light image belongs according to the traffic light at each position in the traffic light image;
[0181] a sixth determining unit, configured to determine corresponding status information of each type of traffic light according to the type and corresponding status information of each traffic light in the traffic light image;
[0182] The first recording unit is used to record the switching time of the corresponding state information of each type of traffic light based on the corresponding state information of each type of traffic light.
[0183] In an embodiment of the present application, the category of the traffic light includes at least one of a straight-ahead light, a left-turn light, and a right-turn light.
[0184] In the embodiment of the present application, the current base station includes an image acquisition device, and the acquisition module includes:
[0185] A control unit, used to control the current base station to collect the traffic light image at the intersection where the current base station is located through the image acquisition device;
[0186] The receiving unit is used to receive the traffic light image of the intersection where the current base station is located, which is acquired by the image acquisition device.
[0187] In the embodiment of the present application, the identification module 302 includes:
[0188] The detection unit is used to input the traffic light image into the target detection network, and the target detection network outputs the position information and corresponding status information of each traffic light; the target detection network is trained based on multiple sampled traffic light images.
[0189] In actual use, the device for determining the cycle duration of a traffic light provided in the embodiment of the present application can be configured in any electronic device to execute the aforementioned method for determining the cycle duration of a traffic light.
[0190] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0191] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0192] In a possible implementation, the embodiment of the present application further provides a traffic light cycle duration determination system, the cycle duration determination system comprising an electronic device and a plurality of base stations, the base stations being installed at traffic light intersections, each base station corresponding to a traffic light intersection;
[0193] An electronic device, used to execute the method in the above method embodiment;
[0194] The base station is used to collect traffic light images at the intersection and send the traffic light images to the electronic device.
[0195] See also Figure 4, shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application, such as Figure 4 As shown, the electronic device 400 of this embodiment includes: at least one processor 410 ( Figure 4 Only one is shown in the figure), a memory 420 and a computer program 421 stored in the memory 420 and executable on the at least one processor 410, wherein the processor 410 implements the steps in the above-mentioned traffic light cycle duration determination method embodiment when executing the computer program 421.
[0196] It should be noted that the electronic device 400 may refer to a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The electronic device may include, but is not limited to, a processor 410 and a memory 420. Those skilled in the art will understand that Figure 4 This is merely an example of the electronic device 400 and does not constitute a limitation on the electronic device 400 . The electronic device 400 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0197] The processor 410 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0198] In some embodiments, the memory 420 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. In other embodiments, the memory 420 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 400. Further, the memory 420 may also include both an internal storage unit of the electronic device 400 and an external storage device. The memory 420 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as the program code of the computer program, etc. The memory 420 may also be used to temporarily store data that has been output or is to be output.
[0199] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0200] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0201] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0202] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0204] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0205] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be completed through a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing.
[0206] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for determining the cycle duration of a traffic light, It is characterized in that The cycle duration determination method comprises: Get the traffic light image collected by the current base station; According to the traffic light image, identifying the traffic light position information and corresponding status information in the traffic light image; According to the corresponding state information of the traffic light at each position in the traffic light image, recording the switching time of the corresponding state information of each type of traffic light; According to the switching time, the cycle durations of various types of traffic lights at the intersection where the current base station is located are determined.
2. The method for determining the cycle duration according to claim 1, It is characterized in that Also includes: When a vehicle is detected passing through the current base station, the switching time of each type of traffic light is determined according to the cycle length of each type of current traffic light and the time when the vehicle passes through the current base station; The switching time of the various traffic lights is sent to the vehicle through the base station and V2X, so that the vehicle determines the switching time of the target traffic light according to the switching time of the various traffic lights and the current driving lane.
3. The method for determining the cycle duration according to claim 1, It is characterized in that The determining, according to the switching time, the cycle durations of various types of traffic lights at the intersection where the current base station is located, includes: Calculate the target period of cyclic display of each type of traffic light according to the switching time corresponding to each type of traffic light; The cycle duration of each type of traffic light at the intersection where the current base station is located is determined according to the calculated target cycle for the cyclic display of each type of traffic light.
4. The method for determining the cycle duration as claimed in claim 3, It is characterized in that The calculating, according to the switching time corresponding to each type of traffic light, a target period for cyclic display of each type of traffic light, comprises: Extracting the switching time corresponding to each type of traffic light; For any type of traffic lights, the time when the yellow light switches to the red light is determined in sequence as the first switching time, the time when the red light switches to the green light is determined as the second switching time, the time when the green light switches to the yellow light is determined as the third switching time, and the time when the next yellow light switches to the red light is determined as the fourth switching time; The average duration of the total durations of all first switching times to fourth switching times within the target time period is determined as the target cycle of the traffic light of this type.
5. The method for determining the cycle duration as claimed in claim 4, It is characterized in that Also includes: Determine the average value of the difference between all the second switching times and the first switching times within the target time period as the red light cycle length; Determine the average value of the difference between all the third switching times and the second switching times within the target time period as the green light cycle length; An average value of the differences between all fourth switching times and the third switching times within the target time period is determined as the yellow light cycle duration.
6. The method for determining the cycle duration as claimed in claim 5, It is characterized in that The target time period is divided according to the congestion situation of the driving environment; or the target time period is evenly divided according to the target duration; the target cycle, the red light cycle duration, the green light cycle duration and the yellow light cycle duration in different time periods are the same or different.
7. The method for determining the cycle duration according to claim 6, It is characterized in that Also includes: According to the target cycle, the red light cycle duration, the green light cycle duration and the yellow light cycle duration in each target time period within a day, the operating cycle regularity of each type of traffic light in each target time period is determined.
8. The method for determining the cycle duration as claimed in claim 1, It is characterized in that The step of recording the switching time of the corresponding state information of each type of traffic light according to the corresponding state information of the traffic light at each position in the traffic light image comprises: Determining, according to the traffic lights at each position in the traffic light image, the category to which each traffic light in the traffic light image belongs; Determine corresponding status information of each type of traffic light according to the type of each traffic light in the traffic light image and the corresponding status information; Based on the corresponding status information of each type of traffic light, the switching time of the corresponding status information of each type of traffic light is recorded.
9. The method for determining the cycle duration according to any one of claims 1 to 8, It is characterized in that The category of the traffic light includes at least one of a straight-ahead light, a left-turn light, and a right-turn light.
10. The method for determining the cycle duration according to claim 1, It is characterized in that The current base station includes an image acquisition device, and the step of acquiring the traffic light image acquired by the current base station includes: Controlling the current base station to collect a traffic light image at the intersection where the current base station is located through the image acquisition device; Receive the traffic light image of the intersection where the current base station is located, which is captured by the image capture device.
11. The method for determining the cycle duration according to claim 1, It is characterized in that The step of identifying the traffic light position information and the corresponding status information in the traffic light image according to the traffic light image includes: The traffic light image is input into a target detection network, and the target detection network outputs the location information and corresponding status information of each traffic light; the target detection network is trained based on a plurality of sampled traffic light images.
12. A device for determining the cycle duration of a traffic light, It is characterized in that The cycle duration determining device comprises: An acquisition module is used to acquire the traffic light image collected by the current base station; an identification module, configured to identify, based on the traffic light image, traffic light position information and corresponding status information in the traffic light image; A recording module, configured to record the switching time of the corresponding state information of each type of traffic light according to the corresponding state information of the traffic light at each position in the traffic light image; The duration determination module is used to determine the cycle duration of various traffic lights at the intersection where the current base station is located according to the switching time.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.
14. A system for determining the cycle duration of a traffic light, It is characterized in that The cycle duration determination system includes an electronic device and a plurality of base stations, wherein the base stations are installed at traffic light intersections, and each base station corresponds to one traffic light intersection; The electronic device is used to perform the method according to any one of claims 1 to 11; The base station is used to collect the traffic light image at the intersection and send the traffic light image to the electronic device.
15. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.