A method for periodic monitoring and anomaly handling of upper and lower computer systems in rail transit platform testing

By adding a message header carrying a cycle number and timing identifier to the rail transit platform test, a closed-loop data interaction is formed, which solves the problem of inconsistent cycles between the host computer and the slave computer, realizes the orderliness of data interaction and anomaly handling, and ensures the accuracy and integrity of test data.

CN123104748APending Publication Date: 2026-11-17SHANGHAI ELECTRIC THALES TRANSPORTATION AUTOMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611493063.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing rail transit platform testing, the lack of periodic binding between the host computer and the slave computer leads to disordered data interaction, out-of-order messages, and period mismatch. Existing solutions cannot effectively monitor and handle period drift and message loss, affecting the accuracy of test results.

Method used

A message header is added to the periodic messages between the lower-level machine and the upper-level machine, carrying the period number, timing identifier and synchronous monotonic time. The upper-level machine verifies the header, forming a closed-loop data interaction to ensure that the test control data of the upper-level machine corresponds to the test data of the lower-level machine within the same period. A periodic dynamic monitoring and anomaly handling mechanism is adopted.

Benefits of technology

It ensures the orderly data interaction between the host computer and the slave computer, avoids data sampling misalignment and message disorder, ensures the accuracy of test data, and promptly identifies and saves test site data in abnormal situations to prevent test result distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123104748A_ABST
    Figure CN123104748A_ABST
Patent Text Reader

Abstract

This invention discloses a method for periodic monitoring and anomaly handling in rail transit platform testing, relating to the field of signal control testing technology. The specific steps of this method are: collaborative parameter initialization, closed-loop handshake and verification, periodic dynamic monitoring, anomaly judgment and handling, and collaborative termination and chain disconnection. This invention adds a message header to the periodic messages between the lower and upper computers, carrying the lower computer's period number, timing identifier, and synchronous monotonic time to the upper computer with each message. After receiving the message, the upper computer verifies both the message header and message body, and only returns a response message carrying test control data to the lower computer after successful verification. This method enables data interaction between the upper and lower computers to form a closed loop triggered by the response message. The upper computer uses only the period number and timing identifier in the lower computer's message as the verification benchmark, ensuring that the test control data sent by the upper computer and the test data collected by the lower computer correspond within the same period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal control testing technology, specifically to a method for periodic monitoring and anomaly handling of upper and lower computer systems in rail transit platform testing. Background Technology

[0002] Urban rail transit signaling systems are core infrastructure for ensuring safe train operation. As the core safety equipment of the signaling system, the correctness of the function and the reliability of operation of the rail transit safety platform are directly related to the safety of train operation. Before leaving the factory and during the type test phase, the rail transit safety platform needs to undergo comprehensive verification of its various functions and performance through a testing system. During the test, the testing system completes the issuance of test commands and the acquisition of operating status through data interaction between the host computer and the rail transit safety platform under test. The host computer runs on a general computing platform, and the rail transit safety platform under test, as the slave computer, operates according to its own internal scheduling mechanism. The two need to maintain the orderliness and consistency of data interaction during the test.

[0003] However, in existing tests, the communication between the host computer and the tested rail transit safety platform often adopts a free-transmission mode without time constraints. The host computer sends data according to its own rhythm, and the tested platform sends data back according to its own pace. There is no binding relationship between the two based on a period. In heterogeneous scenarios where the tested platform operates according to a fixed period while the host computer does not, this method is prone to data interaction disorder, message out-of-order, and period mismatch, resulting in a mismatch between the data sampled by the host computer and the actual operating time of the tested platform. Some solutions introduce external clock synchronization devices to align the two times, but the external clock only... While aligning absolute time is possible, it cannot fundamentally eliminate the time difference between the non-real-time scheduling of the host computer and the hard real-time cycle of the platform under test. Another solution uses a simple waiting and acknowledgment mechanism, but this mechanism only confirms whether the message has been received and does not carry the cycle and timing information of the platform under test in the message. It cannot determine whether the message belongs to the current cycle, whether a jump has occurred, or whether it has been resent. At the same time, the existing test process lacks continuous monitoring of the cycle itself and anomaly handling methods. When the platform under test experiences cycle drift or the host computer continuously loses messages, the system cannot identify it in time and stop the test and preserve the scene according to the established procedure. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a method for monitoring and handling anomalies in the testing of rail transit platforms using both upper and lower control systems. This invention adds a message header to the periodic messages between the lower and upper control systems, carrying the lower control system's period number, timing identifier, and synchronous monotonic time with each message to the upper control system. Upon receiving the message, the upper control system verifies both the message header and the message body. Only after successful verification does it return a response message carrying test control data to the lower control system, which then triggers the next operating cycle based on the response message. This method creates a closed loop for data interaction between the upper and lower control systems, with the response message as the trigger signal. The upper control system does not set its own operating cycle; it only uses the period number and timing identifier in the lower control system's messages as the verification benchmark. This ensures that the test control data sent by the upper control system and the test data collected by the lower control system correspond within the same cycle, avoiding data sampling misalignment and message disorder caused by inconsistent operating cycles between the upper and lower control systems.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for periodic monitoring and anomaly handling of upper and lower computer systems in rail transit platform testing, the specific steps of which are as follows: The coordination parameters are initialized, the host computer and the slave computer establish a communication link, the slave computer sends an initial message to the host computer carrying the hard real-time fixed period, period number, timing identifier and synchronous monotonic time, the host computer records the hard real-time fixed period and period number, and agrees on coordination rules with the slave computer; Closed-loop handshake and verification: The lower-level machine generates a periodic message carrying a message header and a message body according to the hard real-time fixed cycle and sends it to the upper-level machine. After receiving the periodic message, the upper-level machine performs the first round of verification on the message header and the second round of verification on the message body. After the two rounds of verification are passed, the lower-level machine returns a response message carrying verification confirmation information and the next round of test control data. The lower-level machine triggers the next hard real-time fixed cycle according to the response message. Periodic dynamic monitoring: The host computer parses the period number and timing identifier in the message header, calculates the actual period interval using synchronous monotonic time and compares it with the hard real-time fixed period, calculates the period monitoring index, and corrects the response sending time based on the period monitoring index. Anomaly detection and handling: When the host computer fails to receive periodic messages continuously, fails to verify continuously, or the actual period interval exceeds the threshold, the periodic cycle is terminated and the period number, timing identifier, and test data returned by the lower computer at the time of the anomaly are recorded locally. Collaboration termination and link disconnection: The host computer issues a collaboration termination command, the slave computer stops generating the cycle message, archives the test data and returns a termination confirmation message, and then disconnects the communication link.

[0006] Furthermore, during the initialization of the collaborative parameters, the lower-level machine reads the hard real-time fixed period from its own hard real-time scheduler, generates the current period number and timing identifier, and obtains the synchronous monotonic time within the lower-level machine. The lower-level machine embeds the hard real-time fixed period, period number, timing identifier, and synchronous monotonic time into the initial message and sends it to the upper-level machine via the communication link. The upper-level machine receives and parses the initial message, and records the hard real-time fixed period and period number. The upper-level machine and the lower-level machine agree on collaborative rules during the interaction of the initial message, including message transmission protocol, message header format, verification rules, and timing identifier generation rules.

[0007] Furthermore, in the initialization of the collaborative parameters, the message header format is defined as a fixed-length field added outside the application message. The message header includes a period number field, a timing identifier field, a synchronous monotonic time field, a hard real-time fixed period field, a message sending time field, a message number field, and a checksum field. The timing identifier generation rule stipulates that the timing identifier is generated by the lower-level machine using an incrementing sequence number method. The period number is bound to the hard real-time fixed period of the lower-level machine, and the period number increments once after each hard real-time fixed period. The timing identifier increments by one every hard real-time fixed period from the initial period. The checksum rule stipulates that the synchronous monotonic time is the monotonic clock inside the lower-level machine. The upper-level machine does not set its own running period or maintain its own period number during the test.

[0008] Furthermore, in the closed-loop handshake and verification process, after the lower-level machine enters periodic operation, after each hard real-time fixed cycle, the application program executing the test logic in the lower-level machine generates a periodic message. The message body carries the test data collected by the lower-level machine in the current hard real-time fixed cycle, including operating status variables, safety output status, and sensor data. The lower-level machine embeds the current cycle number, the time sequence identifier generated according to the incrementing rule, the current synchronization monotonic time, and cycle association information in the message header according to the agreed message header format. The cycle association information includes the hard real-time fixed cycle and the message sending time. After completing the message assembly, the lower-level machine stops subsequent generation, enters the waiting response state, and sends the periodic message to the upper-level machine through the communication link.

[0009] Furthermore, in the closed-loop handshake and verification process, after the host computer passively receives the periodic message, it does not immediately return a response. Instead, it first parses the message header and performs the first round of verification. The first round of verification includes: verifying whether the length and offset of each field in the message header are complete; verifying whether the period number increases as expected; verifying whether the timing identifier is incremented by one from the timing identifier of the previous periodic message; verifying whether the synchronization monotonic time is greater than the synchronization monotonic time of the previous periodic message, and whether the deviation between the single-cycle increment and the hard real-time fixed period falls within the allowable range; and verifying the message number and the cyclic redundancy check value. If any verification fails, the host computer does not return a response message.

[0010] Furthermore, in the closed-loop handshake and verification process, after the first round of verification passes, the host computer performs business-level verification on the running status variables, safety output status, and sensor data in the message body according to the pre-configured test cases, and the test cases are lower-level functional test items; when both rounds of verification pass, the host computer generates a response message carrying verification confirmation information, and sends the next round of test control data to the lower-level computer along with the response message via the communication link. The next round of test control data includes the lower-level computer's running configuration data and the input data that triggers the lower-level computer's actions; after receiving the response message, the lower-level computer's hard real-time scheduler advances to the next hard real-time fixed cycle, and the lower-level computer starts a timeout countdown within the current hard real-time fixed cycle. If no response message is received within a hard real-time fixed cycle, the current cycle message is retransmitted within the current hard real-time fixed cycle.

[0011] Furthermore, in the aforementioned periodic dynamic monitoring, when the host computer receives each periodic message, it extracts the synchronization monotonic time of the current periodic message from the message header, subtracts the synchronization monotonic time of the current periodic message from the synchronization monotonic time of the previous periodic message, and obtains the current actual period interval; the host computer then takes continuous... The actual period intervals of each period constitute an interval sequence, which will be used to fix the hard real-time period. Both sides according to the preset tolerance ratio Divided into equal parts The number of sub-intervals, where each actual periodic interval in the statistical interval sequence falls within the [number]th sub-interval, [number] sub-intervals. Frequency of each sub-interval The periodic jitter entropy is calculated using the periodic interval jitter entropy calculation formula. As one of the periodic monitoring indicators, the periodic interval jitter entropy is used to quantify the dispersion of the actual periodic interval relative to the hard real-time fixed period. The periodic interval jitter entropy calculation formula is as follows: ,in, The number of periods within the statistical window, with a value range of [value missing]. - , The preset tolerance ratio has a range of values. - , For sub-interval numbers, the range of values ​​is: - , For statistics window The actual period interval falls into the first The frequency of each sub-interval The entropy is the periodic jitter. The closer it is to 0, the more concentrated the actual period interval is within the hard real-time fixed period. The larger it is, the more dispersed the actual period interval is.

[0012] Furthermore, in the aforementioned periodic dynamic monitoring, the host computer compares the current actual period interval with the hard real-time fixed period. Simultaneously, it combines the difference between the period number in the current period message and the period number in the previous period message, and the difference between the time sequence identifier in the current period message and the time sequence identifier in the previous period message, to calculate a collaborative mismatch index using a multi-dimensional collaborative mismatch calculation formula. This collaborative mismatch index, as one of the periodic monitoring indicators, is used to comprehensively quantify the degree to which the lower-level computer deviates from the expected state in the three dimensions of period number, time sequence identifier, and period interval. The multi-dimensional collaborative mismatch calculation formula is as follows: ,in, The period number in the current period message. The period number is from the previous periodic message. This is the time sequence identifier in the current period message. This is the time sequence identifier from the previous periodic message. This is the current actual cycle interval. For hard real-time fixed period, This is the amplification factor for the relative deviation of the period interval, and its value range is... - , The mismatch index is the index of coordination. This indicates that the period number, time sequence identifier, and period interval are all consistent with the desired state. The larger the value, the greater the overall deviation among the three factors.

[0013] Furthermore, in the aforementioned periodic dynamic monitoring, the host computer calculates the coordination mismatch index based on the previous period's data. The periodic interval jitter entropy is used to correct the current response sending time using the closed-loop response time correction calculation formula set, resulting in the corrected response sending time. The host computer then sends the response message to the slave computer according to the corrected response sending time. The closed-loop response time correction calculation formula set is as follows: ,in, For correction amount, This is a correction factor, and its value range is... - , This represents the coordination mismatch index for the previous period. The threshold for coordination mismatch is defined as follows, and its value range is: - , For hard real-time fixed period, This is the jitter enhancement factor, with a value ranging from 0.2 to 0.8. For periodic jitter entropy, For subinterval numbers, The corrected response sending time. This refers to the moment when the host computer receives the message of the current period.

[0014] Furthermore, in the anomaly detection and handling process, if the host computer fails to receive a periodic message within several consecutive hard real-time fixed periods, or if the host computer fails to verify the period number, timing identifier, or synchronous monotonic time consecutively, or if the coordination mismatch index calculated by the host computer fails to resolve the anomaly, the following measures will be taken: Exceeding the coordination mismatch threshold When any abnormal situation occurs, the host computer determines it to be a coordination abnormality, and stops generating and sending response messages. It saves the period number, timing identifier, synchronous monotonic time and test data returned by the lower computer at the time of the abnormality to disk, and notifies the lower computer application to exit the current operation through the notification channel.

[0015] Compared with existing technologies, this method for periodic monitoring and anomaly handling of rail transit platform testing has the following advantages: I. This invention adds a message header to the periodic messages between the lower-level and upper-level computers, carrying the lower-level computer's period number, timing identifier, and synchronous monotonic time to the upper-level computer with each message. The upper-level computer verifies both the message header and message body upon receiving the message, and only returns a response message carrying test control data to the lower-level computer after successful verification. The lower-level computer then triggers the next operating cycle based on the response message. This method creates a closed loop for data interaction between the upper-level and lower-level computers, with the response message as the trigger signal. The upper-level computer does not set its own operating cycle; it only uses the period number and timing identifier in the lower-level computer's message as the verification benchmark. This ensures that the test control data sent by the upper-level computer and the test data collected by the lower-level computer correspond within the same cycle, avoiding data sampling misalignment and message disorder caused by inconsistent operating cycles between the upper and lower-level computers.

[0016] II. This invention involves the host computer parsing the cycle number and timing identifier in the message header each time a cycle message is received. It then calculates the actual cycle interval of the slave computer using synchronous monotonic time, compares the actual cycle interval with the slave computer's hard real-time fixed cycle, and calculates cycle monitoring indicators. Based on these indicators, the host computer continuously monitors the cycle stability and timing continuity of the slave computer. When the host computer fails to receive cycle messages consecutively, fails verification consecutively, or the cycle monitoring indicators exceed a threshold, it terminates the cycle loop and saves the cycle number, timing identifier, and test data at the time of the anomaly to disk. This method ensures that cycle drift and message loss in the slave computer are identified by the host computer as soon as they occur, preserving complete test data in abnormal states. Test personnel can then locate the problem based on the disk records, preventing abnormal data from being mixed into subsequent test processes and causing test result distortion.

[0017] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from an examination of the following, or may be learned from the practice of the invention. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0019] Figure 1 A flowchart of a method for periodic monitoring and anomaly handling of upper and lower computer systems in rail transit platform testing; Figure 2 A framework diagram of a method for periodic monitoring and anomaly handling in the testing of a rail transit platform; Figure 3 This is a framework diagram of periodic dynamic monitoring in a method for periodic monitoring and anomaly handling in a rail transit platform testing system. Detailed Implementation

[0020] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0021] Example: In the factory testing scenario of a rail transit safety platform for urban rail transit signaling systems, a method for periodic monitoring and anomaly handling of the upper and lower computer systems for rail transit platform testing is adopted. This method is applied to a test system including an upper computer and a lower computer, where the upper computer is the test control terminal and the lower computer is the rail transit safety platform under test. A communication link is established between the upper computer and the lower computer via Ethernet. In this embodiment, this method is used to perform functional testing of the lower computer through the upper computer, such as... Figure 1 , Figure 2 As shown; and the hardware real-time fixed period of the lower-level machine is 100ms.

[0022] After the host computer and the slave computer establish a communication link via Ethernet, the host computer sends a link request and an initial message to the slave computer. Upon receiving the initial message, the slave computer reads the fixed running period (100ms) from its own hard real-time scheduler, generates the current period number and timing identifier, and obtains the internal synchronous monotonic time. This synchronous monotonic time is the system monotonic clock within the slave computer's redundant platform, starting from the slave computer's power-on startup and independent of an external clock source; it is used to characterize the sequence of events within the slave computer. The slave computer embeds the hard real-time fixed period, period number, timing identifier, and synchronous monotonic time into the initial message and sends it back to the host computer via Ethernet. The host computer receives and parses the initial message, records the hard real-time fixed period as 100ms, and records the starting period number and starting timing identifier. During the interaction of the initial message between the host computer and the slave computer... The coordination rules are agreed upon, including message transmission protocol, message header format, verification rules, and timing identifier generation rules. The message header format specifies that the message header is a fixed-length field added outside of the application message, including a period number field, a timing identifier field, a synchronous monotonic time field, a hard real-time fixed period field, a message sending time field, a message number field, and a checksum field. The timing identifier generation rules stipulate that the timing identifier is generated by the lower-level machine using an incrementing sequence number. The period number is bound to the lower-level machine's hard real-time fixed period, incrementing once after each hard real-time fixed period. The timing identifier increments by one every hard real-time fixed period from the initial period. The verification rules specify the verification method for the message number and the cyclic redundancy checksum. The upper-level machine does not set its own operating period or maintain its own period number throughout the entire test process.

[0023] After the lower-level machine enters periodic operation, every 100ms hard real-time fixed cycle, the application executing the test logic in the lower-level machine generates a periodic message. The message body carries the test data collected by the lower-level machine in the current hard real-time fixed cycle. The test data includes operating status variables, safety output status, and sensor data. The lower-level machine embeds the current cycle number, a timing identifier generated according to an incrementing rule, the current synchronization monotonic time, and cycle association information in the message header according to the agreed message header format. The cycle association information includes the hard real-time fixed cycle and the message sending time. After completing message assembly, the lower-level machine stops generating subsequent messages, enters a waiting response state, and sends the periodic message to the upper-level machine via Ethernet. After passively receiving the periodic message, the upper-level machine does not immediately return a response. A: First, parse the message header and perform the first round of checks. The first round of checks is as follows: Check whether the length and offset of each field in the message header are complete, confirming that no fields were lost or tampered with during the transmission of the message header; check whether the cycle number increments as expected, confirming that the lower-level machine has not skipped the current scheduling cycle; check whether the timing identifier is incremented by one from the timing identifier of the previous cycle message, confirming that the message is not out of order; check whether the synchronous monotonic time is greater than the synchronous monotonic time of the previous cycle message, and whether the deviation between the single-cycle increment and the hard real-time fixed cycle falls within the allowable range, confirming that the lower-level machine's internal clock has not backed up; check the message number and the cyclic redundancy check value, confirming that the message content has not been erroneous during the transmission of the message. If any check fails, the upper-level machine will not return an acknowledgment message.

[0024] After the first round of verification passes, the host computer performs business-level verification on the test data in the message body according to the pre-configured test cases. The test cases are lower-level machine function test items, which are configured by the host computer according to the function item under test before the test begins. The verification content includes whether the running status quantity meets expectations, whether the safety output status operates correctly, and whether the sensor data is within a reasonable range. When both rounds of verification pass, the host computer generates a response message carrying verification confirmation information and sends the next round of test control data to the lower-level machine via Ethernet along with the response message. The next round of test control data includes the lower-level machine's running configuration data and the input data that triggers the lower-level machine's actions. After the lower-level machine receives the response message, the hard real-time scheduler advances to the next 100ms hard real-time fixed cycle, and the lower-level machine starts a timeout countdown within the current hard real-time fixed cycle. If no response message is received within a hard real-time fixed cycle, the message of the current cycle is retransmitted within the current hard real-time fixed cycle. The retransmission action is completed within this cycle and does not affect the scheduling sequence of the lower-level machine in subsequent cycles.

[0025] When the host computer receives a periodic message, it extracts the synchronization monotonic time of the current periodic message from the message header, subtracts the synchronization monotonic time of the previous periodic message from the synchronization monotonic time of the current periodic message to obtain the current actual period interval. The host computer takes 16 consecutive actual period intervals to form an interval sequence, divides the two sides of the hard real-time fixed period into 6 sub-intervals with a tolerance ratio of 0.1, and counts the frequency of each actual period interval falling into the k-th sub-interval. The period jitter entropy is calculated using the period interval jitter entropy calculation formula, which is one of the period monitoring indicators. The period interval jitter entropy calculation formula is as follows: ,in, To determine the number of periods within the statistical window, this embodiment uses a value of 16, corresponding to 16 fixed hard real-time periods, covering a monitoring duration of 1600ms. This value reflects the short-term periodic fluctuations of the lower-level machine without the statistical results being affected by occasional jitter in a single period due to an excessively short window. To predetermine the tolerance ratio, this embodiment uses a value of 0.1, meaning that a floating range of 10ms is reserved above and below the fixed hard real-time period of 100ms. This floating range is evenly divided into 6 sub-intervals, each with a width of approximately 3.3ms, to differentiate the degree of concentration of the period intervals. For subinterval numbers, For statistics window The actual period interval falls into the first The frequency of each sub-interval The entropy of the periodic jitter is such that the closer it is to 0, the more concentrated the actual period interval is within the hard real-time fixed period; the larger it is, the more dispersed the actual period interval is. The host computer compares the current actual cycle interval with the hard real-time fixed cycle. Simultaneously, it combines the difference between the cycle number in the current cycle message and the cycle number in the previous cycle message, and the difference between the time sequence identifier in the current cycle message and the time sequence identifier in the previous cycle message, to calculate the coordination mismatch index using a multi-dimensional coordination mismatch calculation formula. The coordination mismatch index, as one of the cycle monitoring indicators, is used to comprehensively quantify the degree to which the lower-level computer deviates from the expected state in three dimensions: cycle number, time sequence identifier, and cycle interval. The multi-dimensional coordination mismatch calculation formula is as follows: ,in, The period number in the current period message. The period number is from the previous periodic message. This is the time sequence identifier in the current period message. This is the time sequence identifier from the previous periodic message. This is the current actual cycle interval. For hard real-time fixed period, This is the amplification factor for the relative deviation of the period interval; in this embodiment, it is set to 3. The mismatch index is the index of coordination. This indicates that the period number, time sequence identifier, and period interval are all consistent with the desired state. The larger the value, the greater the overall deviation among the three factors. The host computer, based on the multidimensional coordination mismatch index calculated in the previous cycle and the periodic interval jitter entropy, applies a correction to the current response transmission time using the closed-loop response time correction calculation formula set, thus obtaining the corrected response transmission time, such as... Figure 3 As shown; and the set of formulas for correcting the closed-loop response time is as follows: ,in, For correction amount, The correction factor, set to 0.3 in this embodiment, controls the correction magnitude, ensuring that the timing of the host computer sending the response message is gradually adjusted as the deviation increases, thus preventing drastic fluctuations in the response timing due to single-cycle mismatch. This represents the coordination mismatch index for the previous period. The threshold for coordination mismatch is set to 1 in this embodiment. For hard real-time fixed period, The jitter enhancement factor is set to 0.5 in this embodiment. This is used to increase the correction magnitude when the period interval distribution is dispersed, reflecting that when the lower-level machine's period is unstable, the upper-level machine needs to send a response message earlier to remain within the lower-level machine's waiting window. For periodic jitter entropy, For subinterval numbers, The corrected response sending time. This is the time when the host computer receives the current periodic message; the host computer sends a response message to the slave computer according to the corrected response sending time.

[0026] The host computer determines a coordination anomaly when any of the following occurs: The host computer fails to receive periodic messages for several consecutive hard real-time fixed periods, indicating an Ethernet communication interruption or that the slave computer has stopped operating; the host computer fails to verify the period number, timing identifier, or synchronous monotonic time consecutively, indicating that the message content has been corrupted or the slave computer's periodic scheduling has become disordered; the coordination mismatch index calculated by the host computer exceeds the coordination mismatch threshold of 1.0, indicating that the slave computer's overall deviation in the three dimensions has exceeded the allowable range. After determining a coordination anomaly, the host computer stops generating and sending response messages, saves the period number, timing identifier, synchronous monotonic time, and test data returned by the slave computer at the time of the anomaly to disk, and notifies the slave computer application to exit its current operation via the notification channel. The data saved to disk is used by testers to locate the cause of the anomaly, and the notification channel is used to stop the slave computer application from continuing to generate test data to avoid generating invalid data in the abnormal state.

[0027] After the test task is completed, the host computer actively sends a collaborative termination command. After receiving the collaborative termination command, the slave computer stops generating periodic messages, completes the test data archiving, and returns a termination confirmation message to the host computer. After receiving the termination confirmation message, the host computer stops the verification and periodic dynamic monitoring actions, and the host computer and slave computer disconnect the Ethernet connection.

[0028] In summary, this embodiment determines the message transmission protocol, message header format, verification rules, and timing identifier generation rules between the host computer and the slave computer through collaborative parameter initialization, ensuring that the slave computer's hard real-time fixed cycle, cycle number, timing identifier, and synchronous monotonic time are recorded by the host computer at the start of the test. Through closed-loop handshake and verification, the slave computer triggers the next hard real-time fixed cycle based on the response message returned by the host computer. The host computer does not set its own operating cycle, but only performs verification on the slave computer's message header and message body. Dynamic monitoring of the cycle duration is used to track the actual cycle duration of the slave computer. Statistical analysis is performed to calculate the periodic interval jitter entropy and the coordination mismatch index, and the response sending time is corrected. In case of communication interruption, continuous verification failure, or mismatch exceeding the threshold, the test site is preserved and the lower-level machine is notified to exit. The test process is completed by coordination termination and link disconnection. Without relying on external clock synchronization equipment or modifying the lower-level machine's internal hard real-time scheduling program, the data interaction between the upper-level machine and the lower-level machine is triggered by the upper-level machine's passive closed-loop response, and the test data and the lower-level machine's running time are completed within the same hard real-time fixed period.

[0029] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for periodic monitoring and anomaly handling of upper and lower computer systems in rail transit platform testing, characterized in that, The specific steps of this method are as follows: The coordination parameters are initialized, the host computer and the slave computer establish a communication link, the slave computer sends an initial message to the host computer carrying the hard real-time fixed period, period number, timing identifier and synchronous monotonic time, the host computer records the hard real-time fixed period and period number, and agrees on coordination rules with the slave computer; Closed-loop handshake and verification: The lower-level machine generates a periodic message carrying a message header and a message body according to the hard real-time fixed cycle and sends it to the upper-level machine. After receiving the periodic message, the upper-level machine performs the first round of verification on the message header and the second round of verification on the message body. After the two rounds of verification are passed, the lower-level machine returns a response message carrying verification confirmation information and the next round of test control data. The lower-level machine triggers the next hard real-time fixed cycle according to the response message. Periodic dynamic monitoring: The host computer parses the period number and timing identifier in the message header, calculates the actual period interval using synchronous monotonic time and compares it with the hard real-time fixed period, calculates the period monitoring index, and corrects the response sending time based on the period monitoring index. Anomaly detection and handling: When the host computer fails to receive periodic messages continuously, fails to verify continuously, or the actual period interval exceeds the threshold, the periodic cycle is terminated and the period number, timing identifier, and test data returned by the lower computer at the time of the anomaly are recorded locally. Collaboration termination and link disconnection: The host computer issues a collaboration termination command, the slave computer stops generating the cycle message, archives the test data and returns a termination confirmation message, and then disconnects the communication link.

2. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 1, characterized in that, In the initialization of the coordination parameters, the lower-level machine reads the hard real-time fixed period from its own hard real-time scheduler, generates the current period number and timing identifier, and obtains the synchronous monotonic time inside the lower-level machine. The lower-level machine embeds the hard real-time fixed period, period number, timing identifier, and synchronous monotonic time into the initial message and sends it to the upper-level machine via the communication link. The upper-level machine receives and parses the initial message, and records the hard real-time fixed period and period number. The upper-level machine and the lower-level machine agree on coordination rules in the interaction of the initial message, including message transmission protocol, message header format, verification rules, and timing identifier generation rules.

3. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 2, characterized in that, In the initialization of the collaborative parameters, the message header format is defined as a fixed-length field added in addition to the application message. The message header includes a period number field, a timing identifier field, a synchronous monotonic time field, a hard real-time fixed period field, a message sending time field, a message number field, and a checksum field. The timing identifier generation rule stipulates that the timing identifier is generated by the lower-level machine using an incrementing sequence number method. The period number is bound to the hard real-time fixed period of the lower-level machine, and the period number increments once after each hard real-time fixed period. The timing identifier increments by one every hard real-time fixed period from the initial period. The checksum rule stipulates that the synchronous monotonic time is the monotonic clock inside the lower-level machine. The upper-level machine does not set its own running period or maintain its own period number during the test.

4. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 1, characterized in that, In the closed-loop handshake and verification process, after the lower-level machine enters periodic operation, after each hard real-time fixed cycle, the application program executing the test logic in the lower-level machine generates a periodic message. The message body carries the test data collected by the lower-level machine in the current hard real-time fixed cycle, including operating status quantities, safety output status, and sensor data. The lower-level machine embeds the current cycle number, the time sequence identifier generated according to the incrementing rule, the current synchronization monotonic time, and cycle association information in the message header according to the agreed message header format. The cycle association information includes the hard real-time fixed cycle and the message sending time. After the lower-level machine completes message assembly, it stops generating subsequent messages and enters a waiting response state, sending periodic messages to the upper-level machine via the communication link.

5. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 1, characterized in that, In the closed-loop handshake and verification process, after the host computer passively receives the periodic message, it does not immediately return a response. Instead, it parses the message header and performs the first round of verification. The first round of verification includes: verifying whether the length and offset of each field in the message header are complete; verifying whether the period number increments as expected; verifying whether the timing identifier is incremented by one from the timing identifier of the previous periodic message; verifying whether the synchronization monotonic time is greater than the synchronization monotonic time of the previous periodic message, and whether the deviation between the single-period increment and the hard real-time fixed period falls within the allowable range; and verifying the message number and the cyclic redundancy check value. If any verification fails, the host computer does not return a response message.

6. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 5, characterized in that, In the closed-loop handshake and verification process, after the first round of verification passes, the host computer performs business-level verification on the running status variables, safety output status, and sensor data in the message body according to the pre-configured test cases, and the test cases are lower-level functional test items. When both rounds of verification pass, the host computer generates a response message carrying verification confirmation information and sends the next round of test control data to the lower-level computer along with the response message via the communication link. The next round of test control data includes the lower-level computer's running configuration data and the input data that triggers the lower-level computer's actions. After receiving the response message, the lower-level computer's hard real-time scheduler advances to the next hard real-time fixed cycle, and the lower-level computer starts a timeout countdown within the current hard real-time fixed cycle. If no response message is received within a hard real-time fixed cycle, the current cycle message is retransmitted within the current hard real-time fixed cycle.

7. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 1, characterized in that, In the aforementioned periodic dynamic monitoring, when the host computer receives each periodic message, it extracts the synchronization monotonic time of the current periodic message from the message header, subtracts the synchronization monotonic time of the current periodic message from the synchronization monotonic time of the previous periodic message, and obtains the current actual period interval; the host computer then takes continuous... The actual period intervals of each period constitute an interval sequence, which will be used to fix the hard real-time period. Both sides according to the preset tolerance ratio Divided into equal parts The number of sub-intervals, where each actual periodic interval in the statistical interval sequence falls within the [number]th sub-interval, [number] sub-intervals. Frequency of each sub-interval The periodic jitter entropy is calculated using the periodic interval jitter entropy calculation formula. Periodic interval jitter entropy is one of the periodic monitoring indicators. The formula for calculating periodic interval jitter entropy is as follows: ,in, To count the number of periods within the statistical window, To preset the tolerance ratio, For subinterval numbers, For statistics window The actual period interval falls into the first The frequency of each sub-interval The periodic jitter entropy.

8. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 7, characterized in that, In the aforementioned periodic dynamic monitoring, the host computer compares the current actual period interval with the hard real-time fixed period. Simultaneously, it combines the difference between the period number in the current period message and the period number in the previous period message, and the difference between the time sequence identifier in the current period message and the time sequence identifier in the previous period message, to calculate the coordination mismatch index using a multi-dimensional coordination mismatch calculation formula. The coordination mismatch index is one of the periodic monitoring indicators. The multi-dimensional coordination mismatch calculation formula is as follows: ,in, The period number in the current period message. The period number is from the previous periodic message. This is the time sequence identifier in the current period message. This is the time sequence identifier from the previous periodic message. This is the current actual cycle interval. For hard real-time fixed period, This is the amplification factor for the relative deviation of the period interval. This is the coordination mismatch index.

9. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 8, characterized in that, In the aforementioned periodic dynamic monitoring, the host computer calculates the coordination mismatch index based on the previous period. The periodic interval jitter entropy is used to correct the current response sending time using the closed-loop response time correction calculation formula set, resulting in the corrected response sending time. The host computer then sends the response message to the slave computer according to the corrected response sending time. The closed-loop response time correction calculation formula set is as follows: ,in, For correction amount, For correction factor, This represents the coordination mismatch index for the previous period. The threshold for coordination mismatch, For hard real-time fixed period, This is the jitter enhancement factor. For periodic jitter entropy, For subinterval numbers, The corrected response sending time. This refers to the moment when the host computer receives the message of the current period.

10. The method for periodic monitoring and anomaly handling of a rail transit platform test by upper and lower computers according to claim 1, characterized in that, In the aforementioned anomaly detection and handling, the following situations occur: the host computer fails to receive a periodic message within several consecutive hard real-time fixed periods; the host computer fails to verify the period number, timing identifier, or synchronous monotonic time consecutively; or the host computer calculates a coordination mismatch index. Exceeding the coordination mismatch threshold When any abnormal situation occurs, the host computer determines it to be a coordination abnormality, and stops generating and sending response messages. It saves the period number, timing identifier, synchronous monotonic time and test data returned by the lower computer at the time of the abnormality to disk, and notifies the lower computer application to exit the current operation through the notification channel.