A signal light state inspection method and device

By acquiring traffic light video stream data from roadside equipment and comparing it with traffic control data, the problem of low accuracy in traffic light status detection is solved, achieving high-precision traffic light status verification and improving the reliability of traffic scheduling and autonomous driving.

CN122290374APending Publication Date: 2026-06-26TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2026-03-06
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, communication interruptions, configuration errors, or firmware failures in traffic control units can lead to low accuracy in traffic light status detection, making it impossible to accurately determine the timing of light color changes, resulting in traffic dispatch failures or misjudgments by autonomous driving systems.

Method used

By acquiring video stream data of traffic lights through roadside equipment, using timestamps to determine the first phase list of traffic light status change cycles, and comparing it phase by phase with the second phase list of signal control data, the real-time verification of traffic light status is achieved.

Benefits of technology

It improves the accuracy of traffic light status detection, reduces traffic scheduling failures and autonomous driving misjudgments, lowers operation and maintenance costs, and improves maintenance efficiency. It is applicable to scenarios such as vehicle-road cooperation and autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122290374A_ABST
    Figure CN122290374A_ABST
Patent Text Reader

Abstract

This application discloses a traffic light status verification method and apparatus, relating to the interdisciplinary fields of intelligent transportation systems and computer vision. The method includes: acquiring video stream data of traffic lights from roadside equipment at a target intersection, and determining a first phase list for a traffic light status change cycle based on the timestamps of the video stream data; acquiring signal control data of the traffic lights, and determining a preset second phase list for a traffic light status change cycle based on the signal control data; and comparing the first phase list and the second phase list phase by phase to perform real-time verification of the traffic light status. This method eliminates the need for manual inspection, enables periodic output of traffic light status verification results, reduces maintenance costs, and can detect hardware and software faults in the signal control unit, improving maintenance efficiency. It broadly meets the requirements for traffic light verification in assisted driving and autonomous driving systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the interdisciplinary field of intelligent transportation systems and computer vision, and in particular to a method and device for checking the status of traffic lights. Background Technology

[0002] Traffic lights are core traffic infrastructure that controls road traffic order and ensures the safe and efficient operation of traffic flow. They are also key sensing and interaction nodes for intelligent transportation and vehicle-road cooperation. The core function is to clearly define the right-of-way for motor vehicles, non-motor vehicles, and pedestrians through the sequential switching of red, yellow, and green lights, adapting to various road scenarios such as level crossings, ramps, and pedestrian crossings.

[0003] In related technologies, traffic management platforms primarily rely on signal controllers to actively report phase information. However, these controllers may suffer from communication interruptions, configuration errors, firmware malfunctions, and other issues, leading to distorted reported data. Devices used to detect and identify traffic light states (e.g., light colors) have low timestamp accuracy, making it difficult to precisely align with the timeline of signal control data and determine whether the "light color change moment" matches the signal control command. Therefore, these technologies cannot automatically detect deviations between signal control output and actual light states, resulting in traffic scheduling failures or misjudgments by autonomous driving systems. Summary of the Invention

[0004] The purpose of this invention is to provide a traffic light status verification method and a traffic light status verification device, which at least solves the problem of how to automatically detect the deviation between the signal control output and the actual light status, and solves a technical problem of how to reduce traffic scheduling failures or autonomous driving misjudgments.

[0005] This invention provides the following solution:

[0006] According to one aspect of the present invention, a method for checking the status of a traffic light is provided, comprising:

[0007] Based on the roadside equipment at the target intersection, video stream data of the traffic lights is acquired, and a first phase list for a traffic light state change cycle is determined according to the timestamp of the video stream data.

[0008] Acquire the signal control data of the traffic light, and determine a second phase list for a preset traffic light state change cycle based on the signal control data;

[0009] The status of the traffic lights is checked in real time by comparing the first phase list and the second phase list phase by phase.

[0010] Preferably, determining the first phase list for a traffic light state change cycle based on the timestamps of the video stream data includes:

[0011] Initialize the state of the traffic light, and determine the initial state of the traffic light based on the single frame data of the video stream.

[0012] In response to detecting a transition from the initial state to the second state, the first transition time of the second state phase is recorded;

[0013] The duration of the second state phase is calculated based on the first transition time until the signal light state is detected to transition again, and the second transition time corresponding to the transition state phase is recorded.

[0014] Record the transition time and duration of all traffic light state phases within a traffic light state change cycle;

[0015] The first phase list is determined based on the transition time and duration of all the signal light state phases.

[0016] Preferably, the recording of the first transition time of the second state phase includes:

[0017] The first frame of the video stream data is obtained, and the time corresponding to the first frame of the video stream data is used as the base time.

[0018] The frame rate of the video stream data is obtained, and the first transition time is determined based on the reference time and the frame rate;

[0019] Determine the phase ID corresponding to the second state phase, and record the first transition time based on the phase ID.

[0020] Preferably, the step of using the time corresponding to a single frame of the first video stream as the base time includes:

[0021] In response to the video stream data including absolute world time, the absolute world time corresponding to a single frame of the first frame video stream is used as the reference time;

[0022] or

[0023] In response to the fact that the video stream data does not include the absolute world time, a reference time is estimated by combining the timestamp of the first frame of the network transmission protocol stream of the first frame of the video stream with the network transmission delay time difference.

[0024] Preferably, the step of calculating the duration of the second state phase based on the first transition time includes:

[0025] The first transition time is determined as the start time of the second state phase;

[0026] If the state of the signal light changes again, the time of the last frame of the video stream in the second state is determined as the end time of the phase of the second state.

[0027] The duration of the second state phase is calculated based on the termination time and the start time.

[0028] Preferably, the step of recording the transition time and duration of all traffic light state phases within a traffic light state change cycle further includes:

[0029] In response to the traffic light state configuration, a countdown digit is provided, and the transition time and duration corresponding to each countdown digit are recorded based on the phase ID of the traffic light state.

[0030] Preferably, the phase-by-phase comparison of the first phase list and the second phase list to perform real-time verification of the traffic light status includes:

[0031] In response to the first phase list satisfying the preset multi-directional logic verification rules, the first phase list and the second phase list will be aligned based on time;

[0032] Based on the set offset index, the first phase list and the second phase list are compared phase by phase to determine the offset statistics.

[0033] The status of the traffic lights is checked in real time based on the offset statistics.

[0034] Preferably, the step of comparing the first phase list and the second phase list phase by phase based on the set offset index to determine the offset statistics includes:

[0035] Determine the first start time corresponding to the first phase list with the same phase ID and traffic light status, and the second start time corresponding to the second phase list;

[0036] Calculate the absolute error between the first start time and the second start time;

[0037] Count all phases of each traffic light state in the first phase list to determine the phase statistics result;

[0038] The offset statistics are determined based on the absolute error and the phase statistics.

[0039] Preferably, determining the offset statistics based on the absolute error and the phase statistics includes:

[0040] If the absolute error is greater than a set threshold and / or the phase statistics result includes inconsistencies in the traffic light status, it is determined that there is a phase shift in the traffic light status.

[0041] If the phase statistics result includes phase missing, it is determined that the signal light status has a phase missing.

[0042] The offset statistics are determined based on the phase offset and / or phase loss.

[0043] According to a second aspect of the present invention, a signal light status verification device is provided, comprising:

[0044] The phase list determination module is used to acquire video stream data of traffic lights based on roadside equipment at the target intersection, and determine a first phase list for a traffic light state change cycle based on the timestamp of the video stream data; acquire signal control data of the traffic lights, and determine a second phase list for a preset traffic light state change cycle based on the signal control data;

[0045] The traffic light status verification module is used to compare the first phase list and the second phase list phase by phase to perform real-time verification of the traffic light status.

[0046] According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0047] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the signal light status verification method.

[0048] According to four aspects of the present invention, a computer-readable storage medium is provided, comprising: storing a computer program executable by an electronic device, wherein when the computer program is run on the electronic device, the electronic device performs the steps of a signal light status verification method.

[0049] The above solution achieves the following beneficial technical effects:

[0050] This application uses the timestamps of video stream data to determine the first phase list of a traffic light state change cycle, which can solve the problem of video stream time drift and reduce the detection error of light color change moments.

[0051] This application performs real-time verification of traffic light status by comparing the first phase list and the second phase list phase by phase, eliminating the need for manual inspection. It can periodically output traffic light status verification results, reducing operation and maintenance costs. At the same time, it can detect hardware and software faults in the traffic control unit, improving maintenance efficiency and widely meeting the requirements for traffic light verification in assisted driving and autonomous driving. Attached Figure Description

[0052] Figure 1This is a flowchart of a traffic light status verification method provided by one or more embodiments of the present invention.

[0053] Figure 2 This is a schematic diagram illustrating the acquisition of complete cycle data according to a specific embodiment of the present invention.

[0054] Figure 3 This is a schematic diagram of the system architecture provided in a specific embodiment of the present invention.

[0055] Figure 4 This is a structural diagram of a signal light status inspection device provided in one or more embodiments of the present invention.

[0056] Figure 5 This is a block diagram of an electronic device structure for a signal light status verification method provided in one or more embodiments of the present invention. Detailed Implementation

[0057] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Figure 1 This is a flowchart of a traffic light status verification method provided by one or more embodiments of the present invention.

[0059] like Figure 1 The signal light status verification methods shown include:

[0060] Step S1: Acquire video stream data of traffic lights based on roadside equipment at the target intersection, and determine the first phase list of a traffic light state change cycle based on the timestamp of the video stream data.

[0061] Based on a pre-established topology database of intersections, roadside equipment, and traffic lights, video stream data of traffic lights is acquired from the roadside equipment at the target intersection at set intervals. The topology database also includes metadata such as the traffic light type. Traffic lights are shaped like round lights or arrow lights.

[0062] The acquired video stream data is parsed to obtain the timestamp of each single frame of the video stream. Based on the obtained timestamps and the single frame data of the video stream, the first phase list of a traffic light state change cycle is determined.

[0063] The first phase list includes information such as the start time and phase ID of all traffic light states corresponding to a traffic light state change cycle.

[0064] The status of a traffic light can be its color, such as red, green, or yellow.

[0065] Step S2: Obtain the signal control data of the traffic lights, and determine the second phase list of a preset traffic light state change cycle based on the signal control data.

[0066] It can also obtain the second phase list of traffic light status changes published by the traffic control machine or cloud control platform at the target intersection. This second phase list also includes information such as the start time and phase ID corresponding to the traffic light status change of a complete traffic light status change cycle.

[0067] It should be noted that the information in the second phase list is the pre-set plan information, while the first phase list is the actual information after the traffic lights execute the plan information set in the second phase list.

[0068] Step S3: Compare the first phase list and the second phase list phase by phase to check the status of the traffic lights in real time.

[0069] Align the first phase list and the second phase list with the timestamp, compare the first phase list and the second phase list phase by phase, and perform real-time inspection of the traffic light status to check whether there are any deviations in the traffic light status and whether recalibration is required.

[0070] This embodiment utilizes video stream data from roadside cameras combined with structured data from a signal controller (SDC) to achieve real-time detection, verification, and calibration of traffic light color, phase period, and status through high-precision time alignment. It is applicable to scenarios such as vehicle-to-everything (V2X), vehicle-road-cloud integrated systems, high-precision perception for autonomous driving, and traffic signal maintenance. Furthermore, by comparing the first phase list corresponding to the traffic light's video stream data with the second phase list corresponding to the SDC data, periodic output of traffic light status verification results can be achieved without manual inspection, reducing maintenance costs. Simultaneously, it can detect hardware and software faults in the SDC, improving maintenance efficiency and providing reliable traffic light status services for autonomous vehicles. This approach can broadly meet the needs of traffic light verification for both assisted and autonomous driving.

[0071] Among them, the determination of the first phase list is combined Figure 2 Please provide an explanation.

[0072] Figure 2 This is a schematic diagram illustrating the acquisition of complete cycle data according to a specific embodiment of the present invention. For example... Figure 2 As shown, the traffic light state is initialized, and the initial state of the traffic light is determined based on the single-frame data of the video stream. For example, the traffic light state is C, the video stream data includes n single-frame data, and the initial traffic light state is C = null. The video stream data is then checked, and C_n is output.

[0073] In response to the detection of a transition from the initial state to the second state, the first transition time (T_trans) of the second state phase is recorded. That is, C_n ≠ the current light color C. If the previous signal light state is null, it is skipped; otherwise, the frame number (n_tran) of the single frame data of the transition video stream is recorded. For example, if a signal light is in the red state and transitions to the green state, the transition time of the corresponding phase from red to green is recorded.

[0074] The duration of the second state phase is calculated based on the first transition time until another transition of the traffic light state is detected, and the second transition time corresponding to the transition state phase is recorded. For example, if the previous traffic light state was green and it transitions to yellow, the duration of the green light is calculated based on the transition time of the green light.

[0075] Furthermore, the first transition time is determined as the start time of the second state phase. When another transition of the signal light is detected, the time of the last frame of the second state video stream is determined as the end time of the second state phase. Based on the end time and the start time, the duration of the second state phase is calculated. That is, taking the nth frame of the video stream as an example, the duration = (n_trans - n_start) / Fp

[0076] The process continues until the transition times and durations of all traffic light state phases within a single traffic light state change cycle are recorded. Based on these transition times and durations, a first phase list is determined. For example, a traffic light state change cycle could be defined as the initial state of the traffic light changing from red to green, then to yellow, and finally back to red.

[0077] This process can also acquire the first frame of the video stream data, using the time corresponding to that frame as the base time. The frame rate (Fp) of the video stream data is then acquired, and the first transition time is determined based on the base time and frame rate. For example, taking the nth frame of the video stream data, the transition time is T_trans = T0 + n_trans / Fp.

[0078] Further determine the phase ID corresponding to the second state phase, and record the first transition time based on the phase ID.

[0079] In this embodiment, video stream data can be acquired by deploying a smart camera with high-precision time synchronization (NTP / GPS), or by other smart cameras. The smart camera with high-precision time synchronization (NTP / GPS) supports embedding frame-level exposure absolute timestamps in the Supplemental Enhancement Information (SEI) of the H.264 / H.265 video stream, with an accuracy ≤100μs.

[0080] Based on this, the reference time is determined as follows:

[0081] If the video stream data includes absolute Coordinated Universal Time (UTC), meaning the roadside equipment collecting the video stream data supports SEI timestamps, the absolute UTC time corresponding to the first frame of the video stream is used as the reference time. If the video stream data does not include absolute UTC, meaning the roadside equipment collecting the video stream data does not support SEI timestamps, the reference time is estimated by combining the timestamp of the first frame of the RTMP stream and the network transmission delay time difference. This embodiment solves the time drift problem of traditional video streams by embedding microsecond-level timestamps into SEI, making the detection error of light color change ≤ 1 frame (e.g., 33ms@30fps), supporting both high-precision (SEI) and ordinary (RTMP) cameras, and accommodating both new and existing equipment. For ordinary cameras, the verification error is within 1 second; for intelligent cameras with high-precision time synchronization (NTP / GPS) (vehicle-road-cloud integrated cameras), the verification error is within 100ms.

[0082] In this embodiment, if the traffic light status is configured with countdown numbers, the transition time and duration corresponding to each countdown number can be recorded based on the phase ID of the traffic light status, as well as the frame number of the single frame data of the video stream for each countdown number transition.

[0083] After determining the first phase list, if the first phase list meets the preset multi-directional logic verification rules, the first phase list and the second phase list will be aligned based on time. The multi-directional logic verification rules are as follows:

[0084] At the same time, traffic lights for conflicting phases (such as straight-ahead and left-turn traffic in different directions) cannot both be green; for example, when the east-west traffic light is green, the north-south traffic light should be red.

[0085] The phase when all traffic lights at the target intersection are red should exist during the cycle switching interval.

[0086] Before a traffic light changes from green to red, it must transition through a yellow light (for example, the yellow light lasts for 3 to 5 seconds). During the yellow light period, no conflicting phases (traffic light state transitions) are allowed to start.

[0087] This embodiment uses roadside equipment (such as cameras) for time synchronization and time-based alignment with traffic control data to perform real-time verification of traffic light status after multi-directional phase logic verification, thereby realizing the construction of an end-to-end reliable verification closed loop for traffic light status.

[0088] Furthermore, based on the set offset index, the first phase list and the second phase list are compared phase by phase to determine the offset statistics, and the status of the traffic lights is checked in real time based on the offset statistics.

[0089] The offset indicators can include phase shifts and phase loss of traffic light status, and phase shifts can also include inconsistencies in traffic light status.

[0090] Specifically, the first start time corresponding to the first phase list with the same phase ID and traffic light state, and the second start time corresponding to the second phase list are determined, and the absolute error between the first start time and the second start time is calculated. If the absolute error is greater than a set threshold, it is determined that there is a phase shift in the traffic light state, where the set threshold can be 100ms. The phase ID of the traffic light state corresponding to the phase shift is then marked.

[0091] The system statistically analyzes all phases for each traffic light status in the first phase list to determine the phase statistics. If the phase statistics include inconsistencies in traffic light status, it determines that the traffic light status has shifted. If the phase statistics include missing phases, it determines that the traffic light status has missing phases. Based on the absolute error and the phase statistics, the system determines the shift statistics and performs real-time checks on the traffic light status.

[0092] Figure 3 This is a schematic diagram of the system architecture provided in a specific embodiment of the present invention. For example... Figure 3 As shown, in this embodiment, the real-time verification of traffic light status is performed at the cloud computing layer. The cloud computing layer acquires video stream data of the traffic light status at the target intersection through the roadside perception layer (i.e., roadside devices) and obtains traffic control data through the traffic control data access layer. Based on the acquired video stream data and traffic control data, the cloud computing layer performs comparison calculations and outputs a calibration report for the traffic lights at the intersection. The calibration report includes the verification results of the traffic light status and calibration recommendations to improve the reliability of the traffic signal system.

[0093] For example, for the calibration of a main urban road intersection, GPS timing cameras can be installed in all four directions of the intersection and linked to the cloud-based "Intersection A". The east entrance is registered as a "left-turn arrow light", and the north entrance as a "round light". The cloud retrieves video stream data every 5 minutes. If the system detects that the yellow light at the east entrance started at 10:00:05.230 (SEI time), and the traffic control data shows that the yellow light should have started at 10:00:05.000, then the system outputs: "Yellow light phase offset 230ms, suggesting checking the traffic control clock synchronization." The verification results are generated into a JSON format calibration report and pushed to the traffic management center.

[0094] Figure 4 This is a structural diagram of a signal light status inspection device provided in one or more embodiments of the present invention.

[0095] like Figure 4 The signal light status verification device shown includes: a phase list determination module and a signal light status verification module;

[0096] The phase list determination module is used to acquire video stream data of traffic lights based on roadside equipment at the target intersection, and determine a first phase list for a traffic light state change cycle based on the timestamp of the video stream data; acquire signal control data of traffic lights, and determine a second phase list for a preset traffic light state change cycle based on the signal control data;

[0097] The traffic light status verification module is used to compare the first phase list and the second phase list phase by phase to perform real-time verification of the traffic light status.

[0098] The phase list determination module is used to initialize the traffic light state and determine the initial state of the current traffic light based on the single frame data of the video stream; in response to detecting a transition from the initial state to the second state, it records the first transition time of the second state phase; it calculates the duration of the second state phase based on the first transition time until a transition in the traffic light state is detected again, and records the second transition time corresponding to the transition state phase; it records the transition time and duration of all traffic light state phases within one traffic light state change cycle; and it determines the first phase list based on the transition time and duration of all traffic light state phases.

[0099] The phase list determination module is used to acquire the first frame of video stream data and use the time corresponding to the first frame of video stream data as the reference time; acquire the frame rate of video stream data and determine the first transition time based on the reference time and frame rate; determine the phase ID corresponding to the second state phase and record the first transition time based on the phase ID.

[0100] The phase list determination module is used to determine the reference time by taking the absolute cosmos time corresponding to the first frame of video stream data as the reference time in response to the video stream data including absolute cosmos time; or, in response to the video stream data not including absolute cosmos time, to estimate the reference time by combining the timestamp of the first frame of the network transmission protocol stream of the first frame of video stream data with the network transmission delay time difference.

[0101] The phase list determination module is used to determine the first transition time as the start time of the second state phase; when the state of the traffic light changes again, the time of the last frame of the video stream in the second state is determined as the end time of the second state phase; based on the end time and the start time, the duration of the second state phase is calculated.

[0102] The phase list determination module is used to record the transition time and duration of each countdown number in response to the traffic light status configuration, based on the phase ID of the traffic light status.

[0103] The traffic light status verification module is used to align the first phase list and the second phase list based on time in response to the first phase list meeting the preset multi-directional logic verification rules; compare the first phase list and the second phase list phase by phase based on the set offset index to determine the offset statistics; and perform real-time verification of the traffic light status based on the offset statistics.

[0104] The traffic light status verification module is used to determine the first start time corresponding to the first phase list with the same phase ID and traffic light status, and the second start time corresponding to the second phase list; calculate the absolute error between the first start time and the second start time; count all phases of each traffic light status in the first phase list and determine the phase statistics result; and determine the offset statistics result based on the absolute error and the phase statistics result.

[0105] The traffic light status verification module is used to determine that there is a phase shift in the traffic light status if the absolute error is greater than a set threshold and / or the phase statistics result includes inconsistent traffic light status; if the phase statistics result includes phase missing, it is determined that there is a phase missing in the traffic light status; and the offset statistics result is determined based on the phase shift and / or phase missing.

[0106] Figure 5 This is a block diagram of an electronic device structure for a signal light status verification method provided in one or more embodiments of the present invention.

[0107] like Figure 5 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0108] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of a signal light status verification method.

[0109] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a signal light status verification method.

[0110] This application also provides a vehicle, including:

[0111] Electronic equipment for implementing steps based on a traffic light status inspection method;

[0112] The processor runs a program, and when the program runs, it executes the steps of the signal light status verification method based on the data output from the electronic device.

[0113] A storage medium for storing a program that, when running, performs steps of a signal light status check method on data output from an electronic device.

[0114] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0115] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.

[0116] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.

[0117] Electronic devices can also obtain reset commands corresponding to the storage media. The reset commands corresponding to the storage media are provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and no restrictions are imposed here.

[0118] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.

[0119] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0120] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0121] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0122] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for checking the status of a traffic light, characterized in that, The signal light status verification method includes: Based on the roadside equipment at the target intersection, video stream data of the traffic lights is acquired, and a first phase list for a traffic light state change cycle is determined according to the timestamp of the video stream data. Acquire the signal control data of the traffic light, and determine a second phase list for a preset traffic light state change cycle based on the signal control data; The status of the traffic lights is checked in real time by comparing the first phase list and the second phase list phase by phase.

2. The signal light status inspection method according to claim 1, characterized in that, The step of determining a first phase list for a traffic light state change cycle based on the timestamps of the video stream data includes: Initialize the state of the traffic light, and determine the initial state of the traffic light based on the single frame data of the video stream. In response to detecting a transition from the initial state to the second state, the first transition time of the second state phase is recorded; The duration of the second state phase is calculated based on the first transition time until the signal light state is detected to transition again, and the second transition time corresponding to the transition state phase is recorded. Record the transition time and duration of all traffic light state phases within a traffic light state change cycle; The first phase list is determined based on the transition time and duration of all the signal light state phases.

3. The traffic light status inspection method according to claim 2, characterized in that, The recording of the first transition time of the second state phase includes: The first frame of the video stream data is obtained, and the time corresponding to the first frame of the video stream data is used as the base time. The frame rate of the video stream data is obtained, and the first transition time is determined based on the reference time and the frame rate; Determine the phase ID corresponding to the second state phase, and record the first transition time based on the phase ID.

4. The traffic light status inspection method according to claim 3, characterized in that, The step of using the time corresponding to a single frame of data in the first video stream as the base time includes: In response to the video stream data including absolute world time, the absolute world time corresponding to a single frame of the first frame video stream is used as the reference time; or In response to the fact that the video stream data does not include the absolute world time, a reference time is estimated by combining the timestamp of the first frame of the network transmission protocol stream of the first frame of the video stream with the network transmission delay time difference.

5. The traffic light status inspection method according to claim 2, characterized in that, The calculation of the duration of the second state phase based on the first transition time includes: The first transition time is determined as the start time of the second state phase; If the state of the signal light changes again, the time of the last frame of the video stream in the second state is determined as the end time of the phase of the second state. The duration of the second state phase is calculated based on the termination time and the start time.

6. The traffic light status inspection method according to claim 2, characterized in that, The method of recording the transition time and duration of all traffic light state phases within a traffic light state change cycle also includes: In response to the traffic light state configuration, a countdown digit is provided, and the transition time and duration corresponding to each countdown digit are recorded based on the phase ID of the traffic light state.

7. The signal light status inspection method according to claim 1, characterized in that, The phase-by-phase comparison of the first phase list and the second phase list to perform real-time verification of the traffic light status includes: In response to the first phase list satisfying the preset multi-directional logic verification rules, the first phase list and the second phase list will be aligned based on time; Based on the set offset index, the first phase list and the second phase list are compared phase by phase to determine the offset statistics. The status of the traffic lights is checked in real time based on the offset statistics.

8. The signal light status inspection method according to claim 7, characterized in that, The step of comparing the first phase list and the second phase list phase by phase based on the set offset index to determine the offset statistics includes: Determine the first start time corresponding to the first phase list with the same phase ID and traffic light status, and the second start time corresponding to the second phase list; Calculate the absolute error between the first start time and the second start time; Count all phases of each traffic light state in the first phase list to determine the phase statistics result; The offset statistics are determined based on the absolute error and the phase statistics.

9. The traffic light status inspection method according to claim 8, characterized in that, The step of determining the offset statistics based on the absolute error and the phase statistics includes: If the absolute error is greater than a set threshold and / or the phase statistics result includes inconsistencies in the traffic light status, it is determined that there is a phase shift in the traffic light status. If the phase statistics result includes phase missing, it is determined that the signal light status has a phase missing. The offset statistics are determined based on the phase offset and / or phase loss.

10. A signal light status inspection device, characterized in that, The signal light status verification device includes: The phase list determination module is used to acquire video stream data of traffic lights based on roadside equipment at the target intersection, and determine a first phase list for a traffic light state change cycle based on the timestamp of the video stream data; acquire signal control data of the traffic lights, and determine a second phase list for a preset traffic light state change cycle based on the signal control data; The traffic light status verification module is used to compare the first phase list and the second phase list phase by phase to perform real-time verification of the traffic light status.