Interface configuration method and configuration interface of traffic signal lamp

By automatically identifying traffic light status using a target model and combining it with a red light color correction function, the cumbersome manual configuration problem in existing technologies has been solved, achieving efficient and accurate traffic light detection and improving the user experience.

CN122067412APending Publication Date: 2026-05-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-11-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, traffic light status detection requires a lot of tedious manual configuration, especially when drawing the direction, color, number and installation direction of each light group, which requires users to draw meticulously, resulting in poor detection accuracy and user experience.

Method used

By receiving the first configuration command, the system automatically identifies the traffic light status using the target model and allows users to select the location of all light groups at once, reducing the workload of configuration. Combined with the red light color correction function, it reduces repetitive configuration steps.

Benefits of technology

It enables automatic recognition of traffic light status, reducing the user's configuration workload and drawing requirements, improving detection accuracy and user experience, and reducing configuration redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122067412A_ABST
    Figure CN122067412A_ABST
Patent Text Reader

Abstract

The invention provides a traffic signal lamp interface configuration method and a configuration interface, which can be applied to the field of traffic systems, and comprises the following steps: determining a display interface of a target video, and obtaining a first configuration instruction and a drawing instruction, the first configuration instruction is used for determining that the configuration mode of the display interface is an intelligent configuration mode (used for indicating that the state of the traffic signal lamp is detected through the target model), the drawing instruction is used for delineating the position of the traffic signal lamp on the display interface at a time, and the state of the traffic signal lamp is detected based on the two instructions. And obtaining a detection result. According to the invention, the state of the traffic signal lamp can be automatically identified based on the target model only by receiving the input first configuration instruction, and a plurality of traffic signal lamps can be configured at one time, so that the configuration workload of a user is reduced; besides, the user only needs to delineate the positions of all the traffic lights on the display interface once, compact packages are not needed, repeated drawing is not needed, and the signal light drawing requirements of the user are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of transportation systems, and in particular to a method for configuring traffic lights and a configuration interface. Background Technology

[0002] Electronic traffic enforcement cameras play a crucial role in Intelligent Traffic Systems (ITS). Through video surveillance, they capture real-time dynamic video of vehicles in front of traffic lights (also known as traffic lights or red and green lights). Relying on image recognition algorithms, they simultaneously identify the status of traffic lights and information such as vehicle license plate numbers and types to determine whether a vehicle has committed violations such as running a red light or failing to yield to pedestrians. Through strict monitoring and enforcement, electronic traffic enforcement cameras can effectively reduce red-light running and lower the incidence of traffic accidents. When automatically detecting red-light running, electronic traffic enforcement cameras need to record three images of the red-light running process and one image of the vehicle's license plate characteristics. The evidence images must clearly distinguish the traffic light status, road markings, and license plate information. It is clear that real-time monitoring of traffic lights and license plates is key to the accurate determination and capture of violations by electronic traffic enforcement cameras. Furthermore, to avoid disputes during evidence collection, the red light status in the captured images must be clearly identifiable to the naked eye. Figure 1 As shown, electronic traffic enforcement systems are typically installed at signalized intersections. The traffic lights are positioned slightly above the center of the image, while the lower part of the image shows the intersection scene, with vehicles traveling in the opposite direction being the main subjects of the image. During the site survey and installation, the surveyor uses a web interface to outline the location of the traffic lights and marks some basic information about them (such as whether they are arrows, discs, or numbers; left turn, straight ahead, U-turn, or right turn, etc.). Once this is done, the traffic light enhancement service is activated, and the function then operates 24 / 7.

[0003] Traffic light status detection is the core of traffic light enhancement services. A maximum of four traffic light groups (one or more traffic lights with different colors and countdown displays used for guidance) can be involved in a traffic light status detection scenario, each controlling one of the four guidance functions: U-turn, left turn, straight ahead, and right turn. Figure 2 (As shown). In most scenarios, one light group controls one direction, but in some scenarios, one light group can also control two or more (up to four) directions, for example, a disc-shaped light group to control left turns and straight ahead. At larger intersections, signal light groups that control both left turns and straight ahead directions using left-turn arrows and discs are most common. Currently, the general configuration steps for signal light status detection are as follows (taking the "left turn + straight ahead" two-light group scenario as an example): Step 1, switch the signal light guidance mode to signal light group 1; Step 2, draw the positions of the red, green, and yellow lights of light group 1 in the video interface (the user's drawing frame should be as close as possible to the area occupied by the signal lights, such as...). Figure 3 (As shown); Step 3, Configure the direction of light group 1: left turn; Step 4, Configure the color of light group 1: red, green, yellow. Step 5, Configure the number of light groups 1: 3 (i.e., red, green, yellow). Step 6, Configure the direction of light group 1: horizontal (can be horizontal or vertical). Step 7, Switch to signal light group 2; Step 8, Draw the positions of the red, green, and yellow lights of light group 2 in the video interface (the user's frame should be as close as possible to the area occupied by the signal lights, such as...). Figure 4 (As shown); Step 9, Configure the direction of light group 2: straight; Step 10, Configure the color of light group 2: red, green, yellow. Step 11, Configure the number of light groups 2: 3 (i.e., red, green, yellow). Step 12, Configure the direction of light group 2: horizontal (can be horizontal or vertical). If there are light groups 3, 4, etc., repeat the above configuration in sequence.

[0004] As can be seen from the above configuration methods, the main problem with current traffic light detection lies in the fact that it requires a large amount of manual, tedious, and demanding configuration in the early stages. The large amount of tedious configuration is reflected in the need to switch pages to configure each light group, and each page requires configuring numerous details such as guide direction, color, number, and installation direction (horizontal or vertical). The high configuration requirements are reflected in the requirement for users to draw the position of the light groups as precisely as possible (e.g., ...). Figure 3 , Figure 4 If the frame is not tight, it may cause a decrease in detection accuracy, which places high demands on the user's drawing skills. Summary of the Invention

[0005] This application provides a method and interface for configuring traffic lights, which can automatically identify the status of traffic lights based on the target model by simply receiving the first configuration command input, and can configure multiple traffic lights at once, reducing the user's configuration workload; in addition, the user only needs to select the position of all traffic lights on the display interface at once, without the need for tight wrapping or multiple drawing, reducing the user's requirements for drawing traffic lights.

[0006] Based on this, the embodiments of this application provide the following technical solutions:

[0007] Firstly, this application provides a method for configuring the interface of a traffic light. This method specifically includes: First, a computer device acquires the current display interface of a target video, which includes at least one traffic light. The computer device can be an electronic police device, or a terminal device such as a computer, cluster, or mobile phone; this application does not limit this. After acquiring the display interface of the target video, a configuration instruction (such as web input) can be acquired. This configuration instruction can be referred to as a first configuration instruction. The first configuration instruction is used to determine that the configuration mode of the display interface is an intelligent configuration mode. This intelligent configuration mode is used to instruct the detection of the traffic light status through a target model deployed on the computer device. In addition, the computer device also acquires a drawing instruction (such as web input). This drawing instruction is used to define the position of the traffic light on the current display interface. The user only needs to ensure that all traffic lights on the current display interface are enclosed within the drawing frame; it is not necessary to draw each light group tightly and tangentially. Finally, based on the first configuration instruction and drawing instruction obtained above, the status of the traffic lights on the current display interface is detected to obtain the detection result, that is, to identify various parameters of the traffic lights, such as the position of the light group frame, guidance, color, number, and position of the traffic lights.

[0008] In the above embodiments of this application, the status of traffic lights can be automatically identified based on the target model simply by receiving the first configuration instruction input, and multiple traffic lights can be configured at once, reducing the user's configuration workload. In addition, the user only needs to select the position of all traffic lights on the display interface at once, without the need for tight wrapping or multiple drawing, which greatly reduces the workload of traffic light configuration and lowers the user's traffic light drawing requirements.

[0009] In one possible implementation of the first aspect, the method may further include: determining whether the above detection results contain a red light (which may be one or more); if so, further determining whether the red light is a countdown signal light (which may be simply referred to as a countdown light); if the red light is not a countdown light, then performing color restoration on the red light according to a pre-acquired target instruction (such as web input), the target instruction including a first red light restoration instruction, the first red light restoration instruction being used to determine the restoration intensity of the red light color.

[0010] In the above embodiments of this application, in addition to the signal status detection function, this application may also include a red light color enhancement function. Due to the insufficient dynamic range of the camera's photosensitive element in current electronic monitoring equipment, the red component of the red light in the video will gradually become oversaturated, causing the red light to appear yellowish or whitish, thus reducing accuracy. Therefore, this application can improve recognition accuracy by restoring the discolored red light. Furthermore, if a red light is detected, it is first determined whether the red light is a countdown signal light; if not, the red light color is directly restored according to the target instruction. This combines the color restoration configuration and the status detection configuration into one, eliminating the need for repeated configuration and reducing configuration redundancy (because in existing technology, after the user completes the configuration on the status detection page, the positions of the red light and red countdown signal light need to be drawn again on the red light color restoration page, resulting in significant redundancy between the two page configurations).

[0011] In one possible implementation of the first aspect, the method may further include: if the red light is determined to be a countdown signal light, then the countdown signal light is color-corrected according to a pre-acquired countdown instruction (such as web input) and a target instruction (such as web input), the countdown instruction being used to determine the direction of the countdown signal light (such as going straight, turning left, turning right, or making a U-turn) and the type of the countdown signal light.

[0012] In the above embodiments of this application, it is specifically described that when a red light is detected and it is a countdown signal light, it is necessary to first determine the direction (e.g., straight, left turn, right turn, U-turn) and type of the countdown signal light according to the countdown command, and then perform red light color repair according to the target command. There is no need to repeatedly configure each countdown light, which reduces configuration redundancy.

[0013] In one possible implementation of the first aspect, since there are currently three installation types of digital countdown lights in the industry: Type 1, the digital countdown light coincides with the yellow light; Type 2, the digital countdown light is located to the right or below the green light; Type 3, the digital countdown light is independent of the traffic light group. Therefore, the type of countdown traffic light includes at least any one of the following: the countdown traffic light is located to the right or below the green light, where the green light is one type of traffic light; the countdown traffic light is shared with the yellow light, where the yellow light is one type of traffic light; the countdown traffic light is self-defined.

[0014] In the above embodiments of this application, several typical types of countdown traffic lights are specifically described. These types can cover all the installation scenarios of countdown traffic lights currently on the market and have broad coverage.

[0015] In one possible implementation of the first aspect, the target instruction may further include: a second red light restoration instruction, which is used to determine the effective time period for restoring the red light color; and / or, a third red light restoration instruction, which is used to determine the dehalo intensity of the red light. For example, the effective time period can be divided based on sunrise and sunset times, such as being off, on all day, on during the day, and on at night, with the user selecting one of the four based on the actual application scenario. Alternatively, the effective time period can be divided in hours, such as dividing a 24-hour day evenly into p effective time periods, for example, into four effective time periods: 0:00-6:00, 6:00-12:00, 12:00-18:00, and 18:00-24:00. Another example is that the effective time period can be divided according to traffic congestion, such as being on during morning and evening peak hours and off during other times. This application does not specifically limit this.

[0016] In the above embodiments of this application, the second red light recovery command can provide an effective time period for red light color restoration, which is flexible; the third red light recovery command can provide selectable dehalo intensity, especially in night scenes, where the red light halo intensity in the image is large, which will cause poor subjective visual effect. Selecting an appropriate dehalo intensity can improve the visual effect, thereby improving the user experience.

[0017] In one possible implementation of the first aspect, the method may further include: displaying the detection results obtained above on the current display interface to obtain display results.

[0018] In the above embodiments of this application, although the configuration method eliminates the need for users to configure information such as the direction, quantity, color, and type of traffic lights, it is still essential for users to perceive the correctness of parameter recognition based on the target model. In some complex scenarios, such as at night when the traffic light halo is strong, the target model may err in recognizing whether to turn left or go straight. In such cases, timely manual intervention is necessary. This embodiment of the application will immediately display the detection results on the current display page after the user clicks on intelligent configuration, allowing the user to perceive the accuracy of the configuration.

[0019] In one possible implementation of the first aspect, the method may further include: when the state of the first traffic light (which may be one or more) indicated in the display result is inconsistent with the state of the actual second traffic light (which may be one or more) in the display interface, obtaining a second configuration instruction, the second configuration instruction being used to determine that the configuration mode of the display interface is a manual configuration mode, the manual configuration mode being used to indicate that the state of the first traffic light is corrected by manual input.

[0020] In the above embodiments of this application, when the detection result is inconsistent with the actual state of the traffic light, the user can immediately perceive it based on the displayed result, thereby providing conditions for rapid manual intervention and ensuring the correct implementation of the electronic police system.

[0021] In one possible implementation of the first aspect, the state of the traffic lights may include, but is not limited to: the direction of the traffic lights (e.g., left turn, straight ahead, right turn, U-turn), the color of the traffic lights (e.g., red, yellow, green), the number of traffic lights (i.e., the number of traffic lights captured on the current display interface), the position of the traffic lights on the current display interface, and the type of traffic lights. As an example, the type of traffic lights can be classified according to the traffic scenario: motor vehicle traffic lights, non-motor vehicle traffic lights, pedestrian crossing traffic lights, directional indicator lights (arrow traffic lights), lane traffic lights, flashing warning traffic lights, and road and railway level crossing traffic lights. As another example, the type of traffic lights can also be classified according to the display form of the lights: discs, arrows, X shapes, and countdown numbers. This application does not limit the classification method of traffic light types.

[0022] The above embodiments of this application specifically describe several specific manifestations of traffic light status, which have wide applicability.

[0023] A second aspect of this application provides a configuration interface for traffic lights. The configuration interface may include a configuration method control and a light group drawing control. The configuration method control is used to receive a target configuration instruction, which is used to determine the configuration method of the traffic lights on the current display interface. The light group drawing control is used to receive a target drawing instruction, which is used to define the position of the target traffic lights on the current display interface. The user only needs to ensure that all traffic lights on the current display interface are enclosed within the drawing frame, without needing to draw each light group tightly and tangentially.

[0024] In the above embodiments of this application, an intelligent configuration interface for traffic signal light status detection is specifically described, which includes at least a configuration method control and a light group drawing control. It eliminates the need for switching light groups and configuring information such as traffic light direction, number, and color. Multiple light groups can be drawn at once, which greatly reduces the user's traffic light configuration work, lowers the requirements for the user, and improves the user experience.

[0025] In one possible implementation of the second aspect, the configuration interface may further include: a countdown control for receiving a countdown command, which is used to determine the direction of the countdown signal light (such as going straight, turning left, turning right, or making a U-turn) and the type of the countdown signal light, which is a traffic signal light.

[0026] In the above embodiments of this application, countdown commands can be received based on the countdown control, and the direction and type of the countdown signal lights can be determined in advance, eliminating the need to repeatedly configure each countdown light and greatly reducing configuration redundancy.

[0027] In one possible implementation of the second aspect, since there are currently three installation types of digital countdown lights in the industry: Type 1, the digital countdown light coincides with the yellow light; Type 2, the digital countdown light is located to the right or below the green light; Type 3, the digital countdown light is independent of the traffic light group. Therefore, the type of countdown traffic light includes at least any one of the following: the countdown traffic light is located to the right or below the green light, where the green light is one type of traffic light; the countdown traffic light is shared with the yellow light, where the yellow light is one type of traffic light; the countdown traffic light is self-defined.

[0028] In the above embodiments of this application, several typical types of countdown traffic lights are specifically described. These types can cover all the installation scenarios of countdown traffic lights currently on the market and have broad coverage.

[0029] In one possible implementation of the second aspect, the configuration interface may further include: a red light recovery intensity control, used to receive a first red light recovery instruction, the first red light recovery instruction being used to determine the recovery intensity of the red light color.

[0030] In the above embodiments of this application, the configuration interface combines the color restoration configuration and the status detection configuration page into one, eliminating the need for repeated configuration and reducing configuration redundancy.

[0031] In one possible implementation of the second aspect, the configuration interface may further include: a red light recovery mode control for receiving a second red light recovery instruction, which is used to determine the effective time period for restoring the red light color.

[0032] In the above embodiments of this application, the red light recovery mode control allows selection of the effective time period for red light color restoration, providing flexibility.

[0033] In one possible implementation of the second aspect, the configuration interface may further include: a dehalo intensity control for receiving a third red light recovery command, the third red light recovery command being used to determine the dehalo intensity of the red light.

[0034] In the above embodiments of this application, the dehalo intensity control can be used to select the dehalo intensity. Especially in nighttime scenes, the intensity of the red light halo in the image is relatively large, which will cause poor subjective visual effect. Selecting an appropriate dehalo intensity can improve the visual effect and thus improve the user experience.

[0035] In one possible implementation of the second aspect, the configuration interface may further include: a save control for determining whether an instruction received by the current interface has been executed.

[0036] In the above embodiments of this application, the current interface configuration is confirmed to be successful and executed smoothly by saving the control, thereby reducing the accidental touch rate.

[0037] In one possible implementation of the second aspect, the above configuration method includes at least: an intelligent configuration method and a manual configuration method; wherein, the intelligent configuration method is used to instruct the detection of the state of the traffic lights through the deployed target model; and the manual configuration method is used to instruct the detection of the state of the traffic lights through manual input.

[0038] In the above embodiments of this application, several selectable configuration methods are provided, which users can choose according to their actual applications, providing flexibility.

[0039] A third aspect of this application provides a computer device that has the function of implementing the method described in the first aspect or any possible implementation of the first aspect. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the described function.

[0040] The fourth aspect of this application provides a computer device that may include a memory, a processor, and a bus system, wherein the memory is used to store a computer program (also referred to as a program or computer-readable instructions), and the processor is used to invoke the program stored in the memory to execute the method of the first aspect of the embodiments of this application or any possible implementation of the first aspect.

[0041] In one possible design of the fourth aspect, the computer device may further include a configuration interface of the second aspect or any possible implementation of the second aspect of the embodiments of this application.

[0042] The fifth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0043] The sixth aspect of this application provides a computer program or a computer program product containing instructions that, when the computer program or computer program product is run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation of the first aspect.

[0044] A seventh aspect of this application provides a chip including at least one processor and at least one interface circuit coupled to the processor. The interface circuit performs transceiver functions and sends instructions to the at least one processor. The at least one processor runs a computer program or instructions, having the functionality to implement the methods described in the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware, software, or a combination of hardware and software, including one or more modules corresponding to the described functions. Furthermore, the interface circuit is used to communicate with other modules outside the chip.

[0045] In some implementations of this application, some of the one or more processors may implement some steps of the above method through dedicated hardware. For example, the processing involving neural network models may be implemented by a dedicated neural network processor or graphics processor.

[0046] The method provided in this application embodiment can be implemented by a single chip or by multiple chips working together. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of a typical deployment scenario for an electronic police system.

[0048] Figure 2 This is a schematic diagram of an application scenario where traffic lights can have up to four light groups.

[0049] Figure 3 A schematic diagram of a lighting assembly in the prior art;

[0050] Figure 4 Draw another schematic diagram of the lamp assembly in the prior art;

[0051] Figure 5 A schematic diagram of a traffic light configuration interface provided in an embodiment of this application;

[0052] Figure 6 A basic flowchart for detecting traffic light parameters using a target model provided in this application embodiment;

[0053] Figure 7 A schematic diagram of a common combination of traffic lights provided in the embodiments of this application;

[0054] Figure 8 A comparative schematic diagram showing the restoration of a discolored red light before and after an embodiment of this application;

[0055] Figure 9A schematic diagram of a configuration interface for restoring a faded red light using an existing method provided in this application embodiment;

[0056] Figure 10 A schematic diagram illustrating the area occupied by traffic lights using existing methods provided in this application embodiment;

[0057] Figure 11 A schematic diagram of a configuration interface provided in an embodiment of this application;

[0058] Figure 12 Another schematic diagram of the configuration interface provided in the embodiments of this application;

[0059] Figure 13 Another schematic diagram of the configuration interface provided in the embodiments of this application;

[0060] Figure 14 Another schematic diagram of the configuration interface provided in the embodiments of this application;

[0061] Figure 15 Schematic diagrams of three installation methods for countdown lights in the industry provided for embodiments of this application;

[0062] Figure 16 Another schematic diagram of the configuration interface provided in the embodiments of this application;

[0063] Figure 17 A schematic flowchart illustrating a traffic light interface configuration method provided in an embodiment of this application;

[0064] Figure 18 A schematic diagram of an intelligent feedback display for traffic light status detection provided in an embodiment of this application;

[0065] Figure 19 A schematic flowchart illustrating the configuration process of the configuration interface provided in this application embodiment;

[0066] Figure 20 A schematic diagram of the configuration interface after intelligent echo provided in an embodiment of this application;

[0067] Figure 21 An application example architecture diagram provided in this application embodiment;

[0068] Figure 22 A schematic diagram of a computer device provided in an embodiment of this application;

[0069] Figure 23 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0070] This application provides a method and interface for configuring traffic lights, which can automatically identify the state of traffic lights based on a target model by simply receiving a first configuration command. Multiple traffic lights can be configured at once, reducing the user's configuration workload. In addition, the user only needs to select the position of all traffic lights on the display interface at once, without the need for tight wrapping or multiple drawing, reducing the user's requirements for drawing traffic lights.

[0071] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0072] To better understand the solutions of the embodiments of this application, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below. It should be understood that the explanations of the relevant terms and concepts may be limited due to the specific circumstances of the embodiments of this application, but this does not mean that this application can only be limited to that specific circumstance. The specific circumstances of different embodiments may also differ, and no specific limitation is made here.

[0073] (1) Neural Network

[0074] A neural network can be composed of neural units, specifically understood as a neural network with input layers, hidden layers, and output layers. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. Neural networks with many hidden layers are called deep neural networks (DNNs). The function of each layer in a neural network can be expressed mathematically. To describe it physically, each layer in a neural network can be understood as transforming the input space (the set of input vectors) to the output space (i.e., from the row space to the column space of a matrix) through five operations on the input space. These five operations are: 1. Dimensionality increase / decrease; 2. Magnification / scaling; 3. Rotation; 4. Translation; 5. "Bending". Operations 1, 2, and 3 are... Operation 4 is completed using "+b", and operation 5 is implemented using "a()". The term "space" is used here because the objects being classified are not individual things, but a class of things; space refers to the set of all individuals within this class of things. Here, W is the weight matrix of each layer of the neural network, where each value represents the weight of a neuron in that layer. This matrix W determines the spatial transformation from the input space to the output space, as described above; that is, the W of each layer of the neural network controls how the space is transformed. The purpose of training the neural network is to ultimately obtain the weight matrices of all layers of the trained neural network. Therefore, the training process of a neural network is essentially learning how to control spatial transformation, more specifically, learning the weight matrix.

[0075] It should be noted that in the embodiments of this application, the models used for machine learning tasks are essentially neural networks, such as the target model described in this application.

[0076] (2) Loss Function

[0077] During neural network training, to ensure the output closely approximates the desired predicted value, we compare the network's current prediction with the target value. Based on the difference, we update the weight matrix of each layer (usually pre-configuring parameters before the initial update). For example, if the predicted value is too high, the weight matrix is ​​adjusted to predict a lower value, and this process continues until the neural network accurately predicts the target value. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are crucial equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (Loss) indicates a greater difference, and training the neural network becomes a process of minimizing this loss.

[0078] During the training of a neural network, the back propagation (BP) algorithm can be used to correct the parameters in the initial neural network model, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then propagated back to update the parameters in the initial neural network model, leading to convergence of the error loss. The back propagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the neural network model, such as the weight matrix.

[0079] (3) Traffic lights

[0080] Traffic lights can also be simply called signal lights.

[0081] Traffic lights are divided by color into red, yellow, and green lights. A red light means "stop" or "stop"; a green light means "go" or "go"; and a yellow light means "warning".

[0082] Based on their type, traffic lights can be divided into: motor vehicle traffic lights, non-motor vehicle traffic lights, pedestrian crossing traffic lights, directional indicator lights (arrow traffic lights), lane traffic lights, flashing warning traffic lights, and road and railway level crossing traffic lights.

[0083] Among them, motor vehicle traffic lights are a group of lights consisting of three unpatterned circular units of red, yellow and green (a group of lights corresponding to the same direction (e.g., straight ahead) plus the corresponding countdown digital signal light can be called a light group), which guides motor vehicles to pass.

[0084] Non-motorized vehicle traffic lights consist of a set of three circular units (red, yellow, and green) containing bicycle symbols, guiding non-motorized vehicles to proceed. At intersections without non-motorized vehicle traffic lights and pedestrian crossing lights, non-motorized vehicles and pedestrians should follow the instructions of the motorized vehicle traffic lights. When the red light is on, vehicles turning right may proceed, provided they do not obstruct the passage of vehicles and pedestrians with the right of way.

[0085] A pedestrian crossing light consists of a set of traffic lights containing a red standing pedestrian icon and a green walking pedestrian icon (this set of traffic lights, along with the corresponding countdown traffic lights, can also be called a light group), guiding pedestrians to cross the road.

[0086] Lane traffic lights consist of cross and arrow patterns, guiding vehicles within the lane to proceed as indicated.

[0087] Directional indicator lights consist of a set of three lights—red, yellow, and green—each containing an arrow symbol. They are used to guide motor vehicles to proceed in the indicated direction (i.e., provide guidance). Arrows pointing left, up, and right indicate left turn, straight ahead, and right turn, respectively.

[0088] The flashing warning light is a continuously flashing yellow light, reminding vehicles and pedestrians to look around carefully before proceeding and to cross only after confirming it is safe to do so.

[0089] Level crossing signals consist of one or two red lights installed at the intersection of a road and a railway line to guide vehicles and pedestrians. When two red lights flash alternately or one red light is on, it indicates that vehicles and pedestrians are prohibited from crossing; when the red light is off, it indicates that vehicles and pedestrians are allowed to cross.

[0090] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0091] First, the configuration interface of the traffic light provided in the embodiments of this application will be described. Please refer to [link / reference needed] for details. Figure 5 , Figure 5 This is a schematic diagram of a traffic light configuration interface provided in an embodiment of this application. The configuration interface may include at least: a configuration method control (i.e., ... Figure 5 501 in the middle) and the lamp group drawing control (i.e. Figure 5 502), wherein the configuration method control 501 is used to receive a target configuration instruction (e.g., input by a user through a web interface), which determines the configuration method of the traffic light on the current display interface. For example, the configuration method may include at least: intelligent configuration method and manual configuration method. The intelligent configuration method instructs the detection of the traffic light's state using a target model deployed within the computer device (which has been trained); the manual configuration method instructs the detection of the traffic light's state through manual input. The light group drawing control 502 is used to receive a target drawing instruction, which defines the position of the target traffic light on the current display interface. For example, in... Figure 5 In this process, multiple traffic lights on the current display screen can be selected at once. Users only need to ensure that all traffic lights on the current display screen are enclosed within the drawing frame; it is not necessary to select each light group individually. Figure 3 or Figure 4 The compact drawing shown.

[0092] It should be noted that, in the embodiments of this application, the target model deployed within the computer device is a trained model. This application does not limit the type of the target model; for example, the model can be a trained object detection algorithm (You Only Look Once, YOLO), a general object detection algorithm (Single Shot MultiBox Detector, SSD), Faster R-CNN, etc. Detecting the state of traffic lights based on the target model generally includes the following steps:

[0093] Step 1: Data collection.

[0094] First, images of traffic lights are captured from different angles and in different environments (e.g., daytime, nighttime, rainy / snowy days) using deployed camera equipment (e.g., cameras).

[0095] Step 2: Data preprocessing.

[0096] Next, the obtained traffic light images are enhanced through processes such as rotation, scaling, flipping, and brightness adjustment to improve the generalization ability of the target model. The preprocessed traffic light images can then be used as training data for the target model.

[0097] Step 3: Model selection.

[0098] The specific type of target model is selected based on the actual application requirements, such as YOLO, SSD, Faster R-CNN, etc. In some implementations, the target model can also be improved to suit the characteristics of traffic light data.

[0099] Step 4: Model training.

[0100] Set hyperparameters such as learning rate, batch size, and number of iterations for the model, and construct a suitable loss function. Use the preprocessed training data from step 2 to train the target model. Monitor the loss and accuracy during the training process based on the constructed loss function until the iteration termination condition is obtained.

[0101] Step 5: Model Deployment.

[0102] The trained target model is deployed to practical applications, such as on a computer device (which connects to n camera devices; for videos taken by the same camera device, the interface generally only needs to be configured once (because the position of the camera device is fixed and generally does not change; if the position of the camera device changes, the interface of the computer device can be reconfigured); therefore, n camera devices require at least n configurations) to monitor the status of traffic lights in real time in a traffic monitoring system.

[0103] To better understand the process of the target model performing state detection on traffic lights, please refer to the following: Figure 6 , Figure 6 The following is a basic flowchart of the target model for detecting traffic light parameters provided in the embodiments of this application. First, after the user selects the traffic light area in the web interface, the data goes through processing steps such as cropping, scaling, and normalization. Then, the user inputs the pre-trained target model, which infers information such as the position of the traffic light frame, the type of traffic light, and the direction of the traffic light.

[0104] Specifically, based on the position of the light frame, the installation direction of the traffic light (horizontal or vertical) can be determined by its length-to-width ratio. After detecting a traffic light cycle of red→green→yellow→…, the number of traffic lights can be determined. The directional information of the traffic lights is obtained through the detection results of the target model and an intelligent optimization strategy. The basic idea is as follows:

[0105] like Figure 7As shown, according to the National Standard of the People's Republic of China GB14886—2016, there are five combinations of traffic lights, namely Combination 1 to Combination 5:

[0106] Combination 1: A circular light cluster;

[0107] Combination 2: Left turn + circle;

[0108] Combination 3: Disc + Right Turn;

[0109] Combination 4: Three light groups;

[0110] Combination 5, U-turn + other combinations, etc.

[0111] The guidance of arrow traffic lights can rely on the results of target model detection, while that of disc traffic lights is determined by checking whether a left turn light is present. If a left turn light is present in the current video frame, the disc indicates straight-ahead guidance; if no left turn light is present, the disc indicates both left turn and straight-ahead guidance.

[0112] Once the guidance, number, and direction information of the traffic lights are determined, several other post-processing steps can be performed to obtain a stable and accurate traffic light status for U-turns, left turns, straight-ahead maneuvers, and right turns.

[0113] In summary, the configuration interface described in the above embodiments of this application replaces the cumbersome manual parameter configuration steps for traffic light detection in the prior art with the help of a target model and several post-processing algorithms, which has the following advantages: 1) It eliminates the need for selecting and configuring individual traffic light groups. Multiple traffic light groups can be drawn simultaneously on the same page, eliminating the need to draw each traffic light individually and reducing the requirements for users. Users only need to roughly cover the traffic light positions. 2) When the intelligent configuration method is selected, it is also unnecessary to configure guidance information. The pre-trained target model can accurately identify the guidance of traffic light groups based on an intelligent guidance optimization strategy. Furthermore, based on this target model, it is also unnecessary to configure information such as the number of traffic lights, their colors, and installation directions. 3) It provides a switch between intelligent and manual configuration methods. In some complex scenarios, if the target model misidentifies the relevant parameters of the traffic lights, users can manually configure them to ensure the correct implementation of the electronic police system.

[0114] It should be noted that traffic light enhancement services, in addition to signal status detection, can also include red light color enhancement. Due to the insufficient dynamic range of current electronic surveillance camera sensors, the red component of the red light in the video will gradually become oversaturated, causing the red light to appear yellowish or whitish. Figure 8As shown. Another major function of traffic light enhancement is to restore the faded red light color. Furthermore, in nighttime scenes, the intensity of the red light halo in the image is relatively high, resulting in a poor subjective visual effect. However, similar to traffic light status detection, the main problem with current red light color enhancement is that it requires a large amount of tedious manual configuration work in the early stages, leading to a poor customer experience. Currently, there are two methods for configuring red light color restoration in the industry: one relies on traffic light status detection to determine whether the current video frame is in a red light state, and only performs color restoration if it is; the other does not rely on traffic light status detection and directly enhances the color based on the red light data, the so-called "intelligent enhancement mode". Here, we take the existing configuration method in a two-light group scenario (left turn + straight) as an example (see details). Figure 9 This describes the general configuration steps for restoring the current red light color:

[0115] Step 1: Activate traffic light color enhancement: Select "On All Day". (For example, you can choose one of four options: Off, On All Day, On During the Day, On at Night)

[0116] Step 2: Select the traffic light intensity and sensitivity to control the intensity of color restoration.

[0117] Step 3: Select the intensity of halo reduction.

[0118] Step 4: Configure the left turn red light type and direction: such as left turn + arrow.

[0119] Step 5: Draw the position of the left turn red light (the user's drawing frame should be as close as possible to the area occupied by the traffic light).

[0120] Step 6: Configure the straight-ahead red light type and guidance: such as straight-ahead + roundabout.

[0121] Step 7: Draw the position of the straight-ahead red light (the user's drawing frame should be as close as possible to the area occupied by the traffic light).

[0122] Step 8: Configure the left turn countdown light type and direction: such as left turn + countdown.

[0123] Step 9: Draw the left turn countdown position (the user's drawing frame should be as close as possible to the area occupied by the traffic light).

[0124] Step 10: Configure the straight-line countdown light type and direction: such as straight-line + countdown.

[0125] Step 11: Draw the countdown position for the straight-ahead traffic (the user's drawing frame should be as close as possible to the area occupied by the traffic light).

[0126] However, in most practical applications, both the traffic light status detection and red light color restoration functions need to be enabled simultaneously. For example... Figure 10As shown, under the current configuration, after drawing the traffic light area in the status detection section, the user needs to draw the positions of the red light and red number lights again on the red light color restoration page. This two-step process is clearly repetitive. Furthermore, the repetitiveness also extends to configuring information such as directions and traffic light types during status detection, which then needs to be configured again on the red light color restoration page. This undoubtedly forces the user to perform many redundant operations, reducing the user experience.

[0127] Therefore, in some other embodiments of this application, the traffic light status detection and color restoration configuration methods can be combined into one. Specifically, the configuration interface can also include a red light restoration mode control (such as...). Figure 11 As shown in 503), the red light recovery mode control 503 is used to receive a red light recovery instruction (such as web input), which may be referred to as the second red light recovery instruction, and is used to determine the effective time period for restoring the red light color.

[0128] As an example, the effective time period can be divided based on sunrise and sunset times, such as being off, always on, daytime on, and nighttime on. Users can choose one of these four options based on their actual application scenarios. Figure 11 This is the situation illustrated in the image.

[0129] As another example, the effective time period can also be divided in hours. For example, a day of 24 hours can be evenly divided into p effective time periods, such as 0:00-3:00, 3:00-6:00, 6:00-9:00, 9:00-12:00, 12:00-15:00, 15:00-18:00, 18:00-21:00, and 21:00-24:00, for a total of 8 effective time periods.

[0130] As another example, the effective time period can also be divided according to the level of traffic congestion, such as being open during the morning and evening peak traffic hours and closed during other times. This application does not specifically limit this.

[0131] It should be noted that, in some other embodiments of this application, the configuration interface may also include a red light restoration intensity control (such as...). Figure 12 As shown in 504), the red light restoration intensity control 504 is used to receive a red light restoration command (such as web input), which may be referred to as the first red light restoration command, and is used to determine the restoration intensity of the red light color.

[0132] It should be noted that in some embodiments of this application, the configuration interface may additionally include a red light recovery mode control 503 and / or a red light recovery intensity control 504, in addition to the configuration method control 501 and the light group drawing control 502. Figure 12The illustration shows that it also includes a red light recovery mode control 503 and a red light recovery intensity control 504, but this application does not limit the specifics.

[0133] It should also be noted that, due to the high intensity of red light halos in images at night, the subjective visual effect is poor. Therefore, in some embodiments of this application, the configuration interface may further include a halo intensity control (such as...). Figure 13 The 505 shown is used to receive a red light recovery instruction (such as web input), which may be referred to as the third red light recovery instruction, and is used to determine the dehalo intensity of the red light.

[0134] It should also be noted that, in some embodiments of this application, the configuration interface, in addition to including the configuration method control 501 and the light group drawing control 502, may further include any one or more of the following: red light recovery mode control 503, red light recovery intensity control 504, and halo removal intensity control 505. Figure 13 The illustration shows that it also includes a red light recovery mode control 503, a red light recovery intensity control 504, and a halo removal intensity control 505, but this application does not limit the specifics of these.

[0135] It should also be noted that, in some embodiments of this application, the configuration interface may further include a countdown control (such as...). Figure 14 As shown in 506), the countdown control 506 may specifically include a countdown sequence number sub-control, a countdown guide sub-control, and a countdown type sub-control. Specifically, the countdown control 506 is used to receive countdown instructions, which are used to determine the guidance of one or more countdown traffic lights (which can be selected based on the countdown sequence number sub-control) and the type of the countdown traffic lights.

[0136] It should be noted that, according to the "Public Security Industry Standards of the People's Republic of China," there are currently three installation types for digital countdown lights in the industry (please refer to [link / reference] for details). Figure 15 Type 1: The digital countdown light coincides with the yellow light; Type 2: The digital countdown light is located to the right or below the green light; Type 3: The digital countdown light is independent of the traffic light group. Therefore, in some embodiments of this application, the type of countdown traffic light may include at least any of the following: the countdown traffic light is located to the right or below the green light, the countdown traffic light is shared with the yellow light, and the countdown traffic light is self-defined.

[0137] For Type 1, users do not need to draw the position of the countdown light; they only need to configure its guidance and countdown type as yellow light reuse on the page. The red light color restoration will directly use the yellow light position passed from the status detection as the position of this countdown.

[0138] For Type 2, users do not need to draw the position of the countdown light; they only need to configure its direction and countdown type on the page as the right / bottom of the green light. The red light color will be restored by directly extending the green light position passed from the status detection to the right / bottom as the position of this countdown.

[0139] For Type 3, users need to draw the position of the countdown light separately. The guide and countdown type can be configured on the page to be drawn by themselves (only the frame column is needed, but other light groups cannot be included in the frame).

[0140] It should also be noted that, in some embodiments of this application, the configuration interface, in addition to including the configuration method control 501 and the light group drawing control 502, may additionally include any one or more of the following: red light recovery mode control 503, red light recovery intensity control 504, halo removal intensity control 505, and countdown control 506. Figure 14 The illustration shows that it also includes a red light recovery mode control 503, a red light recovery intensity control 504, a halo removal intensity control 505, and a countdown control 506, but this application does not limit the specifics of these.

[0141] It should also be noted that, in some embodiments of this application, the configuration interface may further include a save control (such as...). Figure 16 As shown in 507), the save control 507 is used to determine whether the instruction received by the current interface has been executed.

[0142] In summary, in the embodiments described above, the red light color restoration page directly obtains information such as the red light's location, direction, and type from status detection, eliminating the need for separate red light configuration. As long as the user enables enhanced mode, the red light will not require any user configuration of location, direction, or type information, as this information is provided by status detection. This reduces configuration redundancy.

[0143] It should be noted that, in the embodiments of this application, Figure 5 , Figures 11 to 14 , Figure 16 The configuration interface shown is for illustrative purposes only, and this application does not limit the deployment method of each control involved. Furthermore, in addition to the controls described above, the configuration interface provided in this application may also include other controls, such as a default configuration retrieval control; this application does not limit the scope of such controls.

[0144] Based on the above configuration interface, the following describes the method for configuring the traffic light interface provided in this application embodiment. Please refer to [link / reference] for details. Figure 17 , Figure 17 A flowchart illustrating the interface configuration method for traffic lights provided in this application embodiment specifically includes the following steps:

[0145] 1701. Determine the display interface of the target video, which includes at least one traffic light.

[0146] First, the computer device acquires the current display interface of the target video, which includes at least one traffic light. This computer device can be an electronic police device, or a terminal device such as a computer, cluster, or mobile phone; this application does not limit its scope.

[0147] It should be noted that this computer device can connect to m cameras (e.g., surveillance cameras) installed on the road. Once the m cameras are installed, each camera will capture video within its respective monitoring range. Since traffic lights are generally located in fixed positions, the video captured by the same camera only needs to be configured once (it can be reconfigured if the camera changes). Therefore, the m cameras need to be configured at least m times. The interface currently being configured is the current display interface, and the corresponding video is the target video, which is captured by the target camera.

[0148] 1702. Obtain the first configuration instruction, which is used to determine that the configuration mode of the display interface is the intelligent configuration mode, and the intelligent configuration mode is used to instruct the detection of the status of the traffic lights through the deployed target model.

[0149] After obtaining the display interface of the target video, configuration instructions (such as web input) can be obtained. These configuration instructions can be referred to as the first configuration instructions. The first configuration instructions are used to determine that the configuration mode of the display interface is intelligent configuration mode. This intelligent configuration mode is used to instruct the detection of the traffic light status through the target model deployed on the computer device. As an example, the first configuration instructions input by the user can be received based on the configuration mode control 501 described above.

[0150] It should be noted that in this embodiment of the application, the target model deployed in the computer device is a trained model. The steps for detecting the state of traffic lights based on the target model can be found in the above description and will not be repeated here.

[0151] 1703. Obtain drawing instructions. These instructions are used to define the position of the traffic lights on the display interface.

[0152] In addition, the computer device also receives drawing instructions (such as web input), which are used to define the position of the traffic lights on the current display screen. As an example, the light group drawing control 502 described above can receive multiple light groups on the current display screen from the user for a single definition. The user only needs to ensure that all traffic lights on the current display screen are enclosed within the drawing frame; it is not necessary to define each light group individually. Figure 3 or Figure 4 The compact drawing shown.

[0153] It should be noted that in the embodiments of this application, there is no limitation on the execution order of steps 1702 and 1703. Step 1702 can be executed first and then step 1703, or step 1703 can be executed first and then step 1702, or steps 1702 and 1703 can be executed simultaneously. This application does not limit the specific execution order.

[0154] 1704. The status of the traffic lights is detected according to the first configuration instruction and the drawing instruction, and the detection results are obtained.

[0155] Finally, based on the first configuration instruction and drawing instruction obtained above, the status of the traffic lights on the current display interface is detected to obtain the detection result, that is, to identify various parameters of the traffic lights, such as the position of the light group frame, guidance, color, number, and position of the traffic lights.

[0156] It should be noted that, in some embodiments of this application, the state of traffic lights may include, but is not limited to: the direction of the traffic lights (e.g., left turn, straight ahead, right turn, U-turn), the color of the traffic lights (e.g., red, yellow, green), the number of traffic lights (i.e., the number of traffic lights captured on the current display interface), the position of the traffic lights on the current display interface, and the type of traffic lights. As an example, the type of traffic lights can be classified according to traffic scenarios: motor vehicle traffic lights, non-motor vehicle traffic lights, pedestrian crossing traffic lights, directional indicator lights (arrow traffic lights), lane traffic lights, flashing warning traffic lights, and road and railway level crossing traffic lights. As another example, the type of traffic lights can also be classified according to the display form of the lights: discs, arrows, X shapes, and countdown numbers. This application does not limit the classification method of traffic light types.

[0157] 1705. If the detection result includes a red light, determine whether the red light is a countdown signal light. If not, proceed to step 1706; if yes, proceed to step 1707.

[0158] After obtaining the detection results, further determine whether the detection results include red light situations. If there are no red lights, proceed to step 1706; if there are red lights, proceed to step 1707.

[0159] 1706. Perform color restoration on the red light according to the target instruction obtained in advance. The target instruction includes a first red light restoration instruction, which is used to determine the restoration intensity of the red light color.

[0160] The red light color is restored based on a pre-acquired target instruction (such as web input). This target instruction includes a first red light restoration instruction, which determines the restoration intensity of the red light color. As an example, the first red light restoration instruction input by the user can be received based on the red light restoration intensity control 504 described above.

[0161] It should be noted that, in some embodiments of this application, the target instruction may further include at least one or more of the following:

[0162] (1) Second red light restoration command

[0163] The second red light restoration command is used to determine the valid time period for restoring the red light color. As an example, the second red light restoration command input by the user can be received based on the red light restoration mode control 503 described above.

[0164] It should be noted that in this embodiment, the effective time period can be divided based on sunrise and sunset times, for example, it can be divided into off, all-day on, daytime on, and nighttime on, with the user choosing one of the four options based on the actual application scenario. The effective time period can also be divided in hours, for example, dividing a 24-hour day evenly into p effective time periods, such as 0:00-3:00, 3:00-6:00, 6:00-9:00, 9:00-12:00, 12:00-15:00, 15:00-18:00, 18:00-21:00, and 21:00-24:00, for a total of 8 effective time periods. The effective time period can also be divided according to traffic congestion, for example, being on during the morning and evening peak traffic hours and off during other times. This application does not specifically limit this.

[0165] (2) Third red light restoration command

[0166] The third red light recovery command is used to determine the dehalo intensity of the red light. As an example, the user-input third red light recovery command can be received based on the dehalo intensity control 505 described above.

[0167] In summary, when the detection result is a red light, step 1706 directly performs red light color restoration according to the target instruction, thereby merging the color restoration configuration and status detection configuration pages into one, eliminating the need for repeated configuration and reducing configuration redundancy (because in the existing technology, after the user completes the configuration on the status detection page, they need to redraw the positions of the red light and red countdown signal lights on the red light color restoration page, and the configuration of the two pages has obvious redundancy).

[0168] 1707. Perform color restoration on the countdown signal light according to the pre-acquired countdown command and target command. The countdown command is used to determine the direction of the countdown signal light and the type of the countdown signal light.

[0169] The countdown traffic light is color-corrected based on the pre-acquired countdown instructions (such as web input) and the target instructions (such as web input). The countdown instructions are used to determine the direction of the countdown traffic light (such as going straight, turning left, turning right, or making a U-turn) and the type of the countdown traffic light.

[0170] It should be noted that in some embodiments of this application, since there are currently three installation types for digital countdown lights in the industry (see details...), Figure 15 Therefore, the countdown signal light can include at least any of the following types: the countdown signal light is located to the right or below the green light, the countdown signal light is shared with the yellow light, or the countdown signal light is self-defined.

[0171] It should also be noted that, in some embodiments of this application, the detection results obtained above can also be displayed on the current display interface to obtain display results (such as...). Figure 18 (The displayed result is shown). This is because: although the above configuration method eliminates the need for users to configure the guidance, quantity, color, type, etc. of traffic lights, it is still essential for users to perceive the correctness of parameter recognition based on the target model. In some complex scenarios, such as when traffic light halos are strong at night, the target model may err in recognizing whether to turn left or go straight. In such cases, timely manual intervention is necessary. In this embodiment, the light group frame and light group guidance will be displayed on the current screen immediately after the user clicks on intelligent configuration, allowing the user to perceive the accuracy of the configuration.

[0172] It is important to note here that when the status of the first traffic light (which may be one or more) indicated in the displayed result is inconsistent with the actual status of the second traffic light (which may be one or more) at the corresponding location on the display interface, for example, Figure 18 The current interface shows two actual traffic lights at the current time: a red left-turn arrow and a red straight-ahead disc. Figure 18 The displayed feedback also shows two traffic lights: a red left turn and a red straight ahead, indicating consistency and correctness. Assuming... Figure 18The displayed feedback result shows the first traffic light as red for U-turn and red for straight ahead, indicating an error in the prediction of one traffic light's state. In this case, a second configuration instruction is needed. This instruction determines that the current display interface is configured as manual. This manual configuration method instructs the system to correct the incorrectly displayed first traffic light's state through manual input, ensuring the correct implementation of the electronic police system.

[0173] To facilitate understanding of the configuration process described in the embodiments of this application, the most common two-light setup scenario is used as an example below (see details). Figure 19 The configuration steps of the configuration interface described in the embodiments of this application will be explained as follows:

[0174] Step 1: The user selects intelligent configuration as the configuration method.

[0175] Step 2: The user draws the light group.

[0176] Step 3: Configure the red light recovery mode to be enabled all day.

[0177] Step 4: The user configures the red light recovery strength to 75%.

[0178] Step 5: The user configures the dehalo intensity to 50%.

[0179] Step 6: Configure the left turn countdown guide to left turn, and the type to right / bottom of green light.

[0180] Step 7: Configure the left turn countdown guide to go straight, and the type to right / bottom of green light.

[0181] After completing the above configuration, click "Save". The intelligent configuration will start running, and the target model will recognize the traffic light's tight frame (i.e., Figure 20 The AI ​​recognition box and color information are intelligently displayed on the web configuration page, such as... Figure 20 As shown. Users can check if the AI ​​recognition box and color information are normal. If the recognition is incorrect, users can reconfigure the traffic lights manually. It should be noted that even with manual configuration, users do not need to perform the same steps as before to restore the red light color. Figure 9 Even with repeated configuration, you still only need to configure the countdown guide and type.

[0182] To further understand the configuration interface and configuration method provided in the embodiments of this application, a specific application scenario is used as an example to illustrate the configuration process described in the embodiments of this application. Please refer to [link / reference needed] for details. Figure 21 , Figure 21This application provides an example architecture diagram, which includes two parts: a traffic light status detection part and a red light color restoration part. In the traffic light status detection part, a rough drawing area of ​​the traffic light (i.e., the drawing box drawn by the user) is input from the web interface. This area is then preprocessed by the computer device's internal data processing and target model to identify the corresponding parameters. The identified detection results are then intelligently displayed back to the web interface. In the red light color restoration part, based on the red light position input from the status detection, it first determines whether the current traffic light is red. If so, it further determines whether the red light is a countdown light. If so, it determines the countdown type based on the countdown type and direction information input from the web interface, i.e., whether it is a reused yellow light, a green light to the right / bottom, or a custom-drawn light, and inputs the corresponding status detection result to the corresponding position for subsequent color restoration. If not, the red light is preprocessed before subsequent color restoration.

[0183] Based on the above embodiments, in order to better implement the above solutions of this application, related equipment for implementing the above solutions is also provided below. See details. Figure 22 , Figure 22 This is a schematic diagram of a computer device provided in an embodiment of this application. The computer device 2200 may specifically include: a determining module 2201, a first acquiring module 2202, a second acquiring module 2203, and a detection module 2204. The determining module 2201 is used to determine the display interface of a target video, the display interface including at least one traffic light; the first acquiring module 2202 is used to acquire a first configuration instruction, the first configuration instruction being used to determine that the configuration mode of the display interface is an intelligent configuration mode, the intelligent configuration mode being used to instruct the detection of the state of the traffic light through a deployed target model; the second acquiring module 2203 is used to acquire a drawing instruction, the drawing instruction being used to define the position of the traffic light on the display interface; and the detection module 2204 is used to detect the state of the traffic light according to the first configuration instruction and the drawing instruction, and obtain a detection result.

[0184] In one possible design, the detection module 2204 is further configured to: determine whether the red light is a countdown signal light if the detection result includes a red light; if not, perform color restoration on the red light according to a pre-acquired target instruction, the target instruction including a first red light restoration instruction, the first red light restoration instruction being used to determine the restoration intensity of the red light color.

[0185] In one possible design, the detection module 2204 is further configured to: when confirming that the red light is a countdown signal light, perform color correction on the countdown signal light according to the pre-acquired countdown command and the target command, wherein the countdown command is used to determine the direction of the countdown signal light and the type of the countdown signal light.

[0186] In one possible design, the countdown signal light type includes at least one of the following: the countdown signal light is located to the right or below the green light, and the green light is a type of traffic signal light; the countdown signal light is shared with the yellow light, and the yellow light is a type of traffic signal light; the countdown signal light is self-defined.

[0187] In one possible design, the target instruction further includes: a second red light recovery instruction for determining the effective time period for restoring the red light color; and / or a third red light recovery instruction for determining the dehalo intensity of the red light.

[0188] In one possible design, the detection module 2204 is also used to: display the detection result on the display interface to obtain the display result.

[0189] In one possible design, the detection module 2204 is further configured to: obtain a second configuration instruction when the state of the first traffic light indicated in the display result is inconsistent with the actual state of the second traffic light in the display interface, the second configuration instruction being used to determine that the configuration mode of the display interface is a manual configuration mode, the manual configuration mode being used to instruct the state of the first traffic light to be corrected by manual input.

[0190] In one possible design, the status of a traffic light includes at least one of the following: the direction of the traffic light, the color of the traffic light, the number of traffic lights, the position of the traffic light on the display interface, the installation direction of the traffic light, and the type of traffic light.

[0191] It should be noted that the information interaction and execution process between the modules / units in the computer device 2200 are based on the same concept as the method embodiments described above in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0192] Next, we will introduce another computer device provided in the embodiments of this application. Please refer to [link / reference]. Figure 23 , Figure 23 This is a schematic diagram of a computer device provided in an embodiment of this application. The computer device 2300 may be equipped with... Figure 22 The computer device 2200 described in the corresponding embodiment is used to implement Figure 22In the corresponding embodiment, the computer device 2300 is implemented by one or more servers. The computer device 2300 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 2322 and memory 2332, and one or more storage media 2330 (e.g., one or more mass storage devices) for storing application programs 2342 or data 2344. The memory 2332 and storage media 2330 can be temporary or persistent storage. The program stored in the storage media 2330 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the computer device 2300. Furthermore, the CPU 2322 may be configured to communicate with the storage media 2330 and execute the series of instruction operations in the storage media 2330 on the computer device 2300.

[0193] Computer device 2300 may also include one or more power supplies 2326, one or more wired or wireless network interfaces 2350, one or more input / output interfaces 2358, and / or one or more operating systems 2341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0194] In this embodiment of the application, the central processing unit 2322 is used to execute... Figure 17 or Figure 21 The steps performed by the computer device in the corresponding embodiment. It should be noted that the specific manner in which the central processing unit 922 performs the above steps differs from that in this application. Figure 17 or Figure 21 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in the above embodiments of this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0195] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0196] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0197] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0198] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method for configuring the interface of a traffic signal light, characterized in that, include: The display interface of the target video is determined, and the display interface includes at least one traffic light; Obtain a first configuration instruction, which is used to determine that the configuration mode of the display interface is an intelligent configuration mode, and the intelligent configuration mode is used to instruct the state of the traffic light to be detected through the deployed target model; Obtain a drawing instruction, which is used to define the position of the traffic light on the display interface; The state of the traffic light is detected according to the first configuration instruction and the drawing instruction, and the detection result is obtained.

2. The method according to claim 1, characterized in that, The method further includes: If the detection result includes a red light, determine whether the red light is a countdown signal light; If not, the red light is restored to its color according to the target instruction obtained in advance. The target instruction includes a first red light restoration instruction, which is used to determine the restoration intensity of the red light color.

3. The method according to claim 2, characterized in that, The method further includes: If so, the countdown signal light is color-corrected according to the pre-acquired countdown command and the target command. The countdown command is used to determine the direction of the countdown signal light and the type of the countdown signal light.

4. The method according to claim 3, characterized in that, The countdown signal light is of at least one of the following types: The countdown signal light is located to the right or below the green light, and the green light is one type of traffic signal light; The countdown signal light is reused with the yellow light, and the yellow light is one type of traffic signal light; The countdown indicator lights automatically circle the area.

5. The method according to any one of claims 2-4, characterized in that, The target instruction also includes: The second red light restoration command is used to determine the effective time period for restoring the red light color. And / or, The third red light recovery command is used to determine the dehalo intensity of the red light.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: The detection results are displayed on the display interface to obtain the display result.

7. The method according to claim 6, characterized in that, The method further includes: If the state of the first traffic light indicated in the display result is inconsistent with the actual state of the second traffic light in the display interface, a second configuration instruction is obtained. The second configuration instruction is used to determine that the configuration mode of the display interface is a manual configuration mode. The manual configuration mode is used to indicate that the state of the first traffic light is corrected by manual input.

8. The method according to any one of claims 1-7, characterized in that, The state of the traffic light includes at least one of the following: The direction of traffic lights, the color of traffic lights, the number of traffic lights, the position of traffic lights on the display interface, the installation direction of traffic lights, and the type of traffic lights.

9. A configuration interface for a traffic signal light, characterized in that, include: Configuration method control, light group drawing control; The configuration method control is used to receive a target configuration instruction, which is used to determine the configuration method of the traffic lights on the current display interface. The light group drawing control is used to receive target drawing instructions, which are used to define the position of the target traffic light on the current display interface.

10. The configuration interface according to claim 9, characterized in that, The configuration interface also includes: A countdown control is used to receive countdown instructions, which are used to determine the direction of the countdown traffic light and the type of the countdown traffic light, which belongs to the traffic light category.

11. The configuration interface according to claim 10, characterized in that, The countdown signal light is of at least one of the following types: The countdown signal light is located to the right or below the green light, and the green light is one type of traffic signal light; The countdown signal light is reused with the yellow light, and the yellow light is one type of traffic signal light; The countdown indicator lights automatically circle the area.

12. The configuration interface according to any one of claims 9-11, characterized in that, The configuration interface also includes: The red light restoration intensity control is used to receive a first red light restoration command, which is used to determine the restoration intensity of the red light color.

13. The configuration interface according to any one of claims 9-12, characterized in that, The configuration interface also includes: The red light recovery mode control is used to receive a second red light recovery command, which is used to determine the effective time period for restoring the red light color.

14. The configuration interface according to any one of claims 9-13, characterized in that, The configuration interface also includes: A halo intensity control is used to receive a third red light recovery command, which is used to determine the halo intensity of the red light.

15. The configuration interface according to any one of claims 9-14, characterized in that, The configuration interface also includes: A save control is used to determine whether the instruction received by the current interface has been executed.

16. The configuration interface according to any one of claims 9-15, wherein the configuration method includes at least: Intelligent configuration method and manual configuration method; The intelligent configuration method is used to instruct the detection of the traffic light status through the deployed target model; The manual configuration method is used to indicate the detection of the status of traffic lights through manual input.

17. A computer device, characterized in that, include: A determination module is used to determine the display interface of the target video, the display interface including at least one traffic light; The first acquisition module is used to acquire a first configuration instruction, the first configuration instruction being used to determine that the configuration mode of the display interface is an intelligent configuration mode, the intelligent configuration mode being used to instruct the state of the traffic light to be detected through the deployed target model; The second acquisition module is used to acquire drawing instructions, which are used to define the position of the traffic light on the display interface. The detection module is used to detect the state of the traffic light according to the first configuration instruction and the drawing instruction, and obtain the detection result.

18. The device according to claim 17, characterized in that, The detection module is also used for: If the detection result includes a red light, determine whether the red light is a countdown signal light; If not, the red light is restored to its color according to the target instruction obtained in advance. The target instruction includes a first red light restoration instruction, which is used to determine the restoration intensity of the red light color.

19. The device according to claim 18, characterized in that, The detection module is also used for: If so, the countdown signal light is color-corrected according to the pre-acquired countdown command and the target command. The countdown command is used to determine the direction of the countdown signal light and the type of the countdown signal light.

20. The device according to claim 19, characterized in that, The countdown signal light is of at least one of the following types: The countdown signal light is located to the right or below the green light, and the green light is one type of traffic signal light; The countdown signal light is reused with the yellow light, and the yellow light is one type of traffic signal light; The countdown indicator lights automatically circle the area.

21. The device according to any one of claims 18-20, characterized in that, The target instruction also includes: The second red light restoration command is used to determine the effective time period for restoring the red light color. And / or, The third red light recovery command is used to determine the dehalo intensity of the red light.

22. The device according to any one of claims 17-21, characterized in that, The detection module is also used for: The detection results are displayed on the display interface to obtain the display result.

23. The device according to claim 22, characterized in that, The detection module is also used for: If the state of the first traffic light indicated in the display result is inconsistent with the actual state of the second traffic light in the display interface, a second configuration instruction is obtained. The second configuration instruction is used to determine that the configuration mode of the display interface is a manual configuration mode. The manual configuration mode is used to indicate that the state of the first traffic light is corrected by manual input.

24. The device according to any one of claims 17-23, characterized in that, The state of the traffic light includes at least one of the following: The direction of traffic lights, the color of traffic lights, the number of traffic lights, the position of traffic lights on the display interface, the installation direction of traffic lights, and the type of traffic lights.

25. A computer device comprising a processor and a memory, the processor being coupled to the memory, characterized in that, The memory is used to store programs; The processor is configured to execute a program in the memory, causing the computer device to perform the method as described in any one of claims 1-8.

26. The device according to claim 25, characterized in that, The computer device further includes a configuration interface as described in any one of claims 9-16.

27. A computer storage medium, characterized in that, The device stores computer-readable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-8.

28. A computer program product, characterized in that, The computer program product includes computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-8.

29. A chip, the chip comprising a processor and a data interface, characterized in that, The processor reads instructions stored in the memory through the data interface and executes the method as described in any one of claims 1-8.