Signal lamp delay test method and device, computer equipment and storage medium
By recording and comparing the preset and actual traffic light changing times in the same server environment, and using timestamps to trigger scripts to obtain traffic light delay data, the problem of inaccurate traffic light delay data was solved, improving the accuracy and reliability of the traffic signal system.
Patent Information
- Application Number
- CN202510674325.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-19
AI Technical Summary
In the existing technology, the acquisition of traffic light delay data is inaccurate, resulting in low reliability of analysis results and an inability to meet high-precision testing requirements. This is mainly because large model calculations and hardware equipment acquiring traffic light data are completed by two independent systems, resulting in the problem of untimely data synchronization.
In the same server environment, by recording the preset light change time and the actual light change time, the traffic light delay data is obtained. The script is triggered to run on the target server using the timestamp to obtain the actual operation information, and the timestamp difference is calculated to obtain the traffic light delay data.
It improves the accuracy of signal light delay calculation and the reliability of data processing, ensures the stability and reliability of the traffic signal system, and reduces the risk of traffic congestion and safety accidents.
Smart Images

Figure CN120673610A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic technology, and in particular to a signal light delay testing method, apparatus, computer equipment, and storage medium. Background Art
[0002] Due to the security requirements of traffic light data, the current common method of obtaining traffic light data is to use large-scale model calculation and analysis, and then obtain traffic light data by installing hardware equipment on traffic lights at intersections, thereby obtaining traffic light delay data.
[0003] However, although this method is feasible, since the large model calculation and the hardware equipment obtain traffic light data are completed by two independent systems, there is a problem of untimely data synchronization, which makes the obtained traffic light delay data inaccurate, resulting in low reliability of the analysis results and unable to meet the needs of high-precision testing. Summary of the Invention
[0004] The embodiments of the present application provide a signal light delay testing method, apparatus, computer equipment, and storage medium. The method can record the preset light change time and the actual light change time in the same system, thereby meeting high-precision testing requirements.
[0005] A first aspect of an embodiment of the present application provides a signal light delay testing method, the method comprising:
[0006] Obtain preset operation information of the target signal light;
[0007] Determine, based on the preset operation information, a timestamp triggering script for executing the operation state switching of the target signal light;
[0008] Running the timestamp trigger script on the target server and obtaining actual operation information of the target signal light;
[0009] The timestamp difference between the actual operation information and the preset operation information is calculated to obtain the signal light delay data.
[0010] In an optional embodiment of the present application, the preset operation information includes multiple types of operation states of the target signal light and preset operation time corresponding to each type of operation state;
[0011] The step of determining, based on the preset operation information, a timestamp triggering script for executing the operation state switching of the target signal light comprises:
[0012] determining a current operating state of the target signal light;
[0013] Based on the preset operation information and according to the current operation state of the target signal light, generating an operation script for the target signal light;
[0014] Based on the operation script, a timestamp trigger script for executing the operation state switching of the target signal light is generated.
[0015] In an optional embodiment of the present application, generating a timestamp trigger script for executing the operating state switching of the target signal light based on the operating script includes:
[0016] Obtaining a preset switching timestamp for the target signal light in the running script to execute adjacent running state switching;
[0017] Based on the preset switching timestamp and according to the current operating state of the target signal light, a timestamp triggering script for executing the operating state switching of the target signal light is generated.
[0018] In an optional embodiment of the present application, running the timestamp trigger script on the target server and obtaining actual operation information of the target traffic light includes:
[0019] Running the timestamp trigger script on the target server and monitoring the operating status of the target signal light in real time;
[0020] When the operating state of the target signal light is a first preset state, obtaining actual operating information of the target signal light within a preset period;
[0021] Wherein, at the end moment of the preset period, the operating state of the target signal light is a first preset state.
[0022] In an optional embodiment of the present application, the obtaining of actual operating information of the target signal light within a preset period includes:
[0023] Acquire an operating video of the target signal light within a preset period;
[0024] Decomposing the running video into a set of continuous running pictures;
[0025] Obtaining the running time and running status of each running picture in the running picture set;
[0026] According to the running time and running state of each running picture in the running picture set, the actual running time of each running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
[0027] In an optional embodiment of the present application, determining the actual running time of each type of running state in the target traffic light and the actual switching timestamp of adjacent running states according to the running time and running state of each running picture in the running picture set includes:
[0028] Based on the running state of each running picture in the running picture set, selecting a running switching picture from the running picture set, and adding a corresponding state switching label to the running switching picture;
[0029] Determining the execution time of the execution switching picture;
[0030] According to the state switching label of the running moment of each running switching picture in the running picture set, the actual running time of each type of running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
[0031] In an optional embodiment of the present application, calculating the timestamp difference between the actual operation information and the preset operation information to obtain the traffic light delay data includes:
[0032] Obtain the actual switching timestamps of adjacent operating states of the target signal light recorded in the actual operation information during actual operation;
[0033] Get the actual switching timestamp of the adjacent running state and the corresponding preset switching timestamp in the timestamp trigger script;
[0034] The difference between the preset switching timestamp and the actual switching timestamp is calculated to obtain the signal light delay data.
[0035] According to a second aspect of the embodiments of the present application, a signal light delay testing device is provided, comprising:
[0036] The first acquisition unit is used to obtain the preset operation information of the target signal light
[0037] A determining unit, configured to determine, based on the preset operating information, a timestamp triggering script for executing the operating state switching of the target signal light;
[0038] A second acquiring unit runs the timestamp trigger script on the target server and acquires actual operating information of the target traffic light;
[0039] The calculation unit is used to calculate the time stamp difference between the actual operation information and the preset operation information to obtain the signal light delay data.
[0040] According to a third aspect of an embodiment of the present application, a computer device is provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0041] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0042] In this embodiment, the preset operating information of the target traffic light is first obtained. Then, based on the preset operating information, a timestamp trigger script is determined for the target traffic light to execute the operating state switch. The timestamp trigger script is then executed on the target server to obtain the actual operating information of the target traffic light. The timestamp difference between the actual operating information and the preset operating information is calculated to obtain the traffic light delay data. As can be seen, this application uses the received data to compare the actual traffic light change time with the actual traffic light change time to analyze and calculate the traffic light change delay in the same server environment, improving the accuracy of the traffic light change delay calculation and ensuring the precision and reliability of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 A flowchart of a signal light delay testing method provided in one embodiment of the present application;
[0045] Figure 2 A flowchart of a method for determining a timestamp-triggered script provided in one embodiment of the present application;
[0046] Figure 3 A flowchart of a method for obtaining actual operation information provided in one embodiment of the present application;
[0047] Figure 4 A flowchart of a method for calculating signal light delay data provided by one embodiment of the present application;
[0048] Figure 5 A schematic structural diagram of a signal light delay testing device provided in one embodiment of the present application;
[0049] Figure 6 A schematic diagram of the computer device structure provided for one embodiment of the present application. DETAILED DESCRIPTION
[0050] Due to the security requirements of traffic light data, the current common method of obtaining traffic light data is to use large-scale model calculation and analysis, and then obtain traffic light data by installing hardware equipment on traffic lights at intersections, thereby obtaining traffic light delay data.
[0051] However, although this method is feasible, since the large model calculation and the hardware equipment obtain traffic light data are completed by two independent systems, there is a problem of untimely data synchronization, which makes the obtained traffic light delay data inaccurate, resulting in low reliability of the analysis results and unable to meet the needs of high-precision testing.
[0052] In response to the above problems, a traffic light delay testing method is provided in an embodiment of the present application. This method can effectively calculate the specific value of the traffic light change delay by recording the traffic light change time of the received data and comparing and analyzing it with the actual traffic light change time in the same server operating environment, thereby significantly improving the accuracy of the traffic light change delay calculation, thereby ensuring the accuracy and reliability of the entire data processing process.
[0053] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0054] In order to make the technical solutions and advantages of the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, and are not an exhaustive list of all the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other unless they conflict.
[0055] The following is a brief description of the application environment of the signal light delay testing method provided in the embodiment of the present application:
[0056] The present application can be applied to various traffic signal control systems, including but not limited to urban road traffic lights, highway traffic lights, railway crossing lights, etc. By performing delay tests on these lights, the stability and reliability of the traffic signal system can be ensured, and the smoothness and safety of traffic can be improved. Specifically, in the application of urban road traffic lights, the present application can monitor the light changing time of the lights in real time, and promptly discover and correct delay problems caused by equipment aging or system failures, thereby avoiding traffic congestion and potential traffic accidents; in highway traffic light systems, the application of the present application can effectively monitor the delay phenomenon in long-distance signal transmission, ensure the smooth passage of vehicles in different sections of the road, and reduce rear-end collisions caused by signal delays; in the application of railway crossing lights, the present application can accurately measure the response time of the crossing lights, ensure the safe intersection of trains and road traffic, and prevent serious safety accidents caused by signal delays.
[0057] See Figure 1 The following embodiments use the above-mentioned delay test system as the execution body and apply the method provided in the embodiments of the present application to the above-mentioned signal light delay test system, and specifically illustrate the signal light delay test as an example. The signal light delay test method provided in the embodiments of the present application includes the following steps 101 to 104:
[0058] Step 101: Obtain preset operating information of a target traffic light;
[0059] Among them, the preset operation information is used to determine the normal light changing timing and expected response time of the traffic light, which provides the data basis for delay testing and comparison in subsequent steps. Through the preset operation information, it is possible to accurately judge whether the traffic light changes according to the established time and whether the response is timely, thereby effectively identifying potential delay problems and providing a basis for subsequent analysis and adjustment.
[0060] In this step, after determining the target traffic light, the server can obtain the traffic light data of the intersection and continuously print the obtained data into the traffic light log file.
[0061] Step 102: Determine the timestamp triggering script for executing the running state switch of the target signal light according to the preset running information;
[0062] Among them, the timestamp trigger script is a script program used to trigger the state switch of the traffic light at a specific time point. By parsing the preset operation information, the timestamp trigger script can accurately calculate when the target traffic light should switch its state, such as from red to green.
[0063] Specifically, when a preset time point is reached, the timestamp trigger script automatically triggers the status switch of the traffic light or sends a switching instruction to the system that controls the traffic light, ensuring that the traffic light can operate strictly according to the preset schedule and reducing errors and delays caused by human operation; at the same time, the timestamp trigger script also provides a precise time reference for subsequent delay tests, making the test results more accurate and reliable.
[0064] In this step, the critical moments when the target traffic light needs to switch states are identified based on preset operating information. This process includes a detailed understanding of the traffic light's operating logic and a comprehensive consideration of multiple factors such as traffic flow, time cycle, and emergency situations. Through precise calculations and intelligent predictions, it ensures that the traffic light can switch states at the most appropriate time, thereby optimizing traffic flow and reducing congestion.
[0065] Step 103: Run the timestamp trigger script on the target server and obtain the actual operation information of the target traffic light;
[0066] Among them, the actual operation information is the real-time status data of the target traffic light during the actual operation process, including but not limited to the color change of the traffic light, switching time and any abnormal conditions. By obtaining the actual operation information, the delay of the traffic light can be further analyzed and compared with the preset schedule, so as to accurately calculate the delay time and provide data support for subsequent optimization and adjustment.
[0067] At the same time, real-time acquisition and monitoring of actual operation information also helps to promptly discover and deal with potential problems in traffic light operation, ensuring the smooth and safe operation of the traffic system.
[0068] In this step, the target server is a device with a recording function. Use a device that can log in to the above server and has a screen display function to log in to the server, run the timestamp trigger foot, continuously refresh the time display, and obtain and monitor the actual operating status and information of the target traffic light in real time.
[0069] Step 104: Calculate the timestamp difference between the actual operation information and the preset operation information to obtain traffic light delay data.
[0070] Among them, traffic light delay data is a quantitative representation of the deviation time generated by the actual operation of the traffic light relative to the preset schedule. It reflects the delay between the traffic light receiving the instruction and executing the instruction (such as color change), and is an important indicator for evaluating the response efficiency of the traffic light. By analyzing traffic light delay data, we can understand the performance of the traffic signal control system and then take targeted optimization measures, such as adjusting the traffic light control logic and enhancing the stability of signal transmission, to improve the operating efficiency and safety of the entire traffic light system.
[0071] During implementation, a video recording device was used to place the real-world traffic lights at the intersection and the continuously refreshed time in the script within the recording range. Within the recording range, the correspondence between the traffic light color changes and the timestamps can be clearly observed, providing intuitive visual evidence for subsequent delay calculations and ensuring the accuracy and reliability of the test.
[0072] At the same time, the video footage can also be saved as historical data to facilitate subsequent analysis and re-testing. In addition, by comparing video footage from different time periods or under different traffic flows, the changing trends of traffic light delays can be further analyzed, providing strong support for the continuous optimization of traffic signal control systems.
[0073] The signal light delay testing method provided in the embodiments of the present application obtains predetermined operating parameters for a target signal light; based on these predetermined parameters, determines the timestamp of the target signal light's state transition and triggers a corresponding script; executes the script triggered by this timestamp on the target server while simultaneously collecting the target signal light's actual operating data; and calculates the timestamp difference between the actual operating data and the predetermined operating parameters to derive the signal light's delay data. Within the same server environment, the signal light delay is analyzed and calculated by comparing the received signal light transition time with the actual signal light transition time. This enhances the accuracy of the signal light transition delay calculation and ensures the precision and reliability of data processing.
[0074] In an optional embodiment of the present application, the preset operation information includes multiple types of operation states of the target signal light and the preset operation time corresponding to each type of operation state. Therefore, the timestamp trigger script for executing the operation state switching of the target signal light can be determined based on the preset operation information. Therefore, the embodiment of the present application provides a timestamp trigger script determination method, which is a specific limitation of the above step 102. Figure 2 As shown, the specific steps include:
[0075] Step 201: Determine the current operating state of the target signal light;
[0076] In this step, the current operating status of the target signal light is first determined, including whether the signal light is operating normally and whether the signal light currently displays a red light, a yellow light, or a green light.
[0077] It should be noted that if the traffic light is in an abnormal working state, it is necessary to first troubleshoot and repair the traffic light to ensure that it can work normally before performing the delay test.
[0078] Step 202: Based on the preset operation information and the current operation status of the target signal light, an operation script for the target signal light is generated;
[0079] The operation script is a set of instructions for controlling the target traffic lights to switch according to the preset operation status and time sequence.
[0080] In this step, when generating the running script, the switching order and time points of the traffic lights will be reasonably arranged based on the multiple running states defined in the preset running information and the preset running time corresponding to each running state, combined with the current running state of the target traffic light.
[0081] For example, if the current traffic light is red, and the preset operation information defines that the next state should be yellow, and the red-to-yellow transition time is 5 seconds, then the operation script will set a corresponding yellow light state trigger instruction 5 seconds later. This operation script can achieve precise control of traffic light delay testing, ensuring the accuracy and effectiveness of the test.
[0082] Step 203: Based on the running script, a timestamp trigger script for executing the running state switch of the target signal light is generated.
[0083] The timestamp trigger script is a trigger instruction for running the script's state switch. This instruction triggers the traffic light state switch precisely at the time specified in the script. By parsing the timestamp trigger script, the traffic light control system can accurately trigger the state switch at the predetermined moment, thus simulating the operation of traffic lights in real road environments.
[0084] In this step, based on the running script, a timestamp trigger script is further created for executing the running state switch of the target traffic light, so that the timestamp trigger script can accurately record and trigger the key moment of the traffic light state change.
[0085] The timestamp trigger script determination method provided in the embodiment of the present application realizes the accurate capture and triggering of the traffic light state switching moment by combining the time point and state switching requirements in the running script, which not only improves the accuracy of the traffic light delay test, but also effectively simulates the operating logic of the traffic light in the actual road environment, fully considers the delay factor of the traffic light switching, and ensures the reliability and practicality of the test results.
[0086] In an optional embodiment of the present application, the running script includes a script program for triggering the state switching of the signal light at a specific time point, i.e., a timestamp triggering script. Therefore, based on the running script, a timestamp triggering script for executing the running state switching of the target signal light can be generated. This method is a specific limitation of the above step 203, and the specific steps include:
[0087] Step 301: Obtain a preset switching timestamp for executing adjacent operating state switching of a target signal light in an operating script;
[0088] In this step, the predetermined switching timestamp information when the target signal light switches between adjacent operating states is extracted from the execution script.
[0089] Step 302: Based on the preset switching timestamp and the current operating state of the target signal light, a timestamp trigger script for executing the operating state switching of the target signal light is generated.
[0090] In this step, based on the set predetermined switching timestamp and the current operating state of the target signal light, a timestamp trigger script is created, and the timestamp trigger script is used to guide the target signal light to perform the corresponding operating state switching operation.
[0091] In an optional embodiment of the present application, the same server is used to execute the timestamp trigger script and obtain the actual operation information of the target signal light during the execution process. The embodiment of the present application provides a method for obtaining the actual operation information, which is a further limitation of step 103, such as Figure 3 As shown, the specific steps include:
[0092] Step 401: Run a timestamp trigger script on the target server and monitor the operating status of the target traffic light in real time;
[0093] In this step, the timestamp trigger script is executed on the specified target server, and the target server's recording function is used to monitor and track the operating status of the target traffic light in real time. Through real-time monitoring and recording functions, the specific performance of the target traffic light during the operating status switching process can be clearly observed, including the exact time of switching, the smoothness of the switching process, and whether there are any delays.
[0094] Specifically, the target server has a recording function. A device capable of logging into the server and displaying on a screen is used to log in to the server and run a time script to continuously refresh the time. During this process, it is ensured that the recording device places the real-world traffic lights at the intersection and the time continuously refreshed in the script within the recording range.
[0095] Step 402: When the operating state of the target signal light is the first preset state, obtain actual operating information of the target signal light within a preset period.
[0096] Wherein, at the end moment of the preset cycle, the operating state of the target signal light is the first preset state.
[0097] In this step, when the operating state of the target signal light is the set first preset state, the recording program is started to capture and record the actual operating conditions of the target signal light within the preset time period; this process not only includes the lighting and off time of the signal light, but also includes the transition time of the signal light between different color states.
[0098] For example, when shooting, you can choose to start recording when the green light is about to end, and continue recording until the next green light starts. Through one recording, you can calculate the time when the green light turns to yellow light, the yellow light turns to red light, and the red light turns to green light.
[0099] It should be noted that the preset cycle is generally a complete traffic light cycle, which includes the entire process of the traffic light color state transition. This can ensure that all operating states of the traffic light within a complete cycle are captured, providing comprehensive and accurate data support for subsequent delay tests. In actual operation, the preset cycle setting can be adjusted according to the specific traffic light type and test requirements to achieve the best test effect.
[0100] The method for obtaining the actual operation information of the target traffic light provided in the embodiment of the present application performs the execution of the preset traffic light switching and the execution of the real traffic light switching in the same server environment, effectively eliminating the influence of environmental factors on the test results, making the test results more real and reliable.
[0101] In an optional embodiment of the present application, the actual operation information of the target signal light can also be obtained by analyzing the operation video of the target signal light. Therefore, the embodiment of the present application provides a method for determining the actual operation information, which is a further limitation of step 402, and obtains the operation video of the target signal light within a preset period;
[0102] Step 501: Decompose the running video into a set of continuous running pictures;
[0103] In this step, the previously recorded running video is decomposed into a series of continuous pictures through editing software or frame rate extraction tools. The interval between pictures is usually set to 30 milliseconds.
[0104] It should be noted that the time interval is generally determined by the frame rate used when the video was originally captured;
[0105] Step 502: Obtain the running time and running status of each running picture in the running picture set;
[0106] Step 503: Determine the actual running time of each running state in the target signal light and the actual switching timestamps of adjacent running states according to the running time and running state of each running picture in the running picture set.
[0107] In this step, the running time and running status corresponding to each running picture in the running picture set are first obtained. Then, based on the running time and running status of each running picture in the running picture set, the actual running time length of each running state in the target traffic light and the actual timestamp of switching between adjacent running states are further analyzed and determined, so as to accurately track the moment when the traffic light state changes.
[0108] The method for obtaining the actual operating information of the target signal light provided in the embodiment of the present application decomposes the operating video into continuous images and accurately captures and analyzes the operating status of the target signal light based on the operating time and status of the images. This not only improves the accuracy of the signal light delay test, but also greatly simplifies the test process. It can automatically identify and record the various operating states of the signal light and its conversion time, providing strong data support for subsequent signal light performance evaluation and maintenance.
[0109] In an optional embodiment of the present application, the actual operating time of each operating state of the target signal light and the actual switching timestamps of adjacent operating states are determined based on an analysis of the operating time and operating state of each operating state in the operating state set. This embodiment of the present application provides a method for determining the actual operating time and the actual switching timestamps. This method further defines step 503 and includes the following specific steps:
[0110] Step 601: Based on the running state of each running picture in the running picture set, select an running switching picture from the running picture set, and add a corresponding state switching label to the running switching picture;
[0111] In this step, the operating status of each running picture in the running picture collection is first analyzed and evaluated, and the key pictures that can represent the operating status switch are selected from the entire picture collection. Then, the corresponding state switching labels are added to the switching pictures to facilitate subsequent identification and processing; the state switching labels clearly indicate the operating status changes that occur in the pictures, thereby providing intuitive and accurate visual assistance for the monitoring and analysis of the entire operating process.
[0112] Step 602: Determine the execution time of switching the image.
[0113] Step 603: Determine the actual running time of each type of running state in the target signal light and the actual switching timestamps of adjacent running states according to the state switching labels of the running moments of each running switching picture in the running picture set.
[0114] In this step, the running time of the running switching picture is first determined. Then, each running switching picture in the running picture set is analyzed based on the running time to identify its corresponding state switching label, and further determine the actual running time of each running state in the target traffic light, as well as the timestamp of the actual switching between adjacent running states.
[0115] The method for determining the actual operating time and the actual switching timestamp provided in the embodiment of the present application realizes accurate identification of the operation process of the signal light by accurately capturing the switching moment of the signal light in different operating states and combining the state switching label carried by each operation switching picture. This method not only improves the accuracy of identifying the changes in the operating state of the signal light, but also ensures the high reliability of the determined actual operating time and actual switching timestamp, and can more effectively evaluate the response speed and stability of the signal light, providing solid data support for the performance analysis of the signal light.
[0116] In an optional embodiment of the present application, the signal light delay data is obtained by calculating the difference between the preset switching timestamp and the actual switching timestamp. The embodiment of the present application provides a method for obtaining actual operation information, which is a further limitation of step 104, such as Figure 4 As shown, the specific steps include:
[0117] Step 701: Obtain the actual switching timestamps of adjacent operating states of the target signal light recorded in the actual operation information during actual operation;
[0118] In this step,
[0119] In order to accurately obtain detailed operating information records of the target traffic light during its actual operation, the actual switching timestamps between adjacent operating states of the traffic light are obtained, thereby helping to analyze and understand the operating mode and efficiency of the traffic light in different time periods and better grasp the operating rules of the traffic light.
[0120] Step 702: Obtain the preset switching timestamp corresponding to the actual switching timestamp of the adjacent running state in the timestamp trigger script;
[0121] In this step, based on the recorded trigger timestamp, the nearby time of the record is found in the timestamp trigger script and used as the preset switching timestamp, laying the foundation for the subsequent calculation of delay data.
[0122] Taking the green light turning yellow as an example, find the green light off time when the green light turns yellow in the data for that direction.
[0123] Step 703: Calculate the difference between the preset switching timestamp and the actual switching timestamp to obtain traffic light delay data.
[0124] In this step, the preset switching timestamp and the actual switching timestamp are calculated to obtain the difference between the two, and then the delay data of the traffic light is obtained.
[0125] Taking the green-to-yellow light as an example, according to the recorded script time, find the nearby time in the traffic light log file, find the green light off time when the green light turns yellow in the data for that direction, and subtract the former from the latter to get the traffic light change delay for that direction.
[0126] It should be understood that although the steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0127] See Figure 5 One embodiment of the present application provides a signal light delay testing device, comprising:
[0128] The first acquisition unit 81 is used to obtain the preset operation information of the target signal light
[0129] A determining unit 82 is configured to determine, based on the preset operating information, a timestamp triggering script for executing the operating state switching of the target signal light;
[0130] The second acquiring unit 83 runs the timestamp trigger script on the target server and acquires the actual operating information of the target traffic light;
[0131] The calculation unit 84 is configured to calculate a timestamp difference between the actual operation information and the preset operation information to obtain signal light delay data.
[0132] In an optional embodiment of the present application, the determining unit 82 is configured to:
[0133] determining a current operating state of the target signal light;
[0134] Based on the preset operation information and according to the current operation state of the target signal light, generating an operation script for the target signal light;
[0135] Based on the operation script, a timestamp trigger script for executing the operation state switching of the target signal light is generated.
[0136] In an optional embodiment of the present application, the determining unit 82 is further configured to:
[0137] Obtaining a preset switching timestamp for the target signal light in the running script to execute adjacent running state switching;
[0138] Based on the preset switching timestamp and according to the current operating state of the target signal light, a timestamp triggering script for executing the operating state switching of the target signal light is generated.
[0139] In an optional embodiment of the present application, the second acquiring unit 83 is configured to:
[0140] Running the timestamp trigger script on the target server and monitoring the operating status of the target signal light in real time;
[0141] When the operating state of the target signal light is a first preset state, obtaining actual operating information of the target signal light within a preset period;
[0142] Wherein, at the end moment of the preset period, the operating state of the target signal light is a first preset state.
[0143] In an optional embodiment of the present application, the second acquiring unit 83 is further configured to:
[0144] Acquire an operating video of the target signal light within a preset period;
[0145] Decomposing the running video into a set of continuous running pictures;
[0146] Obtaining the running time and running status of each running picture in the running picture set;
[0147] According to the running time and running state of each running picture in the running picture set, the actual running time of each running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
[0148] In an optional embodiment of the present application, the second acquiring unit 83 is further configured to:
[0149] Based on the running state of each running picture in the running picture set, selecting a running switching picture from the running picture set, and adding a corresponding state switching label to the running switching picture;
[0150] Determining the execution time of the execution switching picture;
[0151] According to the state switching label of the running moment of each running switching picture in the running picture set, the actual running time of each type of running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
[0152] In an optional embodiment of the present application, the calculation unit 84 is configured to:
[0153] Obtain the actual switching timestamps of adjacent operating states of the target signal light recorded in the actual operation information during actual operation;
[0154] Get the actual switching timestamp of the adjacent running state and the corresponding preset switching timestamp in the timestamp trigger script;
[0155] The difference between the preset switching timestamp and the actual switching timestamp is calculated to obtain the signal light delay data.
[0156] The specific definitions of the signal light delay testing device described above can be found in the definitions of the signal light delay testing method described above and will not be further elaborated here. Each unit in the signal light delay testing device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above units may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in the form of software in a memory in the computer device, allowing the processor to call and execute the corresponding operations of each unit.
[0157] In one embodiment, a computer device is provided. The internal structure diagram of the computer device can be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a signal light delay test method as described above is implemented. It includes: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, any step in the signal light delay test method as described above is implemented.
[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any step in the above signal light delay measurement method can be implemented.
[0159] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1The function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0163] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0164] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A signal light delay testing method, characterized in that: include: Obtain preset operation information of the target signal light; Determine, based on the preset operation information, a timestamp triggering script for executing the operation state switching of the target signal light; Running the timestamp trigger script on the target server and obtaining actual operation information of the target signal light; The timestamp difference between the actual operation information and the preset operation information is calculated to obtain the signal light delay data.
2. The method according to claim 1, characterized in that The preset operation information includes multiple types of operation states of the target signal light and the preset operation time corresponding to each type of operation state; The step of determining, based on the preset operation information, a timestamp triggering script for executing the operation state switching of the target signal light comprises: determining a current operating state of the target signal light; Based on the preset operation information and according to the current operation state of the target signal light, generating an operation script for the target signal light; Based on the operation script, a timestamp trigger script for executing the operation state switching of the target signal light is generated.
3. The method according to claim 2, characterized in that The generating, based on the running script, a timestamp triggering script for executing the running state switching of the target signal light comprises: Obtaining a preset switching timestamp for the target signal light in the running script to execute adjacent running state switching; Based on the preset switching timestamp and according to the current operating state of the target signal light, a timestamp trigger script for executing the operating state switching of the target signal light is generated.
4. The method according to claim 1, characterized in that The step of running the timestamp trigger script on the target server and obtaining actual operation information of the target signal light includes: Running the timestamp trigger script on the target server and monitoring the operating status of the target signal light in real time; When the operating state of the target signal light is a first preset state, obtaining actual operating information of the target signal light within a preset period; Wherein, at the end moment of the preset period, the operating state of the target signal light is a first preset state.
5. The method according to claim 4, characterized in that: The obtaining of actual operating information of the target signal light within a preset period includes: Acquire an operating video of the target signal light within a preset period; Decomposing the running video into a set of continuous running pictures; Obtaining the running time and running status of each running picture in the running picture set; According to the running time and running state of each running picture in the running picture set, the actual running time of each running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
6. The method according to claim 5, characterized in that The determining, based on the running time and running state of each running picture in the running picture set, the actual running time of each running state in the target traffic light and the actual switching timestamp of adjacent running states includes: Based on the running state of each running picture in the running picture set, selecting a running switching picture from the running picture set, and adding a corresponding state switching label to the running switching picture; Determining the execution time of the execution switching picture; According to the state switching label of the running moment of each running switching picture in the running picture set, the actual running time of each type of running state in the target traffic light and the actual switching timestamps of adjacent running states are determined.
7. The method according to claim 1, characterized in that: The calculating the timestamp difference between the actual operation information and the preset operation information to obtain the signal light delay data includes: Obtain the actual switching timestamps of adjacent operating states of the target signal light recorded in the actual operation information during actual operation; Get the actual switching timestamp of the adjacent running state and the corresponding preset switching timestamp in the timestamp trigger script; The difference between the preset switching timestamp and the actual switching timestamp is calculated to obtain the signal light delay data.
8. A signal light delay testing device, characterized in that: include: A first acquiring unit, configured to acquire preset operating information of a target signal light; A determining unit, configured to determine, based on the preset operating information, a timestamp triggering script for executing the operating state switching of the target signal light; A second acquiring unit runs the timestamp trigger script on the target server and acquires actual operating information of the target traffic light; The calculation unit is used to calculate the time stamp difference between the actual operation information and the preset operation information to obtain the signal light delay data.
9. A computer device comprising: The method comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.