Test method for rail transit signal system
By building the first and second communication links that are automatically configured, the problem of synchronous testing of different communication protocols in rail transit signal system testing is solved, efficient multi-protocol testing is realized, and testing efficiency and communication quality are improved.
Patent Information
- Application Number
- CN202411041910.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-20
AI Technical Summary
When conducting on-the-shelf tests, it is difficult to synchronize the test objects under different communication protocols, resulting in low testing efficiency.
By determining the protocol type required for the transit program based on the test requirements, building the first and second communication links, and automatically configuring the communication protocols, the test tool can synchronously test the objects under test of multiple communication protocols.
It significantly improves testing efficiency, reduces the influence of external factors during communication, improves communication quality, frees up the resource limitations of the test tool, and allows one test tool to test multiple objects to be tested at the same time.
Smart Images

Figure CN119172291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail transit signal system testing, and in particular to a testing method for a rail transit signal system. Background Art
[0002] When conducting real-world on-shelf tests, existing rail transit signal systems can only test one real cabinet at a time. Existing test tools are designed to simulate the business layer based on the interface communication protocols of different manufacturers. All interface communication protocols are encapsulated in DLL libraries, which are dynamic link libraries. The use of DLL libraries is limited to the fact that a test tool can only load one DLL library. Furthermore, due to computer resource and bandwidth limitations, only 80 links can exist on each computer when using DLL libraries. Therefore, data volume stress testing is very time-consuming.
[0003] Chinese patent, publication number: CN113515058A, publication date: October 19, 2021, discloses a test system and method for a rail transit signal system, including a simulation system, a tooling plug-in box and an on-board VOBC of a train's rail transit signal system; wherein, the tooling plug-in box communicates with the simulation system through a network interface and communicates with the on-board VOBC through a hard line; the tooling plug-in box is used to receive information of the simulation system sent by the simulation system, and sends the information to the on-board VOBC after adapting the information; the on-board VOBC is used to output the control quantity of the simulation system according to the information, and feed back the control quantity to the tooling plug-in box; the tooling plug-in box is used to adapt the control quantity and send it to the simulation system, but the communication protocol between its test device and the object under test needs to be manually configured, and it is difficult to automatically adjust according to the different communication protocol types of the object under test, and it is also difficult to synchronously test objects under test with multiple communication protocols, and the test efficiency is low. Summary of the Invention
[0004] The present invention aims to solve the problem that it is difficult to synchronously test objects under test of different communication protocols during shelf testing of existing rail transit signal systems, resulting in low testing efficiency. A testing method for rail transit signal systems is proposed. The method determines the protocol type required by the transfer program according to the test requirements, and constructs a first communication link and a second communication link with the protocol type of the test tool and the object under test according to the transfer program. During the test, the second communication link of the corresponding type is started according to the protocol type of different objects under test, and the test data is transferred to different ports of the test tool through the transfer program. The communication protocol can be automatically configured according to the test requirements, so that the test tool can synchronously test objects under test of multiple communication protocols, thereby significantly improving the test efficiency.
[0005] In a first aspect, a technical solution provided in an embodiment of the present invention is: a testing method for a rail transit signal system, comprising the following steps: S1. Obtain the configuration information of the transfer program based on the test requirements; S2. Read the protocol type of the test tool in the configuration information, and obtain corresponding communication information based on the protocol type of the test tool; S3. Establish a first communication link between the transfer program and the test tool based on the communication information; S4. Monitoring the communication between the test tool and the transfer program based on the first communication link to obtain monitoring data, obtaining a protocol type between the transfer program and the object under test based on the monitoring data, and establishing a second communication link between the transfer program and the object under test based on the protocol type; S5. The test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results.
[0006] In this solution, in order to automatically adjust the communication link for information transmission according to the communication protocol type of the object under test, so that the test tool can synchronously test the objects under test of multiple communication protocols, the test requirements for the rail transit signal system are clarified to obtain information such as the protocol type that may be required during the test process, and this information is integrated into configuration information. Based on this configuration information, the communication information for realizing communication between the transfer program and the test tool is determined, and based on this communication information, first communication links for different interfaces of the transfer program and the test tool are constructed. These first communication links correspond to different protocol types of different interfaces of the test tool, respectively. When a certain port is required to receive data, the first communication link corresponding to the port is started. Each first communication link has independent and complementary effects. By monitoring the monitoring data when the test tool communicates with the transfer program, and combining the protocol type of the object under test, a second communication link between the transfer program and the object under test is constructed. Each second communication link corresponds to a protocol type of the object under test, and the second communication links exist independently and do not affect each other. During testing, the test data is sent to the transfer program through the corresponding second communication link. The transfer program plays a transfer role. When receiving the test data, it is automatically configured to the corresponding protocol type, and the first communication link corresponding to the protocol type is started. The test data is sent to the corresponding interface of the test tool through the first communication link, thereby realizing synchronous testing of different objects under test and automatic configuration of communication protocol types, solving the problem of limited test tool resources and significantly improving test efficiency.
[0007] Preferably, in S1, obtaining the configuration information of the transfer program based on the test requirements includes the following steps: Obtaining a rail transit signal train control input table, and obtaining configuration information of a transfer program based on the input table, wherein the configuration information includes at least a protocol type of the transfer program, a communication IP address, and a communication port of a test tool; The protocol types in the rail transit signal train control input table at least include all protocol types of transfer procedures.
[0008] In this solution, in order to obtain the configuration information of the transfer program, the traffic signal train control data input entry table is read. The entry table includes at least all protocol types of the transfer program. During the reading process, it is checked whether the protocol types in the entry table include the protocol types configured in the transfer program to avoid omissions. By determining the protocol type, the communication IP and communication port of the test tool, a communication link of the corresponding protocol type can be constructed, providing a data basis for the subsequent construction of the first communication link and the second communication link.
[0009] Preferably, in S2, reading the protocol type of the test tool in the configuration information and obtaining corresponding communication information based on the protocol type of the test tool includes the following steps: Read the protocol type of the test tool in the configuration information, obtain the communication IP, port, communication mode and link information of the corresponding protocol of the test tool based on the protocol type of the test tool, and integrate the above information to obtain communication information.
[0010] In this solution, in order to obtain the communication information corresponding to different protocol types, the communication IP, port, communication mode, communication protocol type, and link information of the corresponding protocol of the test tool are obtained based on the protocol type. The link information includes data such as link status and link resources, which provides a data basis for the subsequent construction of communication links, ensuring that the constructed communication links correspond one-to-one to the protocol type and will not be affected by other communication links, thereby ensuring the independence of the communication links.
[0011] Preferably, in S3, establishing a first communication link between the transfer program and the test tool based on the communication information includes the following steps: Determine the communication IP address of the transfer program and the test tool based on the communication information, and obtain the communication protocol type of the transfer program and the test tool based on the communication IP address; A first communication link corresponding to the communication protocol type is established based on the communication protocol type.
[0012] In this solution, since the test tool can only test one object under test at a time, the test tool is limited to loading only one communication protocol library, which seriously affects the test efficiency. By constructing a transfer program, the communication IP between the transfer program and the test tool is automatically obtained based on the communication IP. That is, when testing the object under test, there is no need for the test tool to load the communication protocol library itself. The transfer program automatically selects the appropriate communication protocol and constructs the first communication link of the corresponding protocol, and sends the test data to the test tool, which liberates the test tool and makes it no longer limited by the communication protocol library. One test tool can test multiple objects under test at the same time, greatly improving the test efficiency.
[0013] Preferably, the first communication link complies with the first communication protocol rules and encapsulates the communication data of the first communication link in the order of at least message header, message type, communication link sid, communication link did, message length, message content and message tail.
[0014] In this scheme, since data must comply with the communication protocol rules when transmitted in the communication link, the first communication protocol rules must at least include data information and communication link information. The communication data is encapsulated through the structure of message header (1 byte) + message type (1 byte) + link sid (4 bytes) + link did (4 bytes) + message length (2 bytes) + message content (N bytes) + message tail (1 byte), where sid is the service identifier and did is the data identifier. Transmitting data in this way can prevent information loss when it is transmitted to the transmission object, thereby improving the reliability and accuracy of information transmission.
[0015] Preferably, in S4, based on the first communication link, the communication between the test tool and the transfer program is monitored to obtain monitoring data, based on the monitoring data, the protocol type between the transfer program and the object under test is obtained, and based on the protocol type, a second communication link between the transfer program and the object under test is established, including the following steps: Monitoring communications between different interfaces of the test tool and the transfer program based on the first communication link to obtain monitoring data, parsing the monitoring data according to a first communication protocol rule of the first communication link to obtain parsed data, determining a communication IP address between the transfer program and the object under test based on the parsed data, and obtaining a communication protocol type between the transfer program and the object under test based on the communication IP address; A second communication link is established based on the communication protocol type and corresponds to the communication protocol type in a one-to-one manner.
[0016] In this solution, in order to build a second communication link for communication between the object under test and the transit program, the communication between different interfaces of the test tool and the transit program is monitored to obtain monitoring data, the received data trigger event is bound, the interface function of the communication protocol library is called to monitor the object under test, the received data trigger event is bound, and when the event is triggered, the monitoring data is received and parsed. Based on the parsed message type and the link between the transit program and the object under test, various operations are performed, including but not limited to allocating link resources, establishing links, and obtaining the status of the communication link. Based on the above information, a second communication link is constructed. The number of second communication links is related to the number of protocol types of the object under test, so that multiple objects under test can upload test data synchronously in the future, thereby improving test efficiency.
[0017] Preferably, the second communication link complies with the second communication protocol rules and encapsulates the test data of the second communication link in the order of at least message header, communication link status, communication link sid, communication link did, message length, message content and message tail.
[0018] In this solution, since data must comply with the communication protocol rules when transmitted in the communication link, the second communication protocol rules must at least include data information and communication link information. The test data is encapsulated through the structure of message header (1 byte) + communication link status (1 byte) + link sid (4 bytes) + link did (4 bytes) + message length (2 bytes) + message content (N bytes) + message tail (1 byte). At the same time, when the link status is returned, the message length is zero. The link sid and link did of the second communication link are correlated with the link sid and link did of the first communication link. The first communication link or the second communication link can be determined based on the link sid and link did, which provides a basis for subsequent transmission of test data. Transmitting data in this way can prevent information loss when the information is transmitted to the transmission object, thereby improving the reliability and accuracy of information transmission.
[0019] Preferably, in S5, the test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results, including the following steps: Initiate a second communication link of a corresponding type based on the communication protocol type of the object under test, encapsulate test data of the object under test based on a second communication protocol rule of the second communication link, and send the test data to the transfer program via the second communication link; The transit program parses the test data to obtain the link sid and link did of the second communication link, determines the communication protocol type of the first communication link based on the link sid and link did, starts the first communication link of the corresponding type based on the communication protocol type of the first communication link, sends the test data to the test tool through the first communication link, and the test tool obtains the test results based on the test data.
[0020] In this solution, during testing, the communication protocol type of the object under test is first determined, and the second communication link corresponding to the communication protocol type is started. The test data of the object under test is packaged and uploaded to the transit program via the second communication link. The transit program parses the test data, obtains the link information of the second communication link that transmits the data, and determines the communication protocol type based on the link information. Therefore, the transit program automatically starts the first communication link between the ports of the test tool corresponding to the protocol type according to the detected communication protocol type, and transmits the test data to the test tool via the first communication link. At the same time, other objects under test also send their own test data to the test tool in the same way, so that the test is no longer restricted by the communication protocol library, and multiple objects under test can be tested synchronously, which greatly improves the test efficiency.
[0021] Preferably, the tested object, the testing tool and the transfer program are arranged in the same local area network.
[0022] In this solution, by placing the object under test, test tools and transfer program in the same local area network, concurrent testing can be supported, solving the problem of limited object under test.
[0023] Preferably, the message type includes at least communication link status and communication link resources.
[0024] In this solution, the message type contains a variety of information, including but not limited to allocating link resources, establishing links, obtaining communication link status, sending message data content, disconnecting communication link status, and releasing communication link resources.
[0025] The beneficial effects of the present invention are as follows: (1) The present invention can automatically configure the communication protocol according to the test requirements by constructing the first communication link and the second communication link, so that the test tool can synchronously test the test objects of multiple communication protocols, which significantly improves the test efficiency; (2) The present invention transmits the test data of the object under test to the test tool via the first communication link and the second communication link, and each communication link exists independently and does not affect each other, thereby reducing the influence of external factors on communication and improving communication quality; (3) The communication links of the present invention are constructed according to the protocol type. Each communication link corresponds to a protocol. The communication link of the corresponding protocol can be started according to different requirements. There is no need to be restricted by the fact that a test tool can only load one communication protocol library. The number of communication links is increased, thereby improving the test efficiency.
[0026] The above content of the invention is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Other features, objects, and advantages of the present invention will become more apparent upon reading the detailed description of the non-limiting embodiments made with reference to the following drawings. The drawings are for the purpose of illustrating preferred embodiments only and are not to be construed as limiting the present invention. Like reference characters are used throughout the drawings to designate like parts.
[0028] Figure 1 This is a flow chart of a testing method for a rail transit signal system according to the present invention. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0030] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but can also have additional steps not included in the figures; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0031] Example: Figure 1 As shown, in order to solve the problem of low test efficiency caused by the difficulty in synchronously testing objects of different communication protocols during the on-shelf testing of the existing rail transit signal system, this embodiment provides a testing method for the rail transit signal system, including the following steps: S1: Get the configuration information of the transfer program based on the test requirements.
[0032] In this embodiment, obtaining the configuration information of the transfer program based on the test requirements includes the following steps: Obtaining a rail transit signal train control input table, and obtaining configuration information of a transfer program based on the input table, wherein the configuration information includes at least a protocol type of the transfer program, a communication IP address, and a communication port of a test tool; The protocol types in the rail transit signal train control input table at least include all protocol types of transfer procedures.
[0033] When obtaining the configuration information of the transfer program, this embodiment reads the configuration file of the transfer program, which exists in XML format and includes but is not limited to the protocol type, the communication IP and communication port of the test tool, and then reads the traffic signal train control data input entry table, which should include but is not limited to all protocol types configured in the configuration file, and stores the IP, port, communication mode, communication protocol type, and link information of the corresponding protocol according to the protocol type.
[0034] In order to obtain the configuration information of the transfer program, this embodiment reads the traffic signal train control data input entry table, which includes at least all protocol types of the transfer program. During the reading process, it is checked whether the protocol types in the entry table include the protocol types configured in the transfer program to avoid omissions. By determining the protocol type, the communication IP and communication port of the test tool, a communication link of the corresponding protocol type can be constructed, providing a data basis for the subsequent construction of the first communication link and the second communication link.
[0035] S2: Read the protocol type of the test tool in the configuration information, and obtain corresponding communication information based on the protocol type of the test tool.
[0036] In this embodiment, reading the protocol type of the test tool in the configuration information and obtaining corresponding communication information based on the protocol type of the test tool includes the following steps: Read the protocol type of the test tool in the configuration information, obtain the communication IP, port, communication mode and link information of the corresponding protocol of the test tool based on the protocol type of the test tool, and integrate the above information to obtain communication information.
[0037] In order to obtain communication information corresponding to different protocol types, this embodiment obtains data such as the communication IP, port, communication mode, communication protocol type, and link information of the corresponding protocol of the test tool based on the protocol type. The link information includes data such as link status and link resources, which provides a data basis for the subsequent construction of communication links, ensures that the constructed communication links correspond one-to-one to the protocol type and will not be affected by other communication links, and ensures the independence of the communication links.
[0038] After acquiring communication information, this embodiment generates a protocol file based on the protocol template file. The protocol template follows the specified format and includes a protocol type node and a protocol content subnode. The protocol template is checked to see if it exists. If not, it is downloaded from the specified SVN. If it exists, the protocol template is checked to see if it is consistent with the specified template file. If not, an error log is printed. The protocol IP is checked to see if it is configured. If not, the IP is automatically configured. The protocol port is checked to see if it is occupied, ensuring that it is idle. The corresponding information of the communication protocol is written sequentially into the template backup file. The protocol bin file is generated using the protocol packaging tool.
[0039] S3: Construct a first communication link between the transfer program and the test tool based on the communication information.
[0040] In this embodiment, establishing a first communication link between the transfer program and the test tool based on the communication information includes the following steps: determining the communication IP address of the transfer program and the test tool based on the communication information, and obtaining the communication protocol type between the transfer program and the test tool based on the communication IP address; A first communication link corresponding to the communication protocol type is established based on the communication protocol type.
[0041] This embodiment reads the communication protocol bin file according to the startup parameters and establishes a first communication link according to the communication mode and communication protocol type. The startup parameters include but are not limited to the communication protocol type, communication protocol file path, host user name, host password, host IP address, and host port. One communication protocol type starts one transfer program, and the test tool and the transfer program can communicate using the UDP protocol.
[0042] In this embodiment, since the test tool can only test one object under test at a time during testing, the test tool is limited to loading only one communication protocol library, which seriously affects the test efficiency. By constructing a transfer program, the communication protocol type between the transfer program and the test tool is automatically obtained based on the communication IP between the transfer program and the test tool. That is, when testing the object under test, there is no need for the test tool to load the communication protocol library itself. The transfer program automatically selects the appropriate communication protocol and constructs the first communication link of the corresponding protocol, and sends the test data to the test tool, which liberates the test tool and makes it no longer limited by the communication protocol library. It can realize that one test tool tests multiple objects under test at the same time, greatly improving the test efficiency.
[0043] In this embodiment, the first communication link complies with the first communication protocol rules and encapsulates the communication data of the first communication link in the order of at least message header, message type, communication link sid, communication link did, message length, message content and message tail.
[0044] In this embodiment, since data must comply with the communication protocol rules when transmitted in the communication link, the first communication protocol rules must at least include data information and communication link information. The communication data is encapsulated through the structure of message header (1 byte) + message type (1 byte) + link sid (4 bytes) + link did (4 bytes) + message length (2 bytes) + message content (N bytes) + message tail (1 byte), where sid is the service identifier and did is the data identifier. Transmitting data in this way can prevent information loss when it is transmitted to the transmission object, thereby improving the reliability and accuracy of information transmission.
[0045] S4: Based on the first communication link, monitor the communication between the test tool and the transfer program to obtain monitoring data, obtain the protocol type between the transfer program and the object under test based on the monitoring data, and establish a second communication link between the transfer program and the object under test based on the protocol type.
[0046] In this embodiment, based on the first communication link, the communication between the test tool and the transfer program is monitored to obtain monitoring data, based on the monitoring data, the protocol type between the transfer program and the object under test is obtained, and based on the protocol type, a second communication link between the transfer program and the object under test is established, including the following steps: Monitoring communications between different interfaces of the test tool and the transfer program based on the first communication link to obtain monitoring data, parsing the monitoring data according to a first communication protocol rule of the first communication link to obtain parsed data, determining a communication IP address between the transfer program and the object under test based on the parsed data, and obtaining a communication protocol type between the transfer program and the object under test based on the communication IP address; A second communication link is established based on the communication protocol type and corresponds to the communication protocol type in a one-to-one manner.
[0047] In order to build a second communication link for communication between the object under test and the transit program, this embodiment monitors the communication between different interfaces of the test tool and the transit program to obtain monitoring data, binds the received data trigger event, calls the interface function of the communication protocol library to monitor the object under test, binds the received data trigger event, receives and parses the monitoring data when the event is triggered, and performs various operations based on the parsed message type and the link between the transit program and the object under test, including but not limited to allocating link resources, establishing links, and obtaining communication link status. A second communication link is constructed based on the above information. The number of second communication links is related to the number of protocol types of the object under test, so that multiple objects under test can upload test data synchronously in the future, thereby improving test efficiency.
[0048] In this embodiment, the second communication link complies with the second communication protocol rules and encapsulates the test data of the second communication link in the order of at least message header, communication link status, communication link sid, communication link did, message length, message content and message tail.
[0049] In this embodiment, since data must comply with the communication protocol rules when transmitted in the communication link, the second communication protocol rules must at least include data information and communication link information. The test data is encapsulated through the structure of message header (1 byte) + communication link status (1 byte) + link sid (4 bytes) + link did (4 bytes) + message length (2 bytes) + message content (N bytes) + message tail (1 byte). At the same time, when the link status is returned, the message length is zero. The link sid and link did of the second communication link are correlated with the link sid and link did of the first communication link. The first communication link or the second communication link can be determined based on the link sid and link did, which provides a basis for subsequent transmission of test data. Transmitting data in this way can prevent information loss when the information is transmitted to the transmission object, thereby improving the reliability and accuracy of information transmission.
[0050] S5: The test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results.
[0051] In this embodiment, in S5, the test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results, including the following steps: Initiate a second communication link of a corresponding type based on the communication protocol type of the object under test, encapsulate test data of the object under test based on a second communication protocol rule of the second communication link, and send the test data to the transfer program via the second communication link; The transit program parses the test data to obtain the link sid and link did of the second communication link, determines the communication protocol type of the first communication link based on the link sid and link did, starts the first communication link of the corresponding type based on the communication protocol type of the first communication link, sends the test data to the test tool through the first communication link, and the test tool obtains the test results based on the test data.
[0052] During testing, this embodiment first determines the communication protocol type of the object under test, and starts a second communication link corresponding to the communication protocol type. The test data of the object under test is packaged and uploaded to the transit program via the second communication link. The transit program parses the test data, obtains the link information of the second communication link that transmits the data, and determines the communication protocol type based on the link information. Therefore, the transit program automatically starts the first communication link between the ports of the test tool corresponding to the protocol type according to the detected communication protocol type, and transmits the test data to the test tool via the first communication link. At the same time, other objects under test also send their own test data to the test tool in the same way, so that the test is no longer restricted by the communication protocol library, and multiple objects under test can be tested synchronously, which greatly improves the test efficiency.
[0053] When using this embodiment, the user first sets up the object to be tested, including but not limited to the interlocking cabinet, ZC cabinet, and train cabinet, starts the test host, connects the test host, the transfer test program, and the cabinet to be tested to the same local area network, and then configures the transfer program according to the test requirements, including but not limited to the protocol type, communication IP, and communication port. Then, the test tool is started and the transfer program is started according to the startup parameters. If n protocol types are configured, n transfer programs will be started. When multiple objects to be tested are tested at the same time, a distributed deployment can be performed, including but not limited to one host starting one transfer, and each console application establishes a connection and communicates with the object to be tested respectively. The user can start testing each object to be tested by checking the required test object and synchronously upload the test data to the test tool, so that one test tool can test multiple test objects at the same time, thereby improving the test efficiency.
[0054] In this embodiment, the tested object, the testing tool and the transfer program are arranged in the same local area network.
[0055] This embodiment can support concurrent testing by arranging the tested object, the test tool, and the transfer program in the same local area network, thereby solving the problem of limited tested objects.
[0056] In this embodiment, the message type includes at least communication link status and communication link resources.
[0057] The message type of this embodiment includes a variety of information, including but not limited to allocating link resources, establishing links, obtaining communication link status, sending message data content, disconnecting communication link status, and releasing communication link resources.
[0058] In order to automatically adjust the communication link for information transmission according to the communication protocol type of the object under test, so that the test tool can synchronously test the objects under test of multiple communication protocols, this embodiment obtains information such as the protocol type that may be required in the test process by clarifying the test requirements of the rail transit signal system, integrates this information into configuration information, and determines the communication information for realizing communication between the transfer program and the test tool based on the configuration information. Based on the communication information, first communication links of different interfaces of the transfer program and the test tool are constructed. These first communication links correspond to different protocol types of different interfaces of the test tool, respectively. When a port is required to receive data, the first communication link corresponding to the port is started. Each first communication link has independent and complementary effects. By monitoring the monitoring data when the test tool communicates with the transfer program, and combining the protocol type of the object under test, a second communication link between the transfer program and the object under test is constructed. Each second communication link corresponds to a protocol type of the object under test, and the second communication links exist independently and do not affect each other. During testing, the test data is sent to the transfer program through the corresponding second communication link. The transfer program plays a transfer role. When receiving the test data, it is automatically configured to the corresponding protocol type, and the first communication link corresponding to the protocol type is started. The test data is sent to the corresponding interface of the test tool through the first communication link, thereby realizing synchronous testing of different objects under test and automatic configuration of communication protocol types, solving the problem of limited test tool resources and significantly improving test efficiency.
[0059] It can be seen from the above embodiments that at least the following substantial effects are achieved: (1) The present invention can automatically configure the communication protocol according to the test requirements by constructing the first communication link and the second communication link, so that the test tool can synchronously test the test objects of multiple communication protocols, significantly improving the test efficiency; (2) The present invention transmits the test data of the object under test to the test tool via the first communication link and the second communication link, and each communication link exists independently and does not affect each other, thereby reducing the influence of external factors on communication and improving communication quality; (3) The communication links of the present invention are constructed according to the protocol type. Each communication link corresponds to a protocol. The communication link of the corresponding protocol can be started according to different requirements. There is no need to be restricted by the fact that a test tool can only load one communication protocol library. The number of communication links is increased, thereby improving the test efficiency.
[0060] The specific embodiment described above is a preferred embodiment of a testing method for a rail transit signal system of the present invention, and is not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to this specific embodiment. Any equivalent changes made in accordance with the shape and structure of the present invention are within the scope of protection of the present invention.
Claims
1. A test method for a rail transit signal system, characterized in that: The following steps are involved: S1. Obtain the configuration information of the transfer program based on the test requirements; S2. Read the protocol type of the test tool in the configuration information, and obtain corresponding communication information based on the protocol type of the test tool; S3, constructing a first communication link between the transfer program and the test tool based on the communication information; S4, based on the first communication link, monitoring the communication between the test tool and the transfer program to obtain monitoring data, based on the monitoring data, obtaining the protocol type between the transfer program and the object under test, and based on the protocol type, establishing a second communication link between the transfer program and the object under test; S5. The test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results.
2. A test method for a rail transit signal system according to claim 1, characterized in that: In S1, the configuration information of the transfer program is obtained based on the test requirements, including the following steps: Obtaining a rail transit signal train control input table, and obtaining configuration information of a transfer program based on the input table, wherein the configuration information includes at least a protocol type of the transfer program, a protocol type of a test tool, a communication IP, and a communication port; The protocol types in the rail transit signal train control input table at least include all protocol types of transfer procedures.
3. A test method for a rail transit signal system according to claim 1, characterized in that: In S2, the protocol type of the test tool in the configuration information is read, and corresponding communication information is obtained based on the protocol type of the test tool, including the following steps: Read the protocol type of the test tool in the configuration information, obtain the communication IP, port, communication mode and link information of the corresponding protocol of the test tool based on the protocol type of the test tool, and integrate the above information to obtain communication information.
4. A test method for a rail transit signal system according to claim 1, characterized in that: In S3, a first communication link between the transfer program and the test tool is established based on the communication information, including the following steps: Determine the communication IP of the transfer program and the test tool based on the communication information, and obtain the communication protocol type of the transfer program and the test tool based on the communication IP; A first communication link corresponding to the communication protocol type is established based on the communication protocol type.
5. A test method for a rail transit signal system according to claim 4, characterized in that: The first communication link complies with the first communication protocol rules and encapsulates the communication data of the first communication link in the order of at least message header, message type, communication link sid, communication link did, message length, message content and message tail.
6. A test method for a rail transit signal system according to claim 1, characterized in that: In S4, based on the first communication link, the communication between the test tool and the transfer program is monitored to obtain monitoring data, based on the monitoring data, the protocol type between the transfer program and the object under test is obtained, and based on the protocol type, a second communication link between the transfer program and the object under test is constructed, including the following steps: Based on the first communication link, the communication between different interfaces of the test tool and the transfer program is monitored to obtain monitoring data, the monitoring data is parsed according to the first communication protocol rule of the first communication link to obtain parsed data, the communication IP of the transfer program is determined based on the parsed data, and the communication protocol type between the transfer program and the object under test is obtained based on the communication IP; A second communication link corresponding to the communication protocol type is constructed based on the communication protocol type.
7. A test method for a rail transit signal system according to claim 6, characterized in that: The second communication link complies with the second communication protocol rules and encapsulates the test data of the second communication link in the order of at least message header, communication link status, communication link sid, communication link did, message length, message content and message tail.
8. A test method for a rail transit signal system according to claim 1, characterized in that: In S5, the test data is sent to the test tool via the second communication link and the first communication link for testing and outputting the test results, including the following steps: Based on the communication protocol type of the object under test, a second communication link of a corresponding type is started, and based on the second communication protocol rule of the second communication link, the test data of the object under test is encapsulated and sent to the transfer program through the second communication link; The transit program parses the test data to obtain the link sid and link did of the second communication link, determines the communication protocol type of the first communication link based on the link sid and link did, starts the first communication link of the corresponding type based on the communication protocol type of the first communication link, sends the test data to the test tool through the first communication link, and the test tool obtains the test result based on the test data.
9. A test method for a rail transit signal system according to claim 1, characterized in that: The tested object, the testing tool and the transfer program are arranged in the same local area network.
10. A test method for a rail transit signal system according to claim 5, characterized in that: The message type includes at least a communication link status and a communication link resource.
