Traffic data generation method and device, electronic equipment and storage medium
By acquiring and integrating traffic light data in multiple ways, the problem of traffic light recognition being affected by environmental factors is solved, the accuracy of traffic data is improved, and the safe driving of vehicles is ensured.
Patent Information
- Application Number
- CN202410291044.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-09-16
AI Technical Summary
In the prior art, the identification method of traffic lights is greatly affected by environmental factors, resulting in low accuracy of the generated traffic data.
Traffic data from traffic lights is obtained in a variety of ways, including from preset servers, roadside equipment, and image recognition. Data is fused through pre-trained image recognition models to generate target traffic data.
The accuracy of traffic data is improved, ensuring that vehicles can effectively control their driving based on accurate traffic data, reducing the probability of violations and traffic accidents.
Smart Images

Figure CN120656313A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for generating traffic data. Background Art
[0002] With the rapid development of autonomous driving technology and the increasing prevalence of intelligent connected vehicles, traffic light recognition presents new challenges. In today's road environment, there are multiple ways to perceive traffic lights. For example, V2X (vehicle-to-everything) communication can be used to obtain traffic light data from roadside equipment. Another example is cellular network communication, which utilizes big data from cloud platforms to obtain traffic light data.
[0003] However, the accuracy of the above methods is greatly affected by environmental factors, resulting in low accuracy of the traffic data ultimately generated.
[0004] It can be seen that how to improve the accuracy of generating target traffic data is a technical issue worthy of attention. Summary of the Invention
[0005] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a method, device, electronic device and storage medium for generating traffic data.
[0006] In a first aspect, an embodiment of the present application provides a method for generating traffic data, the method comprising:
[0007] Acquiring traffic data indicated by a traffic light using a first method to obtain first traffic data;
[0008] When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is acquired in a second manner to obtain second traffic data;
[0009] When the second traffic data does not meet the preset second condition, the traffic data indicated by the traffic light is acquired using a third method to obtain third traffic data;
[0010] Based on the third traffic data, target traffic data of the traffic light is generated.
[0011] In one possible implementation,
[0012] The first condition includes: the delay of the first traffic data obtained by the first method is less than or equal to a preset first delay threshold; and / or
[0013] The second condition includes: the delay of the second traffic data obtained using the second method is less than or equal to a preset second delay threshold.
[0014] In a possible implementation manner, the third manner represents performing image recognition on the image of the traffic light; and
[0015] The method of obtaining the traffic data indicated by the traffic light in a third manner to obtain third traffic data includes:
[0016] Acquiring an image of the traffic light;
[0017] Inputting the image into a pre-trained image recognition model to obtain a plurality of traffic data of the traffic light, wherein the image recognition model is used to determine the plurality of traffic data indicated by the traffic light based on the image of the traffic light;
[0018] Based on the first traffic data and / or the second traffic data, third traffic data is determined from the obtained plurality of traffic data of the traffic light.
[0019] In a possible implementation, when the first traffic data meets the preset first condition, the method further includes:
[0020] determining the first traffic data as target traffic data for the traffic light; or
[0021] The first traffic data is determined as target traffic data of the traffic light, and at least one of the second manner and the third manner is prohibited from being adopted to obtain the traffic data indicated by the traffic light.
[0022] In a possible implementation, when the second traffic data meets the preset second condition, the method further includes:
[0023] determining the second traffic data as target traffic data for the traffic light; or
[0024] The second traffic data is determined as the target traffic data of the traffic light, and at least one of the first manner and the third manner is prohibited from being adopted to obtain the traffic data indicated by the traffic light.
[0025] In one possible implementation, after obtaining the target traffic data, the method further includes:
[0026] generating a control instruction for a target vehicle based on the target traffic data so as to cause the target vehicle to perform an operation matching the target traffic data;
[0027] Wherein, the target vehicle indicates the driving mode via the traffic light.
[0028] In a possible implementation manner, the first method or the second method indicates obtaining from a preset server; and
[0029] After generating the target traffic data of the traffic light based on the third traffic data, the method further includes:
[0030] determining the traffic data indicated by the traffic light recorded by the preset server to obtain fourth traffic data;
[0031] determining whether the fourth traffic data matches the third traffic data;
[0032] In a case where the fourth traffic data does not match the third traffic data, the fourth traffic data is re-determined, and the fourth traffic data before the re-determination is updated to the fourth traffic data after the re-determination.
[0033] In a second aspect, an embodiment of the present application provides a device for generating traffic data, the device comprising:
[0034] a first acquiring unit, configured to acquire traffic data indicated by a traffic light in a first manner to obtain first traffic data;
[0035] a second acquiring unit, configured to acquire the traffic data indicated by the traffic light in a second manner to obtain second traffic data when the first traffic data does not meet the preset first condition;
[0036] a third acquiring unit, configured to acquire the traffic data indicated by the traffic light in a third manner to obtain third traffic data when the second traffic data does not meet the preset second condition;
[0037] The first generating unit is configured to generate target traffic data for the traffic light based on the third traffic data.
[0038] In one possible implementation,
[0039] The first condition includes: the delay of the first traffic data obtained by the first method is less than or equal to a preset first delay threshold; and / or
[0040] The second condition includes: the delay of the second traffic data obtained using the second method is less than or equal to a preset second delay threshold.
[0041] In a possible implementation manner, the third manner represents performing image recognition on the image of the traffic light; and
[0042] The method of obtaining the traffic data indicated by the traffic light in a third manner to obtain third traffic data includes:
[0043] Acquiring an image of the traffic light;
[0044] Inputting the image into a pre-trained image recognition model to obtain a plurality of traffic data of the traffic light, wherein the image recognition model is used to determine the plurality of traffic data indicated by the traffic light based on the image of the traffic light;
[0045] Based on the first traffic data and / or the second traffic data, third traffic data is determined from the obtained plurality of traffic data of the traffic light.
[0046] In a possible implementation, when the first traffic data meets the preset first condition, the device further includes:
[0047] a first determining unit, configured to determine the first traffic data as target traffic data for the traffic light; or
[0048] The second determining unit is configured to determine the first traffic data as target traffic data of the traffic light, and prohibit adopting at least one of the second manner and the third manner to obtain the traffic data indicated by the traffic light.
[0049] In a possible implementation, when the second traffic data meets the preset second condition, the apparatus further includes:
[0050] a third determining unit, configured to determine the second traffic data as target traffic data for the traffic light; or
[0051] The fourth determining unit is configured to determine the second traffic data as target traffic data of the traffic light, and prohibit adopting at least one of the first manner and the third manner to obtain the traffic data indicated by the traffic light.
[0052] In one possible implementation, after obtaining the target traffic data, the apparatus further includes:
[0053] a second generating unit, configured to generate a control instruction for a target vehicle based on the target traffic data, so as to enable the target vehicle to perform an operation matching the target traffic data;
[0054] Wherein, the target vehicle indicates the driving mode via the traffic light.
[0055] In a possible implementation manner, the first method or the second method indicates obtaining from a preset server; and
[0056] After generating the target traffic data of the traffic light based on the third traffic data, the apparatus further includes:
[0057] a fifth determining unit, configured to determine the traffic data indicated by the traffic light recorded by the preset server to obtain fourth traffic data;
[0058] a sixth determining unit, configured to determine whether the fourth traffic data matches the third traffic data;
[0059] The seventh determining unit is configured to, when the fourth traffic data does not match the third traffic data, redetermine the fourth traffic data and update the fourth traffic data before redetermining to the fourth traffic data after redetermining.
[0060] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0061] memory for storing computer programs;
[0062] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the method for generating traffic data in the first aspect of the present application is implemented.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the method for generating traffic data in the first aspect described above is implemented.
[0064] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code is run on a device, the processor in the device implements a method as in any embodiment of the method for generating traffic data in the first aspect described above.
[0065] The traffic data generation method provided in the embodiment of the present application can use a first method to obtain traffic data indicated by a traffic light to obtain first traffic data. Then, if the first traffic data does not meet a preset first condition, use a second method to obtain traffic data indicated by the traffic light to obtain second traffic data. Then, if the second traffic data does not meet the preset second condition, use a third method to obtain traffic data indicated by the traffic light to obtain third traffic data. Finally, based on the third traffic data, target traffic data for the traffic light is generated. Thus, if the traffic data obtained using the first and second methods do not meet the corresponding conditions, the final target traffic data can be generated based on the traffic data obtained using the third method. In this way, the accuracy of generating the target traffic data can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0068] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0069] Figure 1 A flow chart of a method for generating traffic data provided in an embodiment of the present application;
[0070] Figure 2 A flow chart of another method for generating traffic data provided in an embodiment of the present application;
[0071] Figure 3A A flowchart of another method for generating traffic data provided in an embodiment of the present application;
[0072] Figure 3B A flow chart of another method for generating traffic data provided in an embodiment of the present application;
[0073] Figure 3C A schematic diagram of an application scenario of a method for generating traffic data provided in an embodiment of the present application;
[0074] Figure 4 A schematic diagram of the structure of a traffic data generation device provided in an embodiment of the present application;
[0075] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It is apparent that the described embodiments are only a portion of the embodiments of the present application, rather than all of the embodiments. It should be noted that, unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions, and numerical values described in these embodiments do not limit the scope of the present application.
[0077] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and neither represent any specific technical meaning nor indicate the logical order between them.
[0078] It should also be understood that in this embodiment, “a plurality of” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0079] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0080] In addition, the term "and / or" in this application is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the related objects are in an "or" relationship.
[0081] It should also be understood that the description of each embodiment in this application focuses on the differences between the embodiments, and the same or similar aspects can be referenced with each other. For the sake of brevity, they will not be described one by one.
[0082] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0083] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered part of the specification.
[0084] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0085] It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0086] In order to solve the technical problem of how to improve the accuracy of generating target traffic data in the prior art, the present application provides a method, device, electronic device and storage medium for generating traffic data, which can improve the accuracy of generating target traffic data.
[0087] Figure 1 A flow chart of a method for generating traffic data provided in an embodiment of the present application. This method can be applied to one or more electronic devices such as vehicles, smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or a plurality of electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is given here.
[0088] like Figure 1 As shown, the method specifically includes:
[0089] Step 101: Acquire traffic data indicated by a traffic light using a first method to obtain first traffic data.
[0090] In this embodiment, the first method may be at least one of the following:
[0091] A method of obtaining from a preset server, a method of obtaining from a roadside device, and a method of performing image recognition on the image of the traffic light.
[0092] The preset server may store traffic data for multiple traffic lights. The traffic data for each traffic light may be stored in association with the location information (e.g., latitude, longitude, and direction) of the traffic light. Based on this, the location information of the traffic light can be used to determine the traffic data stored in association with the location information in the preset server, thereby obtaining the traffic data indicated by the traffic light from the preset server.
[0093] The aforementioned roadside units (RSUs) serve as the foundation for networked and intelligent road infrastructure in vehicle-road collaboration, enabling communication between roads and vehicles. They can transmit traffic data, including traffic light indicators at the current intersection, to vehicles and other devices via V2X communication.
[0094] In addition, as a first example, the following method may be used to perform image recognition on the image of the traffic light, thereby obtaining traffic data indicated by the traffic light:
[0095] First, obtain an image of the traffic light.
[0096] Afterwards, the above image is recognized to obtain traffic data indicated by the traffic light.
[0097] Here, an artificial intelligence (AI) model may be used to recognize the above-mentioned image, thereby obtaining traffic data indicated by the traffic light.
[0098] Among them, the above-mentioned artificial intelligence model can be a model trained using a machine learning algorithm (such as a clustering algorithm, a supervised machine learning algorithm, etc.).
[0099] As a second example, you can also use Figure 2 The method described in the embodiment shown performs image recognition on the image of the traffic light to obtain the traffic data indicated by the traffic light. Please refer to the following description for details, which will not be repeated here.
[0100] The first traffic data may be traffic data indicated by a traffic light and obtained in a first manner.
[0101] The traffic data indicated by the traffic light may include at least one of the following: the color of the light currently displayed by the traffic light (for example, red, yellow, or green), the duration for the light of the color currently displayed by the traffic light to switch to the light of the next color (for example, the red light currently displayed by the traffic light will switch to the green light in 10 seconds), and the duration for which the lights of various colors of the traffic light are displayed (for example, the red light is displayed for 60 seconds, the yellow light is displayed for 3 seconds, and the green light is displayed for 10 seconds).
[0102] Step 102: When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is obtained in a second manner to obtain second traffic data.
[0103] In this embodiment, the preset first condition may be one or more predetermined conditions. The first condition may be used to determine whether to adopt the second method to obtain the traffic data indicated by the traffic light.
[0104] The second method may be at least one of the following:
[0105] A method of obtaining from a preset server, a method of obtaining from a roadside device, and a method of performing image recognition on the image of the traffic light.
[0106] The second mode may be another mode different from the first mode.
[0107] As an example, the first condition may be: the accuracy of the first traffic data acquired by adopting the first method is greater than or equal to a predetermined first accuracy threshold.
[0108] In some optional implementations of this embodiment, the first condition includes: the delay of the first traffic data obtained using the first method is less than or equal to a preset first delay threshold.
[0109] It can be understood that in the above-mentioned optional implementation method, the second method can be used to obtain the traffic data indicated by the traffic light only when the first traffic data is not obtained and / or the delay of obtaining the first traffic data is large. If the delay of obtaining the first traffic data is small, the first traffic data can be directly used as the target traffic data. In this way, the efficiency of generating target traffic data can be improved and the processing resources of the system can be saved.
[0110] Step 103: When the second traffic data does not meet the preset second condition, the traffic data indicated by the traffic light is obtained by adopting a third method to obtain third traffic data.
[0111] In this embodiment, the preset second condition may be one or more predetermined conditions. The second condition may be used to determine whether to adopt the third method to obtain the traffic data indicated by the traffic light.
[0112] The third method may be at least one of the following:
[0113] A method of obtaining from a preset server, a method of obtaining from a roadside device, and a method of performing image recognition on the image of the traffic light.
[0114] The third aspect may be another aspect different from the first aspect and the second aspect.
[0115] As an example, the second condition may be: the accuracy of the second traffic data acquired using the second method is greater than or equal to a predetermined second accuracy threshold.
[0116] In some optional implementations of this embodiment, the second condition includes: the delay of the second traffic data obtained using the second method is less than or equal to a preset second delay threshold.
[0117] It can be understood that in the above-mentioned optional implementation method, the third method can be used to obtain the traffic data indicated by the traffic light only when the second traffic data is not obtained and / or the delay of obtaining the second traffic data is large. If the delay of obtaining the second traffic data is small, the second traffic data can be directly used as the target traffic data. In this way, the efficiency of generating target traffic data can be improved and the processing resources of the system can be saved.
[0118] Step 104: Generate target traffic data for the traffic light based on the third traffic data.
[0119] In this embodiment, the target traffic data may represent the traffic data of the traffic light that is finally determined. The target traffic data may be used to guide the travel of the user or vehicle.
[0120] As an example, the third traffic data may be directly determined as the target traffic data of the traffic light. Alternatively, the target traffic data of the traffic light may be generated based on the third traffic data and its time delay.
[0121] In some optional implementations of this embodiment, when the first traffic data meets the preset first condition, the first traffic data may also be determined as the target traffic data of the traffic light.
[0122] It is understood that in the above optional implementation, the first traffic data can be directly determined as the target traffic data of the traffic light, thereby improving the efficiency of generating the target traffic data.
[0123] In some optional implementations of this embodiment, when the first traffic data meets the preset first condition, the first traffic data can also be determined as the target traffic data of the traffic light, and at least one of the second method and the third method is prohibited from being used to obtain the traffic data indicated by the traffic light.
[0124] It can be understood that in the above optional implementation, by prohibiting the use of at least one of the second method and the third method to obtain the traffic data indicated by the traffic light, the efficiency of generating target traffic data can be improved and the processing resources of the system can be saved.
[0125] In some optional implementations of this embodiment, when the second traffic data meets the preset second condition, the second traffic data may be determined as the target traffic data of the traffic light.
[0126] It is understood that in the above optional implementation, the second traffic data can be directly determined as the target traffic data of the traffic light, thereby improving the efficiency of generating the target traffic data.
[0127] In some application scenarios of the above-mentioned optional implementation methods, when the second traffic data meets the preset second condition, the second traffic data can also be determined as the target traffic data of the traffic light, and at least one of the first method and the third method is prohibited from being used to obtain the traffic data indicated by the traffic light.
[0128] It can be understood that in the above optional implementation, by prohibiting the use of at least one of the first and third methods to obtain the traffic data indicated by the traffic light, the efficiency of generating target traffic data can be improved and the processing resources of the system can be saved.
[0129] In some optional implementations of this embodiment, after obtaining the target traffic data, a control instruction for a target vehicle may be generated based on the target traffic data, so that the target vehicle performs an operation matching the target traffic data.
[0130] Wherein, the target vehicle indicates the driving mode via the traffic light.
[0131] As an example, if the target traffic data indicates "currently a red light", the control instruction may indicate that the target vehicle traveling straight ahead stops. In this case, the target vehicle may remain stopped or be switched to a stopped state by a driving state after receiving the control instruction.
[0132] As another example, if the target traffic data indicates "the current traffic light is green and will switch to yellow in 20 seconds," the control instruction may instruct the target vehicle to go straight. In this case, after receiving the control instruction, the target vehicle may continue to drive or switch from a stopped state to a driving state.
[0133] It can be understood that in the above optional implementation, the target traffic data can be used to guide the driving or stopping of the target vehicle, thereby reducing the probability of violation of the target vehicle and reducing the occurrence of traffic accidents.
[0134] In some optional implementations of this embodiment, the first method or the second method indicates obtaining from a preset server.
[0135] On this basis, after generating the target traffic data of the traffic light based on the third traffic data, the following steps may be further performed:
[0136] First, traffic data indicated by the traffic light recorded by the preset server is determined to obtain fourth traffic data.
[0137] The fourth traffic data may be the traffic data indicated by the traffic light recorded by the preset server.
[0138] Here, the preset server may store traffic data for multiple traffic lights. The traffic data for each traffic light may be stored in association with the location information (e.g., latitude, longitude, and direction) of the traffic light. Based on this, the location information of the traffic light can be used to determine the traffic data stored in association with the location information in the preset server, thereby obtaining the fourth traffic data.
[0139] Thereafter, it is determined whether the fourth traffic data matches the third traffic data.
[0140] As an example, if the fourth traffic data and the third traffic data represent the same color of the currently displayed traffic light, then the cycle duration of the traffic light can be calculated based on the fourth traffic data to obtain a first cycle duration. The first cycle duration represents: the total time the traffic light displays the three colors of red, yellow, and green in one cycle, calculated based on the fourth traffic data. And the cycle duration of the traffic light is calculated based on the third traffic data to obtain a second cycle duration. The second cycle duration represents: the total time the traffic light displays the three colors of red, yellow, and green in one cycle, calculated based on the third traffic data. If the absolute value of the time difference between the first cycle duration and the second cycle duration is less than or equal to a preset first threshold (for example, 300 milliseconds), then it can be determined that the fourth traffic data matches the third traffic data. Otherwise, it can be determined that the fourth traffic data does not match the third traffic data.
[0141] For example, if the fourth traffic data indicates that traffic light A is currently displaying a red light, and the total time that traffic light A displays the three colors of red, yellow, and green in one cycle (that is, the first cycle duration) is 1 minute and 400 milliseconds, and the third traffic data indicates that traffic light A is currently displaying a red light, and the total time that traffic light A displays the three colors of red, yellow, and green in one cycle (that is, the second cycle duration) is 1 minute and 500 milliseconds, then, under the preset first threshold of 300 milliseconds, it can be determined that the fourth traffic data matches the third traffic data.
[0142] If the fourth traffic data indicates that traffic light A is currently displaying a green light, and the total time that traffic light A displays the red, yellow, and green lights in one cycle (that is, the first cycle time) is 1 minute and 400 milliseconds, and the third traffic data indicates that traffic light A is currently displaying a red light, and the total time that traffic light A displays the red, yellow, and green lights in one cycle (that is, the second cycle time) is 2 minutes and 500 milliseconds, then, under the preset first threshold of 300 milliseconds, it can be determined that the fourth traffic data does not match the third traffic data.
[0143] If the fourth traffic data indicates that traffic light A is currently displaying a red light, and the total time that traffic light A displays the three colors of red, yellow and green in one cycle (that is, the first cycle duration) is 1 minute and 400 milliseconds, and the third traffic data indicates that traffic light A is currently displaying a red light, and the total time that traffic light A displays the three colors of red, yellow and green in one cycle (that is, the second cycle duration) is 2 minutes and 500 milliseconds, then, under the preset first threshold of 300 milliseconds, it can be determined that the fourth traffic data does not match the third traffic data.
[0144] As another example, if the fourth traffic data and the third traffic data indicate the same color of the currently displayed traffic light, namely, color A, then the duration that the traffic light has continuously displayed color A during the current cycle can be calculated based on the third traffic data to obtain a third duration. The third duration represents the duration that the traffic light has continuously displayed color A during the current cycle, as calculated based on the third traffic data. The fourth duration represents the duration that the traffic light has continuously displayed color A during the current cycle, as calculated based on the fourth traffic data. If the absolute value of the time difference between the third duration and the fourth duration is less than or equal to a preset first threshold value (for example, 300 milliseconds), then it can be determined that the fourth traffic data matches the third traffic data; if the fourth traffic data and the third traffic data represent different colors of the currently displayed traffic lights, and the sum of the first duration and the second duration is less than or equal to the preset first threshold value, then it can be determined that the fourth traffic data matches the third traffic data; if the fourth traffic data and the third traffic data represent different colors of the currently displayed traffic lights, and the sum of the first duration and the second duration is greater than the preset first threshold value, then it can be determined that the fourth traffic data does not match the third traffic data.
[0145] The first duration may represent the remaining duration of a traffic light of one color (e.g., color A) switching to a traffic light of the other color (e.g., color B) between two different colors (e.g., color A and color B). The second duration may represent the duration of the traffic light of the other color (e.g., color B) being displayed continuously.
[0146] For example, if the fourth traffic data indicates that traffic light B is currently displaying a red light and will switch to a yellow light in 100 milliseconds; the third traffic data indicates that traffic light B is currently displaying a yellow light and has been displaying a yellow light for 100 milliseconds, then, if the preset first threshold is 300 milliseconds, it can be determined that the fourth traffic data matches the third traffic data.
[0147] If the fourth traffic data indicates that traffic light B is currently displaying a red light and has been displaying a red light for 100 milliseconds; the third traffic data indicates that traffic light B is currently displaying a red light and has been displaying a red light for 150 milliseconds, then, under the preset first threshold of 300 milliseconds, it can be determined that the fourth traffic data matches the third traffic data.
[0148] If the fourth traffic data indicates that traffic light B is currently displaying a red light and will switch to a yellow light after 800 milliseconds; the third traffic data indicates that traffic light B is currently displaying a yellow light and has been displaying a yellow light for 100 milliseconds, then, under the preset first threshold of 300 milliseconds, it can be determined that the fourth traffic data does not match the third traffic data.
[0149] Then, in a case where the fourth traffic data does not match the third traffic data, the fourth traffic data is re-determined, and the fourth traffic data before the re-determination is updated to the fourth traffic data after the re-determination.
[0150] As an example, if the third traffic data represents incomplete traffic data, multiple third traffic data sets obtained by multiple vehicles or other devices using the third method can be obtained for the same traffic light. For example, the third traffic data obtained by vehicle A using the third method is "Traffic light C displays a red light for 30 seconds in a cycle," the third traffic data obtained by vehicle B using the third method is "Traffic light C displays a yellow light for 5 seconds in a cycle," the third traffic data obtained by vehicle C using the third method is "Traffic light C displays a green light for 25 seconds in a cycle," the third traffic data obtained by vehicle D using the third method is "Traffic light C displays a green light for 20 seconds in a cycle," and the third traffic data obtained by vehicle E using the third method is "Traffic light C displays a green light for 25 seconds in a cycle." Subsequently, these multiple third traffic data sets can be statistically analyzed, and unreliable data (i.e., mismatched third traffic data) can be deleted to determine the fourth traffic data set. For example, in the above example, the fourth traffic data set may represent "Traffic light C displays a green light for 25 seconds, a red light for 30 seconds, and a yellow light for 5 seconds in a cycle."
[0151] As yet another example, in a case where the third traffic data represents complete traffic data, the third traffic data may be determined as the re-determined fourth traffic data.
[0152] As another example, when the third traffic data represents complete traffic data, when multiple third traffic data obtained for the same traffic light (for example, third traffic data determined separately for multiple vehicles) match, the matched third traffic data can be determined as the re-determined fourth traffic data.
[0153] In the above example, as to how to determine whether the two third traffic data match, please refer to the above process of determining whether the third traffic data matches the fourth traffic data. Please refer to the above description for details, which will not be repeated here.
[0154] Here, the third method mentioned above does not mean obtaining from a preset server.
[0155] It can be understood that in the above-mentioned optional implementation method, the third traffic data can be used to update the fourth traffic data recorded in the preset server. In this way, when subsequently obtaining the traffic data of the corresponding traffic light, there is no need to use the third method to obtain the traffic data again. The traffic data can be directly obtained using the first method or the second method. In this way, the efficiency of subsequently generating the target traffic data of the traffic light can be improved.
[0156] In some optional implementations of this embodiment, the first method represents obtaining from a roadside device, the second method represents obtaining from a preset server, and the third method represents performing image recognition on the image of the traffic light.
[0157] It can be understood that in the above optional implementation method, traffic data can be obtained from roadside equipment first. If the traffic data does not meet the conditions, traffic data can be obtained from the preset server. If the traffic data does not meet the conditions, image recognition is further performed on the image of the traffic light to generate the final target traffic data. In this way, when facing a complex traffic environment, the above three technologies can be used to complement each other and act simultaneously. When facing a simple road environment, by selecting a reliable data source, the processing capacity of other equipment can be reduced and system resources can be saved.
[0158] The traffic data generation method provided in the embodiment of the present application can use a first method to obtain traffic data indicated by a traffic light to obtain first traffic data. Then, if the first traffic data does not meet a preset first condition, use a second method to obtain traffic data indicated by the traffic light to obtain second traffic data. Then, if the second traffic data does not meet the preset second condition, use a third method to obtain traffic data indicated by the traffic light to obtain third traffic data. Finally, based on the third traffic data, target traffic data for the traffic light is generated. Thus, if the traffic data obtained using the first and second methods do not meet the corresponding conditions, the final target traffic data can be generated based on the traffic data obtained using the third method. In this way, the accuracy of generating the target traffic data can be improved.
[0159] Figure 2 This is a flow chart of another method for generating traffic data provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:
[0160] Step 201: Obtain traffic data indicated by a traffic light in a first manner to obtain first traffic data.
[0161] In this embodiment, step 201 and Figure 1Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0162] Step 202: When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is acquired in a second manner to obtain second traffic data.
[0163] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0164] Step 203: When the second traffic data does not meet the preset second condition, obtain the image of the traffic light.
[0165] In this embodiment, the image of the above-mentioned traffic light can be collected via a camera, lidar, or millimeter-wave radar in a vehicle (such as the above-mentioned target vehicle), or can also be collected via a camera, lidar, or millimeter-wave radar installed near the above-mentioned traffic light.
[0166] Step 204 : Input the image into a pre-trained image recognition model to obtain a plurality of traffic data of the traffic light, wherein the image recognition model is used to determine a plurality of traffic data indicated by the traffic light based on the image of the traffic light.
[0167] In this embodiment, the image recognition model can be trained using a deep learning algorithm.
[0168] Specifically, the image recognition model can be trained in the following way:
[0169] First, a training sample set is obtained, wherein the training samples in the training sample set include sample images of traffic lights and sample traffic data.
[0170] Afterwards, a deep learning algorithm is used, the sample images included in the training samples in the training sample set are used as input data, and the sample traffic data is used as expected output data to train an image recognition model.
[0171] When using an image recognition model for image recognition, after inputting the image into a pre-trained image recognition model, the image recognition model can output multiple traffic data of the traffic light, each of which can correspond to a confidence level (indicating accuracy). Thus, traffic data with a confidence level greater than or equal to a preset confidence threshold can be used as the multiple traffic data ultimately obtained in step 204.
[0172] Step 205 : Determine third traffic data from the obtained plurality of traffic data of the traffic light based on the first traffic data and / or the second traffic data.
[0173] In this embodiment, the traffic data that matches the first traffic data and / or the second traffic data among the multiple traffic data finally obtained in the above step 204 can be determined as the third traffic data.
[0174] Here, if the two traffic data (for example, the traffic data finally obtained in step 204 and the first traffic data, or the traffic data finally obtained in step 204 and the second traffic data) represent the same color of the currently displayed traffic light, and the difference in the duration of the traffic light of that color is less than or equal to the preset first threshold, then it can be determined that the two traffic data match; if the two traffic data represent different colors of the currently displayed traffic lights, and the sum of the first duration and the second duration is less than or equal to the preset first threshold, then it can be determined that the two traffic data match; if the two traffic data represent different colors of the currently displayed traffic lights, and the sum of the first duration and the second duration is greater than the preset first threshold, then it can be determined that the two traffic data do not match.
[0175] The first duration may represent the remaining duration of a traffic light of one color (e.g., color A) switching to a traffic light of the other color (e.g., color B) between two different colors (e.g., color A and color B). The second duration may represent the duration of the traffic light of the other color (e.g., color B) being displayed.
[0176] Step 206 : Generate target traffic data of the traffic light based on the third traffic data.
[0177] In this embodiment, step 206 and Figure 1 Step 104 in the corresponding embodiment is basically the same and will not be described again here.
[0178] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For details on the technical effects of the method for generating traffic data shown, please refer to Figure 1 For the sake of brevity, the relevant description will not be repeated here.
[0179] The traffic data generation method provided in the embodiment of the present application uses the first traffic data and / or the second traffic data as constraints, filters out non-compliant prediction results from the multiple traffic data of the traffic lights obtained, and thus determines the third traffic data. This can improve the accuracy of determining the third traffic data, and further improve the accuracy of determining the target traffic data.
[0180] The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.
[0181] With the rapid development of autonomous driving technology and the increasing prevalence of intelligent connected vehicles, new challenges are emerging in traffic light recognition. In current vehicle-to-road environments, some cellular data-based methods offer low transmission latency and long transmission distances for traffic light recognition, but require additional equipment costs. Other cellular data-based methods suffer from errors in some traffic light data. Alternatively, traffic light cycles are accurate but difficult to obtain, and the latency of traffic data obtained with these methods is significantly affected by environmental factors, and data for some traffic light intersections is missing. Other visual recognition methods require no additional equipment and offer fast perception speeds, but are subject to interference from weather, line of sight, and visual field, resulting in unclear perception. Therefore, in complex traffic environments, this solution leverages multiple complementary technologies simultaneously. In simple road environments, by selecting reliable data sources, the processing power of other devices is reduced, conserving system resources.
[0182] Existing traffic data generation solutions address single road scenarios and fail to accommodate the simultaneous presence of single-vehicle perception, network connectivity, and direct data. In traffic light recognition scenarios, they fail to address how to adaptively integrate data to ensure stability and timeliness. Furthermore, sensors simultaneously process duplicate data, significantly wasting equipment processing resources.
[0183] This solution optimizes the perception of traffic light data from different sources to obtain highly accurate traffic light data. By controlling three perception methods, it reduces equipment processing capacity and reduces vehicle power consumption.
[0184] Specifically, if Figure 3C As shown, the interactive devices in this solution include roadside equipment 11, vehicles 12, and a cloud platform (also known as the aforementioned pre-set server) 10. The roadside equipment 11 includes a roadside communication module. The vehicle includes a vehicle-side perception module, a vehicle-side communication module, and a vehicle-side computing module. The cloud platform 10 is the cloud server.
[0185] The vehicle-side perception module in this solution includes cameras, lidar, and millimeter-wave radar to collect road environment data. CAN (Controller Area Network) and GNSS (Global Navigation Satellite System) are used to collect vehicle positioning data (such as latitude and longitude, speed, and heading angle). Vehicle-side and road-side communication modules can send and receive cellular network and V2X messages to upload traffic light data. A cloud server calculates and records traffic light times at each intersection using network data and vehicle perception feedback.
[0186] like Figure 3A As shown, this solution can take advantage of the long transmission distance of connected data. First, V2X direct data (i.e., the first traffic data) is obtained. If V2X direct traffic signal light data exists, the V2X data delay (indicating the time difference between the data generation time and the current time) is calculated. If it is less than a threshold (i.e., it meets the preset first condition), the V2X data is directly used (i.e., the first traffic data is determined as the target traffic data). The vehicle's connected network and vehicle perception do not recognize the roadside traffic light, that is, the second and third methods are prohibited from obtaining traffic data indicated by the traffic light. If it is greater than the threshold, the remaining time of the traffic light at the intersection is recorded.
[0187] If there is no V2X direct traffic light data, the cloud platform network data (i.e., the second traffic data) is obtained and the cloud platform network delay (indicating the time difference between the data generation time and the current time) is calculated. If it is less than the threshold (i.e., it meets the preset second condition), the cloud platform network data is directly used (i.e., the second traffic data is determined as the target traffic data), and the vehicle perception and V2X are not allowed to identify the roadside traffic light (i.e., the first and third methods are prohibited from obtaining the traffic data indicated by the traffic light). If it is greater than the threshold, the remaining time of the traffic light at the intersection is recorded.
[0188] If the networked data is not reliable enough (that is, the first traffic data does not meet the preset first condition, and the second traffic data does not meet the preset second condition), the vehicle's perception data (that is, the third traffic data mentioned above) will be relied upon. If the networked traffic light data does not exist, no optimization will be performed. If the networked traffic light data (that is, the first traffic data and / or the second traffic data) exists, the remaining time of the recorded traffic light in that stage is used as a constraint to quickly filter out the prediction results that do not meet this range, and optimize the results of the deep learning of perception. That is, based on the first traffic data and / or the second traffic data, the third traffic data is determined from the multiple traffic data of the traffic light obtained.
[0189] This solution can optimize the processing capabilities of vehicle equipment at intersections with accurate network data. At intersections with large network data latency, the remaining time at the traffic light can be used as a constraint to optimize vehicle-side perception results.
[0190] In this solution, the vehicle-side device can pass through a traffic light intersection. When the network data is not reliable enough (that is, the first traffic data does not meet the preset first condition, and the second traffic data does not meet the preset second condition), and the vehicle senses the traffic light data, it can upload the traffic light data of the intersection (that is, the third traffic data mentioned above). The cloud server can collect statistics on the data. If there is no traffic light data at the current intersection, the server gradually obtains a complete cycle (that is, the fourth traffic data). When it matches the vehicle-side perception data (that is, the third traffic data), the cycle is determined and sent through the network device. If there is traffic light data at the current intersection, the two data traffic light times are compared to see if they match. If they do not match, it means that the traffic light data at the current intersection has changed and needs to be recalculated.
[0191] like Figure 3C As shown, 9 is a roadside traffic light; 10 is a cloud platform that provides networked traffic light data; 11 is a roadside V2X service device (RSU); and 12 is the current driving vehicle.
[0192] When the vehicle arrives at the traffic light intersection, the vehicle 12 has three perception sources for the recognition of the traffic light 1: ①, the vehicle's camera recognition (that is, the above-mentioned method of image recognition of the image of the traffic light); ②, the roadside RSU device sends the traffic light message of the current intersection (that is, the above-mentioned method of obtaining from the roadside device); ③, the cloud platform sends the traffic light message of the current intersection (that is, the above-mentioned method of obtaining from the preset server). Therefore, when the vehicle receives traffic light messages from multiple sources, it needs to select the perception source to save device system resources. The specific implementation steps are as follows: Figure 3A 、 3B As shown:
[0193] Step 1: The vehicle determines whether it has sensed the V2X traffic light message sent by the roadside unit (RSU) via the roadside communication module. V2X communication is a short-range private network communication with the advantages of low latency and high reliability, but it requires additional equipment, so some intersections may not have V2X equipment. Therefore, V2X messages (i.e., the first traffic data) are prioritized. If a V2X message is present, the timestamp in the V2X message is calculated with the current time to obtain the message delay. The message delay is then compared with the delay threshold of 300 milliseconds (i.e., the preset first delay). If it is less than the delay threshold, indicating that the V2X message is reliable, the V2X traffic light message is directly used. At this point, traffic light data is no longer processed in the connected data or the vehicle's perception, and the process proceeds to Step 5. Otherwise, the process proceeds to Step 4, and the connected data will no longer process traffic light data. If no V2X message is present, the process proceeds to Step 3.
[0194] Step 2: The vehicle determines whether it has sensed the traffic light network message sent by the cloud server through the cellular network. The cloud platform service has the advantages of wide coverage and no need to install additional equipment, but there is also the problem that the red and green data at some intersections do not exist or are inaccurate. Therefore, the second thing to be processed is the networked traffic light data. If the networked traffic light data exists, the timestamp in the networked traffic light data is calculated with the current time to obtain the message delay, and the message delay is compared with the delay threshold (that is, the preset second delay mentioned above). If it is less than the delay threshold, it means that the networked traffic light data is reliable, and the networked traffic light message is directly used. At this time, the traffic light data is no longer processed in V2X and the vehicle perception, and the process goes to step 4. Otherwise, the process goes to step 3. If the networked traffic light data does not exist, the process also goes to step 3.
[0195] Step 3: Determine whether the vehicle senses a traffic light. If a traffic light is detected, since the vehicle uses YOLO (object detection model) to identify traffic lights and numbers, the traffic light cycle is used as a constraint for the vehicle's deep learning perception. Prediction results that do not fit within this range are quickly filtered out, thereby optimizing the traffic light recognition results and transmitting them back to the cloud server. If a traffic light is not detected, the networked traffic light data is used as the final result, and the process proceeds to Step 4.
[0196] Step 4: Display the traffic light data obtained according to the above steps on the screen, and give the driver a warning to start or stop according to the current vehicle speed and the distance to the traffic light intersection.
[0197] Step 5: The cloud server receives the camera-perceived traffic light data transmitted by the device and compares it with the current intersection traffic light data after aligning the time. If there is no traffic light data at the current intersection, the server gradually obtains a complete cycle through statistics. When it matches the vehicle-side perception data, it determines the cycle and sends it through the connected device. If there is traffic light data at the current intersection, the two data are compared to see if the traffic light times match. If not, it indicates that the traffic light data at the current intersection has changed and needs to be recalculated.
[0198] It should be noted that, in addition to the contents described above, this embodiment may also include the technical features described in the above embodiments, thereby achieving the technical effects of the traffic data generation method shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0199] The traffic data generation method provided by the embodiment of the present application, based on the advantages and disadvantages of the perception source, determines the source reliability of the traffic light in real time to turn on or off the processing of traffic lights by other devices, thereby saving device system resources and reducing device power consumption. Generally, when the vehicle's field of vision is affected, such as in bad weather, when pedestrians, vehicles, and trees partially block the traffic light, the vehicle that does not use the traffic light cycle constraint will make recognition errors or have a very slow recognition speed. Compared with the above scenario, based on the obtained networked traffic light data, when the networked data delay is large and it is necessary to rely on the vehicle's perception, the remaining traffic light cycle time is used as a deep learning constraint to optimize the vehicle's perception results, speed up the vehicle's accurate recognition of traffic lights, reduce computing resources, and enhance robustness. In addition, when the reliability of the networked data is low, if the vehicle perceives the traffic light data, it will transmit the traffic light data back to the cloud platform. The cloud server will collect and compare the data to update the intersections without traffic lights or with inaccurate traffic light data.
[0200] Figure 4 This is a schematic diagram of a traffic data generation device provided in an embodiment of the present application. Specifically, it includes:
[0201] A first acquiring unit 401 is configured to acquire traffic data indicated by a traffic light in a first manner to obtain first traffic data;
[0202] A second acquiring unit 402 is configured to acquire the traffic data indicated by the traffic light in a second manner to obtain second traffic data when the first traffic data does not meet the preset first condition;
[0203] A third acquiring unit 403 is configured to acquire the traffic data indicated by the traffic light in a third manner to obtain third traffic data when the second traffic data does not meet the preset second condition;
[0204] The first generating unit 404 is configured to generate target traffic data for the traffic light based on the third traffic data.
[0205] In one possible implementation,
[0206] The first condition includes: the delay of the first traffic data obtained by the first method is less than or equal to a preset first delay threshold; and / or
[0207] The second condition includes: the delay of the second traffic data obtained using the second method is less than or equal to a preset second delay threshold.
[0208] In a possible implementation manner, the third manner represents performing image recognition on the image of the traffic light; and
[0209] The method of obtaining the traffic data indicated by the traffic light in a third manner to obtain third traffic data includes:
[0210] Acquiring an image of the traffic light;
[0211] Inputting the image into a pre-trained image recognition model to obtain a plurality of traffic data of the traffic light, wherein the image recognition model is used to determine the plurality of traffic data indicated by the traffic light based on the image of the traffic light;
[0212] Based on the first traffic data and / or the second traffic data, third traffic data is determined from the obtained plurality of traffic data of the traffic light.
[0213] In a possible implementation, when the first traffic data meets the preset first condition, the device further includes:
[0214] a first determining unit (not shown in the figure), configured to determine the first traffic data as target traffic data for the traffic light; or
[0215] The second determining unit (not shown) is configured to determine the first traffic data as target traffic data of the traffic light, and prohibit adopting at least one of the second manner and the third manner to obtain the traffic data indicated by the traffic light.
[0216] In a possible implementation, when the second traffic data meets the preset second condition, the apparatus further includes:
[0217] a third determining unit (not shown in the figure), configured to determine the second traffic data as target traffic data for the traffic light; or
[0218] The fourth determining unit (not shown) is configured to determine the second traffic data as the target traffic data of the traffic light, and prohibit adopting at least one of the first and third methods to obtain the traffic data indicated by the traffic light.
[0219] In one possible implementation, after obtaining the target traffic data, the apparatus further includes:
[0220] a second generating unit (not shown in the figure), configured to generate a control instruction for a target vehicle based on the target traffic data, so as to enable the target vehicle to perform an operation matching the target traffic data;
[0221] Wherein, the target vehicle indicates the driving mode via the traffic light.
[0222] In a possible implementation manner, the first method or the second method indicates obtaining from a preset server; and
[0223] After generating the target traffic data of the traffic light based on the third traffic data, the apparatus further includes:
[0224] a fifth determining unit (not shown in the figure), configured to determine the traffic data indicated by the traffic light recorded by the preset server to obtain fourth traffic data;
[0225] a sixth determining unit (not shown in the figure), configured to determine whether the fourth traffic data matches the third traffic data;
[0226] The seventh determining unit (not shown) is configured to redetermine the fourth traffic data if the fourth traffic data does not match the third traffic data, and update the fourth traffic data before redetermining to the fourth traffic data after redetermining.
[0227] The traffic data generation device provided in this embodiment may be as follows Figure 4 The traffic data generation device shown in can execute all the steps of the traffic data generation method described above, thereby achieving the technical effects of the traffic data generation method described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0228] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and another user interface 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505.
[0229] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a touch screen).
[0230] It is understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0231] In some embodiments, the memory 502 stores the following elements, executable units, or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and application programs 5022 .
[0232] Among them, the operating system 5021 includes various system programs, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and handle hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program that implements the method of the embodiment of the present application can be included in the application 5022.
[0233] In this embodiment, by calling a program or instruction stored in the memory 502, specifically, a program or instruction stored in the application 5022, the processor 501 is configured to execute the method steps provided in each method embodiment, for example, including:
[0234] Acquiring traffic data indicated by a traffic light using a first method to obtain first traffic data;
[0235] When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is acquired in a second manner to obtain second traffic data;
[0236] When the second traffic data does not meet the preset second condition, the traffic data indicated by the traffic light is acquired using a third method to obtain third traffic data;
[0237] Based on the third traffic data, target traffic data of the traffic light is generated.
[0238] The methods disclosed in the above embodiments of the present application can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 501 or by software instructions. The above processor 501 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software units can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 502 , and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0239] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, or other electronic units or combinations thereof for performing the above-mentioned functions of the present application.
[0240] For software implementation, the techniques described above can be implemented by a unit that performs the functions described above. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0241] The electronic device provided in this embodiment may be Figure 5 The electronic device shown in can execute all the steps of the above-mentioned methods for generating traffic data, thereby achieving the technical effects of the above-mentioned methods for generating traffic data. Please refer to the above-mentioned relevant description for details. For the sake of brevity, it will not be repeated here.
[0242] The present application also provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and the memory may also include a combination of the aforementioned types of memory.
[0243] When one or more programs in the storage medium can be executed by one or more processors, the traffic data generation method executed on the electronic device side can be implemented.
[0244] The processor is configured to execute a traffic data generation program stored in the memory to implement the following steps of a traffic data generation method executed on the electronic device side:
[0245] Acquiring traffic data indicated by a traffic light using a first method to obtain first traffic data;
[0246] When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is acquired in a second manner to obtain second traffic data;
[0247] When the second traffic data does not meet the preset second condition, the traffic data indicated by the traffic light is acquired using a third method to obtain third traffic data;
[0248] Based on the third traffic data, target traffic data of the traffic light is generated.
[0249] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0250] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0251] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0252] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for generating traffic data, characterized in that: The method comprises: Acquiring traffic data indicated by a traffic light using a first method to obtain first traffic data; When the first traffic data does not meet the preset first condition, the traffic data indicated by the traffic light is acquired in a second manner to obtain second traffic data; When the second traffic data does not meet the preset second condition, the traffic data indicated by the traffic light is acquired using a third method to obtain third traffic data; Based on the third traffic data, target traffic data of the traffic light is generated.
2. The method according to claim 1, characterized in that The first condition includes: the delay of the first traffic data obtained by the first method is less than or equal to a preset first delay threshold; and / or The second condition includes: the delay of the second traffic data obtained using the second method is less than or equal to a preset second delay threshold.
3. The method according to claim 1, characterized in that The third mode represents performing image recognition on the image of the traffic light; and The method of obtaining the traffic data indicated by the traffic light in a third manner to obtain third traffic data includes: Acquiring an image of the traffic light; Inputting the image into a pre-trained image recognition model to obtain a plurality of traffic data of the traffic light, wherein the image recognition model is used to determine the plurality of traffic data indicated by the traffic light based on the image of the traffic light; Based on the first traffic data and / or the second traffic data, third traffic data is determined from the obtained plurality of traffic data of the traffic light.
4. The method according to claim 1, wherein When the first traffic data meets the preset first condition, the method further includes: determining the first traffic data as target traffic data for the traffic light; or The first traffic data is determined as target traffic data of the traffic light, and at least one of the second manner and the third manner is prohibited from being adopted to obtain the traffic data indicated by the traffic light.
5. The method according to claim 1, wherein When the second traffic data meets the preset second condition, the method further includes: determining the second traffic data as target traffic data for the traffic light; or The second traffic data is determined as the target traffic data of the traffic light, and at least one of the first manner and the third manner is prohibited from being adopted to obtain the traffic data indicated by the traffic light.
6. The method according to any one of claims 1 to 5, characterized in that After obtaining the target traffic data, the method further includes: generating a control instruction for a target vehicle based on the target traffic data so as to cause the target vehicle to perform an operation matching the target traffic data; Wherein, the target vehicle indicates the driving mode via the traffic light.
7. The method according to any one of claims 1 to 5, characterized in that The first method or the second method indicates obtaining from a preset server; as well as After generating the target traffic data of the traffic light based on the third traffic data, the method further includes: determining the traffic data indicated by the traffic light recorded by the preset server to obtain fourth traffic data; determining whether the fourth traffic data matches the third traffic data; In a case where the fourth traffic data does not match the third traffic data, the fourth traffic data is re-determined, and the fourth traffic data before the re-determination is updated to the fourth traffic data after the re-determination.
8. A traffic data generating device, characterized in that: The device comprises: a first acquiring unit, configured to acquire traffic data indicated by a traffic light in a first manner to obtain first traffic data; a second acquiring unit, configured to acquire the traffic data indicated by the traffic light in a second manner to obtain second traffic data when the first traffic data does not meet the preset first condition; a third acquiring unit, configured to acquire the traffic data indicated by the traffic light in a third manner to obtain third traffic data when the second traffic data does not meet the preset second condition; The first generating unit is configured to generate target traffic data of the traffic light based on the third traffic data.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.