CN-121980772-A - Real-time display and recording method for key power distribution signals
Abstract
The invention provides a real-time display and recording method of key power distribution signals, which integrates event driving and polling mechanisms, supports equipment power distribution signal detection in automatic and manual modes, ensures the completeness of equipment power distribution statistics, adopts configuration files to construct equipment power distribution time data logs, and calculates and displays accumulated power distribution time based on historical state statistical signals to provide data driving decisions for equipment life prediction and preventive maintenance.
Inventors
- LI XIANG
- CHI HAOMIAO
- WANG HUIHUI
- LIU XI
- QI LIWEI
- YANG ZHE
- LI NA
- DU YANHUI
- ZHANG SHU
- HAN XIANGYU
- GUO BOTAO
Assignees
- 北京航天自动控制研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (9)
- 1. The method for displaying and recording the key power distribution signals in real time is characterized by comprising the following steps: step 1, modeling a key signal; Step 2, initializing software; step 3, signal state machine and event processing; and 4, real-time monitoring and data visualization.
- 2. The method for displaying and recording the key distribution signals in real time according to claim 1, wherein the specific process of step 1 is as follows: (1) Based on a tree structure design field special language Extensible Markup Lauguage, adopting a custom tag and attribute set to describe signal metadata to form an XML configuration file; (2) The signal attribute set uses hash mapping to realize 'K, V' index, wherein K is a signal static identifier, and V is a signal entity object containing dynamic time sequence attribute; (3) Through XML serialization/deserialization, the read-write conformity of the configuration file is ensured.
- 3. The method for real-time display and recording of key distribution signals according to claim 2, wherein said set of attributes comprises :"SignalName"、"test_id"、"model"、"connect_time"、"disconnect_time"、"duration_time"、"totalDuration_time".
- 4. The method for displaying and recording key distribution signals in real time according to claim 3, wherein the specific process of step 2 is as follows: (1) Analyzing the configuration file when the software is started, constructing a thread security set m_ MAPTIMEKEEPING of the type of ConcurrentHashMap < String, SIGNALENTITY >; (2) Traversing m_ MAPTIMEKEEPING, extracting each signal entity object, and taking the field 'totalDuration _time' value as the initial accumulated distribution time reference value of each signal; (3) Based on MVC pattern, searching corresponding Observer control (Observer Widget) in UI component registry by signal name 'SIGNALNAME', and establishing data-view bidirectional binding; (4) Realizing time unit conversion by adopting a strategy mode; (5) The second-level time stamp of the initial accumulated distribution time of each signal is converted into an hour, minute and second formatted character string according to the display unit requirement of the system on the distribution time of each signal, and each UI component is refreshed by combining the steps (2), (3) and (4); (6) Timer management, creating a high-precision timer based on a thread pool, and associating independent timing instances with each 'SIGNALNAME', so as to support millisecond-level time slice polling.
- 5. The method for real-time displaying and recording key distribution signals according to claim 4, wherein step 3 is specifically to record signal "on" and "off" time according to signal entity object attribute "model", adopt two modes, namely signal automatic on-off mode, signal manual on-off mode, when each signal "on" and "off" state is switched, generate new SignalRecord object by copy-on-write mode, and add to < SignalRecord > node of XML configuration file, and ensure atomicity of operation.
- 6. The method for displaying and recording the key distribution signal in real time according to claim 5, wherein the automatic signal switching-on and switching-off mode is specifically that in an automatic test framework, if the distribution state of the equipment is controlled by a test flow driver, an event-driven mode is adopted to monitor a test step event, a signal state change callback function is injected through a Hook mechanism, and signal entity object attributes "connect_time" and "disconnect_time" are recorded.
- 7. The method for displaying and recording the key distribution signal in real time according to claim 5, wherein the manual signal switching-on and switching-off mode is characterized in that a polling detector is realized on the basis of establishing connection with equipment where the key signal is located, equipment response feedback is requested and received at a fixed frequency, equipment switching-on and switching-off states are periodically acquired, and recorded signal entity object attributes of "connect_time" and "disconnect_time" are triggered based on state change difference.
- 8. The method for displaying and recording key distribution signals in real time according to claim 7, wherein the step 4 is specifically: (1) Starting a high-precision timer when the signal is on, and calculating the signal distribution time duration_time and the accumulated distribution time totalDuration _time maintained by the current test_id when the signal is off; (2) Reducing UI refresh card stop by double buffer (DOUBLE BUFFERING) technology, locally updating timing control, displaying the current power distribution time and accumulated power distribution time; (3) And carrying out time unit conversion according to the design requirement of the display control, and refreshing each key signal displayed by the interface control to accumulate the total power distribution time.
- 9. The method for real-time display and recording of key distribution signals according to claim 8, wherein duration_time=disconnect_time-connect_time and totalDuration _time= totalDuration _time+duration_time.
Description
Real-time display and recording method for key power distribution signals Technical Field The invention belongs to the field of industrial field testing, and particularly relates to a real-time display and recording method for key power distribution signals. Background In the design and implementation of the ground test initiation control system, the power distribution control of the system instrument equipment is usually controlled by the ground test initiation control system, and specifically comprises the power supply state control of equipment such as an arrow-mounted computer, a ground inertial measurement unit and the like. However, hardware devices are limited by their physical lifecycle, requiring device retirement and replacement when MTTF (Mean Time to Failure) thresholds are reached. Because the actual accumulated power distribution time length is obviously lower than the theoretical value, in order to optimize the production operation and maintenance cost, it is particularly important to display and record the actual live working time of key equipment of the system in real time. Disclosure of Invention The invention aims to provide a recording method for realizing a key equipment power distribution process based on an XML dynamic parameterized configuration file, which is used for displaying key power distribution signals in real time through a GUI man-machine interaction interface, wherein the power distribution time length and the accumulated power distribution time length used so far in the test process are convenient for system staff to grasp equipment states and test related progress in real time, test state confirmation, fault investigation and the like, so that the dual requirements of engineering reliability and cost control are met, and data support is provided for equipment life prediction and preventive maintenance. The invention provides a recording method for realizing a key equipment power distribution process based on an XML dynamic parameterized configuration file, which comprises the following specific steps: step 1, modeling a key signal; (1) Based on the tree structure design domain specific language Extensible Markup Lauguage, the signal metadata is described by using custom tags (such as "< SignalRecord >") and attribute sets ("SignalName"、"test_id"、"model"、"connect_time"、"disconnect_time"、"duration_time"、"totalDuration_time", etc., so as to form an XML configuration file. (2) The signal attribute set implements a "K, V" index using a hash map (HashMap), where Key is the signal Static Identifier (SIGNALNAME) and Value is the signal entity object (SIGNALENTITY) that contains the dynamic timing attributes. (3) Through XML serialization/deserialization, the read-write conformity of the configuration file is ensured. Step 2, initializing software: (1) Configuration file loading and objectification. The configuration file is analyzed when the software is started, a thread safety set m_ MAPTIMEKEEPING of the type of ConcurrentHashMap < String, SIGNALENTITY >' is constructed, and the instantiation of the signal entity object is completed. (2) The historical state is restored. Traversing m_ MAPTIMEKEEPING, extracting each signal entity object, and taking the field 'totalDuration _time' value as an initial accumulated distribution time reference value of each signal. (3) View layer binding. Based on the MVC mode, the corresponding Observer control (Observer Widget) is retrieved in the UI component registry by the signal name "SIGNALNAME" to establish the data-view bidirectional binding. (4) Time unit normalization. The policy mode (STRATEGY PATTERN) is used to implement time unit conversion. (5) And (5) redrawing the interface. And (3) according to the display unit requirement of the system on the distribution time of each signal, combining the steps (2), 3 and 4), converting the second-level time stamp of the initial accumulated distribution time of each signal into a formatted character string such as hours/minutes/seconds and refreshing each UI component. (6) And (5) managing a timer. A high precision timer is created based on the thread pool, and each 'SIGNALNAME' is associated with an independent timing instance to support millisecond-level time slice polling. Step 3, signal state machine and event processing: according to the attribute "model" of the signal entity object, the signal "on" and "off" times are recorded in the following two ways respectively. (1) The signal automatically turns on/off mode. In the automatic test framework, if the power distribution state of the equipment is controlled by the test flow drive, an event-driven mode is adopted to monitor test step events (such as 'ON_CONNECT' and 'ON_DISCNECT' events of corresponding equipment), a signal state change callback function is injected through a Hook mechanism, and the attributes 'connect_time' and 'disconnect_time' of a signal entity object are recorded. (2) The signal manually turns on/off mode. On the basi