Rail transit power supply equipment test method and device
By automatically generating and sending test messages, the problem of low testing efficiency for rail transit power supply equipment was solved, automated testing was achieved, and testing efficiency and accuracy were improved.
Patent Information
- Application Number
- CN202511464298.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-09
AI Technical Summary
Existing technologies for testing rail transit power supply equipment are inefficient and prone to errors. Manually writing test messages is time-consuming and makes it difficult to quickly switch test scenarios, resulting in distorted test results.
By reading the power supply device configuration file, test messages are automatically generated and sent to the test server, thus realizing automated testing of the power supply device.
It shortens the power supply equipment testing cycle, improves testing efficiency, reduces the error rate, and ensures the accuracy and comprehensiveness of test results.
Smart Images

Figure CN121299518A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of rail transit technology, and in particular to a rail transit power supply device testing method and device. BACKGROUND
[0002] A rail transit system usually contains multiple independent operating lines, each line covers 10-30 stations (the number of stations of a main line in some cities can reach more than 40), and each station needs to be configured with 3-8 power supply devices of different types (such as DC screens, UPS power supplies, and emergency power supplies, etc.), and the total number of power supply devices in the entire line often reaches hundreds. In order to ensure that the power supply device can stably supply power to the rail vehicle, the power supply device needs to be simulated tested, and the traditional simulation testing method requires the test personnel to manually write the message of the power supply device. The test personnel needs to manually write test messages in accordance with specific protocols for each power supply device of each station, and the preparation of single-station device messages takes about 15-30 minutes, and the whole line testing period is as long as several weeks, and the testing efficiency is low. When manually preparing test messages, the test results are prone to distortion due to input deviation of the number of power supply devices, non-standard format (such as calculation error of check bits), etc., and the error rate can reach 10%-15%. Manual testing is difficult to quickly switch between multiple test scenarios such as "normal operation", "fault alarm", and "voltage fluctuation", and cannot comprehensively verify the response capability of the power supply device under extreme working conditions. Moreover, after manually preparing the test messages, the test messages are manually sent to the test server to simulate test the power supply device.
[0003] It can be seen that when there are many lines, stations, and power supply devices in each station, the traditional manual testing leads to low testing efficiency of the power supply device and is prone to errors. SUMMARY
[0004] The present application provides a rail transit power supply device testing method and device to solve the problem of low testing efficiency and errors of the power supply device in the prior art.
[0005] The present application provides a rail transit power supply device testing method, comprising the following steps: reading a power supply device configuration file to obtain configuration information of the power supply device, the power supply device configuration file containing configuration information of at least one power supply device; generating test messages of each power supply device based on the power supply device type in the configuration information; sending the test messages of each power supply device to a test server to simulate test the power supply device.
[0006] According to the rail transit power supply device testing method provided by the present application, the power supply device configuration file is read, which comprises: Based on the file path and the file name input by the user, a power supply device configuration file corresponding to the file name is read under a folder corresponding to the file path.
[0007] According to the power supply device test method provided by the application, each folder is named by a line name of the rail transit, the number of the power supply device configuration files under each folder is equal to the number of stations of the corresponding rail transit line, and each power supply device configuration file is named by a corresponding station.
[0008] According to the power supply device test method provided by the application, after the power supply device configuration file is read and the configuration information of the power supply device is obtained, the method further comprises: Based on the configuration information, analysis information corresponding to the test message is generated, and the analysis information is output to a terminal interface.
[0009] According to the power supply device test method provided by the application, based on the power supply device type in the configuration information, the test message of each power supply device is generated, comprising: According to the preset control switch corresponding to different power supply device types, the alarm information, the analog quantity information or the switch quantity information corresponding to the control switch is selected from the configuration information of each power supply device; Based on the selected alarm information, analog quantity information or switch quantity information, the test message of each power supply device is generated.
[0010] According to the power supply device test method provided by the application, the test message of each power supply device is sent to a test server, comprising: According to the preset sending parameter, the test message of each power supply device is sent to the test server, and the sending parameter comprises at least one of a source IP address, a target IP address, a target port, a sending interval time or a cyclic sending mode.
[0011] The application further provides a rail transit power supply device test device, comprising the following modules: A file reading module is configured to read a power supply device configuration file to obtain configuration information of a power supply device, wherein the power supply device configuration file comprises configuration information of at least one power supply device; A message generation module is configured to generate a test message of each power supply device based on a power supply device type in the configuration information; A message sending module is configured to send the test message of each power supply device to a test server to simulate test the power supply device.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the rail transit power supply equipment testing method as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the rail transit power supply equipment testing method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the rail transit power supply equipment testing method as described above.
[0015] The rail transit power supply equipment testing method and apparatus provided by this invention reads the power supply equipment configuration file to obtain the configuration information of the power supply equipment in the configuration file, and generates test messages for each power supply equipment based on the power supply equipment type in the configuration information. This realizes the automatic generation of test messages for the power supply equipment. Moreover, after generating the test messages, the apparatus automatically sends the test messages of each power supply equipment to the test server to simulate the test of the power supply equipment. This frees testers from the dilemma of manually generating and sending test messages, shortens the power supply equipment testing cycle, and improves the testing efficiency of the power supply equipment. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the testing method for rail transit power supply equipment provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the structure of the rail transit power supply equipment testing device provided by the present invention.
[0019] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0021] This invention provides a testing method for rail transit power supply equipment. This method can be implemented using a script program to automatically generate test messages for the power supply equipment. The specific flow of the method is as follows: Figure 1 As shown, it includes steps S110 to S130.
[0022] Step S110: Read the power supply device configuration file to obtain the configuration information of the power supply device. The power supply device configuration file contains configuration information for at least one power supply device. The configuration information of the power supply device includes: power supply device type, power supply device ID, power supply device name, device status (fault, normal), analog quantities (current, voltage, frequency), and switching quantities (contactor open, closed), etc. Specifically, the corresponding configuration information can be obtained by reading the keywords corresponding to the configuration information.
[0023] Step S120: Based on the power supply device type in the configuration information, generate test messages for each power supply device. Different power supply device types require different test messages, including: device status messages, analog quantity messages, switch quantity messages, etc. Device status messages are generated in the order of power supply devices to indicate faults or normal operation. Analog quantity messages simulate the message data when the power supply device is operating normally, such as: voltage values are random values within the range of rated voltage ±5%. Switch quantity messages simulate the opening and closing of contactor switches (e.g., KM1 / KM2).
[0024] Step S130: Send the test messages of each power supply device to the test server to perform simulated testing on the power supply device, that is, the test server performs simulated testing on the power supply device according to the test messages.
[0025] The rail transit power supply equipment testing method of this embodiment reads the power supply equipment configuration file to obtain the configuration information of the power supply equipment in the configuration file, and generates test messages for each power supply equipment based on the power supply equipment type in the configuration information. This realizes the automatic generation of test messages for the power supply equipment. Moreover, after generating the test messages, the method automatically sends the test messages of each power supply equipment to the test server to simulate the test of the power supply equipment. This frees testers from the dilemma of manually generating and sending test messages, shortens the power supply equipment testing cycle, and improves the power supply equipment testing efficiency.
[0026] In some embodiments, step S110, reading the power device configuration file, includes: based on the file path and file name input by the user, reading the power device configuration file corresponding to the file name in the folder corresponding to the file path. This enables the automatic generation of test messages for the user-specified power device.
[0027] Furthermore, the folders are named after the rail transit lines. The number of power supply device configuration files in each folder is equal to the number of stations on the corresponding rail transit line, and each power supply device configuration file is named after its corresponding station. Specifically, each rail transit line corresponds to one folder, which can be named after the corresponding rail transit line. Each folder stores the power supply device configuration files (e.g., in TXT format) for all stations on the corresponding rail transit line. Each power supply device configuration file is named after its corresponding station, meaning each station corresponds to one power supply device configuration file, which contains the configuration information for all power supply devices corresponding to that station. Based on this, testers can easily switch the power message generation for power supply devices on different lines and at different stations by re-specifying the path and name of the power supply device configuration files.
[0028] In some embodiments, after step S110, the method further includes: generating parsing information corresponding to the test message based on the configuration information, and outputting the parsing information to a terminal interface. The parsing information includes: the quantity and serial number of different types of power supply devices, whether each power supply device is alarm-free, the analog value of each power supply device, and the switching value of each power supply device. Outputting the parsing information to the terminal interface is crucial. Without parsing the test message, the message is merely a string of hexadecimal characters, such as AABB123789, making it impossible to identify the device, its corresponding status, or the analog and switching values. Testers would need to manually split and parse the message. Therefore, automatic parsing of test messages helps testers quickly locate the specified power supply device, and the output is more intuitive and clear, improving testing efficiency and accuracy.
[0029] This can be understood as follows: when generating test messages, the corresponding parsing information is presented as comment code in the text of the test message so that testers can view it accordingly.
[0030] In some embodiments, step S120 specifically includes: selecting alarm information, analog quantity information, or switch quantity information corresponding to the control switch from the configuration information of each power supply device according to the preset control switch corresponding to different power supply device types; and generating test messages for each power supply device based on the selected alarm information, analog quantity information, or switch quantity information.
[0031] Understandably, different power supply device types require different test messages. For example, a data acquisition card type power supply device, which does not contain a contactor (KM), only needs to generate alarm messages and analog quantity messages. The script is configured with switch flags for different information such as alarm information, analog quantity information, and digital quantity information. For example, for alarm information, the corresponding switch flag is 1, indicating that an alarm message should be generated based on the alarm information; a flag of 0 indicates that no alarm message should be generated. During script execution, test messages are selectively generated based on the switch flags corresponding to each configuration information, thereby enabling faster coverage of various test scenarios and ensuring the comprehensiveness and timeliness of power supply device testing.
[0032] For example, test scenarios include: Test Scenario 1: Verify the alarm function: The script extracts the configuration information of the power supply device that is triggering the alarm from the configuration information, generates alarm messages such as overvoltage, undervoltage, and overload, and quickly verifies whether the alarm response of the power supply device is accurate.
[0033] Test Scenario 2: Verify parameter monitoring function: The script extracts analog quantities of the power supply equipment's analog components from the rated parameters and configuration information, and generates messages containing real-time voltage, current, and status indicators. The test server can monitor the operating parameters of the power supply equipment through these messages.
[0034] Test Scenario 3: Verify switch quantity function: The script extracts the switch quantities from the configuration information, generates messages containing open and closed states, and quickly verifies whether the status of components such as contactors in the power supply equipment is accurate.
[0035] In some embodiments, step S130, sending the test messages of each power supply device to the test server, includes: sending the test messages of each power supply device to the test server according to preset sending parameters, wherein the sending parameters include at least one of: source IP address, destination IP address (i.e., the IP address of the test server), destination port, sending interval time, or cyclic sending mode. Specifically, the script file can preset the above sending parameters, or it can receive the above sending parameters input by the tester before executing the script.
[0036] The transmission interval represents the time interval between the transmission of adjacent messages, and can be set from 100ms to 10s, with a default value of 1s. For high-frequency tests (such as verifying the dynamic response of the device), this interval can be shortened to 100ms, while for low-frequency stability tests, it can be extended to 10s. Low-frequency transmission, high-frequency transmission, and cyclic transmission all involve the test software monitoring the power supply's response status in real time, thereby verifying the stability of the power supply equipment under long-term operation.
[0037] The following describes the testing apparatus for rail transit power supply equipment provided by the present invention. The testing apparatus for rail transit power supply equipment described below and the testing method for rail transit power supply equipment described above can be referred to in correspondence.
[0038] The rail transit power supply equipment testing device of this invention embodiment, such as Figure 2 As shown, it includes: The file reading module 210 is used to read the power device configuration file to obtain the configuration information of the power device. The power device configuration file contains the configuration information of at least one power device.
[0039] The message generation module 220 is used to generate test messages for each power device based on the power device type in the configuration information.
[0040] The message sending module 230 is used to send test messages of each power supply device to the test server to perform simulated testing on the power supply device.
[0041] The rail transit power supply equipment testing device in this embodiment reads the power supply equipment configuration file to obtain the configuration information of the power supply equipment in the configuration file. Based on the power supply equipment type in the configuration information, it generates test messages for each power supply equipment, thereby realizing the automatic generation of test messages for the power supply equipment. Moreover, after generating the test messages, it automatically sends the test messages of each power supply equipment to the test server to perform simulated testing on the power supply equipment. This frees testers from the dilemma of manually generating and sending test messages, shortens the power supply equipment testing cycle, and improves the power supply equipment testing efficiency.
[0042] In some embodiments, the file reading module is specifically used to read the power device configuration file corresponding to the file name in the folder corresponding to the file path based on the file path and file name input by the user.
[0043] In some embodiments, the folders are named after rail transit lines, and the number of power equipment configuration files in each folder is equal to the number of stations on the corresponding rail transit line. Each power equipment configuration file is named after the corresponding station.
[0044] In some embodiments, the rail transit power equipment testing device further includes a message parsing module, which, after reading the power equipment configuration file and obtaining the configuration information of the power equipment, generates parsing information corresponding to the test message based on the configuration information and outputs the parsing information to the terminal interface.
[0045] In some embodiments, the message generation module 320 is specifically used to select alarm information, analog quantity information or switch quantity information corresponding to the control switch from the configuration information of each power supply device according to the preset control switch corresponding to different power supply device types; and generate test messages for each power supply device based on the selected alarm information, analog quantity information or switch quantity information.
[0046] In some embodiments, the message sending module 330 is specifically used to send test messages of each power supply device to the test server according to preset sending parameters, the sending parameters including at least one of the following: source IP address, destination IP address, destination port, sending interval time or cyclic sending mode.
[0047] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a rail transit power supply equipment testing method, which includes: Read the power device configuration file to obtain the configuration information of the power device. The power device configuration file contains the configuration information of at least one power device.
[0048] Based on the power device type in the configuration information, test messages are generated for each power device.
[0049] The test messages of each power supply device are sent to the test server to simulate the test of the power supply device.
[0050] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0051] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the rail transit power supply equipment testing method provided by the above methods, the method comprising: Read the power device configuration file to obtain the configuration information of the power device. The power device configuration file contains the configuration information of at least one power device.
[0052] Based on the power device type in the configuration information, test messages are generated for each power device.
[0053] The test messages of each power supply device are sent to the test server to simulate the test of the power supply device.
[0054] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the rail transit power supply equipment testing method provided by the above methods, the method comprising: Read the power device configuration file to obtain the configuration information of the power device. The power device configuration file contains the configuration information of at least one power device.
[0055] Based on the power device type in the configuration information, test messages are generated for each power device.
[0056] The test messages of each power supply device are sent to the test server to simulate the test of the power supply device.
[0057] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0058] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A testing method for rail transit power supply equipment, characterized in that, include: Read the power device configuration file to obtain the configuration information of the power device, wherein the power device configuration file contains configuration information of at least one power device; Based on the power device type in the configuration information, generate test messages for each power device; The test messages of each power supply device are sent to the test server to simulate the test of the power supply device.
2. The testing method for rail transit power supply equipment according to claim 1, characterized in that, Read the power device configuration file, including: Based on the file path and file name entered by the user, the power device configuration file corresponding to the file name is read from the folder corresponding to the file path.
3. The testing method for rail transit power supply equipment according to claim 2, characterized in that, The folders are named after the rail transit lines. The number of power equipment configuration files in each folder is equal to the number of stations on the corresponding rail transit line, and each power equipment configuration file is named after the corresponding station.
4. The testing method for rail transit power supply equipment according to claim 1, characterized in that, After reading the power device configuration file and obtaining the power device's configuration information, the process also includes: Based on the configuration information, generate parsing information corresponding to the test message, and output the parsing information to the terminal interface.
5. The testing method for rail transit power supply equipment according to claim 1, characterized in that, Based on the power device type in the configuration information, test messages are generated for each power device, including: Based on the preset control switches corresponding to different power supply equipment types, select alarm information, analog quantity information or switch quantity information corresponding to the control switch from the configuration information of each power supply equipment; Based on the selected alarm information, analog quantity information, or switch quantity information, test messages are generated for each power supply device.
6. The test method for rail transit power supply equipment according to any one of claims 1 to 5, characterized in that, Send test messages for each power supply device to the test server, including: Test messages from each power supply device are sent to the test server according to preset sending parameters, which include at least one of the following: source IP address, destination IP address, destination port, sending interval time, or cyclic sending mode.
7. A testing device for rail transit power supply equipment, characterized in that, include: The file reading module is used to read the power device configuration file to obtain the configuration information of the power device. The power device configuration file contains the configuration information of at least one power device. The message generation module is used to generate test messages for each power device based on the power device type in the configuration information. The message sending module is used to send test messages from each power supply device to the test server to perform simulated tests on the power supply devices.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the rail transit power supply equipment testing method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the rail transit power supply equipment testing method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the rail transit power supply equipment testing method as described in any one of claims 1 to 6.