A subway visual grounding software automatic testing device and method

By describing the device state changes based on a discrete state mechanism model based on a state machine and a continuous state mechanism model based on a differential equation, the problems of complexity and high time cost in device debugging in the existing technology are solved, and accurate simulation and efficient testing of the device are achieved.

CN119807052BActive Publication Date: 2025-10-14BEIJING TOT AUTOMATION SYST EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411871076.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-10-14
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In the debugging of the subway power supply system in the existing technology, the existing technology cannot effectively solve the technical problems that the existing technology cannot solve.

Method used

By describing the device state changes of discrete and continuous properties based on a state machine discrete state mechanism model and a continuous state mechanism model based on differential equations, accurate simulation of the device is achieved, solving the device problems existing in the prior art.

Benefits of technology

It achieves accurate simulation of the equipment, reduces the complexity and time cost of debugging, improves the accuracy and integration of the simulation model, and improves test efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807052B_ABST
    Figure CN119807052B_ABST
Patent Text Reader

Abstract

The application discloses a kind of subway visual grounding software automation testing device and method, device includes power supply system real-time simulation unit: to power supply environment simulation realizes the real-time simulation of subway power supply system;IEC104 protocol simulation unit: each station corresponds an IEC104 protocol simulation unit, responsible for simulation main station and each substation communication link;Man-machine interface monitoring and operation unit: monitoring the man-machine interface state of software to be measured, verifies the interactive logic and response of visual grounding software;Automatic test management unit: control test process, with other units data interaction, management test execution order and trigger condition;Measured visual grounding software: as the main station end of IEC104 protocol, receives artificial remote control operation, changes the state of power supply system.The advantage is: flexible and portable, easy to integrate, can be directly integrated with subway visual grounding software, quickly access debugging environment, without deploying field real equipment in testing process, improve test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of monitoring and debugging of rail transit power supply systems, and in particular to a metro visual grounding software automatic testing device and method. BACKGROUND

[0002] With the rapid expansion of urban rail transit networks, the operation safety and power supply stability of metro systems are particularly important. To ensure the stable and safe operation of the power supply system, effective grounding control of electrical equipment is required during faults or maintenance of the metro power supply system. As an important tool for monitoring and dispatching of the power supply system, the metro visual grounding software displays the state information and working parameters of the grounding equipment in real time, helping operation and maintenance personnel quickly understand the state of the grounding equipment during fault handling, maintenance and daily monitoring, and making reasonable operations and decisions.

[0003] In the metro power supply system, the visual grounding system involves multiple types of power supply and distribution equipment, including disconnectors, overhead contact systems, and visual grounding devices. The working state and control logic of these devices are complex, and the linkage mechanism, protection logic and fault response requirements between different devices have high technical requirements. In the existing debugging work, the function debugging and verification of the visual grounding software mainly rely on field testing of the actual equipment. This debugging method has the following problems:

[0004] (1) Dependence on actual equipment: field debugging is highly dependent on the operating state of actual equipment, and debugging work must usually be carried out during specific maintenance or power-off windows, which is time-limited, costly, and poses some risk to normal operation.

[0005] (2) Low debugging efficiency: current debugging mainly relies on manual operation, which is tedious and difficult to ensure consistency. In particular, in complex scenarios involving multiple nodes and multiple device linkages, debugging efficiency is low and human error is prone to occur.

[0006] To improve debugging efficiency, using simulation models has become an effective alternative, but existing simulation models are not suitable for debugging of metro visual grounding software and are difficult to adapt to debugging requirements, specifically in the following aspects:

[0007] (1) These simulation models focus on accurately simulating the physical properties of electrical equipment from the beginning of their design, involving a large amount of data and complex calculations, so they are too large to be quickly set up and used during debugging.

[0008] (2) Too many physical details, increasing debugging burden: traditional simulation models contain a large number of physical-level details, which, although helpful for accurate simulation of equipment, may not require such accurate physical layer simulation during software debugging. As a result, the additional physical details increase the complexity and time cost of debugging.

[0009] (3) Inflexible and difficult to integrate: This type of simulation model usually does not have a flexible interface and is not easy to directly integrate with subway visual grounding software. Due to the lack of unified data standards and interfaces, it is difficult to quickly access the debugging environment, resulting in low software debugging efficiency.

[0010] In summary, subway visual grounding software urgently needs a lightweight, flexible, and easy-to-integrate simulation model and a complete set of automated testing methods to improve debugging efficiency. Summary of the Invention

[0011] The purpose of the present invention is to provide a device and method for automatically testing subway visual grounding software, thereby solving the above-mentioned problems existing in the prior art.

[0012] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0013] An automatic testing device for subway visual grounding software, comprising:

[0014] Power supply system real-time simulation unit: realizes real-time simulation of subway power supply system by simulating the on-site power supply environment;

[0015] IEC104 protocol simulation unit: Each station corresponds to an IEC104 protocol simulation unit, which is responsible for simulating the communication link between the master station and each substation;

[0016] Human-computer interaction interface monitoring and operation unit: monitors the human-computer interface status of the software under test, records changes in the interface, and performs necessary operations during the test to verify the interaction logic and response of the visual grounding software;

[0017] Automated test management unit: controls the entire testing process, including test case creation, execution, and result collection; interacts with other units for data, and manages the execution order and triggering conditions of tests;

[0018] Tested visual grounding software: As the master end of the IEC104 protocol, it displays the changes in signal status and the latest status on the human-computer interaction interface according to the real-time changes of the power supply system, receives human remote control operations, and changes the status of the power supply system.

[0019] Preferably, the power supply system real-time simulation unit includes:

[0020] Basic simulation parameter module: defines and initializes each device, device attributes, and topological relationships between devices according to the requirements of the power supply system;

[0021] Based on the discrete state mechanism model of the state machine: describes the state changes of discrete attributes;

[0022] Continuous state mechanism model based on differential equations: describes the dynamic changes of continuous properties;

[0023] Model interface module: provides a standardized interface for the simulation model to integrate with external systems, supporting users to obtain real-time status information of the equipment and dynamic intervention; the interface includes:

[0024] Full status interface: used to provide the status of all devices in the power supply system to the upper system or master station in the form of snapshots;

[0025] State intervention interface: used to receive intervention instructions from external systems or humans on power supply system equipment. After execution, the discrete or continuous state of the equipment is updated in real time to meet the temporary control needs of the system.

[0026] State change event interface: used to transmit device state change information to the upper system or master station in real time;

[0027] Model optimization module based on historical data: Verify and optimize the simulation model through historical data to improve the accuracy of the simulation model.

[0028] Preferably, in the state machine discrete state mechanism model,

[0029] According to the topological relationship between devices in the power supply system and the definition of device status, a state machine is used to describe the state change of the device. The state transition follows the preset state transition matrix. For a device i with k discrete states, a state transition matrix T of size k×k is defined. i , the element T in the matrix i,ab Indicates the condition for device i to transition from state a to state b; each non-zero element T i,ab , all define specific transfer conditions, forming the corresponding state transfer logic;

[0030] In the continuous state mechanism model based on differential equations,

[0031] Continuous state x of device i i (y) is defined by the differential equation,

[0032]

[0033] Among them, h i It is a function that describes the continuous state change of the device and depends on the current state of the device x i (t) and parameter P; t is time.

[0034] Preferably, the model optimization module based on historical data includes:

[0035] State transfer matrix configuration verification and optimization: Suppose there is a set of discrete states {S1, S2, ..., Sn} represents the different states of the device, and the state transition matrix T defines the transition rules between each state; the matrix T = [t ij ] in the element t ij Indicates state S i to S j The conversion conditions are obtained by historical data statistics. i to S j The actual conversion frequency f ij , define an error matrix ΔT=[δ ij ], where δ ij =|t ij -f ij |;If δ ij If it is greater than the set error threshold ∈, it is considered that t ij There is a configuration error that needs to be corrected; if the frequent switching paths (S i →S j ) is not included in T, then add it to the matrix T and set the corresponding conditions. The optimized matrix is ​​T′;

[0036] Parameter fitting verification and optimization: For the continuous state of the equipment, through differential equations Indicates that x(t) is the state variable, u(t) is the input variable, and p is the parameter vector; assuming that a series of observations are obtained through historical data Based on these data, the optimal parameter p is fitted * The fitting process is to construct an objective function that minimizes the error, optimize the objective function, and define the tolerance δ. Then update the parameters in the model to

[0037] Preferably, the IEC104 protocol emulation unit includes:

[0038] Data transmission module: realizes two-way data transmission with the master station, supports TCP / IP communication, and ensures real-time data transmission;

[0039] Bidirectional IEC104 protocol parsing module: parses IEC104 protocol messages and converts the data to be sent into 104 protocol messages;

[0040] Event processing module: continuously monitors event notifications from the real-time simulation unit of the power supply system, captures events and performs corresponding processing;

[0041] Remote control command processing module: receives remote control commands issued by the master station, parses the command content, identifies the specific operations to be performed, calls the interface of the power supply system simulation unit, and implements the specific operations.

[0042] Preferably, the human-machine interface monitoring and operation unit includes:

[0043] Interface status monitoring module: monitors changes in the user interface by pre-installing test points in the software under test or monitoring changes in interface elements, and sends detailed information about the interface response to the automated test management unit;

[0044] Interface operation module: operates the software's user interface by simulating clicks on buttons or input box elements to complete operations;

[0045] Instruction interface module: receives instructions sent by the automated test management unit and passes instructions and parameter information to the instruction operation module.

[0046] Preferably, the automated test management unit includes:

[0047] Test case management module: supports the creation, editing, storage and organization of test cases, so as to generate test cases for different scenarios according to test requirements;

[0048] Test task scheduling module: sorts and schedules test cases, specifies the order, trigger conditions, and test intervals of test execution, and ensures that the test process complies with the predetermined operation logic;

[0049] Use case execution interface module: used to send remote control commands to the human-machine interface monitoring and operation unit to simulate user operation and click remote control commands, and send state change commands to the power supply system real-time simulation unit to simulate changes triggered by external factors in the power supply system;

[0050] Result collection and analysis module: Receives records of interface status changes sent from the machine interface monitoring and operation unit, message records sent by the IEC104 protocol simulation unit, and status change records of the power supply system real-time simulation unit, analyzes the above records in time series and associates them with specific test cases, and fully records the changes of each unit that occur during the execution of the test case to determine whether the test case passes.

[0051] The present invention also aims to provide a method for automated testing of subway visual grounding software, which is implemented based on the device and includes the following steps:

[0052] S1. Establish relevant models of the power supply system real-time simulation unit;

[0053] S2. Deploy multiple IEC104 protocol simulation units and visual grounding software that are consistent with the on-site layout plan by using virtual machines or Docker containers, and ensure that the network configuration and software sample configuration are consistent with the on-site layout plan; establish a multi-layer local area network to connect the nodes of each IEC104 protocol simulation unit, the nodes of the visual grounding software, and the power supply system real-time simulation unit;

[0054] S3. Create test cases, clarify the input conditions, expected outputs, and test steps for each test case; and after all test cases are established and all software environments are deployed, start executing the test cases in sequence;

[0055] S4. Analyze the historical record data generated by executing the use cases to obtain the test results of each use case, and obtain the overall test results based on the passing status of each use case. After the test is completed, configure the software to be tested or modify the software itself, release the version again, and re-execute the test cases until all use cases pass and meet the requirements for system launch.

[0056] Preferably, step S1 specifically includes the following contents:

[0057] S11. List of equipment related to the maintenance of the power supply system;

[0058] S12. Maintain a list of device attributes of the power supply system and assign initial values; device attributes include discrete attributes and continuous attributes;

[0059] S13. Import existing historical data according to device attributes in the format of <device, attribute, value, time>;

[0060] S14, configuring a topology relationship matrix between various devices;

[0061] S15. Configure the optional states of the discrete attributes of each device and the transition conditions between states;

[0062] S16. Configuring calculation functions for the continuous attributes of each device to provide a basis for subsequent calculations of continuous data;

[0063] S17. Establish external interfaces of the real-time simulation unit of the power supply system, including a full state interface, a state intervention interface, and a state change event interface;

[0064] S18. Using the historical data of each attribute, call the model optimization module of the historical data to verify and optimize the simulation model.

[0065] Preferably, in step S3,

[0066] The input conditions are operations or instructions of the automated test management unit to other systems;

[0067] The expected output includes the state change record of the power supply system real-time simulation unit, the transmission record of the IEC104 protocol simulation unit, and the UI change or output of the tested visual grounding software; these outputs will be recorded in the database in time sequence;

[0068] The test steps include two categories:

[0069] (1) When the test management unit adjusts the power supply system status, the IEC104 protocol simulation unit should be able to receive the change event and report it to the visual grounding software, and the visual grounding software will make corresponding status changes in the user interface;

[0070] (2) When the test management unit sends a remote control command to the visual grounding software, the visual grounding software sends a remote control command to the IEC104 protocol simulation unit. The remote control command processing module of the IEC104 protocol simulation unit processes the remote control command and directly modifies the corresponding device attribute status of the power supply system real-time simulation unit, causing the status of other devices to change and then reporting the changes to the visual grounding software layer by layer in the user interaction interface.

[0071] The beneficial effects of the present invention are: 1. The present invention describes the state changes of devices with discrete and continuous properties by using a discrete state mechanism model based on a state machine and a continuous state mechanism model based on a differential equation, thereby achieving accurate simulation of the device without the need for accurate physical layer simulation results, which can reduce the complexity and time cost of debugging. 2. The present invention verifies and optimizes the simulation model based on historical data, thereby improving the accuracy of the simulation model results. 3. The device of the present invention is flexible and lightweight, easy to integrate, and can be directly integrated with the subway visual grounding software through the corresponding interface, quickly accessing the debugging environment, and no real on-site equipment needs to be deployed during the test process, thereby improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 is a structural diagram of an automated testing device according to an embodiment of the present invention;

[0073] Figure 2 It is a topological relationship diagram between devices in an embodiment of the present invention. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0075] Example 1

[0076] like Figure 1As shown, in this embodiment, a subway visual grounding software automatic testing device is provided, which includes the following five main parts:

[0077] 1. Power supply system real-time simulation unit

[0078] The power supply system real-time simulation model unit is designed to achieve real-time simulation of the subway power supply system by simulating the on-site power supply environment.

[0079] The power supply system real-time simulation unit consists of the following modules

[0080] 1.1 Basic simulation parameter module

[0081] The basic simulation parameter module is used to define and initialize each device, attribute, and topology relationship according to the requirements of the power supply system.

[0082] (1) Discrete state vector s i (t): The discrete state of each device i consists of multiple discrete attributes, such as the state of the switch, s i (t)=[s i1 (t), s i2 (t),…,s ik (t)], where s ij (t) represents the jth discrete attribute of device i, and k is the number of discrete attributes of the device.

[0083] (2) Continuous state vector x i (t): The continuous state of each device i consists of multiple continuous attributes, such as the voltage of the contact network, which is expressed as where x ij (t) represents the jth continuous attribute of device i, and m is the number of continuous attributes of the device.

[0084] (3) The basic parameter vector P includes the initial properties of all devices: Each of the p i Represents the attributes of device i, including the initial values ​​of discrete and continuous attributes:

[0085] (4) Connection topology between devices: The adjacency matrix A is a matrix used to represent the topological relationship between devices. For n devices in the system, the elements of the adjacency matrix are defined as follows:

[0086]

[0087] where a ij =1 means there is a direct connection between device i and device j, a ij =0 means there is no direct connection between device i and device j.

[0088] (5) Historical data import: Allow users to import historical operation data of devices (such as switch status records, voltage records, etc.) for model validation.

[0089] 1.2 Discrete state machine mechanism model based on state machine

[0090] This model is used to describe the state change of discrete attributes.

[0091] (1) State transition matrix: According to the system topology structure and device state definition, the system uses state machine to describe the state change of the device, and the state transition follows the preset state transition matrix T i :

[0092] Assuming that the number of discrete states of device i is k, then T i is a k x k matrix, and each element T i,ab represents the condition of state a transitioning to state b. Its general form is:

[0093]

[0094] where T i,ab = 1 indicates that state a can transition to state b, subject to certain conditions; T i,ab = 0 indicates that state a cannot transition to state b.

[0095] (2) State transition logic: For each non-zero element T i,ab , a specific transition condition can be defined: for example, the transition from state s ia to state s ib can be represented by the condition , where: If is satisfied, it can include device state itself, adjacent device state s 邻接 , system parameters P or external intervention conditions, etc. For example, the condition can be defined as: s i (t) = s ia and s j (t) = s 邻接 , if condition is true, then the device state will transition from s ia to s ib at the next time step.

[0096] (3) State transition of external intervention: External intervention implemented through input interface can also be reflected in the state transition matrix, for a direct change of state , it can be regarded as an additional state (external input state) which is directly changed to a specific state without condition restriction: This means that when the external input is triggered, the state directly changes to Not subject to other conditions.

[0097] 1.3 Continuous state mechanism model based on differential equations

[0098] This model is used to describe the dynamic changes of continuous attributes.

[0099] Continuous state x of device i i (t) is defined by the differential equation:

[0100]

[0101] where h i It is a function that describes the continuous state change of the device and depends on the current state of the device x i (t) and parameter P.

[0102] 1.4 Model interface module

[0103] The model interface module provides a standardized interface for the simulation model for integration with external systems, allowing users to obtain real-time device status information and dynamic intervention. This module includes the following interfaces:

[0104] (1) Full status interface: Provides a full status interface for the power supply system, used to respond to the IEC104 protocol full call command. This interface can provide a status snapshot of all nodes within a specified period.

[0105] The system outputs the overall state O(t), which includes a combination of discrete and continuous states: O(t) = (S(t), X(t)) where S(t) = [s1(t), s2(t), ..., s n (t)] represents the discrete state vector, X(t) = [x1(t), x2(t), ..., x n (t)] represents the continuous state vector.

[0106] (2) Status Intervention Interface: This interface provides a user-programmable interface for manual or system intervention in the device status. This interface supports manual control of the device status (such as the on / off operation of the isolation switch) and the input of test tool signals.

[0107] (3) State change event interface: Define the state change event interface to feed back device state changes to the upper system in real time.

[0108] 1.5. Model optimization module based on historical data

[0109] The simulation model can be verified and optimized through historical data to improve the accuracy of the simulation model.

[0110] (1) Verification and optimization of state transfer matrix configuration: Suppose there is a set of discrete states {S1, S2, ..., S n} represents the different states of the device, and the state transition matrix T defines the transition rules between each state. Matrix T = [t ij ] in the element t ij Indicates state S i to S j The conversion conditions are obtained by historical data statistics. i to S j The actual conversion frequency f ij , define an error matrix ΔT=[δ ij ], where δ ij =|t ij -f ij |. If δ ij If the error is greater than the set error threshold ∈, it is considered that t ij There is a configuration error that needs to be corrected. If the frequent switching paths (S i →S j ) is not included in T, then add it to the matrix T and set the corresponding conditions. The optimized matrix is ​​T′.

[0111] (2) Parameter fitting verification and optimization: For the continuous state of the equipment, the differential equation Indicates that x(t) is the state variable, u(t) is the input variable, and p is the parameter vector. Assume that a series of observations are obtained through historical data The optimal parameter p can be fitted based on these data * . Fitting process: Construct an objective function that minimizes the error, such as the least squares error in It is the predicted value of the model under parameter p, and p is solved by optimization. * =argminJ(p). If (δ is the tolerance), then update the parameters in the model to

[0112] 2. IEC104 protocol simulation unit

[0113] Each station corresponds to an IEC104 protocol simulation unit. This module is responsible for simulating the communication link between the master station and each substation and has the following functions:

[0114] Respond to the master station's general call: obtain the current power supply system status information from the power supply system simulation unit and report it to the master station.

[0115] Processing event response: receiving event notification of power supply system simulation unit, obtaining event information, and sending relevant report to master station.

[0116] Executing remote control instruction: responding to remote control command from master station, and realizing intervention and control of power supply system state by calling interface of power supply system simulation unit.

[0117] The unit consists of the following modules:

[0118] 2.1, data transmission module: realizing bidirectional data transmission with master station, supporting TCP / IP communication, and ensuring real-time transmission of data.

[0119] 2.2, bidirectional IEC104 protocol analysis module: analyzing IEC104 protocol message, and arranging data to be sent into 104 protocol message.

[0120] 2.3, event processing module: continuously listening to event notification of power supply system real-time simulation unit, capturing event and performing corresponding processing.

[0121] 2.4, remote control instruction processing module: receiving remote control instruction from master station, analyzing command content, identifying specific operation to be performed, calling interface of power supply system simulation unit, and realizing specific operation such as changing device state and adjusting power grid parameter.

[0122] Three, man-machine interface monitoring and operation unit

[0123] The man-machine interface monitoring and operation unit monitors the state of the man-machine interface of the software to be tested, records the changes of the interface, and performs necessary operations during the test process to verify the interaction logic and response of the visual grounding software.

[0124] The unit consists of the following modules:

[0125] 3.1, interface state monitoring module: monitoring changes of user interface by means of pre-buried points in the software to be tested or monitoring changes of interface elements, and sending detailed information of interface response to the automation test management unit.

[0126] 3.2, interface operation module: operating elements such as buttons or input boxes of the interface by simulating clicks to operate the user interface of the software, and completing operations such as remote control.

[0127] 3.3, instruction interface module: receiving instructions sent by the automation test management unit, and delivering instruction and parameter information to the instruction operation module.

[0128] Four, automation test management unit

[0129] As the management core of the test process, it is responsible for controlling the entire test process, including test case creation, execution, and result collection. It interacts with other modules to manage the execution order and trigger conditions of the tests.

[0130] The unit consists of the following modules:

[0131] 4.1. Test case management module: supports the creation, editing, storage and organization of test cases so as to generate test cases for different scenarios according to test requirements.

[0132] 4.2. Test task scheduling module: Sort and schedule test cases, specify the order of test execution, trigger conditions and test intervals, and ensure that the test process complies with the predetermined operation logic.

[0133] 4.3. Use case execution interface module: used to send remote control instructions to the human-machine interface monitoring and operation unit to simulate user operation and click on the remote control instructions, and send state change instructions to the power supply system real-time simulation unit to simulate changes in external triggers of the power supply system.

[0134] 4.4. Result collection and analysis module: Receives records of interface status changes sent from the machine interface monitoring and operation unit, message records sent by the IEC104 protocol simulation unit, and status change records of the power supply system real-time simulation unit. Analyzes these records in time series and associates them with specific test cases. Completely records changes in each unit that occur during the execution of the test case to determine whether the test case passes.

[0135] 5. Visual grounding software

[0136] As the master terminal of the IEC104 protocol, the tested visual grounding software displays the changes in signal status and the latest status on the human-computer interaction interface according to the real-time changes of the power supply system, receives manual remote control operations, and changes the status of the power supply system.

[0137] The visual grounding software under test consists of the subway dispatching center (OCC) visual grounding operation terminal and the station visual grounding operation terminal. It can be used independently as a master station. The difference is that the station is mainly responsible for the visual grounding device and related power supply system status of the station, while the OCC needs to manage the visual grounding device and related power supply system status of the entire line. There are significant differences between the two in software configuration and equipment capacity, and they need to be tested separately.

[0138] Example 2

[0139] In this embodiment, a method for automatically testing subway visual grounding software is provided, which includes the following four main parts:

[0140] 1. Establish a real-time simulation unit model for the power supply system, including the following processes

[0141] 1.1. A list of equipment related to the maintenance of the power supply system, including contact network equipment A, disconnector equipment B, visual grounding device C, and power supply equipment D.

[0142] 1.2. Maintain a list of device attributes and assign initial values, where

[0143] (1) Isolating switch device A contains the attribute switch status, which is a discrete attribute with optional values ​​of on / off and the default value of on.

[0144] (2) Visual grounding device C includes the attribute grounding status, with optional values ​​of grounded / disconnected. It is a discrete attribute and the default value is grounded.

[0145] (3) The contact network equipment A includes the attribute contact network energized state, which is a discrete attribute. The optional values ​​are energized / de-energized / grounded, and the default value is de-energized.

[0146] (4) The contact network device A contains the contact network voltage attribute, which is a continuous attribute with a default value of 0 and a unit of V.

[0147] (5) The power supply device D contains the attribute power supply voltage, which is a continuous attribute with a unit of V and a default value of 1500V.

[0148] 1.3. Import existing historical data by device attributes, which contains the time series data of each attribute of each device in the format of <device, attribute, value, time>.

[0149] 1.4. Configure the topological relationship between each device and the connection relationship between each device. Figure 2 shown.

[0150] 1.5. Configure the optional states of each device's discrete attributes and the transition conditions between states, where:

[0151] (1) The switch state attribute of the isolating switch A can be changed from open to closed or from closed to open, both of which are changed by external intervention.

[0152] (2) Visualize the grounding status attributes of the grounding device, which can be changed from grounded to disconnected, or from disconnected to grounded, and both conversions are performed by external intervention.

[0153] (3) Whether the contact network of the contact network equipment A is energized: when the isolating switch is closed, the state is automatically converted to energized; when the isolating switch is open, the state is automatically converted to de-energized; when the grounding state of the visual grounding device C is grounded, the energized state of the contact network of the contact network equipment A is automatically converted to grounded.

[0154] 1.6. Configure the calculation function of each device's continuous attributes to provide a basis for subsequent continuous data calculations.

[0155] (1) The power supply voltage of the power supply device D is considered to be a constant, which is represented by U. source .

[0156] (2) Properties of contact network equipment A The contact network voltage is related to the power supply voltage, the contact network energized state, and the real-time current, and can be expressed as follows using a differential equation:

[0157]

[0158] Where a represents the current attenuation coefficient of the system, U source Represents the power supply voltage, R l ine It represents the line resistance of the system contact network, which is a constant. I represents the current passing through the contact network.

[0159] 1.7. Establish external interfaces of the real-time simulation unit of the power supply system: full state interface, state intervention interface, and state change event interface.

[0160] (1) Full Status Interface: The full status interface is used to provide the entire device status (including discrete and continuous status) of the power supply system to the upper system or master station in the form of a snapshot. This interface is usually used to periodically report the current status of the entire system to meet the full call requirements of the IEC104 protocol.

[0161] Full status interface input: request trigger source, request time stamp, ensure that the status data corresponds to the request time.

[0162] Full state interface output: State snapshot data: contains real-time state data of all devices in the entire system, including discrete state vectors and continuous state vectors; timestamp: the time point corresponding to the state data.

[0163] (2) State intervention interface: The state intervention interface is used to receive intervention instructions from external systems or humans on power supply system equipment. After execution, the discrete or continuous state of the equipment is updated in real time to meet the temporary control needs of the system. This interface is mainly used by operators to manually control the state of the equipment, such as controlling the on / off state of the isolation switch or adjusting the voltage value in the system.

[0164] State intervention interface input: Intervention instruction: specifies the type of intervention to be performed, including the device ID and expected state.

[0165] Status intervention interface output: Execution result: Contains execution feedback of the intervention operation

[0166] (3) State change event interface: used to transfer the change information of device state to the upper system or master station in real time. When the device state changes due to external intervention or system operation change, this interface sends the change event to the upper system, ensuring that its monitoring of the device state is real-time and dynamic.

[0167] State change event interface input: state change data: contains information of each state change including device ID, old state and new state, change reason; timestamp.

[0168] State change event interface subscription: subscribe to events in external subsystems, define corresponding processors, and when events occur, external systems can handle them in a timely manner.

[0169] II. Deploying IEC104 protocol simulation units and visual grounding software for testing according to actual network topology on site

[0170] Build a simulation module that conforms to the IEC104 communication protocol to simulate the communication between the master station and the subway visual grounding system, realize real-time data interaction with the power supply system, including the following steps:

[0171] 2.1, Deploy multiple IEC104 protocol simulation units consistent with the on-site layout plan by using virtual machines or docker containers, and ensure that the network configuration is consistent with the on-site layout plan.

[0172] 2.2, Deploy multiple visual grounding software consistent with the on-site layout plan by using virtual machines or docker containers, and ensure that the configuration of each software example is consistent with the on-site layout plan.

[0173] 2.3, Assemble a multi-layer local area network to connect the nodes of each IEC104 protocol simulation unit, the nodes of visual grounding software, and the real-time simulation unit of the power supply system together.

[0174] III. Establish test cases and execute test cases

[0175] To fully verify the functions and performance of the visual grounding software, based on its business requirements and expected operations, detailed test cases are designed, including the following steps,

[0176] 3.1. Clarify the input conditions, expected outputs, and test steps for each test case. The input conditions are the operations or instructions of the automated test management unit to other systems. The expected outputs should include state change records of the power supply system real-time simulation unit, transmission records of the IEC104 protocol simulation unit, and UI changes or outputs of the tested visual grounding software. These outputs will be recorded in a database in a time sequence. The test steps of a typical test case for the visual grounding system include two categories: First, when the test management unit adjusts the power supply system status, the IEC104 protocol simulation unit should be able to receive the change event and report it to the visual grounding software, causing the visual grounding software to undergo a corresponding state change on the user interface. Second, when the test management unit sends a remote control command to the visual grounding software, the visual grounding software sends the remote control command to the IEC104 protocol simulation unit. The remote control command processing module of the IEC104 protocol simulation unit processes the remote control command and directly modifies the corresponding device attribute status of the power supply system real-time simulation unit, causing the status of other devices to change, which is then reported layer by layer to the visual grounding software, causing the change in the user interface.

[0177] 3.2. Once all use cases are established and all software environments are deployed, you can start executing test cases in sequence.

[0178] 4. Analyze test results and iterate after modifying the software

[0179] 4.1. After executing the test case, analyze the generated historical data to obtain the test results of each case. The overall test results can be obtained based on the passing status of each case.

[0180] 4.2. After the test is completed, the developer or implementer configures the software to be tested or modifies the software itself. After the version is released again, the test cases can be re-executed until all cases pass and meet the requirements for system launch. During this process, there is no need to deploy real equipment on site, which greatly improves testing efficiency.

[0181] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:

[0182] The present invention provides an automated testing device and method for subway visual grounding software. The present invention describes the state changes of devices with discrete and continuous properties by using a discrete state mechanism model based on a state machine and a continuous state mechanism model based on a differential equation, thereby achieving accurate simulation of the device without the need for accurate physical layer simulation results, thereby reducing the complexity and time cost of debugging. The present invention verifies and optimizes the simulation model based on historical data, thereby improving the accuracy of the simulation model results. The device of the present invention is flexible, lightweight, and easy to integrate. It can be directly integrated with the subway visual grounding software through the corresponding interface, quickly accessing the debugging environment, and does not require the deployment of real on-site equipment during the test process, thereby improving test efficiency.

[0183] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A subway visual grounding software automated testing device, characterized by: include, Power supply system real-time simulation unit: Realizes real-time simulation of the subway power supply system by simulating the on-site power supply environment; The power supply system real-time simulation unit includes: Basic simulation parameter module: defines and initializes each device, device attributes, and topological relationships between devices according to the needs of the power supply system; Based on the discrete state mechanism model of the state machine: describes the state changes of discrete attributes; Continuous state mechanism model based on differential equations: describes the dynamic changes of continuous properties; Model interface module: provides a standardized interface for the simulation model to integrate with external systems, supporting users to obtain real-time status information of the equipment and dynamic intervention; the interface includes, Full status interface: used to provide the status of all devices in the power supply system to the upper system or master station in the form of snapshots; State intervention interface: used to receive intervention instructions from external systems or humans on power supply system equipment. After execution, the discrete or continuous state of the equipment is updated in real time to meet the temporary control needs of the system. State change event interface: used to transmit device state change information to the upper system or master station in real time; Model optimization module based on historical data: Verify and optimize the simulation model through historical data to improve the accuracy of the simulation model; IEC104 protocol simulation unit: Each station corresponds to an IEC104 protocol simulation unit, which is responsible for simulating the communication link between the master station and each substation; Human-computer interaction interface monitoring and operation unit: monitors the human-computer interface status of the software under test, records changes in the interface, and performs necessary operations during the test to verify the interaction logic and response of the visual grounding software; Automated test management unit: controls the entire testing process, including test case creation, execution, and result collection; Interact with other units for data, manage the execution order and triggering conditions of tests; Visual grounding software under test: As the master terminal of the IEC104 protocol, it displays the changes in signal status and the latest status on the human-computer interaction interface according to the real-time changes of the power supply system, receives manual remote control operations, and changes the status of the power supply system.

2. The automated testing device for subway visual grounding software according to claim 1 is characterized in that: In the state machine discrete state mechanism model, According to the topological relationship between devices in the power supply system and the definition of device status, a state machine is used to describe the state change of the device. The state transition follows the preset state transition matrix. For a device i with k discrete states, a state transition matrix T of size k×k is defined. i , the element T in the matrix i,ab Indicates the condition for device i to transition from state a to state b; each non-zero element T i,ab , all define specific transfer conditions, forming the corresponding state transfer logic; In the continuous state mechanism model based on differential equations, The continuous state of device i is defined by the differential equation, Among them, h i It is a function that describes the continuous state change of the device and depends on the current state of the device x i (t) and parameter P; parameter P is the attribute of all devices; t is time.

3. The automated testing device for subway visual grounding software according to claim 2 is characterized in that: The model optimization module based on historical data includes: State transfer matrix configuration verification and optimization: Suppose there is a set of discrete states {S1, S2, ..., S n } represents the different states of the device, and the state transition matrix T defines the transition rules between each state; the matrix T = [t ij ] in the element t ij Indicates state S i to S j The conversion conditions are obtained by historical data statistics. i to S j The actual conversion frequency f ij , define an error matrix ΔT=[δ ij ], where δ ij =|t ij -f ij |;If δ ij If it is greater than the set error threshold ∈, it is considered that t ij There is a configuration error that needs to be corrected; if the frequent switching paths (S i →S j ) is not included in T, then add it to the matrix T and set the corresponding conditions. The optimized matrix is ​​T′; Parameter fitting verification and optimization: For the continuous state of the equipment, through differential equations Indicates that x(t) is the state variable, u(t) is the input variable, and p is the parameter vector; assuming that a series of observations are obtained through historical data Based on these data, the optimal parameter p is fitted * The fitting process is to construct an objective function that minimizes the error, optimize the objective function, and define the tolerance δ. Then update the parameters in the model to 4. The automated testing device for subway visual grounding software according to claim 1 is characterized in that: The IEC104 protocol simulation unit includes: Data transmission module: realizes two-way data transmission with the master station, supports TCP / IP communication, and ensures real-time data transmission; Bidirectional IEC104 protocol parsing module: parses IEC104 protocol messages and converts the data to be sent into 104 protocol messages; Event processing module: continuously monitors event notifications from the real-time simulation unit of the power supply system, captures events and performs corresponding processing; Remote control command processing module: receives remote control commands from the master station, parses the command content, identifies the specific operations to be performed, calls the interface of the power supply system simulation unit, and implements the specific operations.

5. The automated testing device for subway visual grounding software according to claim 1 is characterized in that: The human-machine interaction interface monitoring and operation unit includes: Interface status monitoring module: monitors changes in the user interface by pre-installing test points in the software under test or monitoring changes in interface elements, and sends detailed information about the interface response to the automated test management unit; Interface operation module: operates the software's user interface by simulating clicks on buttons or input box elements to complete operations; Instruction interface module: receives instructions sent by the automated test management unit and passes instructions and parameter information to the instruction operation module.

6. The automated testing device for subway visual grounding software according to claim 1 is characterized in that: The automated test management unit includes: Test case management module: supports the creation, editing, storage and organization of test cases, so as to generate test cases for different scenarios according to test requirements; Test task scheduling module: sorts and schedules test cases, specifies the order, trigger conditions, and test intervals of test execution, and ensures that the test process complies with the predetermined operation logic; Use case execution interface module: used to send remote control commands to the human-machine interface monitoring and operation unit to simulate user operation and click remote control commands, and send state change commands to the power supply system real-time simulation unit to simulate changes triggered by external factors in the power supply system; Result collection and analysis module: Receives records of interface status changes sent from the machine interface monitoring and operation unit, message records sent by the IEC104 protocol simulation unit, and status change records of the power supply system real-time simulation unit. It analyzes the above records in time series and associates them with specific test cases. It fully records the changes in each unit that occur during the execution of the test case to determine whether the test case passes.

7. A method for automated testing of subway visual grounding software, characterized by: The method is implemented based on the device according to any one of claims 1 to 6, and the method comprises the following steps: S1. Establish relevant models of the power supply system real-time simulation unit; S2. Deploy multiple IEC104 protocol simulation units and visual grounding software consistent with the site layout plan by using virtual machines or Docker containers, and ensure that the network configuration and software sample configuration are consistent with the site layout plan; establish a multi-layer local area network to connect the nodes of each IEC104 protocol simulation unit, the nodes of the visual grounding software, and the power supply system real-time simulation unit; S3. Create test cases and clarify the input conditions, expected outputs, and test steps for each test case; After all use cases are established and all software environments are deployed, test cases are executed in sequence; S4. Analyze the historical record data generated by executing the use case to obtain the test results of each use case, and obtain the overall test results based on the passing status of each use case; After the test is completed, the software to be tested is configured or the software itself is modified. After the version is released again, the test cases are re-executed until all cases pass and meet the requirements for system launch.

8. The automated testing method for subway visual grounding software according to claim 7 is characterized in that: Step S1 specifically includes the following contents: S11. List of equipment related to the maintenance of the power supply system; S12. Maintain a list of device attributes of the power supply system and assign initial values; device attributes include discrete attributes and continuous attributes; S13. Import existing historical data according to device attributes in the format of <device, attribute, value, time>; S14, configuring a topology relationship matrix between various devices; S15. Configure the optional states of the discrete attributes of each device and the transition conditions between states; S16. Configuring calculation functions for the continuous attributes of each device to provide a basis for subsequent calculations of continuous data; S17. Establish external interfaces of the real-time simulation unit of the power supply system, including a full state interface, a state intervention interface, and a state change event interface; S18. Using the historical data of each attribute, call the model optimization module of the historical data to verify and optimize the simulation model.

9. The automated testing method for subway visual grounding software according to claim 7, characterized in that: In step S3, The input conditions are operations or instructions of the automated test management unit to other systems; The expected output includes the status change record of the power supply system real-time simulation unit, the transmission record of the IEC104 protocol simulation unit, and the UI change or output of the tested visual grounding software; these outputs will be recorded in the database in time sequence; The test steps include two categories: (1) When the test management unit adjusts the power supply system status, the IEC104 protocol simulation unit should be able to receive the change event and report it to the visual grounding software, and the visual grounding software will make corresponding status changes in the user interface; (2) When the test management unit sends a remote control command to the visual grounding software, the visual grounding software sends a remote control command to the IEC104 protocol simulation unit. The remote control command processing module of the IEC104 protocol simulation unit processes the remote control command and directly modifies the corresponding device attribute status of the power supply system real-time simulation unit, causing the status of other devices to change and then reporting the changes to the visual grounding software layer by layer in the user interaction interface.