Test method of traffic signal controller, electronic equipment and server

By introducing a central platform server to automatically distribute timing plans and test environment configuration data during traffic signal testing, and collecting and comparing signal output information, the problem of low test automation in the existing technology is solved, and test efficiency and quality are improved.

CN118672229AInactive Publication Date: 2024-09-20QINGDAO HISENSE TRANS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310267347.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing traffic signal testing mainly relies on manual operation and has a low degree of automation, resulting in low testing efficiency and difficulty in ensuring quality. It also requires high testers' time and concentration, and it is easy to miss short-term defects.

Method used

By designing a test method for traffic signals, the central platform server is used to automatically issue timing plans and test environment configuration data, collect signal output information, and compare it with pre-written test cases to generate test results to realize the automated testing process.

Benefits of technology

It improves the efficiency of traffic signal testing, reduces test manpower consumption, ensures test quality, simplifies the test process, and reduces testers' dependence and concentration requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672229A
    Figure CN118672229A
Patent Text Reader

Abstract

The invention discloses a traffic signal machine test method, an electronic device and a server, and the method comprises the steps: uploading a timing scheme to a central platform server when a signal machine is tested, so as to enable the central platform server to transmit the received timing scheme to a designated signal machine; issuing test environment configuration data to the annunciator, and performing test configuration on the annunciator; and when the annunciator runs according to the received timing scheme, acquiring output information of the annunciator, and comparing the acquired output information with expected data in a pre-written test case to generate a test result. According to the electronic equipment and the server, test software can be integrated, the signal machine can be automatically tested, the test efficiency of the traffic signal machine is improved, the test manpower consumption is reduced, and meanwhile the test quality is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a testing method, electronic equipment and a server for a traffic signal. Background Art

[0002] Traffic signals are an important part of modern urban transportation systems and are mainly used for the control and management of urban road traffic signals. Traffic signals need to be tested before they are put into use. Currently, the testing of road traffic signals is mainly performed manually. The testing process mainly involves manually configuring the signal machine's software and hardware environment, manually configuring the signal machine's timing plan, manually issuing the timing plan, manually switching the time period plan, manually checking the signal machine's output results, and manually filling out the test report.

[0003] Therefore, the current traffic signal testing has a low degree of automation, is highly dependent on testers, requires a lot of time and concentration from testers, and has low testing efficiency. Because different testers may have deviations in their understanding and execution of test cases, it is difficult to ensure test quality. Summary of the invention

[0004] The embodiment of the present invention provides a traffic signal testing method, electronic equipment and server, which can perform automated testing on the signal, improve the testing efficiency of the traffic signal, reduce the testing manpower consumption, and ensure the testing quality.

[0005] A first aspect of an embodiment of the present invention provides a method for testing a traffic signal, comprising:

[0006] When testing the signal, uploading the timing plan to the central platform server, so that the central platform server sends the received timing plan to the designated signal;

[0007] Sending test environment configuration data to the signal machine to perform test configuration on the signal machine;

[0008] When the signal machine operates according to the received timing scheme, collecting output information of the signal machine;

[0009] Comparing the collected output information with expected data in a pre-written test case to generate a test result;

[0010] The pre-written test case includes the timing scheme and the test environment configuration data.

[0011] In some embodiments of the present invention, uploading the timing scheme to the central platform server includes:

[0012] Acquire timing plan data, and parse the timing plan data;

[0013] Reorganize and package the parsed timing plan data according to the plan distribution rules between the central platform server and the signal machine;

[0014] Encapsulating the reorganized and packaged timing plan data according to the hypertext transfer protocol to generate a request data packet;

[0015] The generated request data packet is sent to the central platform server.

[0016] In some embodiments of the present invention, the sending of test environment configuration data to the signal machine to perform test configuration on the signal machine includes:

[0017] encapsulate the communication interface with the signal machine according to the simple network management protocol;

[0018] Sending the test environment configuration data to the signal machine through the communication interface to modify the test configuration items of the signal machine;

[0019] The test configuration items include countdown type configuration, bar screen protocol configuration, startup phase takeover configuration and startup countdown configuration.

[0020] In some embodiments of the present invention, the present invention further comprises:

[0021] When the timing scheme of the signal is switched, the set system time is sent to the signal through the communication interface to modify the system time of the signal and realize the switching of the timing scheme.

[0022] In some embodiments of the present invention, the signal machine is connected to a signal light, and the signal machine and the signal light communicate with each other using a CANBUS bus;

[0023] The collecting of the output information of the signal machine includes:

[0024] The frame data on the CANBUS bus is collected by a signal collection and conversion device, and the collected frame data is converted into Ethernet data;

[0025] Receive the Ethernet data transmitted by the signal acquisition and conversion device to collect light color data.

[0026] In some embodiments of the present invention, the signal machine is also connected to a countdown screen and a bar screen, and the signal machine communicates with the countdown screen and the bar screen via a 485 serial port;

[0027] The collecting of the output information of the signal machine also includes:

[0028] Encapsulate the communication interface between the signal machine and the signal machine according to the serial port protocol, and collect countdown data through the interface converter;

[0029] The communication interface between the signal machine and the strip screen protocol is encapsulated, and the strip screen data is collected through an interface converter.

[0030] In some embodiments of the present invention, comparing the collected output information with expected data in a pre-written test case includes:

[0031] Verifying the frame data in the collected light color data;

[0032] When the inspection is passed, the frame data is structured according to the light color reorganization algorithm to generate light color structured data;

[0033] Comparing the generated light color structured data with expected data in a pre-written test case;

[0034] The light color structured data includes: light color channel number, light color duration and light color position index.

[0035] In some embodiments of the present invention, the comparing the collected output information with expected data in a pre-written test case further includes:

[0036] Parsing the collected countdown data to generate countdown structured data;

[0037] Comparing the generated countdown structured data with expected data in a pre-written test case;

[0038] Parsing the collected strip screen data to generate strip screen structured data;

[0039] The generated structured data of the strip screen is compared with the expected data in the pre-written test case.

[0040] A second aspect of an embodiment of the present invention provides an electronic device, which is used to upload a timing scheme to a central platform server when testing a signal, so that the central platform server sends the received timing scheme to a designated signal;

[0041] The electronic device is also used to send test environment configuration data to the signal machine to perform test configuration on the signal machine;

[0042] The electronic device is used to collect output information of the signal machine when the signal machine operates according to the received timing scheme;

[0043] The electronic device is used to compare the collected output information with expected data in a pre-written test case to generate a test result;

[0044] The pre-written test case includes the timing scheme and the test environment configuration data.

[0045] According to a third aspect of an embodiment of the present invention, a server is provided, wherein the server is used to receive a timing plan uploaded by an electronic device; the timing plan includes address information of a signal to be tested;

[0046] The server is used to send the received timing plan to the signal to be tested according to the address information;

[0047] The server returns the sending result to the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings introduced below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0049] Figure 1 A schematic diagram of the connection of a signal machine provided by an embodiment of the present invention;

[0050] Figure 2a One of the structural schematic diagrams of the test management system of the traffic signal provided by the embodiment of the present invention;

[0051] Figure 2b This is a schematic diagram of information interaction during manual testing of a signal machine;

[0052] Figure 3 One of the flow charts of the testing method provided in the embodiment of the present invention;

[0053] Figure 4 A second flow chart of the testing method provided in the embodiment of the present invention;

[0054] Figure 5 A schematic diagram of a time period table provided in an embodiment of the present invention;

[0055] Figure 6 A schematic diagram of a test case interface provided by an embodiment of the present invention;

[0056] Figure 7 A schematic diagram of the light color data collection principle provided by an embodiment of the present invention;

[0057] Figure 8A third flow chart of the testing method provided in the embodiment of the present invention;

[0058] Fig. 9 A schematic diagram of the format of frame data provided by an embodiment of the present invention;

[0059] Fig.10 A schematic diagram of a data collection process according to an embodiment of the present invention;

[0060] Fig.11 A schematic diagram of the structure of an interface converter provided by an embodiment of the present invention;

[0061] Fig.12 A schematic diagram of the data format of countdown data provided by an embodiment of the present invention;

[0062] Fig.13 A schematic diagram of the data format of the strip screen data provided by an embodiment of the present invention;

[0063] Fig.14 A schematic diagram of the data format of a data linked list provided in an embodiment of the present invention;

[0064] Fig.15 A schematic diagram of a flow chart of frame data comparison provided by an embodiment of the present invention;

[0065] Fig.16 A schematic diagram of the data format of light color structured data provided by an embodiment of the present invention;

[0066] Fig.17 A schematic diagram of a test result interface of light color data provided by an embodiment of the present invention;

[0067] Fig.18 A schematic diagram of a test result interface of countdown data provided by an embodiment of the present invention;

[0068] Fig.19 A schematic diagram of a test result interface of bar screen data provided by an embodiment of the present invention;

[0069] Fig. 20 A schematic diagram of a test result interface provided by an embodiment of the present invention;

[0070] Fig.21 The second structural diagram of the test management system for traffic signals provided by the embodiment of the present invention. DETAILED DESCRIPTION

[0071] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described below with reference to the accompanying drawings and examples. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to the embodiments described herein; on the contrary, these embodiments are provided to make the present invention more comprehensive and complete, and to fully convey the concepts of the exemplary embodiments to those skilled in the art. The same figure marks in the figures represent the same or similar structures, and thus their repeated descriptions will be omitted. The words expressing position and direction described in the present invention are all explained with reference to the accompanying drawings as examples, but changes can be made as needed, and the changes made are all included in the scope of protection of the present invention. The drawings of the present invention are only used to illustrate the relative position relationship and do not represent the true proportion.

[0072] Traffic signals are an important part of modern urban transportation systems and are mainly used for the control and management of urban road traffic signals. Figure 1 The connection diagram of the signal machine provided by the embodiment of the present invention is shown in FIG. Figure 1 The signal machine 1 is usually connected to a signal light 101, a countdown screen 102 and a strip screen 103. The signal machine 1 is used to control the display of the signal light 101, the countdown screen 102 and the strip screen 103, and the display of the signal light 101, the countdown screen 102 and the strip screen 103 is usually synchronized.

[0073] The signal light 101 is used to light up a red light, a green light, a yellow light, a flashing green light, a flashing red light, etc. to indicate vehicles and pedestrians to pass or wait. The countdown screen 102 can be used to count down and display the duration of the red light or green light. The bar screen 103 can be used to display auxiliary information of the waiting area, etc.

[0074] The display information of the signal light 101, the countdown screen 102 and the bar screen 103 is usually controlled by the signal machine 1, and the signal machine needs to be tested before it is put into use. At present, the testing of traffic signal machines is mainly based on manual testing. The testing process mainly includes manually configuring the signal machine software and hardware environment, manually configuring the signal machine timing plan, manually issuing the timing plan, manually switching the time period plan, manually checking the output results of the signal machine, and manually filling in the test report, etc., and the degree of automation is very low.

[0075] The execution of signal light test cases is time-consuming and requires a lot of time from testers. The duration of a single operation cycle of a signal light ranges from 1 to 10 minutes, depending on the timing plan. Testers need to check the output results of each signal cycle and need to observe multiple signal cycles continuously. The execution of a single test case takes at least 10 minutes if the personnel observe it in place and there are no errors, which is time-consuming. For regression tests that need to be executed repeatedly, each round of testing executes hundreds or thousands of test cases, which requires a lot of manpower and time.

[0076] The signal machine outputs multiple channels of information synchronously. Testers need to switch between different equipment terminals and observe multiple outputs synchronously, which can easily lead to missing problems. The signal machine synchronously outputs information such as signal light color, countdown, and bar screen. Testers need to constantly switch back and forth between different test terminals during the result observation process, which inevitably leads to missing some short-term defects. At the same time, the observation of the output results is a process inspection, which needs to be done second by second as much as possible, and the concentration requirements of personnel are relatively high.

[0077] For maintenance testing with a high annual release frequency, testers are prone to become passive and lazy when performing the same work repeatedly; and different testers may have deviations in their understanding and execution of use cases, making it difficult to ensure test quality.

[0078] In view of the many problems that arise when people test traffic lights, an embodiment of the present invention provides a test management system for traffic lights, which can perform automated testing on traffic lights, improve the testing efficiency of traffic lights, reduce testing manpower consumption, and ensure test quality.

[0079] Figure 2a This is one of the structural schematic diagrams of the test management system for traffic signals provided in an embodiment of the present invention.

[0080] like Figure 1 and Figure 2a As shown, the test management system for traffic signals provided by the embodiment of the present invention includes: a host computer 2, a central platform server 3, a signal machine 1 connected to the host computer 2 for communication, and a signal light 101, a countdown screen 102 and a strip screen 103 connected to the signal machine 1.

[0081] In the embodiment of the present invention, test software for automatically testing the signal 1 can be integrated in the host computer 2, and the signal can be tested by running the test software.

[0082] Before testing the traffic light, test cases can be written in advance. By executing the test cases, a complete closed loop of the traffic light can be achieved, from automatic distribution of plans, to automatic collection of output information, and automatic judgment of results.

[0083] Figure 2b This is a schematic diagram of information interaction during manual testing of signal lights. Figure 2b The dotted lines in the figure show the information interaction between the devices during manual testing. Figure 2bAs shown by the dotted line in , when manually testing a signal, the tester 4 needs to first control the host computer 2 to upload the timing plan to the website server 6, and then download the timing plan in batches from the website server 6 to the central platform server 3, and the central platform server 3 sends the timing plan to the signal 1 to be tested. For a separate timing plan, it is first uploaded to the website server 6, and then downloaded to the application database server 5, and the application database server 5 directly sends the separate timing plan to the signal 1 to be tested. After sending the timing plan to the signal 1 to be tested, it is also necessary to manually configure the test environment of the signal. At the beginning of the test, the status of the signal light, countdown screen and bar screen is manually checked, the test data and analysis results are manually recorded, and the test report is imported into the host computer 2 by the tester 4.

[0084] It can be seen from this that the entire process of manually testing signal lights is cumbersome and highly dependent on testers. Testers need to observe the entire process during the test phase, which has high manpower requirements and low test efficiency.

[0085] The test management system for traffic signals provided by the embodiment of the invention can realize automatic distribution of timing plans, automatic collection of test data, and automatic generation of test reports, thereby reducing testing manpower consumption, simplifying the testing process, improving testing efficiency, and improving testing accuracy.

[0086] Figure 2a The solid lines in FIG. 1 show the information interaction between the devices in the test management system for the traffic signal provided by the embodiment of the present invention, such as Figure 2a As shown by the solid line in the middle, in the embodiment of the present invention, the host computer 2 can directly upload the timing scheme to the central platform server 3, and the central platform server 3 sends the received timing scheme to the designated signal 1. At the same time, the host computer 2 can send the test environment configuration data to the signal 1 to test and configure the signal 1. After the configuration of the signal 1 is completed, the signal 1 runs according to the received timing scheme. At the same time, the host computer 2 automatically collects the output information of the signal 1, and compares the collected output information with the expected data in the pre-written test case to generate the test result.

[0087] During this process, testers only need to write test cases in advance. Test cases are written based on timing plans. Different test cases will be equipped with different timing plans. Test cases contain the above timing plans, test environment configuration data and expected data. After executing the test cases, testers can directly check the test results and evaluate the signal.

[0088] Specifically, before testing the signal 1, the test environment of the signal needs to be configured, mainly including the issuance of the timing plan, the configuration of the countdown screen, the configuration of the bar screen, etc. In the embodiment of the present invention, the software environment of the test software of the host computer 2 is based on the Robot Framework automated testing framework and is a signal machine protocol driver test library built in Python language.

[0089] The specific process of uploading the timing plan from the host computer 2 to the central platform server 3 can be found in Figure 3 , Figure 3 One of the flow charts of the testing method provided in the embodiment of the present invention.

[0090] like Figure 3 As shown, the host computer 2 uploads the timing plan to the central platform server 3, including:

[0091] S101, obtaining the timing plan data, and parsing the timing plan data;

[0092] S102, reorganizing and packaging the parsed timing plan data according to the plan distribution rules between the central platform server and the signal machine;

[0093] S103, encapsulating the reorganized and packaged timing plan data according to the Hypertext Transfer Protocol to generate a request data packet;

[0094] S104: Send the generated request data packet to the central platform server.

[0095] The test method executed by the host computer 2 can read the timing scheme data under the specified path. Under normal circumstances, the timing scheme data is mainly stored in the json data format in the cmts format, and is generated by zip compression and base64 encoding encryption. Therefore, after reading the timing scheme data through python under the specified path, it is necessary to parse the timing scheme data through base64 decoding, zip decompression and other processes. Then, according to the preset scheme issuance rules between the central platform server 3 and the signal machine 1, the parsed timing scheme data is reorganized and packaged to generate a data format that meets the requirements. Then, the HTTP request data packet is encapsulated according to the Hypertext Transfer Protocol (HTTP), and the timing scheme is sent to the signal center platform server 3 in the form of an HTTP request. The central platform server 3 automatically sends the received timing scheme to the target signal machine 1, and returns the timing scheme issuance result to the host computer 2, thereby realizing the automatic issuance of the timing scheme of the signal machine. The central platform server 3 will also write the timing scheme into the application data server 5 for recording.

[0096] In addition to issuing the timing plan, the test environment configuration of signal 1 also needs to modify the countdown type configuration, bar screen protocol configuration, start phase takeover, start countdown, etc. of signal 1 according to the test requirements. These test configurations are usually completed by testers through dedicated configuration tools during manual testing.

[0097] In the embodiment of the present invention, the host computer 2 directly sends the test environment configuration data to the signal machine 1 to realize automatic configuration of the test environment of the signal machine.

[0098] The specific process of the host computer configuring the signal test environment can be found in Figure 4 , Figure 4 The second flowchart of the testing method provided in the embodiment of the present invention.

[0099] like Figure 4 As shown, the host computer 2 sends the test environment configuration data to the signal machine 1 to perform test configuration on the signal machine, including:

[0100] S201, encapsulating the communication interface with the signal machine according to the simple network management protocol;

[0101] S202. Send the test environment configuration data to the signal machine through the communication interface to modify the test configuration items of the signal machine.

[0102] Among them, the test configuration items include countdown type configuration, bar screen protocol configuration, startup phase takeover configuration and startup countdown configuration.

[0103] The communication protocol between the dedicated configuration tool used in manual testing and the signal machine 1 adopts the Simple Network Management Protocol (SNMP for short). Therefore, the test method of the embodiment of the present invention is based on SNMP, a preset management information base (MIB) node address, data type and data value, etc., and encapsulates the SNMP communication interface between the host computer 2 and the signal machine 1 through Python, converts the configuration item content into a data format that meets the requirements, and sends it to the target signal machine through the encapsulated SNMP communication interface, thereby automatically modifying the test configuration items of the signal machine 1.

[0104] The above-mentioned test management system provided by the embodiment of the present invention can perform periodic control on the signal machine 1. For the multi-time period periodic scheme of the signal machine, it means dividing different time periods within 0 to 24 hours, and configuring different signal cycle lengths and green-to-signal ratios in each time period. The signal machine operates according to the scheme configured in the time period table.

[0105] Figure 5 A schematic diagram of a time period table provided in an embodiment of the present invention.

[0106] like Figure 5 As shown, the signal can be divided into four time periods within 0 to 24 hours, wherein the signal operates according to the timing scheme (1) in time period one, the timing scheme (2) in time period two, the timing scheme (3) in time period three, and the timing scheme (4) in time period four.

[0107] When testing different schemes, testers usually modify the current system time of the signal machine 1 through special tools so that the signal machine can quickly transition to the specified test scheme. In the embodiment of the present invention, the modification of the system time of the signal machine can also be completed through the above-mentioned SNMP communication interface. When switching the timing scheme, the host computer 2 sends the set system time to the signal machine 1 through the SNMP communication interface to automatically modify the system time of the signal machine 1 and realize the automatic switching of the timing schemes executed in different time periods.

[0108] Figure 6 A schematic diagram of a test case interface provided by an embodiment of the present invention.

[0109] like Figure 6 As shown, the test environment configuration process in the embodiment of the present invention is to use Python language to write the underlying modules of the process. After each underlying module is encapsulated layer by layer, a timing plan and a keyword for automatically issuing test configuration items are formed. When the signal machine test environment is initialized, the keyword is called to realize the automatic issuance of the timing plan and the automatic configuration of the test configuration items.

[0110] The test method provided by the embodiment of the present invention is based on the Robot Framework automated test framework, and the writing and execution of test cases are completed through the Robot Framework RIDE graphical management interface. Robot Framework is an open source, python-based, well-scalable, keyword-driven general automated test framework with a very rich built-in library and extension library support. At the same time, the test library can also be developed and imported based on the needs. On the basis of RobotFramework, a test library dedicated to the signal machine is developed using the python language, and the test library is imported into RobotFramework. Then, the test case keywords in the test library can be used to write and execute the test cases. When writing test cases, you can search for available use case keywords in the test library and use the use case keywords directly, or you can encapsulate the use case keywords according to personal needs to form higher-level user keywords to write test cases. At the same time, the test cases can be tagged (tag), and when executing, the test cases can be filtered according to the tags to perform corresponding acceptance tests, regression tests, full-function tests, etc.

[0111] After the test environment configuration of the signal machine 1 is completed, the signal machine 1 operates according to the cycle length and green-to-signal ratio configured in the issued timing plan. There is no other external control input during the process, so it is only necessary to test whether the output information of the signal machine 1 is correct. The output information of the signal machine 1 includes the color of the signal light, countdown, bar screen, etc. The test method provided in the embodiment of the present invention can also automatically collect the above output information. The collection of the above output information is specifically introduced below.

[0112] Figure 7 A schematic diagram of the light color data collection principle provided by an embodiment of the present invention.

[0113] like Figure 7 As shown, the signal machine 1 is usually provided with a main control board and a phase board, and the main control board and the phase board communicate with each other using the CANBUS bus. The main control board transmits periodic frame data to the phase board, and the periodic frame data is the light color data of the signal light. The phase board controls the light on and off switching of the signal light through 220V strong electricity according to the received light color data.

[0114] In the embodiment of the present invention, Figure 7 As shown, a signal acquisition conversion device 7 can be set in the test management system. The signal acquisition conversion device is connected to the CANBUS bus between the main control board and the phase board. The signal acquisition conversion device 7 can collect frame data on the CANBUS bus and perform data conversion on the frame data. In specific implementation, the signal acquisition conversion device 7 can adopt a GCAN signal acquisition conversion device.

[0115] The specific process of collecting light color data by host computer 2 can be found in Figure 8 , Figure 8 The third flowchart of the testing method provided in the embodiment of the present invention.

[0116] Specifically, Figure 7 and Figure 8 As shown, the host computer 2 collects the output information of the signal machine, including:

[0117] S301, collecting frame data on the CANBUS bus through a signal collection and conversion device, and converting the collected frame data into Ethernet data;

[0118] S302, receiving Ethernet data transmitted by the signal acquisition conversion device, and collecting light color data.

[0119] Considering the reliability and accuracy of the data source, the embodiment of the present invention chooses to directly collect the light color data on the CANBUS bus of the signal machine (avoiding the collection of strong electric signals) and uses it as the data source for judging the color of the signal light. The light color data on the CANBUS bus of the signal machine is collected by the GCAN signal collection and conversion device, and the CANBUS frame data collected by its CAN port is converted into Ethernet data, which is transmitted to the host computer 2 through the Ethernet port in the form of the User Datagram Protocol (UDP for short). The host computer 2 creates a communication interface with the GCAN signal collection and conversion device by encapsulating the CANBUS protocol to complete the collection of light color data.

[0120] Fig. 9 A schematic diagram of the format of frame data provided by an embodiment of the present invention.

[0121] like Fig. 9 As shown, the frame data transmitted on the CANBUS bus is usually of 02 frame type and 03 frame type, and the collection and judgment of the light color data is performed in units of signal cycles. Therefore, when collecting light color data, the collection is performed according to the cycle data to complete the comparison of the cycle data. In order to accurately capture the start time and end time of the signal cycle, the embodiment of the present invention uses the existing phase takeover function of the signal machine. This function sends the cycle start frame data (04 01 frame type) at the start time of the signal cycle and sends the cycle end frame data (04 02 frame type) at the end time of the cycle on the basis of the main control board sending the light color data to the phase board. The data in between are all the light color data of the cycle. Therefore, the cycle start frame data and the cycle end frame data are used to determine the start and end of the signal cycle to control the collection of the cycle light color data.

[0122] When signal 1 is in fixed-cycle control, it will generally run according to the cycle length and green-to-signal ratio configured in the timing scheme. However, if there are events such as signal synchronization and timing scheme switching during the period, the coordination state of signal 1 will be broken and signal 1 will enter coordinated transition. However, the number of coordinated transition cycles and the green-to-signal ratio distribution of each cycle are uncertain and are usually calculated in real time according to the coordination rules.

[0123] The print information output by the debug serial port of signal light 1 will output the transition cycle information (number of cycles, cycle length, etc.), and the transition cycle information is output before the start of the transition cycle. Therefore, the transition cycle data can be captured by regular expressions with the help of the print information output by the debug serial port.

[0124] The data collection process in the embodiment of the present invention can interact with the test case process through the Transmission Control Protocol (TCP) server / client in accordance with a custom message format. The test case process sends collection messages as a client, and the data collection process verifies the collection messages as a server, creates a collection task according to the collection rules, and after the collection is completed, it is transmitted back to the client for data comparison through processes such as data compression and deserialization.

[0125] The logical process of collecting periodic data can be found in Fig.10 , Fig.10 A schematic diagram of a data collection process provided by an embodiment of the present invention.

[0126] like Fig.10 As shown in the figure, when it is necessary to collect the periodic data of the signal machine, a collection task is created. First, it is determined whether the current collection type is a transition period. If it is determined to be yes, the debug serial port data is listened to; if it is determined to be no, the fixed period frame data collection process is entered. When listening to the debug serial port data, it is determined whether the transition period data is captured. If it is determined to be yes, the collection period data is updated; if it is determined to be no, the debug serial port data is continued to be listened to.

[0127] For the collection of fixed-period data, since it needs to be collected and stored in units of cycles, when collecting frame data, first determine whether the currently collected frame data is the cycle start frame data. If the currently collected data is the cycle start frame data, further determine whether the cycle data collection has started. If the cycle data collection has not started, start the cycle data collection and continue to collect frame data. If the cycle data collection has already started, it means that the currently collected frame data is incorrect and the complete cycle frame data cannot be collected. At this time, a data collection exception is thrown and the process of cycle data collection ends. When the currently collected frame data is not the cycle start frame data, further determine whether the currently collected frame data is the cycle end frame data. If the currently collected frame data is not the cycle end frame data, determine whether the cycle data collection has started. When the cycle data collection starts, save the frame data and continue to collect frame data. If the cycle data collection has not started, it means that the frame data does not need to be saved and continue to collect frame data. If the currently collected frame data is the cycle end frame data, determine whether the cycle data collection has started. When the cycle data collection has started, update the completed cycle data, and continue to determine whether all cycles are completed. When all cycles are completed, save the results and end the collection task. When all cycles are not completed, continue to collect frame data and prepare for the storage of the next cycle data.

[0128] It can be seen that in the periodic data collection method provided by the embodiment of the present invention, the light color data is collected and saved frame by frame. In order to obtain the completed periodic data and a sufficient number of periodic data, it is necessary to determine whether the periodic data collection has started each time the frame data is collected, so as to avoid the situation where the collected periodic data is incomplete and the periodic data is erroneous.

[0129] The countdown screen and the bar screen are displayed synchronously with the signal light, so in the above test method provided by the embodiment of the present invention, the data of the countdown screen and the bar screen are also collected synchronously. In actual application, the signal machine 1 communicates with the countdown screen 102 and the bar screen 103 using a 485 serial port. The signal machine 1 sends the display content to the countdown screen 102 through the 485 interface, and the countdown screen 102 sends a heartbeat response to the signal machine 1 through the 485 interface. The output of the bar screen data of the signal machine 1 and the output of the countdown data are the same 485 interface.

[0130] Fig.11 A schematic diagram of the structure of an interface converter provided by an embodiment of the present invention.

[0131] In order to obtain the countdown data and bar screen data output by the signal machine, the test management system provided by the embodiment of the present invention can also be set Fig.11 The interface converter 8 shown is used to convert the 485 interface and the USB interface; the 485 interface of the interface converter 8 is connected to the signal machine 1, and the USB interface of the interface converter 8 is connected to the host computer 2 to complete the physical link establishment.

[0132] Specifically, the host computer 2 collects the output information of the signal machine, and also includes:

[0133] Encapsulate the communication interface between the signal machine and the serial port protocol, and collect countdown data through the interface converter;

[0134] The communication interface between the bar screen and the signal machine is encapsulated according to the bar screen protocol, and the bar screen data is collected through the interface converter.

[0135] The host computer 2 encapsulates the serial port protocol to establish serial port communication with the signal machine 1. The countdown data collection is also carried out in cycles, starting and ending synchronously with the light color data collection. The collection principle of the bar screen data is similar to the countdown data collection, the difference is that the data protocol format is different, and the data is collected according to the bar screen protocol.

[0136] Fig.12 A schematic diagram of the data format of countdown data provided by an embodiment of the present invention, Fig.13 A schematic diagram of the data format of the strip screen data provided by an embodiment of the present invention, Fig.14 A schematic diagram of the data format of a data linked list provided in an embodiment of the present invention.

[0137] The data format of the countdown data collected frame by frame according to the countdown screen protocol is as follows: Fig.12 As shown, the data format of the strip screen data collected frame by frame according to the strip screen protocol is as follows Fig.13 After obtaining the data of the above output information, Fig.14 The data is stored in the form of a linked list, which facilitates subsequent data parsing.

[0138] The signal machine output information is collected by an independent process, and the synchronous collection of multiple channels of data is achieved through asynchronous IO technology. The collected data is stored in cycles.

[0139] Furthermore, the test method provided in the embodiment of the present invention can also analyze the collected light color data, countdown data and bar screen data, and compare them with the expected data, so as to generate a test result report.

[0140] The following is a detailed introduction to the processing and comparison of the above-collected output information.

[0141] Fig.15 A schematic diagram of a flow chart of frame data comparison provided by an embodiment of the present invention, Fig.16 A schematic diagram of the data format of the light color structured data provided by an embodiment of the present invention, Fig.17 A schematic diagram of a test result interface of light color data provided by an embodiment of the present invention.

[0142] The specific process of analyzing and comparing light color data can be found in Fig.15 Specifically, the host computer 2 compares the collected output information with the expected data in the pre-written test case, including:

[0143] S401, verifying the frame data in the collected light color data;

[0144] S402, determine whether the verification is passed; if the verification is passed, execute S403-S404, if the verification is not passed, execute S405;

[0145] S403, performing structured processing on the frame data according to the light color reorganization algorithm to generate light color structured data;

[0146] S404, comparing the generated light color structured data with the expected data in the pre-written test case;

[0147] S405: Throw a data exception.

[0148] The host computer 2 first performs basic frame data verification on the collected light color data to verify whether the number of 03 frame data and 02 frame data in the periodic data is the same. If the verification passes, the frame data is further processed, and a data exception is thrown if the verification fails. When the frame data passes the verification, the periodic frame data is reorganized and other structural processing is performed according to the light color reorganization algorithm to form comparable structured data.

[0149] The original periodic frame data format is as follows:

[0150] {"CAN": {0: [(ts,c_frame),(ts,c_frame),(ts,c_frame),…],1:[(ts,c_frame),(ts,c_frame),(ts,c_frame),…],…}}

[0151] The data format of the light color structured data formed after structured processing is as follows Fig.16 As shown. Fig.16 It can be seen that the light color structured data can be in the structured matrix metrics format. The light color structured data includes: light color channel number, light color duration, light color position index and other information. After the light color data is structured, the light color status of the signal channel at each moment in the cycle can be clearly interpreted.

[0152] The light color structured data is compared with the expected data in the pre-written test case, where the expected data also specifies the light color channel number, light color duration, light color position index and other information. By using the corresponding color judgment keywords of red light, green light and yellow light, the results of channel green light, green flash, yellow light and red light are compared respectively. The test results are as follows: Fig.17 shown.

[0153] Fig.18 A schematic diagram of a test result interface of countdown data provided by an embodiment of the present invention, Fig.19 A schematic diagram of a test result interface of bar screen data provided by an embodiment of the present invention.

[0154] Similarly, for countdown data and bar screen data, the host computer further parses the collected countdown screen data and bar screen data to generate countdown structured data and bar screen structured data, so that the expected data in the pre-written test cases can be compared to generate test results.

[0155] Specifically, the host computer 2 compares the collected output information with the expected data in the pre-written test case, and also includes:

[0156] The collected countdown data is parsed to generate countdown structured data; the generated countdown structured data is compared with the expected data in the pre-written test case, and the test results of the generated countdown data are as follows: Fig.18 shown.

[0157] The collected strip screen data is parsed to generate strip screen structured data; the generated strip screen structured data is compared with the expected data in the pre-written test case, and the test results of the generated strip screen data are as follows: Fig.19 shown.

[0158] Fig. 20 A schematic diagram of a test result interface provided by an embodiment of the present invention.

[0159] After the above light color data, countdown data and bar data are compared with the expected data, the test results of the light color data, countdown data and bar data can be generated respectively. When the light color data, countdown data and bar data are completely consistent with the expected data, the test result passes, otherwise the test result fails. Fig. 20 The test result report shown provides an information summary of the entire test process.

[0160] Fig.21 The second structural diagram of the test management system for traffic signals provided by the embodiment of the present invention.

[0161] like Fig.21 As shown, the test management system provided in the embodiment of the present invention may include multiple host computers 2 and signal machines 1 that are communicatively connected to each host computer 2 in a one-to-one correspondence; the test management system may also include: a management server 9, with the management server 9 serving as a master node and each host computer 2 serving as a slave node, and the master node manages each slave node.

[0162] In order to facilitate the centralized management of multiple sets of test equipment and realize other auxiliary functions of the automated test system, the test management system of the embodiment of the present invention uses the management server as the master node to manage each host computer as a slave node. The management server 9 in the embodiment of the present invention can be a Jenkins server, which manages each host computer slave node through the JNLP agent. The tester accesses the created Jenkins management platform through the browser to centrally manage all slave nodes. The test slave nodes can also be expanded on the Jenkins management platform as needed. The tester can configure the test task pool on the Jenkins management platform. These test tasks (such as Fig.21 Build notifications, build tests, build deployments, etc.) can be deployed to different test nodes for execution.

[0163] Furthermore, if Fig.21 As shown, the test management system also includes a database server 10, which is used to store function codes, pre-written test cases and timing plans. When the data of the database server 10 is updated, the management server 9 downloads the updated data from the database server and deploys it to each host computer 2.

[0164] Among them, the database server 10 can be an SVN server. By using the Jenkins integrated management tool and the SVN version control tool, by building the Jenkins server and the SVN server, configuring the server environment and tasks, it can realize the integrated management of the slave nodes, automatic deployment of the test environment, cyclic execution of test tasks, email notification of test results and other functions.

[0165] Automated testing requires the deployment of code, test cases, and timing plans on each host slave node, and the content will be constantly updated. Use SVN tools to store code, test cases, and timing plans; use Jenkins' SVN plug-in to automatically download and deploy these resources; use SVN hook programs to automatically trigger Jenkins' automatic download and deployment tasks when the SVN library content is updated, thereby realizing automatic deployment of the host node test environment. In addition, the configuration files of different host slave nodes will be slightly different, and the automatic update of the configuration files can also be achieved through scripts, so that the host slave node environment can be automatically deployed without human involvement.

[0166] By configuring Jenkins to build task triggers, each test task can be executed continuously in a loop, including timed loops, task-to-task serial loops, etc. When there is an extranet access environment, the Jenkins email notification plug-in can be used to directly implement the test result email notification function; when there is no extranet access environment, the message middleware plug-in can be used to implement message transmission in the LAN and extranet environments, and the results can be sent to designated testers so that they can know the test results in time.

[0167] Therefore, the embodiment of the present invention can automatically test the traffic signal by constructing a test management system for the traffic signal and integrating the test method in the host computer, thereby improving the test efficiency of the traffic signal, reducing the manpower consumption of the test, and ensuring the test quality.

[0168] An embodiment of the present invention also provides an electronic device, which is used to upload a timing plan to a central platform server when testing a signal light, so that the central platform server sends the received timing plan to a designated signal light; the electronic device is also used to send test environment configuration data to the signal light to test the signal light.

[0169] When the signal machine operates according to the received timing plan, the electronic equipment collects the output information of the signal machine; compares the collected output information with the expected data in the pre-written test case to generate the test result.

[0170] Among them, the pre-written test cases include timing plans and test environment configuration data.

[0171] Specifically, the electronic device may be, for example, the host computer provided in the embodiment of the present invention.

[0172] An embodiment of the present invention also provides a server, which is used to receive a timing plan uploaded by an electronic device; the timing plan includes address information of a signal to be tested; the received timing plan is sent to the signal to be tested according to the address information; and the sending result is returned to the electronic device.

[0173] Specifically, the server may be, for example, the central platform server provided in the embodiment of the present invention.

[0174] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other 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 invention.

[0175] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for testing a traffic signal, characterized in that: include: When testing the signal, upload the timing plan to the central platform server, so that the central platform server sends the received timing plan to the designated signal; Sending test environment configuration data to the signal machine to perform test configuration on the signal machine; When the signal machine operates according to the received timing scheme, collecting output information of the signal machine; Comparing the collected output information with expected data in a pre-written test case to generate a test result; The pre-written test case includes the timing scheme and the test environment configuration data.

2. The testing method according to claim 1, characterized in that: The uploading of the timing plan to the central platform server includes: Acquire timing plan data, and parse the timing plan data; Reorganize and package the parsed timing plan data according to the plan distribution rules between the central platform server and the signal machine; Encapsulating the reorganized and packaged timing plan data according to the hypertext transfer protocol to generate a request data packet; The generated request data packet is sent to the central platform server.

3. The testing method according to claim 1, characterized in that: The sending of the test environment configuration data to the signal machine to perform test configuration on the signal machine includes: encapsulate the communication interface with the signal machine according to the simple network management protocol; Sending the test environment configuration data to the signal machine through the communication interface to modify the test configuration items of the signal machine; The test configuration items include countdown type configuration, bar screen protocol configuration, startup phase takeover configuration and startup countdown configuration.

4. The testing method according to claim 3, characterized in that: Also includes: When the timing scheme of the signal is switched, the set system time is sent to the signal through the communication interface to modify the system time of the signal and realize the switching of the timing scheme.

5. The testing method according to claim 1, characterized in that: The signal machine is connected to the signal light, and the signal machine and the signal light communicate with each other using a CANBUS bus; The collecting of the output information of the signal machine includes: The frame data on the CANBUS bus is collected by a signal collection and conversion device, and the collected frame data is converted into Ethernet data; Receive the Ethernet data transmitted by the signal acquisition and conversion device to collect light color data.

6. The testing method according to claim 5, characterized in that: The signal machine is also connected to a countdown screen and a bar screen, and the signal machine communicates with the countdown screen and the bar screen via a 485 serial port; The collecting of the output information of the signal machine also includes: Encapsulate the communication interface between the signal machine and the signal machine according to the serial port protocol, and collect countdown data through the interface converter; The communication interface between the signal machine and the strip screen protocol is encapsulated, and the strip screen data is collected through an interface converter.

7. The testing method according to claim 6, characterized in that: The comparing the collected output information with expected data in a pre-written test case includes: Verifying the frame data in the collected light color data; When the inspection is passed, the frame data is structured according to the light color reorganization algorithm to generate light color structured data; Comparing the generated light color structured data with expected data in a pre-written test case; The light color structured data includes: light color channel number, light color duration and light color position index.

8. The testing method according to claim 7, characterized in that: The step of comparing the collected output information with expected data in a pre-written test case further includes: Parsing the collected countdown data to generate countdown structured data; Comparing the generated countdown structured data with expected data in a pre-written test case; Parsing the collected strip screen data to generate strip screen structured data; The generated structured data of the strip screen is compared with the expected data in the pre-written test case.

9. An electronic device, characterized in that: The electronic device is used to upload a timing plan to the central platform server when testing the signal, so that the central platform server sends the received timing plan to the designated signal; The electronic device is also used to send test environment configuration data to the signal machine to perform test configuration on the signal machine; The electronic device is used to collect output information of the signal machine when the signal machine operates according to the received timing scheme; The electronic device is used to compare the collected output information with expected data in a pre-written test case to generate a test result; The pre-written test case includes the timing scheme and the test environment configuration data.

10. A server, characterized in that: The server is used to receive a timing plan uploaded by an electronic device; the timing plan includes address information of a signal to be tested; The server is used to send the received timing plan to the signal to be tested according to the address information; The server returns the sending result to the electronic device.