Signal lamp control method and device, terminal equipment and storage medium
By dynamically calculating the green light duration of each lane and controlling the signal light switching time, the problem of low traffic efficiency caused by fixed signal light switching time is solved and traffic mobility is improved.
Patent Information
- Application Number
- CN202410960872.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The switching times of traffic lights at major urban traffic intersections are fixed and cannot adapt to changes in the number of vehicles during different traffic periods, resulting in low traffic efficiency.
By obtaining the number of vehicles in each lane, the green light duration of each lane is dynamically calculated, and the switching time of the signal lights is controlled in a preset sequence to ensure that the green light duration of each lane matches the number of vehicles.
It achieves dynamic adjustment of signal light switching time, improves traffic efficiency, and avoids the problem of vehicles passing too early but the green light time is too long during off-peak periods.
Smart Images

Figure CN118865713A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal lights, and in particular to a method, device, terminal equipment and storage medium for controlling a signal light. Background Art
[0002] As the number of cars in my country gradually increases, traffic congestion in cities is becoming more and more serious. In related technologies, the switching time of signal lights (traffic lights) at major traffic intersections in cities is generally fixed. However, the number of vehicles at each intersection will be different during different traffic periods, and the fixed signal light switching time is only applicable to the traffic conditions during a certain period of time, not to all traffic time periods. For example, during the morning rush hour, there are a large number of vehicles at each intersection, so the signal light switching time at each intersection is generally longer. During low traffic periods, there are fewer vehicles at each intersection. If the switching time of the signal light is still as long as during the morning rush hour, it may happen that all the vehicles waiting for the red light at the intersection have passed, but the green light will take a long time to light up, resulting in relatively low traffic efficiency. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, terminal device and storage medium for controlling a traffic light, which can solve the problem of low traffic efficiency caused by fixed switching time of traffic lights in the related art.
[0004] In a first aspect, an embodiment of the present application provides a method for controlling a signal light, comprising: In the first vehicle signal light cycle, obtain the number of vehicles in all lanes; Based on the first number of vehicles in the first lane, a first green light duration of the first lane is calculated, and according to the first green light duration, a first vehicle signal light corresponding to the first lane is controlled to display a green light, where the first lane is a through lane; Based on the number of second vehicles in the second lane, a second green light duration of the second lane is calculated, and according to the second green light duration, a second vehicle signal light corresponding to the second lane is controlled to display a green light, wherein the second lane is a left turn lane corresponding to the first lane; After the green light display duration of the second vehicle signal light reaches the second green light duration, the second vehicle signal light is controlled to display a yellow light, and based on the number of third vehicles in the third lane, a third green light duration of the third lane is calculated, and according to the third green light duration, the third vehicle signal light corresponding to the third lane is controlled to display a green light, and the third lane is a through lane that is an opposite lane to the first lane; After the green light display duration of the first vehicle signal light reaches the first green light duration, the first vehicle signal light is controlled to display a yellow light, and based on the number of fourth vehicles in the fourth lane, a fourth green light duration of the fourth lane is calculated, and according to the fourth green light duration, a fourth vehicle signal light corresponding to the fourth lane is controlled to display a green light, and the fourth lane is a left turn lane corresponding to the third lane; When neither the third vehicle signal light nor the fourth vehicle signal light displays a green light, the second vehicle signal light cycle is entered.
[0005] In a second aspect, an embodiment of the present application provides a control device for a signal light, comprising: An acquisition module, used for acquiring the number of vehicles in all lanes in the first vehicle signal light cycle; a first calculation module, configured to calculate a first green light duration of the first lane based on the first number of vehicles in the first lane, and control a first vehicle signal light corresponding to the first lane to display a green light according to the first green light duration, wherein the first lane is a through lane; A second calculation module is used to calculate a second green light duration of the second lane based on the number of second vehicles in the second lane, and control a second vehicle signal light corresponding to the second lane to display a green light according to the second green light duration, wherein the second lane is a left turn lane corresponding to the first lane; a third calculation module, configured to control the second vehicle signal light to display a yellow light after the green light display duration of the second vehicle signal light reaches the second green light duration, and calculate a third green light duration of the third lane based on the number of third vehicles in the third lane, and control the third vehicle signal light corresponding to the third lane to display a green light according to the third green light duration, wherein the third lane is a through lane that is an opposite lane to the first lane; a fourth calculation module, configured to control the first vehicle signal light to display a yellow light after the green light display duration of the first vehicle signal light reaches the first green light duration, and calculate a fourth green light duration of the fourth lane based on the number of fourth vehicles in the fourth lane, and control the fourth vehicle signal light corresponding to the fourth lane to display a green light according to the fourth green light duration, wherein the fourth lane is a left turn lane corresponding to the third lane; An entry module is used to enter a second vehicle signal light cycle when neither the third vehicle signal light nor the fourth vehicle signal light displays a green light.
[0006] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned signal light control method when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned signal light control method are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the above-mentioned method for controlling a signal light.
[0009] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment of the present application obtains the number of vehicles in all lanes, and calculates the green light duration of each lane according to the number of vehicles in each lane, and controls the vehicle signal lights corresponding to each lane to display green lights in sequence according to the preset lighting sequence. The embodiment of the present application can control the corresponding vehicle signal lights according to the number of vehicles in the lane, realize dynamic adjustment of the switching time of the signal lights, and thus improve traffic efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 This is a schematic diagram of an implementation flow of a signal light control method provided in an embodiment of the present application; Figure 2 is a structural schematic diagram of a signal light control device provided in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.
[0013] It should be noted that the terms "include", "comprises" and "have" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, terminal, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices. In the claims, specification and drawings of the present application, relational terms such as "first" and "second" are merely used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such real-time relationship or order between these entities / operations / objects.
[0014] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0015] As the number of cars in my country gradually increases, traffic congestion in cities is becoming more and more serious. In related technologies, the switching time of signal lights (traffic lights) at major traffic intersections in cities is generally fixed. However, the number of vehicles at each intersection will be different during different traffic periods, and the fixed signal light switching time is only applicable to the traffic conditions during a certain period of time, not to all traffic time periods. For example, during the morning rush hour, there are a large number of vehicles at each intersection, so the signal light switching time at each intersection is generally longer. During low traffic periods, there are fewer vehicles at each intersection. If the switching time of the signal light is still as long as during the morning rush hour, it may happen that all the vehicles waiting for the red light at the intersection have passed, but the green light will take a long time to light up, resulting in relatively low traffic efficiency.
[0016] In view of this, the embodiments of the present application can control the corresponding vehicle signal lights according to the number of vehicles in the lane, realize dynamic adjustment of the switching time of the signal lights, and thus improve traffic efficiency.
[0017] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0018] Figure 1The present invention provides a schematic diagram of the implementation process of a signal light control method provided by an embodiment of the present invention, which can be applied to a terminal device, which can be a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, etc.
[0019] Specifically, the above-mentioned signal light control method may include the following steps S101 to S106.
[0020] Step S101, in the first vehicle signal light cycle, obtaining the number of vehicles in all lanes.
[0021] Among them, the vehicle signal light cycle refers to the complete signal light change cycle in two opposite directions, including green light, yellow light, red light and other stages, for example, it can be the signal light change cycle in the east-west direction, or it can be the signal light change cycle in the north-south direction. Lane refers to the area on the road divided for vehicles to travel in a single direction, such as a straight lane, a left turn lane, etc. It can be understood that the lane in the embodiment of the present application does not include a right turn lane.
[0022] In an embodiment of the present application, at the beginning of each vehicle signal light cycle, the terminal device can detect and record the number of vehicles in each lane through sensors installed at the intersection (such as infrared sensors, video recognition, etc.), or it can use image recognition to identify and record the number of vehicles in each lane.
[0023] Step S102: calculating a first green light duration of the first lane based on the first number of vehicles in the first lane, and controlling a first vehicle signal light corresponding to the first lane to display a green light according to the first green light duration.
[0024] The first lane is a straight lane, which can be a straight lane in any direction. The green light duration refers to the length of time that the vehicle signal light is green.
[0025] In the implementation of the present application, the terminal device can calculate the corresponding first green light duration according to the number of vehicles in the first lane (through lane) through a preset algorithm or model (such as a linear relationship, an exponential relationship, etc.). Then, the terminal device can set the first vehicle signal light to green through the signal light control system, and keep it for the first green light duration.
[0026] Step S103, based on the number of second vehicles in the second lane, calculating the second green light duration of the second lane, and controlling the second vehicle signal light corresponding to the second lane to display a green light according to the second green light duration.
[0027] The second lane is the left-turn lane corresponding to the first lane. For example (for ease of understanding, this example is used in the examples of subsequent steps of this embodiment), if the first lane is the east-bound straight lane, the second lane is the east-bound left-turn lane.
[0028] In an embodiment of the present application, the terminal device can calculate the second green light duration according to the number of vehicles in the second lane through a preset algorithm or model, and control the second vehicle signal light to display a green light for the second green light duration.
[0029] Step S104, after the green light display time of the second vehicle signal light reaches the second green light duration, control the second vehicle signal light to display a yellow light, and based on the number of third vehicles in the third lane, calculate the third green light duration of the third lane, and control the third vehicle signal light corresponding to the third lane to display a green light according to the third green light duration.
[0030] The third lane is a straight lane opposite to the first lane. For example, if the first lane is a straight lane in the east direction, the third lane is a straight lane in the west direction.
[0031] In an embodiment of the present application, after the green light display duration of the second vehicle signal light reaches the second green light duration, the second vehicle signal light will be converted from green to yellow. At this time, the terminal device can calculate the third green light duration according to the number of vehicles in the third lane, and control the third vehicle signal light to display green light and continue for the third green light duration. Exemplarily, after the green light display duration of the second vehicle signal light (corresponding to the left turn lane in the east direction) reaches the second green light duration, the third vehicle signal light in the third lane (corresponding to the straight lane in the west direction) displays green light and continues for the third green light duration.
[0032] Step S105, after the green light display time of the first vehicle signal light reaches the first green light duration, control the first vehicle signal light to display a yellow light, and based on the number of the fourth vehicles in the fourth lane, calculate the fourth green light duration of the fourth lane, and control the fourth vehicle signal light corresponding to the fourth lane to display a green light according to the fourth green light duration.
[0033] The fourth lane is the left-turn lane corresponding to the third lane. For example, if the third lane is a west-direction straight lane, the fourth lane is a west-direction left-turn lane.
[0034] In the implementation of the present application, the terminal device can turn the signal light to yellow when the green light duration of the first lane ends, calculate the green light duration according to the number of vehicles in the fourth lane, and control the fourth vehicle signal light to display green. Exemplarily, after the green light display duration of the first vehicle signal light (corresponding to the eastward through lane) reaches the first green light duration, the fourth vehicle signal light of the fourth lane (corresponding to the westward left turn lane) displays green light and continues for the fourth green light duration.
[0035] Step S106: When neither the third vehicle signal light nor the fourth vehicle signal light displays green light, entering the second vehicle signal light cycle.
[0036] The lane direction corresponding to the second vehicle signal light cycle is perpendicular to the lane direction corresponding to the second vehicle signal light cycle. For example, if the lane direction corresponding to the first vehicle signal light cycle is the east-west direction, the lane direction corresponding to the second vehicle signal light cycle is the north-south direction.
[0037] In an embodiment of the present application, when all relevant vehicle signal lights in the first vehicle signal light cycle no longer display green lights, for example, the green light stage of all lanes in the east-west direction has ended, the terminal device can enter the next vehicle signal light cycle and repeat the above steps, but calculate and control based on the new vehicle quantity data.
[0038] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment of the present application obtains the number of vehicles in all lanes, and calculates the green light duration of each lane according to the number of vehicles in each lane, and controls the vehicle signal lights corresponding to each lane to display green lights in sequence according to the preset lighting sequence. The embodiment of the present application can control the corresponding vehicle signal lights according to the number of vehicles in the lane, realize dynamic adjustment of the switching time of the signal lights, and thus improve traffic efficiency.
[0039] In some specific implementations of the present application, the above-mentioned extraction of video data and audio data from the file to be repaired based on the reference file video stream number and the reference file audio stream number may specifically include steps S401 to S405.
[0040] Step S401, based on the fifth number of vehicles in the fifth lane, calculate the fifth green light duration of the fifth lane, and control the fifth vehicle signal light corresponding to the fifth lane to display a green light according to the fifth green light duration.
[0041] The fifth lane is a straight lane perpendicular to the first lane. For example (for ease of understanding, the examples in steps S101 to S106 are used in the examples of this embodiment), if the first lane is a straight lane in the east direction, the fifth lane is a straight lane in the south or north direction. In this example, the fifth lane is set as a straight lane in the south direction.
[0042] In the implementation manner of the present application, reference may be made to the specific implementation process of step S102 above, which will not be repeated here.
[0043] Step S402, based on the sixth number of vehicles in the sixth lane, calculate the sixth green light duration of the sixth lane, and control the sixth vehicle signal light corresponding to the sixth lane to display a green light according to the sixth green light duration.
[0044] The sixth lane is the left-turn lane corresponding to the fifth lane. For example, if the first lane is the east-bound straight lane and the fifth lane is the south-bound straight lane, the sixth lane is the south-bound left-turn lane.
[0045] In the implementation manner of the present application, reference may be made to the specific implementation process of step S103 above, which will not be repeated here.
[0046] Step S403, after the green light display duration of the sixth vehicle signal light reaches the sixth green light duration, the sixth vehicle signal light is controlled to display a yellow light, and based on the seventh number of vehicles in the seventh lane, the seventh green light duration of the seventh lane is calculated, and the seventh vehicle signal light corresponding to the seventh lane is controlled to display a green light according to the seventh green light duration. The seventh lane is a straight lane opposite to the fifth lane. For example, if the first lane is a straight lane in the east direction and the fifth lane is a straight lane in the south direction, the seventh lane is a straight lane in the north direction.
[0047] In the implementation manner of the present application, reference may be made to the specific implementation process of step S104 above, which will not be repeated here.
[0048] Step S404, after the green light display duration of the fifth vehicle signal light reaches the fifth green light duration, the fifth vehicle signal light is controlled to display a yellow light, and based on the eighth number of vehicles in the eighth lane, the eighth green light duration of the eighth lane is calculated, and the eighth vehicle signal light corresponding to the eighth lane is controlled to display a green light according to the eighth green light duration. The eighth lane is the left-turn lane corresponding to the seventh lane. For example, if the first lane is the east-bound straight lane and the fifth lane is the south-bound straight lane, the eighth lane is the north-bound left-turn lane.
[0049] In the implementation manner of the present application, reference may be made to the specific implementation process of step S105 above, which will not be repeated here.
[0050] Step S405: When the seventh vehicle signal light and the eighth vehicle signal light both do not display green lights, the third vehicle signal light cycle is entered.
[0051] The lane corresponding to the third vehicle signal light cycle is consistent with the lane corresponding to the first vehicle signal light cycle. Exemplarily, if the first vehicle signal light cycle is a signal light change cycle in the east-west direction, the third vehicle signal light cycle is also a signal light change cycle in the east-west direction.
[0052] In the implementation of the present application, the specific implementation process can refer to the specific implementation process of the above step S106, which will not be repeated here. After the first vehicle signal light cycle and the second vehicle signal light cycle are completed, the lanes in each direction have been released once, and then the next cycle begins, that is, steps S101 to S106 are repeated.
[0053] In some specific implementations of the present application, the calculation of the first green light duration of the first lane based on the first number of vehicles in the first lane may specifically include steps S501 to S504.
[0054] Step S501, setting the passing time of the first vehicle in the first lane as the first passing time.
[0055] Step S502, setting the passing time of the second vehicle in the first lane as the second passing time.
[0056] Step S503: multiply the number of vehicles in the first lane except the first vehicle and the second vehicle by a preset constant to obtain a third travel time.
[0057] Step S504, adding the first passing time, the second passing time and the third passing time to obtain a first green light duration.
[0058] In the implementation of the present application, the terminal device can set the passing time of the first vehicle in the first lane to 3S, and use it as the first passing time. And set the passing time of the second vehicle in the second lane to 2S, and use it as the second passing time. The number of vehicles in the first lane other than the first and second vehicles can also be multiplied by a preset constant, which can be set to 0.5S, to obtain the third passing time. For example, assuming that the number of first vehicles in the first lane is 52, the corresponding first green light duration is 3+2+(52-1-1)*0.5=30S.
[0059] It can be understood that the calculation method of the green light duration of other lanes can be consistent with the calculation method of the first green light duration of the first lane.
[0060] In some specific embodiments of the present application, when the number of vehicles in any straight lane or left-turn lane is greater than the corresponding first vehicle threshold, the green light duration corresponding to any straight lane is set to a first set value, and the green light duration corresponding to any left-turn lane is set to a second set value.
[0061] In the implementation of the present application, when the number of vehicles in any straight lane or left-turn lane is greater than the corresponding vehicle threshold, for example, the number of vehicles in the straight lane is greater than 100, or the number of vehicles in the left-turn lane is greater than 50, it can be understood that vehicle congestion occurs in one or more directions. At this time, the green light duration corresponding to any straight lane can be set to a first set value, such as 60S. The green light duration corresponding to any left-turn lane can also be set to a second set value, such as 30S.
[0062] In some specific implementations of the present application, when the number of vehicles in any lane is less than the second vehicle threshold, the green light duration corresponding to any lane is set to a third set value.
[0063] In an embodiment of the present application, when the number of vehicles in any lane is less than the vehicle threshold, for example, the number of vehicles in the straight lane or the left turn lane is less than 5, there are few vehicles on the lane at this time, and the green light duration corresponding to any lane can be set to a third set value, for example 10S.
[0064] In some specific implementations of the present application, the pedestrian signal light and the vehicle signal light corresponding to the pedestrian signal light are controlled to display a green light synchronously.
[0065] In the implementation of the present application, the pedestrian signal light needs to display the green light synchronously with the corresponding vehicle signal light. For example, if the vehicle signal light of the eastward through lane displays the green light, the pedestrian signal light of the eastward can also display the green light synchronously, and the green light duration of the pedestrian signal light can be consistent with the green light duration of the vehicle signal light of the through lane, or it can be the green light duration of the vehicle signal light of the through lane plus the yellow light duration.
[0066] In some specific implementations of the present application, the above-mentioned acquisition of the number of vehicles in all lanes may specifically include steps S601 to S603.
[0067] Step S601, obtaining a vehicle entry signal collected by a first sensor disposed in front of a lane; Step S602, obtaining a vehicle exit signal collected by a second sensor disposed behind the lane; Step S603, determining the number of vehicles in all lanes according to the vehicle entry signal and the vehicle exit signal.
[0068] In the implementation of the present application, the first sensor may be arranged in front of the lane to collect vehicle entry signals, that is, to count the number of vehicles entering the lane. The second sensor may be arranged behind the lane to collect vehicle exit signals, that is, to count the number of vehicles exiting the lane.
[0069] Specifically, when a vehicle enters a lane, the first sensor triggers and sends a signal (such as an electrical signal or a wireless signal), which is received and processed by the terminal device, thereby recording that a vehicle has entered the lane. When the vehicle exits the lane, the second sensor also sends a signal to the terminal device, indicating that the vehicle has left the lane. The terminal device can record the vehicle entry and exit signals of each lane in real time. Each time a vehicle entry signal is received, the number of vehicles in the lane increases; each time a vehicle exit signal is received, the number of vehicles in the lane decreases. In this way, the terminal device can update and determine the number of vehicles in each lane in real time.
[0070] Figure 2 The structure diagram of a signal light control device provided in an embodiment of the present application is shown. The signal light control device 2 can be configured on a terminal device. Specifically, the signal light control device 2 can include: An acquisition module 201 is used to acquire the number of vehicles in all lanes in the first vehicle signal light cycle; A first calculation module 202 is used to calculate a first green light duration of the first lane based on the first number of vehicles in the first lane, and control a first vehicle signal light corresponding to the first lane to display a green light according to the first green light duration, wherein the first lane is a through lane; A second calculation module 203 is used to calculate a second green light duration of the second lane based on the number of second vehicles in the second lane, and control a second vehicle signal light corresponding to the second lane to display a green light according to the second green light duration, wherein the second lane is a left turn lane corresponding to the first lane; A third calculation module 204 is used to control the second vehicle signal light to display a yellow light after the green light display duration of the second vehicle signal light reaches the second green light duration, and calculate the third green light duration of the third lane based on the third number of vehicles in the third lane, and control the third vehicle signal light corresponding to the third lane to display a green light according to the third green light duration, wherein the third lane is a through lane that is an opposite lane to the first lane; a fourth calculation module 205, configured to control the first vehicle signal light to display a yellow light after the green light display duration of the first vehicle signal light reaches the first green light duration, and calculate a fourth green light duration of the fourth lane based on the number of fourth vehicles in the fourth lane, and control the fourth vehicle signal light corresponding to the fourth lane to display a green light according to the fourth green light duration, wherein the fourth lane is a left turn lane corresponding to the third lane; The module 206 is used to enter the second vehicle signal light cycle when the third vehicle signal light and the fourth vehicle signal light do not display green lights.
[0071] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment of the present application obtains the number of vehicles in all lanes, and calculates the green light duration of each lane according to the number of vehicles in each lane, and controls the vehicle signal lights corresponding to each lane to display green lights in sequence according to the preset lighting sequence. The embodiment of the present application can control the corresponding vehicle signal lights according to the number of vehicles in the lane, realize dynamic adjustment of the switching time of the signal lights, and thus improve traffic efficiency.
[0072] In some embodiments of the present application, the control device 2 of the above-mentioned signal light may also include a repeating module, which is used to: calculate the fifth green light duration of the fifth lane based on the fifth number of vehicles in the fifth lane, and control the fifth vehicle signal light corresponding to the fifth lane to display a green light according to the fifth green light duration, and the fifth lane is a straight lane perpendicular to the first lane; calculate the sixth green light duration of the sixth lane based on the sixth number of vehicles in the sixth lane, and control the sixth vehicle signal light corresponding to the sixth lane to display a green light according to the sixth green light duration, and the sixth lane is a left turn lane corresponding to the fifth lane; after the green light display duration of the sixth vehicle signal light reaches the sixth green light duration, control the sixth vehicle signal light to display a yellow light, and calculate the seventh lane based on the seventh number of vehicles in the seventh lane. The seventh green light duration is calculated, and the seventh vehicle signal light corresponding to the seventh lane is controlled to display a green light according to the seventh green light duration, and the seventh lane is a through lane that is an opposite lane to the fifth lane; after the green light display duration of the fifth vehicle signal light reaches the fifth green light duration, the fifth vehicle signal light is controlled to display a yellow light, and based on the eighth number of vehicles in the eighth lane, the eighth green light duration of the eighth lane is calculated, and the eighth vehicle signal light corresponding to the eighth lane is controlled to display a green light according to the eighth green light duration, and the eighth lane is a left turn lane corresponding to the seventh lane; when both the seventh vehicle signal light and the eighth vehicle signal light do not display green lights, the third vehicle signal light cycle is entered, and the lane corresponding to the third vehicle signal light cycle is consistent with the lane corresponding to the first vehicle signal light cycle.
[0073] In some embodiments of the present application, the first calculation module 202 can also be used to: set the passing time of the first vehicle in the first lane as the first passing time; set the passing time of the second vehicle in the first lane as the second passing time; multiply the number of vehicles in the first lane except the first vehicle and the second vehicle by a preset constant to obtain a third passing time; add the first passing time, the second passing time and the third passing time to obtain the first green light duration.
[0074] In some embodiments of the present application, when the number of vehicles in any straight lane or left-turn lane is greater than the corresponding first vehicle threshold, the green light duration corresponding to any straight lane is set to a first set value, and the green light duration corresponding to any left-turn lane is set to a second set value.
[0075] In some embodiments of the present application, when the number of vehicles in any lane is less than the second vehicle threshold, the green light duration corresponding to any lane is set to a third set value.
[0076] In some embodiments of the present application, the pedestrian signal light is controlled to display a green light synchronously with the vehicle signal light corresponding to the pedestrian signal light.
[0077] In some embodiments of the present application, the above-mentioned acquisition module 201 can also be used to: obtain a vehicle entry signal collected by a first sensor arranged in front of the lane; obtain a vehicle exit signal collected by a second sensor arranged behind the lane; and determine the number of vehicles in all the lanes based on the vehicle entry signal and the vehicle exit signal.
[0078] like Figure 3 FIG. 3 is a schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 3 may include: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301, such as a signal light control program. When the processor 301 executes the computer program 303, the steps in the above-mentioned signal light control method embodiments are implemented, such as Figure 1 Alternatively, when the processor 301 executes the computer program 303, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 2 The obtained module 201 , the first calculation module 202 , the second calculation module 203 , the third calculation module 204 , the fourth calculation module 205 , and the entry module 206 are shown.
[0079] The computer program may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the terminal device.
[0080] The terminal device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access equipment, buses, etc.
[0081] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0082] The memory 302 may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory 302 may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device. Further, the memory 302 may also include both an internal storage unit of the terminal device and an external storage device. The memory 302 is used to store the computer program and other programs and data required by the terminal device. The memory 302 may also be used to temporarily store data that has been output or is to be output.
[0083] It should be noted that, for the convenience and brevity of description, the structure of the above-mentioned terminal device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.
[0084] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0085] The embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned signal light control method can be implemented.
[0086] The embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the steps in the above-mentioned signal light control method can be implemented when the mobile terminal executes the computer program product.
[0087] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0088] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0089] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0093] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a signal light, It is characterized in that include: In the first vehicle signal light cycle, obtain the number of vehicles in all lanes; Based on the first number of vehicles in the first lane, a first green light duration of the first lane is calculated, and according to the first green light duration, a first vehicle signal light corresponding to the first lane is controlled to display a green light, where the first lane is a through lane; Based on the number of second vehicles in the second lane, a second green light duration of the second lane is calculated, and according to the second green light duration, a second vehicle signal light corresponding to the second lane is controlled to display a green light, wherein the second lane is a left turn lane corresponding to the first lane; After the green light display duration of the second vehicle signal light reaches the second green light duration, the second vehicle signal light is controlled to display a yellow light, and based on the number of third vehicles in the third lane, a third green light duration of the third lane is calculated, and according to the third green light duration, the third vehicle signal light corresponding to the third lane is controlled to display a green light, and the third lane is a through lane that is an opposite lane to the first lane; After the green light display duration of the first vehicle signal light reaches the first green light duration, the first vehicle signal light is controlled to display a yellow light, and based on the number of fourth vehicles in the fourth lane, a fourth green light duration of the fourth lane is calculated, and according to the fourth green light duration, a fourth vehicle signal light corresponding to the fourth lane is controlled to display a green light, and the fourth lane is a left turn lane corresponding to the third lane; When neither the third vehicle signal light nor the fourth vehicle signal light displays a green light, the second vehicle signal light cycle is entered.
2. The method for controlling a signal light according to claim 1, It is characterized in that After entering the second vehicle signal light cycle, the method further includes: Based on the fifth number of vehicles in the fifth lane, calculate the fifth green light duration of the fifth lane, and control the fifth vehicle signal light corresponding to the fifth lane to display a green light according to the fifth green light duration, wherein the fifth lane is a straight lane perpendicular to the first lane; Based on the sixth number of vehicles in the sixth lane, a sixth green light duration of the sixth lane is calculated, and according to the sixth green light duration, a sixth vehicle signal light corresponding to the sixth lane is controlled to display a green light, wherein the sixth lane is a left turn lane corresponding to the fifth lane; After the green light display duration of the sixth vehicle signal light reaches the sixth green light duration, the sixth vehicle signal light is controlled to display a yellow light, and based on the seventh number of vehicles in the seventh lane, the seventh green light duration of the seventh lane is calculated, and according to the seventh green light duration, the seventh vehicle signal light corresponding to the seventh lane is controlled to display a green light, and the seventh lane is a through lane that is an opposite lane to the fifth lane; After the green light display duration of the fifth vehicle signal light reaches the fifth green light duration, the fifth vehicle signal light is controlled to display a yellow light, and based on the eighth number of vehicles in the eighth lane, the eighth green light duration of the eighth lane is calculated, and according to the eighth green light duration, the eighth vehicle signal light corresponding to the eighth lane is controlled to display a green light, and the eighth lane is a left turn lane corresponding to the seventh lane; When the seventh vehicle signal light and the eighth vehicle signal light both do not display green lights, the third vehicle signal light cycle is entered, and the lane corresponding to the third vehicle signal light cycle is consistent with the lane corresponding to the first vehicle signal light cycle.
3. The method for controlling a signal light according to claim 1, It is characterized in that The calculating, based on the first number of vehicles in the first lane, a first green light duration of the first lane includes: Setting the passing time of the first vehicle in the first lane as the first passing time; Setting the passing time of the second vehicle in the first lane as the second passing time; Multiply the number of vehicles in the first lane except the first vehicle and the second vehicle by a preset constant to obtain a third travel time; The first green light duration is obtained by adding the first passing time, the second passing time and the third passing time.
4. The method for controlling a signal light according to claim 1, It is characterized in that When the number of vehicles in any straight lane or left-turn lane is greater than the corresponding first vehicle threshold, the green light duration corresponding to any straight lane is set to a first set value, and the green light duration corresponding to any left-turn lane is set to a second set value.
5. The method for controlling a signal light according to claim 1, It is characterized in that When the number of vehicles in any lane is less than the second vehicle threshold, the green light duration corresponding to any lane is set to a third set value.
6. The method for controlling a signal light according to claim 1, It is characterized in that The pedestrian signal light and the vehicle signal light corresponding to the pedestrian signal light are controlled to display a green light synchronously.
7. The method for controlling a signal light according to claim 1, It is characterized in that The method of obtaining the number of vehicles in all lanes includes: Acquiring a vehicle entry signal collected by a first sensor disposed in front of the lane; Acquiring a vehicle exit signal collected by a second sensor disposed behind the lane; The number of vehicles in all the lanes is determined according to the vehicle entry signal and the vehicle exit signal.
8. A control device for a signal light, It is characterized in that include: An acquisition module, used for acquiring the number of vehicles in all lanes in the first vehicle signal light cycle; a first calculation module, configured to calculate a first green light duration of the first lane based on the first number of vehicles in the first lane, and control a first vehicle signal light corresponding to the first lane to display a green light according to the first green light duration, wherein the first lane is a through lane; A second calculation module is used to calculate a second green light duration of the second lane based on the number of second vehicles in the second lane, and control a second vehicle signal light corresponding to the second lane to display a green light according to the second green light duration, wherein the second lane is a left turn lane corresponding to the first lane; a third calculation module, configured to control the second vehicle signal light to display a yellow light after the green light display duration of the second vehicle signal light reaches the second green light duration, and calculate a third green light duration of the third lane based on the number of third vehicles in the third lane, and control the third vehicle signal light corresponding to the third lane to display a green light according to the third green light duration, wherein the third lane is a through lane that is an opposite lane to the first lane; a fourth calculation module, configured to control the first vehicle signal light to display a yellow light after the green light display duration of the first vehicle signal light reaches the first green light duration, and calculate a fourth green light duration of the fourth lane based on the number of fourth vehicles in the fourth lane, and control the fourth vehicle signal light corresponding to the fourth lane to display a green light according to the fourth green light duration, wherein the fourth lane is a left turn lane corresponding to the third lane; An entry module is used to enter a second vehicle signal light cycle when neither the third vehicle signal light nor the fourth vehicle signal light displays a green light.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the signal light control method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the signal light control method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Signal lamp control method, device and equipment and storage medium
CN111063205A
Intelligent control method of urban traffic signal lamp and storage medium
CN112382103A
Signal lamp regulation and control method and system based on urban trunk line vehicle queuing length
CN112489456A
Crossroad vehicle scheduling method, cloud server, equipment and storage medium
CN114093179A
Takeout and delivery tableware rental service
KR1020220133402A
