CN113593261B - Signal lamp countdown processing method, device, system, equipment and storage medium - Google Patents

Signal lamp countdown processing method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN113593261B
CN113593261B CN202110743526.9A CN202110743526A CN113593261B CN 113593261 B CN113593261 B CN 113593261B CN 202110743526 A CN202110743526 A CN 202110743526A CN 113593261 B CN113593261 B CN 113593261B
Authority
CN
China
Prior art keywords
period
time
color
signal lamp
lamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110743526.9A
Other languages
Chinese (zh)
Other versions
CN113593261A (en
Inventor
吴冬升
王传奇
曾少旭
林慧钒
倪鸿鑫
郑廷钊
刘双广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Gaoxing Internet Connection Technology Co ltd
Original Assignee
Gosuncn Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gosuncn Technology Group Co Ltd filed Critical Gosuncn Technology Group Co Ltd
Priority to CN202110743526.9A priority Critical patent/CN113593261B/en
Publication of CN113593261A publication Critical patent/CN113593261A/en
Application granted granted Critical
Publication of CN113593261B publication Critical patent/CN113593261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/07Controlling traffic signals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention provides a signal lamp countdown processing method, a device, a system, equipment and a storage medium, wherein the method comprises the following steps: carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state; determining the current period of the signal lamp according to the currently stored period identification; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation; and calculating the countdown of the signal lamp according to the current period, the starting time of the current period and the time corresponding to the time stamp of the lamp state data. The invention obtains the lamp state data of the signal lamp through the video identification technology, performs count-down statistics, can realize the adaptation of the signal lamp count-down scheme to all signal machines, and reduces the cost.

Description

Signal lamp countdown processing method, device, system, equipment and storage medium
Technical Field
The invention relates to the technical field of signal lamp timing, in particular to a signal lamp countdown processing method, a device, a system, equipment and a storage medium.
Background
The traffic signal lamp has a very important traffic guidance function in modern traffic cases, and particularly, traffic signal lamps are subjected to traffic light timing, so that safe, reliable and effective traffic guidance is provided for urban road intersections (or traffic networks). At present, a camera is arranged at a road intersection to shoot a signal lamp, and a signal machine is adopted to carry out conversion control on the signal lamp. And the transform control of signal lamp involves the signal lamp scheme of timing, and at present, some semaphore producers give the signal lamp scheme of timing through customization communication protocol, but this needs external controller, and is with high costs to the communication protocol of different producers is inconsistent, leads to the unable other semaphores of adaptation of the signal lamp countdown scheme of the semaphore of a producer.
Disclosure of Invention
In view of the foregoing problems, an object of the present invention is to provide a method, an apparatus, a system, a device, and a storage medium for signal lamp countdown processing, which can adapt to all signal lamps in a signal lamp countdown scheme, thereby reducing the cost.
In a first aspect, an embodiment of the present invention provides a signal lamp countdown processing method, including:
carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state;
determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
and calculating the countdown of the signal lamp according to the current period, the starting time of the current period and the time corresponding to the time stamp of the lamp state data.
As a refinement of the above, the cycle comprises a number of time periods;
then, the method further comprises:
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
recording the initial receiving time corresponding to the first color corresponding lamp state data received for the first time;
when the light state data corresponding to the first color is received at the ith time, updating the locally stored time period corresponding to the light state of the first color according to the light state data corresponding to the first color; wherein the time period comprises a start time, an end time and a duration thereof;
judging whether the duration corresponding to the lamp states of the first color, the second color and the third color which are stored currently is equal or not; wherein i > 1;
if yes, inserting the updated time interval into the cycle obtained by the last calculation;
if not, inserting the updated time interval into the newly calculated period;
and updating the period identification according to the updated period obtained by the last calculation and the latest calculated period.
As an improvement of the above solution, the updating the period identifier according to the updated last calculated period and the updated latest calculated period includes:
comparing the updated cycle obtained by the last calculation with the latest calculation;
when the updated cycle obtained by the last calculation and the updated cycle obtained by the latest calculation meet the preset cycle identifier updating condition, updating the cycle identifier to be true; the cycle identifier updating condition is that the number of the time periods in the updated cycle obtained by the last calculation is equal to the number of the time periods in the updated cycle obtained by the latest calculation, and the corresponding duration of each time period is equal;
and updating the period identifier to be false when the updated period obtained by the last calculation and the updated period obtained by the latest calculation do not meet the period identifier updating condition.
As an improvement of the above solution, the inserting the updated time period into the cycle obtained by the last calculation includes:
comparing the start time and the end time of each time interval in the cycle obtained by the last calculation according to the updated start time and the updated end time of the time interval;
and when the end time of the j time interval in the cycle obtained by the last calculation is less than the start time of the updated time interval, and the end time of the updated time interval is less than the start time of the j +1 time interval in the cycle obtained by the last calculation, inserting the updated time interval between the j time interval and the j +1 time interval in the cycle obtained by the last calculation.
As an improvement of the above scheme, the determining the current period of the signal lamp according to the currently stored period identifier includes:
reading a currently stored period identifier;
and when the period identification is true, determining that the current period of the signal lamp is equal to the period obtained by the last calculation.
As an improvement of the above scheme, the calculating the countdown of the signal lamp according to the current cycle, the start time thereof, and the time corresponding to the timestamp of the light state data includes:
calculating the difference between the time corresponding to the timestamp of the light state data and the starting time by taking the starting receiving time as the starting time of the current period;
the difference value is subjected to remainder calculation by adopting the current period to obtain the timed duration;
and calculating the difference between the current period and the timed time length to obtain the countdown of the signal lamp.
In a second aspect, an embodiment of the present invention provides a signal lamp countdown processing apparatus, including:
the lamp state data acquisition module is used for acquiring lamp state data of the signal lamp; the signal lamp state data are obtained by carrying out video identification on the signal lamp; the light state data comprises the light state of a signal lamp and a timestamp of the light state;
the period determining module is used for determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
and the countdown calculating module is used for calculating the countdown of the signal lamp according to the current cycle, the starting time of the current cycle and the time corresponding to the timestamp of the light state data.
In a third aspect, an embodiment of the present invention provides a signal lamp countdown processing system, including: the device comprises a camera device and a signal lamp countdown processing device;
the camera equipment is used for carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal lamp and a timestamp of the light state;
the signal lamp countdown processing device comprises:
the lamp state data acquisition module is used for acquiring the lamp state data of the signal lamp;
the period determining module is used for determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
and the countdown calculating module is used for calculating the countdown of the signal lamp according to the current cycle, the starting time of the current cycle and the time corresponding to the timestamp of the light state data.
In a fourth aspect, an embodiment of the present invention provides a signal light countdown processing apparatus, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the signal light countdown processing method according to any one of the first aspect when executing the computer program.
In a fifth aspect, the embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the signal lamp countdown processing method according to any one of the first aspect.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the method comprises the steps of carrying out video identification on a signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state; determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation; and calculating the countdown of the signal lamp according to the current period, the starting time of the current period and the time corresponding to the time stamp of the lamp state data. The invention obtains the lamp state data of the signal lamp through the video identification technology, performs count-down statistics, can realize the adaptation of the signal lamp count-down scheme to all signal machines, and reduces the cost.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a signal lamp countdown processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a signal lamp countdown calculation process according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a signal lamp countdown processing device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a signal light countdown processing system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a signal lamp countdown processing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
Please refer to fig. 1, which is a flowchart illustrating a signal lamp countdown processing method according to an embodiment of the present invention, where the signal lamp countdown processing method includes:
s1: carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state;
for example, the light state of the signal light generally includes three colors, for example, green, yellow, and red, which are common on roads. In the embodiment of the invention, the period of the signal lamp is defined to be composed of a plurality of < green, yellow and red >, and all comprise three lamp states of green, yellow and red. Furthermore, when the signal lamp is in the conditions of full red, full yellow and red-yellow alternation, only the lamp state data is sent, and the countdown is not calculated.
Shooting the signal lamp through camera equipment, and recording a timestamp corresponding to each frame of image; through the video identification technology, the time stamp of the first occurrence and the time stamp of the last occurrence of various light states can be obtained, so that the duration of the light state is obtained. In an embodiment of the present invention, the data is defined as follows:
lamp state data:
Figure BDA0003142129810000061
phase data: consists of green, yellow and red three light state data
Figure BDA0003142129810000062
S2: determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
illustratively, the image pickup apparatus sends the light state data to a signal for subsequent countdown calculation, and a period flag is locally stored in the signal, and the initial value of the flag is false (false), and when the last calculated period of the signal coincides with the latest calculated period, the value of the flag is modified to true (true). And after the signal machine receives the light state data, reading a locally stored flag, and if the flag is true, indicating that a complete cycle identifier is obtained, and obtaining the cycle calculated last time as the current cycle. The specific data are defined as follows:
periodic data List < Range >: there are Period (representing the last calculated Period) and Period cache (representing the most recently calculated Period), consisting of several ranges (representing time periods).
Periodic timing judger for certain signal lamp
Figure BDA0003142129810000071
Time of first piece of data per cycle
Figure BDA0003142129810000072
S3: and calculating the countdown of the signal lamp according to the current period, the starting time of the current period and the time corresponding to the time stamp of the lamp state data.
According to the embodiment of the invention, the lamp state data of the signal lamp is acquired through the video identification technology, and countdown statistics is carried out, so that the signal lamp countdown scheme can be adapted to all signal machines, and the cost is reduced.
In an alternative embodiment, the cycle comprises several periods;
then, the method further comprises:
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
recording the initial receiving time corresponding to the first color corresponding lamp state data received for the first time;
when the light state data corresponding to the first color is received at the ith time, updating the locally stored time period corresponding to the light state of the first color according to the light state data corresponding to the first color; wherein the time period comprises a start time, an end time and a duration thereof;
judging whether the duration corresponding to the lamp states of the first color, the second color and the third color which are stored currently is equal or not; wherein i > 1;
if yes, inserting the updated time interval into the cycle obtained by the last calculation;
if not, inserting the updated time interval into the newly calculated period;
and updating the period identification according to the updated last calculated period and the latest calculated period.
In the embodiment of the present invention, the first color, the second color, and the third color refer to green, yellow, and red, respectively, that is, the periodic sequence of the signal lamp is green, yellow, and red. When the light state in the previous light state data is red and the light state in the newly received light state data is green, executing a countdown calculation process; otherwise, the signal machine directly sends the light state message.
Further, the updating the period identifier according to the updated last calculated period and the latest calculated period includes:
comparing the updated cycle obtained by the last calculation with the latest calculation;
when the updated cycle obtained by the last calculation and the updated cycle obtained by the latest calculation meet a preset cycle identifier updating condition, updating the cycle identifier to be true; the cycle identifier updating condition is that the number of the time periods in the updated cycle obtained by the last calculation is equal to the number of the time periods in the updated cycle obtained by the latest calculation, and the corresponding duration of each time period is equal;
and updating the period identifier to be false when the updated period obtained by the last calculation and the updated period obtained by the latest calculation do not meet the period identifier updating condition.
The countdown calculation process is as follows:
s11: and recording the corresponding initial receiving time of the received first piece of green light data as the initial time of the current period.
S12: each time the signaler receives the light state data, the starting time (first time), the ending time (lastTime) and the duration (duration) of the time interval (Range Temp) corresponding to the corresponding light state are updated.
S13: the following determination is made for a locally stored time period (RangeTemp) each time a new piece of green light data is received:
if PeriodCache [ len (period) ] - [ RangeTemp ]/[ judgment on three lamp state duration ]
Insertion of RangeTemp into Period// equal case
Else
Insertion of RangeTemp into Period cache// unequal cases
If the durations of the green, yellow and red light states are equal, the updated time Period in step S12 is inserted into Period, otherwise, the updated time Period in step S12 is inserted into Period cache. After the Period information is updated, the Period (the Period obtained by the last calculation) is compared with the Period date (the Period obtained by the latest calculation), when the number of the periods is consistent with the duration of each Period, the complete Period is taken, and the Period flag is modified to be true.
In an alternative embodiment, the inserting the updated period into the last calculated cycle includes:
comparing the start time and the end time of each time interval in the cycle obtained by the last calculation according to the updated start time and the updated end time of the time interval;
and when the end time of the j-th time interval in the cycle obtained by the last calculation is less than the start time of the updated time interval, and the end time of the updated time interval is less than the start time of the j + 1-th time interval in the cycle obtained by the last calculation, inserting the updated time interval between the j-th time interval and the j + 1-th time interval in the cycle obtained by the last calculation.
In an optional embodiment, the determining the current period of the signal lamp according to the currently stored period identifier includes:
reading a currently stored period identifier;
and when the period identification is true, determining that the current period of the signal lamp is equal to the period obtained by the last calculation.
In the embodiment of the present invention, as shown in fig. 2, the period identifier is checked, if the period identifier is true, it indicates that the complete period has been taken, the countdown calculation process is performed, the information of the light state, countdown and timing scheme is filled, and the light state and countdown message is issued; if the period is marked as false, the complete period is not taken, only the light state is filled, and then a light state message is sent.
In an optional embodiment, the calculating the countdown of the signal lamp according to the current cycle and the start time thereof and the time corresponding to the timestamp of the light state data includes:
calculating the difference between the time corresponding to the timestamp of the light state data and the starting time by taking the starting receiving time as the starting time of the current period;
the difference value is subjected to remainder calculation by adopting the current period to obtain the timed duration;
and calculating the difference between the current period and the timed time length to obtain the countdown of the signal lamp.
The flow of calculating the countdown is as follows:
TimePase=(TimeStamp-FirstRecvTime)%Period
accumulating Period until the sum of a certain stage is larger than the TimePase, and setting the sum as SumDuration
CountDown=SumDuration-TimePase
The TimePase indicates the timed duration, the TimeStamp indicates the TimeStamp of the newly received lamp-up data, the FirstRecvTime indicates the starting time of the period, and the percent indicates the remainder; period represents the current period, which is equal to the sum of the durations of all lamp states; CountDown represents a CountDown.
For example, assuming that the current period is (green 4s, yellow 3s, red 3s), firstdecvtime is 1s, and TimeStamp is 30s, the current period 4+3+3 is 10 s. The TimePase calculation is 9, which indicates that it is the 9 th second in a cycle, and since the current cycle is 10s and is greater than 9s, it indicates that it is currently a red light, and CountDown is 10-9 or 1s, i.e. the CountDown of the signal light is 1 s.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the method comprises the steps of identifying the lamp state of a signal lamp based on a video, and performing countdown statistics based on lamp state data to obtain a complete countdown period of a signal machine, wherein the data are complete and reliable; because the semaphore of so different producers can be adapted to current video identification technique, the commonality is high to can realize all semaphores of signal lamp countdown scheme adaptation, reduce cost. Meanwhile, the calculated light state countdown is provided by a communication protocol, and effective support is provided for the service of designing a traffic light scene by a vehicle network.
Example two
Referring to fig. 3, an embodiment of the present invention provides a signal lamp countdown processing apparatus, including:
the light state data acquisition module 11 is used for acquiring light state data of the signal lamp; the signal lamp state data are obtained by carrying out video identification on the signal lamp; the light state data comprises the light state of a signal lamp and a timestamp of the light state;
the period determining module 12 is configured to determine a current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
and the countdown calculating module 13 is configured to calculate a countdown of the signal lamp according to the current cycle, the starting time of the current cycle, and the time corresponding to the timestamp of the light state data.
In an alternative embodiment, the cycle comprises a number of periods;
then, the apparatus further comprises: the device comprises a starting moment recording module, a time period updating module, a duration judging module, a first interpolation module, a second interpolation module and a cycle identifier updating module;
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
the starting time recording module is used for recording a starting receiving time corresponding to the first color corresponding lamp state data received for the first time;
the time interval updating module is used for updating the locally stored time interval corresponding to the lamp state of the first color according to the lamp state data corresponding to the first color when the lamp state data corresponding to the first color is received at the ith time; wherein the time period comprises a start time, an end time and a duration thereof;
the time length judging module is used for judging whether the duration lengths corresponding to the currently stored lamp states of the first color, the second color and the third color are equal or not; wherein i > 1;
the first interpolation module is used for inserting the updated time interval into the cycle obtained by the last calculation if the time interval is equal to the updated time interval;
the second interpolation module is used for inserting the updated time interval into the newly calculated period if the updated time interval is not within the newly calculated period;
and the period identifier updating module is used for updating the period identifier according to the updated period obtained by the last calculation and the updated period obtained by the latest calculation.
In an optional embodiment, the period identifier updating module includes:
a comparison unit for comparing the updated last calculated period with the latest calculated period;
the updating unit is used for updating the cycle identifier to be true when the updated cycle obtained by the last calculation and the updated cycle obtained by the latest calculation meet the preset cycle identifier updating condition; the cycle identifier updating condition is that the number of the time periods in the updated cycle obtained by the last calculation is equal to the number of the time periods in the updated cycle obtained by the latest calculation, and the corresponding duration of each time period is equal;
the updating unit is further configured to update the cycle identifier to be false when the updated last calculated cycle and the updated latest calculated cycle do not satisfy the cycle identifier updating condition.
In an alternative embodiment, the first interpolation module is configured to
Comparing the start time and the end time of each time interval in the cycle obtained by the last calculation according to the updated start time and the updated end time of the time interval;
and when the end time of the j-th time interval in the cycle obtained by the last calculation is less than the start time of the updated time interval, and the end time of the updated time interval is less than the start time of the j + 1-th time interval in the cycle obtained by the last calculation, inserting the updated time interval between the j-th time interval and the j + 1-th time interval in the cycle obtained by the last calculation.
In an alternative embodiment, the period determination module 12 includes:
a cycle identifier reading unit for reading the currently stored cycle identifier;
and the period determining unit is used for determining that the current period of the signal lamp is equal to the period obtained by the last calculation when the period identifier is true.
In an alternative embodiment, the countdown counting module 13 includes:
the first difference value calculating unit is used for calculating the difference value between the time corresponding to the time stamp of the light state data and the starting time by taking the starting receiving time as the starting time of the current period;
the complementation unit is used for complementing the difference value by adopting the current period to obtain the timed duration;
and the second difference value calculating unit is used for calculating the difference value between the current period and the timed duration to obtain the countdown of the signal lamp.
It should be noted that the working principle and technical effect of the embodiment of the present invention are the same as those of the signal lamp countdown processing method described in the first embodiment, and detailed description thereof is omitted here.
EXAMPLE III
Referring to fig. 4, an embodiment of the present invention provides a signal lamp countdown processing system, including: the device comprises a camera 2 and a signal lamp countdown processing device 1;
the camera device 2 is used for carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state;
the signal lamp countdown processing device 1 includes:
a light state data obtaining module 11, configured to obtain light state data of the signal lamp;
the period determining module 12 is configured to determine a current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
and the countdown calculating module 13 is configured to calculate a countdown of the signal lamp according to the current cycle, the starting time of the current cycle, and the time corresponding to the timestamp of the light state data.
Please refer to embodiment two for a specific structural schematic of the signal lamp countdown processing device 1, and a detailed description thereof is omitted here.
Example four
Referring to fig. 5, a signal countdown processing apparatus according to an embodiment of the present invention includes at least one processor 11, such as a CPU, at least one network interface 14 or other user interface 13, a memory 15, and at least one communication bus 12, where the communication bus 12 is used to implement connection communication between these components. The user interface 13 may optionally include a USB interface, and other standard interfaces, wired interfaces. The network interface 14 may optionally include a Wi-Fi interface as well as other wireless interfaces. The memory 15 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 15 may optionally comprise at least one memory device located remotely from the aforementioned processor 11.
In some embodiments, memory 15 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
an operating system 151, which contains various system programs for implementing various basic services and for processing hardware-based tasks;
and (5) a procedure 152.
Specifically, the processor 11 is configured to call the program 152 stored in the memory 15, and execute the semaphore countdown processing method according to the above-described embodiment, for example, step S1 shown in fig. 1. Alternatively, the processor implements the functions of the modules/units in the above device embodiments when executing the computer program, for example, the light state data acquiring module.
Illustratively, the computer program may be partitioned into one or more modules/units, stored in the memory and executed by the processor, to implement the invention. The one or more modules/units may be a series of instruction sections of a computer program capable of performing a specific function, the instruction sections being used for describing the execution process of the computer program in the signal lamp countdown processing device.
The signal lamp countdown processing equipment can be computing equipment such as a VCU, an ECU and a BMS. The signal light countdown processing device can include, but is not limited to, a processor and a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a signal countdown processing device and does not constitute a limitation of the signal countdown processing device, and may include more or fewer components than those shown, or combine some components, or different components.
The Processor 11 may be a Microprocessor (MCU) Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 11 is a control center of the traffic light countdown processing apparatus, and various interfaces and lines are used to connect various parts of the entire traffic light countdown processing apparatus.
The memory 15 may be used to store the computer programs and/or modules, and the processor 11 implements various functions of the signal countdown processing device by running or executing the computer programs and/or modules stored in the memory and calling up data stored in the memory. The memory 15 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 15 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module/unit integrated with the signal lamp countdown processing device can be stored in a computer readable storage medium if the module/unit is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
EXAMPLE five
The embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device in which the computer-readable storage medium is located is controlled to execute the signal lamp countdown processing method according to any one of the first embodiments.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (9)

1. A signal lamp countdown processing method is characterized by comprising the following steps:
carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state;
determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
calculating the countdown of the signal lamp according to the current period, the starting time of the current period and the time corresponding to the time stamp of the lamp state data;
the cycle comprises a number of time periods;
then, the method further comprises:
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
recording the initial receiving time corresponding to the first color corresponding lamp state data received for the first time;
when the light state data corresponding to the first color is received at the ith time, updating the locally stored time period corresponding to the light state of the first color according to the light state data corresponding to the first color; wherein the time period comprises a start time, an end time and a duration thereof;
judging whether the duration corresponding to the lamp states of the first color, the second color and the third color which are stored currently is equal or not; wherein i > 1;
if yes, inserting the updated time interval into the cycle obtained by the last calculation;
if not, inserting the updated time interval into the newly calculated period;
and updating the period identification according to the updated period obtained by the last calculation and the latest calculated period.
2. The signal lamp countdown processing method of claim 1, wherein updating the period identifier according to the updated last calculated period and the latest calculated period comprises:
comparing the updated cycle obtained by the last calculation with the latest calculation;
when the updated cycle obtained by the last calculation and the updated cycle obtained by the latest calculation meet the preset cycle identifier updating condition, updating the cycle identifier to be true; the cycle identifier updating condition is that the number of the time periods in the updated cycle obtained by the last calculation is equal to the number of the time periods in the updated cycle obtained by the latest calculation, and the corresponding duration of each time period is equal;
and updating the cycle identifier to be false when the updated cycle obtained by the last calculation and the updated cycle obtained by the latest calculation do not meet the cycle identifier updating condition.
3. The signal lamp countdown processing method of claim 2, wherein the inserting the updated time period into the last calculated cycle includes:
comparing the start time and the end time of each time interval in the cycle obtained by the last calculation according to the updated start time and the updated end time of the time interval;
and when the end time of the j-th time interval in the cycle obtained by the last calculation is less than the start time of the updated time interval, and the end time of the updated time interval is less than the start time of the j + 1-th time interval in the cycle obtained by the last calculation, inserting the updated time interval between the j-th time interval and the j + 1-th time interval in the cycle obtained by the last calculation.
4. The signal lamp countdown processing method of claim 1, wherein said determining the current period of the signal lamp based on the currently stored period identification comprises:
reading a currently stored period identifier;
and when the period identification is true, determining that the current period of the signal lamp is equal to the period obtained by the last calculation.
5. The signal lamp countdown processing method of claim 1, wherein the calculating the countdown of the signal lamp according to the current cycle and the start time thereof and the time corresponding to the time stamp of the light state data includes:
calculating the difference between the time corresponding to the timestamp of the light state data and the starting time by taking the starting receiving time as the starting time of the current period;
the difference value is subjected to remainder calculation by adopting the current period to obtain the timed duration;
and calculating the difference between the current period and the timed time length to obtain the countdown of the signal lamp.
6. A signal lamp countdown processing apparatus, comprising:
the lamp state data acquisition module is used for acquiring lamp state data of the signal lamp; the signal lamp state data are obtained by carrying out video identification on the signal lamp; the light state data comprises the light state of the signal lamp and a timestamp of the light state;
the period determining module is used for determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
the countdown calculating module is used for calculating the countdown of the signal lamp according to the current cycle and the starting time thereof and the time corresponding to the timestamp of the light state data;
the cycle comprises a number of time periods;
then, the apparatus further comprises: the device comprises a starting moment recording module, a time period updating module, a duration judging module, a first interpolation module, a second interpolation module and a cycle identifier updating module;
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
the starting time recording module is used for recording a starting receiving time corresponding to the first color corresponding lamp state data received for the first time;
the time interval updating module is used for updating the locally stored time interval corresponding to the lamp state of the first color according to the lamp state data corresponding to the first color when the lamp state data corresponding to the first color is received at the ith time; wherein the time period comprises a start time, an end time and a duration thereof;
the time length judging module is used for judging whether the duration lengths corresponding to the currently stored lamp states of the first color, the second color and the third color are equal or not; wherein i > 1;
the first interpolation module is used for inserting the updated time interval into the cycle obtained by the last calculation if the time interval is updated;
the second interpolation module is used for inserting the updated time interval into the newly calculated period if the updated time interval is not within the newly calculated period;
and the period identifier updating module is used for updating the period identifier according to the updated period obtained by the last calculation and the updated period obtained by the latest calculation.
7. A signal lamp countdown processing system, comprising: the device comprises a camera device and a signal lamp countdown processing device;
the camera equipment is used for carrying out video identification on the signal lamp to obtain lamp state data of the signal lamp; the light state data comprises the light state of a signal light and a timestamp of the light state;
the signal lamp countdown processing device comprises:
the lamp state data acquisition module is used for acquiring the lamp state data of the signal lamp;
the period determining module is used for determining the current period of the signal lamp according to the currently stored period identifier; wherein, the period mark is determined according to the period obtained by the latest calculation and the period obtained by the last calculation;
the countdown calculating module is used for calculating the countdown of the signal lamp according to the current cycle and the starting time thereof and the time corresponding to the timestamp of the light state data;
the cycle comprises a number of time periods;
then, the signal lamp countdown processing device further includes: the device comprises a starting moment recording module, a time period updating module, a duration judging module, a first interpolation module, a second interpolation module and a cycle identifier updating module;
when the lamp state in the currently received lamp state data is a first color and the lamp state in the last received lamp state data is a third color, executing the following periodic identification updating process; the signal lamp periodically displays the first color, the second color and the third color in sequence;
the starting time recording module is used for recording a starting receiving time corresponding to the first received lamp state data corresponding to the first color;
the time interval updating module is used for updating the locally stored time interval corresponding to the lamp state of the first color according to the lamp state data corresponding to the first color when the lamp state data corresponding to the first color is received at the ith time; wherein the time period comprises a start time, an end time and a duration thereof;
the time length judging module is used for judging whether the duration lengths corresponding to the currently stored lamp states of the first color, the second color and the third color are equal or not; wherein i > 1;
the first interpolation module is used for inserting the updated time interval into the cycle obtained by the last calculation if the time interval is equal to the updated time interval;
the second interpolation module is used for inserting the updated time interval into the newly calculated period if the updated time interval is not within the newly calculated period;
and the period identifier updating module is used for updating the period identifier according to the updated period obtained by the last calculation and the updated period obtained by the latest calculation.
8. A signal light countdown processing apparatus, characterized by comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the signal light countdown processing method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program, wherein the computer program, when running, controls an apparatus in which the computer-readable storage medium is located to perform the signal lamp countdown processing method according to any one of claims 1 to 5.
CN202110743526.9A 2021-06-30 2021-06-30 Signal lamp countdown processing method, device, system, equipment and storage medium Active CN113593261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110743526.9A CN113593261B (en) 2021-06-30 2021-06-30 Signal lamp countdown processing method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110743526.9A CN113593261B (en) 2021-06-30 2021-06-30 Signal lamp countdown processing method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113593261A CN113593261A (en) 2021-11-02
CN113593261B true CN113593261B (en) 2022-07-12

Family

ID=78245611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110743526.9A Active CN113593261B (en) 2021-06-30 2021-06-30 Signal lamp countdown processing method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113593261B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780247B (en) * 2021-11-09 2022-03-01 禾多科技(北京)有限公司 Traffic light detection method and device, electronic equipment and computer readable medium
CN114463723B (en) * 2022-02-10 2023-02-03 广州小鹏自动驾驶科技有限公司 Traffic signal lamp information processing method, device and equipment
CN115662132A (en) * 2022-10-27 2023-01-31 天津天瞳威势电子科技有限公司 Traffic light countdown time identification method and device
CN116434576B (en) * 2022-12-12 2024-03-12 中电信数字城市科技有限公司 Traffic light timing scheme determining method, device, system and equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928947A (en) * 2006-07-24 2007-03-14 宝鸡市公安局交通警察支队 Real-time synchronized control method and system for no-protocol traffic lights and reverse-timing
JP2008027024A (en) * 2006-07-19 2008-02-07 Sumitomo Electric Ind Ltd Signal control system, signal controller and traffic signal control unit
CN201307341Y (en) * 2008-09-09 2009-09-09 郑州市圣兰电子技术有限公司 Self-adapting split type road traffic signal control system
KR20100021701A (en) * 2008-08-18 2010-02-26 권진영 A traffic light
CN102750831A (en) * 2011-04-19 2012-10-24 上海交大高新技术股份有限公司 Road traffic signal countdown displaying device
WO2014109348A1 (en) * 2013-01-10 2014-07-17 住友電工システムソリューション株式会社 Traffic signal control system, traffic signal control device, and lamp control device
CN205230352U (en) * 2015-12-24 2016-05-11 沈阳天久信息技术工程有限公司 Traffic light control system
CN106297325A (en) * 2016-10-13 2017-01-04 烟台大学 A kind of self adaptation pulsed signal machine signal lamp control system
CN107993470A (en) * 2016-10-26 2018-05-04 天津职业技术师范大学 Count down traffic signal lamp condition detection method and the monitoring system based on the method
CN208848370U (en) * 2018-09-27 2019-05-10 成都蜀之匠科技有限公司 Traffic lights prompt system
CN110910665A (en) * 2019-11-06 2020-03-24 北京百度网讯科技有限公司 Signal lamp control method and device and computer equipment
US10730457B1 (en) * 2019-08-15 2020-08-04 GM Global Technology Operations LLC Method and apparatus for presenting information on a vehicle display
CN112634621A (en) * 2020-12-25 2021-04-09 北京百度网讯科技有限公司 Traffic light data quality detection method, device, electronic equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005301518A (en) * 2004-04-08 2005-10-27 Toyota Motor Corp Signal detection device and signal detecting method

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008027024A (en) * 2006-07-19 2008-02-07 Sumitomo Electric Ind Ltd Signal control system, signal controller and traffic signal control unit
CN1928947A (en) * 2006-07-24 2007-03-14 宝鸡市公安局交通警察支队 Real-time synchronized control method and system for no-protocol traffic lights and reverse-timing
KR20100021701A (en) * 2008-08-18 2010-02-26 권진영 A traffic light
CN201307341Y (en) * 2008-09-09 2009-09-09 郑州市圣兰电子技术有限公司 Self-adapting split type road traffic signal control system
CN102750831A (en) * 2011-04-19 2012-10-24 上海交大高新技术股份有限公司 Road traffic signal countdown displaying device
WO2014109348A1 (en) * 2013-01-10 2014-07-17 住友電工システムソリューション株式会社 Traffic signal control system, traffic signal control device, and lamp control device
CN205230352U (en) * 2015-12-24 2016-05-11 沈阳天久信息技术工程有限公司 Traffic light control system
CN106297325A (en) * 2016-10-13 2017-01-04 烟台大学 A kind of self adaptation pulsed signal machine signal lamp control system
CN107993470A (en) * 2016-10-26 2018-05-04 天津职业技术师范大学 Count down traffic signal lamp condition detection method and the monitoring system based on the method
CN208848370U (en) * 2018-09-27 2019-05-10 成都蜀之匠科技有限公司 Traffic lights prompt system
US10730457B1 (en) * 2019-08-15 2020-08-04 GM Global Technology Operations LLC Method and apparatus for presenting information on a vehicle display
CN110910665A (en) * 2019-11-06 2020-03-24 北京百度网讯科技有限公司 Signal lamp control method and device and computer equipment
CN112634621A (en) * 2020-12-25 2021-04-09 北京百度网讯科技有限公司 Traffic light data quality detection method, device, electronic equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Safe Driving at Traffic Lights: An Image Recognition Based Approach;Cuizhu Bao 等;《2019 20th IEEE International Conference on Mobile Data Management (MDM)》;20191231;112-117 *
基于SCOOT交通控制系统的信号灯倒计时研究及应用;刘越伟 张海波;《交通工程》;20120131;145-147 *
智能交通信号控制机的设计与实现;曾艳萍;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20200615;C034-905 *

Also Published As

Publication number Publication date
CN113593261A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN113593261B (en) Signal lamp countdown processing method, device, system, equipment and storage medium
CN117079468B (en) Traffic flow track position method for realizing traffic digital twin
CN114116795B (en) Data storage and query method, device, storage medium and electronic equipment
CN109756616B (en) Message processing method and device, storage medium and electronic device
CN116704765A (en) Road condition prediction method and device and readable storage medium
CN113096420B (en) Information processing method, device and system
CN114199274B (en) Vehicle travel determination method, device, equipment and readable storage medium
CN115547055A (en) Traffic signal lamp coordination control method and device, storage medium and equipment
CN115529423A (en) Journey video generation method and device based on cabin, vehicle and storage medium
CN111368651B (en) Vehicle identification method and device and electronic equipment
CN110609861A (en) Vehicle identification method and device, electronic equipment and storage medium
CN114399912A (en) Adaptive signal control method and system under intelligent networking environment
CN114708425A (en) Method and device for identifying vehicle parking violation and computer readable storage medium
CN111223208B (en) Maintenance reminding method and device for engine parts, storage medium and electronic equipment
CN110910654B (en) Illegal information processing method and device, electronic equipment and readable storage medium
CN115085909A (en) Random number generation method, device, computer equipment and medium
CN111935199B (en) Vehicle-mounted software version information synchronization method, device and system and vehicle
CN114694393A (en) Phase duration adjusting method and device, storage medium and electronic equipment
CN114005186A (en) License plate recognition method and device and parking management system
CN109996010B (en) Video processing method and device, intelligent device and storage medium
CN113903105B (en) Video cyclic storage method and device, electronic equipment and storage medium
CN112423105A (en) Data transmission method, device and medium
CN110012351A (en) Label data acquisition methods, memory, terminal, vehicle and car networking system
CN113642619B (en) Training method, training device, training equipment and training readable storage medium for character recognition model
CN109934232A (en) Vehicle identification method, computer installation and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231008

Address after: Room 619, Building 1, No. 2819 Chuangye Avenue, Huangpu District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangzhou Gaoxing Internet Connection Technology Co.,Ltd.

Address before: 510670 6th floor, 2819 Kaichuang Avenue, Science City, Huangpu District, Guangzhou City, Guangdong Province

Patentee before: GOSUNCN TECHNOLOGY GROUP Co.,Ltd.

TR01 Transfer of patent right