Dual-network collaborative event sequence automatic testing method and device and storage medium
By employing a dual-network collaborative event sequence automated testing method in industrial control systems, the problems of dependence on host computer software and inconsistent network time bases are solved, achieving efficient and reliable SOE testing and ensuring the continuity of testing and the accuracy of results.
Patent Information
- Application Number
- CN202511449485.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-02-10
AI Technical Summary
The SOE testing of existing industrial control systems is highly dependent on the host computer software. Version compatibility issues can easily lead to process interruptions. Tools and modules lack unified arrangement, making it difficult to perform two-level network data consistency verification. Redundancy judgment lacks rules, resulting in low testing efficiency and insufficient reproducibility.
An automated test method for event sequence is adopted through dual-network collaboration. Multi-channel pulse sequences are driven by signal control interface to generate trigger identifiers as time bases. Logs and messages are collected on the secondary backplane bus and primary communication network side to establish a unified time base, correct time offset and drift, generate event sequences and perform consistency comparison, calculate delay and redundancy pairing, and generate structured test results.
It achieves end-to-end automated testing, unified time base alignment, dual network consistency verification, redundant request and response quantization, and millisecond-level event resolution, ensuring the continuity of the testing process and the structured output of results.
Smart Images

Figure CN121500925A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation control system testing technology, and in particular to a dual-network collaborative event sequence automated testing method, apparatus and storage medium. Background Technology
[0002] In industrial control systems (power, rail transportation, etc.), SOE (Sequence of Event) is used to time-calibrate and sequentially record switching quantities and state changes, serving as a crucial basis for fault location and integrated debugging. Current SOE testing often employs distributed tools and manual processes: during the signal triggering phase, pulses are manually output using a dedicated signal generator; during the data acquisition phase, serial port debugging tools are used to capture secondary network logs, and network analyzers are used to capture primary network packets; during the data analysis phase, event sequences are manually compared, resolution and time-scale accuracy are manually calculated, and redundancy of the master station is visually checked; finally, a report is manually compiled and conclusions are given.
[0003] The existing implementation methods described above have the following problems: high dependence on host computer software and manual operation; version and compatibility issues easily lead to process interruptions; tools and modules lack unified orchestration and time base alignment, making it difficult to perform two-level network data consistency verification; redundancy judgment lacks rule-based pairing and latency quantification; test cases and thresholds are managed in a decentralized manner, resulting in high reuse and regression costs, and insufficient overall efficiency and reproducibility. The root cause lies in the host computer center's architectural concept and fragmented module development, failing to form an end-to-end automated and standardized testing system. Summary of the Invention
[0004] In view of this, embodiments of this application provide an automated testing method, apparatus and storage medium for event sequence based on dual-network collaboration, in order to solve the problems of single-point dependence of the host computer, inconsistent time bases of the two-level networks leading to difficulty in consistency verification, lack of requests for redundancy determination and response quantification in the prior art.
[0005] A first aspect of this application provides an automated testing method for event sequence in a dual-network collaborative manner, comprising: driving a multi-channel pulse sequence through a signal control interface according to preset parameters, and generating a trigger identifier associated with the first pulse as a time base; collecting slave logs on the secondary backplane bus side and collecting communication messages on the primary communication network side, adding time information and source identifiers to the collected records, and establishing an association with the trigger identifier; establishing a unified time base based on the trigger identifier, correcting the time offset and time drift between the primary communication network and the secondary backplane bus, standardizing the collected records into event records according to a unified data model, and generating a primary event sequence and a secondary event sequence. The test involves: comparing the first-level and second-level event sequences under a unified time base to obtain consistency comparison results; calculating the interval between adjacent events based on the continuous jump records of each channel and comparing it with the expected interval to obtain time stamp accuracy verification results; calculating event resolution results according to both simultaneous triggering and interval triggering methods; extracting event-related request and response messages from the first-level communication network, pairing them according to source address and sequence number, calculating the latency between requests and responses, and statistically analyzing the pairing rate to obtain redundancy pairing statistics; and generating structured test results based on the consistency comparison results, event resolution results, time stamp accuracy verification results, and redundancy pairing statistics.
[0006] A second aspect of this application provides an automated event sequence testing device with dual-network collaboration, comprising: a driving module, configured to drive a multi-channel pulse sequence through a signal control interface according to preset parameters, and generate a trigger identifier associated with the first pulse as a time base; an association module, configured to collect slave logs on the secondary backplane bus side and communication messages on the primary communication network side, add time information and source identifier to the collected records, and establish an association with the trigger identifier; and a correction module, configured to establish a unified time base based on the trigger identifier, correct the time offset and time drift between the primary communication network and the secondary backplane bus, standardize the collected records into event records according to a unified data model, and generate a primary event sequence and a secondary event sequence; and compare... The system comprises four modules: a consistency comparison module for primary and secondary event sequences under a unified time base, and a calculation module for calculating the interval between adjacent events based on continuous transition records of each channel and comparing it with the expected interval to obtain the time-stamp accuracy verification result, and calculating the event resolution result according to both simultaneous triggering and interval triggering methods; a pairing module for extracting event-related request and response messages from the primary communication network, pairing them according to source address and sequence number, calculating the latency between requests and responses, and statistically analyzing the pairing rate to obtain the redundancy pairing statistics result; and a generation module for generating structured test results based on the consistency comparison result, event resolution result, time-stamp accuracy verification result, and redundancy pairing statistics result.
[0007] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0008] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0009] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: A multi-channel pulse sequence is driven via a signal control interface according to preset parameters, and a trigger identifier associated with the first pulse is generated as a time base. Slave logs are collected on the secondary backplane bus side, and communication messages are collected on the primary communication network side. Time information and source identifiers are added to the collected records and associated with the trigger identifier. A unified time base is established based on the trigger identifier, and the time offset and time drift between the primary communication network and the secondary backplane bus are corrected. The collected records are standardized into event records according to a unified data model, generating primary and secondary event sequences. Under the unified time base, the primary event sequences and secondary event sequences are compared. The system performs consistency comparison on the sequence of events at each level to obtain the consistency comparison result. Based on the continuous jump records of each channel, it calculates the interval between adjacent events and compares it with the expected interval to obtain the time stamp accuracy verification result. It also calculates the event resolution result according to both simultaneous triggering and interval triggering methods. The system extracts event-related request and response messages from the primary communication network, pairs them according to source address and sequence number, calculates the latency between requests and responses, and statistically analyzes the pairing rate to obtain the redundancy pairing statistics result. Finally, it generates structured test results based on the consistency comparison result, event resolution result, time stamp accuracy verification result, and redundancy pairing statistics result. This application enables end-to-end automated testing, unified time base alignment, dual-network consistency verification, redundant requests, response quantization, and millisecond-level event resolution. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the overall architecture of the SOE automated testing system provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the automated testing method for event sequence using dual-network collaboration provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of the dual-network collaborative event sequence automated testing device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0012] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0013] In industrial control systems, the Sequence of Events (SOE) function records the sequence and timing of events, serving as a crucial basis for fault analysis and system debugging. Its accuracy and reliability directly impact the stability of system operation. Traditional SOE testing methods include: 1) Signal triggering phase: Manually trigger a dedicated signal generator to produce a pulse sequence.
[0014] 2) Data Acquisition Phase: Manually connect a serial port debugging tool to capture secondary network logs.
[0015] Use a network analyzer to capture primary network packets.
[0016] 3) Data Analysis Phase: Manually compare network logs with expected signal sequences.
[0017] Manually calculate event resolution and timescale accuracy metrics.
[0018] Visually inspect the redundant communication status of the main station.
[0019] 4) Result determination stage: Test reports are compiled manually and conclusions are submitted.
[0020] However, the aforementioned prior art has the following drawbacks: 1. Over-reliance on host computer software: This reliance limits the testing process to the functionality and stability of the host computer software. If the host computer software malfunctions, experiences compatibility issues, or version updates cause incompatibility, the entire testing process cannot proceed normally, severely impacting the continuity and reliability of the tests.
[0021] 2. Excessive Manual Intervention: From setting test parameters and starting the test process to analyzing test data, a large amount of manual operation not only consumes time and manpower but is also prone to inaccurate test results due to human error. For example, during data comparison, manually comparing a large amount of data can easily miss differences, making it impossible to accurately determine the correctness of the SOE function.
[0022] 3. Lack of unified management: The lack of effective unified management among various testing tools and functional modules makes the testing process cumbersome and complex. Operating different modules requires testers to possess different skills and knowledge, increasing the difficulty of testing and the possibility of errors. Furthermore, this decentralized management approach hinders the automation and standardization of the testing process, making it difficult to adapt to the needs of large-scale, high-efficiency testing.
[0023] 4. Low testing efficiency: Considering the above factors, the testing process of existing technologies is lengthy, requiring a lot of time from test preparation to final conclusions, which cannot meet the requirements of timely and efficient testing of SOE functions in the rapid iterative product development cycle.
[0024] The root cause of the above problems is: 1. Limitations of traditional test architecture design concepts: Previous test architecture designs mainly revolved around the host computer software, treating it as the core control and data processing center of the test, neglecting the improvement of the independence, autonomy and automation capabilities of the test system, resulting in excessive dependence on the host computer software.
[0025] 2. Insufficient consideration of the continuity and automation requirements of the testing process: When designing functional modules, each module was developed separately for specific testing stages. There was a lack of systematic planning for the entire testing process from start to finish, and no unified management and scheduling mechanism was established, resulting in a fragmented testing process and frequent manual intervention.
[0026] 3. Insufficient trade-off between testing efficiency and accuracy: In pursuing the implementation of test functions, the relationship between testing efficiency and accuracy was not fully balanced. While relying too much on manual operation can ensure control over test details to a certain extent, it sacrifices testing efficiency and cannot completely avoid the impact of human error on test accuracy.
[0027] In view of the problems existing in the prior art, this application provides an automated testing method based on a self-developed SOE bus. The purpose of this application is to solve the four core problems of SOE functional testing in industrial control systems: strong dependence, low efficiency, poor accuracy, and incomplete coverage. This will enable fully automated testing (from signal triggering to result push), millisecond-level event detection accuracy (resolution ≤ 1ms), two-level network data consistency verification, and automatic determination of master station redundancy reliability.
[0028] This application belongs to the field of industrial automation control system testing technology, specifically involving an SOE automated testing method and system based on a self-developed two-level bus architecture (HolliNet, a real-time communication system based on gigabit Ethernet, referred to as the first-level network, and HolliBus, a real-time backplane bus based on 100Mbps LVDS, referred to as the second-level network). It is particularly suitable for industrial control scenarios such as power systems and rail transit where high accuracy in recording the sequence of events is required.
[0029] Figure 1 This is a schematic diagram of the overall architecture of the SOE automated testing system provided in the embodiments of this application, as shown below. Figure 1 As shown, the SOE automated testing system of this application adopts a three-layer core design, specifically including: The central control layer is hosted by a self-developed testing tool platform, which includes a built-in test scheduling engine, Python script executor, and report generation module. The functional execution layer comprises a signal control subsystem and a network analysis subsystem, used to execute commands, drive hardware, and collect data from both networks. The input / output layer consists of HolliBus secondary backplane bus devices and HolliNet primary communication network devices on the input side, and a result push subsystem on the output side, sending reports to users via email or SMS.
[0030] The workflow unfolds in a closed loop: "Orchestration → Triggering → Acquisition → Standardization → Analysis → Reporting → Push". First, the test scheduling engine loads test cases and thresholds, generates batch-level configurations, and issues two types of control flows. One type is a control command, directed to the signal control subsystem, used to drive physical signals according to the number of channels, number of events, pulse high / low level duration, and trigger mode, and generate a trigger identifier on the first rising edge. The other type is a monitoring command, directed to the network analysis subsystem, requiring it to enter a ready state before batch startup and apply protocol filtering rules to ensure that the first batch of events is not missed.
[0031] The signal control subsystem compiles pulse sequence templates based on control commands and drives the physical input of the device under test (DUT). During the output process, it records the measured time of each rising and falling edge and generates trigger identifiers, which are then synchronously reported to the central control layer. The network analysis subsystem consists of two paths: a secondary network analysis path and a primary network analysis path. The secondary network analysis path subscribes to slave logs through the backplane diagnostic channel, extracts log records carrying SOE fields, and appends a local acquisition timestamp and source domain identifier. The primary network analysis path captures communication packets of the protocol under test, extracts the channel, event sequence number, status value, and packet sequence number, and appends a local acquisition timestamp and source domain identifier. Both acquisition paths receive trigger identifiers in batches for subsequent establishment of a unified time base.
[0032] The Python script executor performs three types of analysis tasks under the task scheduling of the scheduling engine. First, time base establishment and standardization. Using the trigger identifier as an anchor point, the first relevant acquisition record is located in both source domains. The initial time offset is calculated, and the time drift rate is fitted within a preset time window. Piecewise linear correction is performed on the acquisition timestamps of the two source domains to form a unified time base. Subsequently, the corrected acquisition records are mapped to event records according to a unified data model, and first-level and second-level event sequences are generated by sorting them separately. Second, consistency comparison and anomaly archiving. The two sequences are first checked for the number of records, then matched item by item using the channel and event sequence number as matching keys, combined with status bits. A matching set is formed within the time difference threshold. Unmatched and threshold-crossing entries are classified as missing, duplicate, out of order, or threshold-crossing, and a difference list is generated. Third, index calculation and redundancy pairing. Based on the continuous jump records of each channel, the relationship between the measured interval and the expected interval is calculated to obtain the time-scale accuracy verification result; the event resolution is calculated under both synchronization and interval calibers. Simultaneously, request and response messages are extracted from the primary communication network, paired one-to-one according to source address and sequence number, and the request-response latency is calculated. The pairing rate and latency distribution are then statistically analyzed to generate redundancy pairing statistics. The execution logs, standardized data, and anomaly reports of the above tasks are all fed back to the report generation module.
[0033] The report generation module receives the analysis results and evidence index, and generates structured test reports in batches. Each report includes at least unified time base parameters, consistency comparison results, event resolution results, timescale accuracy verification results, and redundancy pairing statistics, and provides original data references for discrepancies to support traceability. The test scheduling engine sends push instructions to the results push subsystem, which then sends emails or SMS messages to users through preset channels, achieving closed-loop report delivery.
[0034] Through the above architecture and process, the system completes end-to-end automation of "signal triggering, dual-network acquisition, time base normalization, consistency comparison, index calculation, report generation, and result push" under a unified central arrangement. It realizes synchronous processing and traceable management of HolliBus and HolliNet dual-network data, ensuring the continuity of the testing process, consistency of standards, and structured output of results.
[0035] The technical solution of this application will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0036] Figure 2 This is a flowchart illustrating the automated testing method for event sequence using dual-network collaboration provided in an embodiment of this application. Figure 2 As shown, this dual-network collaborative event sequence automated testing method may specifically include: S201, according to preset parameters, drives a multi-channel pulse sequence through a signal control interface, and generates a trigger identifier associated with the first pulse as a time reference; S202 collects slave station logs on the secondary backplane bus side and communication messages on the primary communication network side, adds time information and source identifier to the collected records, and establishes an association with the trigger identifier; S203 establishes a unified time base based on the trigger identifier, corrects the time offset and time drift between the primary communication network and the secondary backplane bus, standardizes the collected records into event records according to the unified data model, and generates primary event sequences and secondary event sequences. S204, Under a unified time base, perform a consistency comparison between the first-level event sequence and the second-level event sequence to obtain the consistency comparison result; S205 calculates the interval between adjacent events based on the continuous jump records of each channel and compares it with the expected interval to obtain the time stamp accuracy verification result, and calculates the event resolution result according to two methods: simultaneous triggering and interval triggering. S206: Extract the event-related request and response messages from the primary communication network, pair them according to the source address and sequence number, calculate the latency between the request and response, and calculate the pairing rate to obtain the redundancy pairing statistics. S207 generates structured test results based on consistency comparison results, event resolution results, timescale accuracy verification results, and redundancy pairing statistics results.
[0037] In some embodiments, a multi-channel pulse sequence is driven via a signal control interface according to preset parameters, and a trigger identifier associated with the first pulse is generated as a time reference, including: An instruction set is formed based on preset parameters, which include the number of channels, the number of events per channel, the pulse high-level time and low-level time, and the trigger mode identifier. The instruction set is sent to the signal control interface, a pulse sequence template is established for each channel, and pulse output is generated in each channel according to the triggering mode; At the start of pulse output, the edge of the first pulse is calibrated to generate a trigger identifier.
[0038] Specifically, the test scheduling engine reads preset parameters from the test case library and forms an instruction set. The preset parameters include the number of channels, the number of events per channel, the pulse high-level time, the pulse low-level time, and the trigger mode identifier. The number of channels is used to limit the range of physical input ports to be driven and corresponds one-to-one with the channel mapping relationship of the device under test; the number of events per channel is used to determine the number of pulse pairs that each channel needs to generate in a single test batch; the pulse high-level time and pulse low-level time are used to constrain the duty cycle and cycle length of a single cycle; the trigger mode identifier is used to indicate the timing organization method of the pulses on each channel, including synchronous trigger mode and interval trigger mode.
[0039] In this embodiment, the test scheduling engine structurally encapsulates the instruction set according to preset parameters. The instruction set includes at least a batch identifier, a channel list, the number of events for each channel, the high-level and low-level times for each channel, a trigger mode identifier, and timing reference requirements. To ensure subsequent time base consistency, the instruction set carries a time base type field, which indicates the local clock source and timing accuracy level referenced by the signal control interface when generating pulses. The test scheduling engine performs consistency verification on the instruction set. Verification items include matching the channel list with the terminal block table of the device under test, boundary value checks of the number of events and pulse parameters, and feasibility checks between the trigger mode and the number of channels. After successful verification, the instruction set is sent to the signal control interface.
[0040] Furthermore, after receiving the instruction set, the signal control interface establishes pulse sequence templates for each channel. The pulse sequence template describes the target level timing of a channel within a test batch. The template fields include at least the channel identifier, event number, the planned rising and falling edge times for each event, and the relative displacement related to the trigger mode. In synchronous trigger mode, the planned rising edge time for each channel template is the same, and the planned rising and falling edge times for subsequent events are equidistant according to a unified high-level and low-level time rule. In interval trigger mode, the planned rising edge time for each channel template is calculated by adding a fixed interval based on the channel number or by step offsetting the relative displacement in the instruction set. The planned rising and falling edge times for adjacent events within the same channel are still calculated based on the high-level and low-level times. To reduce the impact of level jitter and glitches on edge recognition, the signal control interface generates a debouncing timing window and an effective edge holding duration for each edge during the template compilation stage, and stores them along with the template for use during the execution stage.
[0041] Furthermore, during the pulse output execution phase, the signal control interface drives the physical output channel by channel according to the pulse sequence template. To ensure correlation with subsequent acquisition and recording, the signal control interface performs a self-check and offset reading of the local clock before outputting, and fixes it as the local reference time for this batch. When the planned time of the first rising edge defined by the template is reached, the signal control interface applies a high level to the corresponding channel, and then enters the edge hold timing; after the edge hold expires and passes the jitter detection, the actual occurrence time of the rising edge is recorded as the measured time of the first edge, and a standardized timestamp is generated for this moment according to the time base type in the instruction set. To avoid slight deviations in the first rising edge of different channels in synchronous trigger mode, the signal control interface uniformly triggers a hardware-level start signal before executing the first rising edge, and submits level switching requests for multiple channels within the same clock cycle of the hardware timing unit.
[0042] Furthermore, at the start of pulse output, the signal control interface is calibrated based on the measured time of the first rising edge, generating a trigger identifier. The trigger identifier includes a batch identifier, trigger channel identifier, first edge type, a standardized timestamp of the first edge's measured time, and the source domain identifier of the signal control interface. To facilitate the subsequent establishment of a unified time base between the primary communication network and the secondary backplane bus, the trigger identifier also carries a summary of the conversion relationship between the local reference time and the standardized timestamp, used to support the estimation of cross-domain time offset and time drift. Immediately after generation, the trigger identifier is submitted to the central control layer via an internal message channel and registered as the time anchor point for that batch in the acquisition agent of the function execution layer.
[0043] In this embodiment, to ensure the traceability of the trigger identifier and subsequent event sequence, the signal control interface records the measured time of each rising and falling edge during the entire pulse output process and stores it in correspondence with the event number. When an output interruption occurs due to hardware protection mechanism, level establishment delay due to external load change, or edge delay due to resource arbitration, the signal control interface writes the event number of the abnormal cause and its impact into the abnormal record list, and reports it together with the trigger identifier and edge measured time at the end of the batch.
[0044] In this way, the trigger identifier can serve as the time anchor point for establishing a unified time base and comparing consistency between the two networks, and it has a deterministic correlation with the channel, event number, and edge type, thereby supporting the batch association and time normalization processing of the collected records.
[0045] In some embodiments, slave logs are collected on the secondary backplane bus side, and communication messages are collected on the primary communication network side. Time information and source identifiers are added to the collected records, and an association is established with a trigger identifier, including: The slave station log records are obtained by the acquisition agent on the secondary backplane bus side, and a local acquisition timestamp and source domain identifier are added to the slave station log records; The acquisition agent on the primary communication network side obtains communication message records, adds a local acquisition timestamp and source domain identifier to the communication message records, and records the sequence number or event number provided by the protocol. Based on a unified data model, slave log records and communication message records are organized into collection records, and the collection records are associated by batch and time window using trigger identifiers as anchor points.
[0046] Specifically, the function execution layer sets up a secondary backplane bus-side acquisition agent and a primary communication network-side acquisition agent, and registers batch identifiers and trigger identifiers at the central control layer. The trigger identifier is generated and reported by the signal control interface at the measured moment of the first rising edge, and includes the batch identifier, trigger channel, edge type, standardized timestamp, and source domain identifier. After receiving the batch start command, the acquisition agent enters a synchronous standby state to ensure that it is available before and after the trigger identifier is generated to cover the first batch of events.
[0047] On the secondary backplane bus side, the acquisition agent subscribes to the operation logs output by the slave stations through the backplane diagnostic channel, and filters log lines containing event sequence record fields in batches. A local acquisition timestamp and source domain identifier are appended to each slave station log record, while retaining the device identifier, channel number, event sequence number, status bit, and original line number. To reduce the impact of time drift caused by asynchronous writes, the acquisition agent uses a monotonic timing source to record the acquisition timestamp and writes the time sequence number of the same batch when the log buffer is refreshed, ensuring that log entries within the same batch can be stably sorted according to the acquisition order. When a missing log line, duplicate line, or time rollback is detected, the exception type and corresponding log line number are registered in the exception list.
[0048] On the primary communication network side, the acquisition agent captures communication message records related to the event sequence record using the filtering conditions of the protocol under test. It parses and extracts the channel number, event sequence number, status bits, message sequence number, and event time field from the payload. Simultaneously, it appends a local acquisition timestamp and source domain identifier to each communication message record. To ensure frame-level integrity, the acquisition agent employs a hardware ring buffer and segment reassembly strategy when network load is high, ensuring that cross-segment messages are reassembled before entering the parsing process. Communication message records that fail to parse, have sequence number jumps, or have payload verification errors are also registered in the exception list.
[0049] In this embodiment, the two acquisition agents organize slave log records and communication message records into acquisition records according to a unified data model. The acquisition records include batch identifier, source domain identifier, device identifier, channel number, event sequence number, status bit, acquisition timestamp, raw data reference, and parsing status flag. The unified data model constrains field names, value ranges, and time formats to ensure that acquisition records from the secondary backplane bus and the primary communication network can be processed uniformly in subsequent processes.
[0050] When establishing the association with the trigger identifier, the central control layer uses the standardized timestamp of the trigger identifier as the anchor point and merges the acquired records according to batches and time windows. The time window is given by the batch configuration file and is used to limit the range of starting events related to the first rising edge. During the merging process, the acquired records are first filtered by the batch identifier, then candidate sets are established according to the source domain identifier, and then preliminary sorting is performed within the source by the acquisition timestamp and event sequence number. For the first acquired record in the same channel that meets the time window condition, it is marked as a trigger neighbor item and a one-to-one association is established with the trigger identifier; if multiple candidates appear in the same time window, the smallest time difference is given priority and the consistency of the event sequence number is used as a secondary constraint. Unselected candidates are marked as ambiguous items to be resolved and the original data reference is retained. After merging is completed, a set of acquired records with association tags is output for use in establishing a unified time base and subsequent consistency comparison.
[0051] Through the above implementation method, the raw data from the secondary backplane bus side and the primary communication network side are extracted in a standardized manner, and the time labeling and source identification are uniformly processed. The batch and time window association is completed with the trigger identifier as the anchor point, forming an input set that can be used for subsequent time offset and time drift correction, realizing traceable acquisition path, consistent field caliber, and orderly connection of cross-domain data.
[0052] In some embodiments, a unified time base is established based on the trigger identifier to correct the time offset and time drift between the primary communication network and the secondary backplane bus. The collected records are standardized into event records according to a unified data model, generating primary event sequences and secondary event sequences, including: The first corresponding acquisition record is located in the primary communication network and the secondary backplane bus respectively by the trigger identifier, and the initial time offset of the corresponding acquisition record is calculated. Within a preset time window, the time drift rate is calculated based on the time difference of the corresponding acquisition records, and the offset and drift rate parameters used for correction are obtained. The timestamps of each collected record are corrected according to the offset and drift rate parameters to obtain the corrected timestamps; The corrected collection records are mapped to event records according to the unified data model, and then aggregated according to the source domain identifier and sorted by the corrected timestamp and sequence number to generate a first-level event sequence and a second-level event sequence.
[0053] Specifically, after receiving the trigger flag, the central control layer initiates the time base establishment process. First, in the associated acquisition records of the primary communication network and the secondary backplane bus, using the standardized timestamp of the trigger flag as the retrieval anchor point, the first acquisition record within each source domain closest to that timestamp is located, and its acquisition time is recorded as the first record time of the source domain. The initial time offset is obtained by subtracting the first record time of the secondary backplane bus from the first record time of the primary communication network. This initial time offset is used to characterize the time difference between the two source domains at the first relevant event.
[0054] Furthermore, corresponding acquisition record pairs from two source domains are selected within a preset time window. Matching is performed using a consistency rule based on channel and event sequence number. If multiple candidates exist within the same time window, the pair with the smallest time difference from the trigger identifier is prioritized, with equal event sequence number as a secondary constraint. For each pair of matched records, its time difference sequence is calculated, and the time drift rate parameter is estimated based on the trend of time difference changes with acquisition time. The time drift rate parameter is obtained through piecewise linear approximation within the preset time window, with each segment generating a set of offset and drift rate parameters. If abnormal segments are found, such as abrupt changes in time difference or record loss across segments, the abnormal segments are removed from the fitted set, and the corresponding channel and event sequence number range is registered in the anomaly list.
[0055] Furthermore, after obtaining the offset and drift rate parameters, timestamp correction is performed on all acquisition records of the primary communication network and the secondary backplane bus. For any acquisition record, the relative duration of its acquisition time to the trigger flag time is used as the independent variable, and the original acquisition time is corrected according to the offset and drift rate parameters of the corresponding segment to obtain the corrected timestamp. To ensure continuity across segments, parameters are smoothly connected at the boundaries of adjacent segments. If there is a small amount of overlapping records near the boundary, interpolation correction is performed using a transition coefficient with decreasing weights. After correction, all acquisition records are given the corrected timestamp while retaining the original acquisition time for traceability.
[0056] Furthermore, based on a unified data model, the corrected acquisition records are mapped to event records. Each event record includes a batch identifier, source domain identifier, device identifier, channel number, event sequence number, status bit, corrected timestamp, original data reference, and correction segment number. Event records originating from a primary communication network and those originating from a secondary backplane bus are aggregated separately. They are first sorted by corrected timestamp, then stably sorted by event sequence number within the same timestamp range. If necessary, the device identifier and channel number are used as a third sorting key to handle concurrency boundary cases. After sorting, primary and secondary event sequences are formed, and sequence boundary indexes are output to support subsequent line-by-line matching and window retrieval.
[0057] In this embodiment, the initial time offset and time drift rate estimation across domains are completed by using the trigger identifier as a unified anchor point. The records collected from the two source domains are then subjected to piecewise linear time correction and standardized into unified event records. Finally, a time-consistent first-level event sequence and a second-level event sequence are generated, thereby providing a unified time base and traceable data input for subsequent consistency comparison and timescale accuracy verification.
[0058] In some embodiments, consistency comparison is performed between the first-level event sequence and the second-level event sequence under a unified time base to obtain consistency comparison results, including: Verify the total number of events in the first-level event sequence and the second-level event sequence; Using the channel and sequence number as the matching key and combined with the state, the events in the first-level event sequence are matched item by item with the corresponding events in the second-level event sequence within a preset time difference threshold to obtain a matching set; Events that do not enter the matching set or whose time difference exceeds the time difference threshold are marked with differences, and consistency comparison results are generated according to missing, duplicate, out-of-order and threshold-crossing categories.
[0059] Specifically, after establishing a unified time base and standardizing event records, the central control layer obtains primary and secondary event sequences. Both sequences are ordered primarily by the corrected timestamp and secondarily by the event sequence number, and the sequence metadata contains batch identifier, source domain identifier, device identifier, channel number, event sequence number, and status bit. To conduct consistency comparison, the test scheduling engine first reads the time difference threshold and matching window parameters according to the batch configuration, and loads the boundary indexes of the two sequences into the comparison buffer.
[0060] Furthermore, during the total event count verification phase, the central control layer counts the number of events in the first-level event sequence and the second-level event sequence in batches, and outputs the difference in the number of events and the percentage of the difference. To avoid statistical bias caused by abnormal removal or duplicate records, the count is based on the deduplicated event key, which consists of the channel number and the event sequence number. When multiple records with the same event key are detected in the same source domain, only the record with the timestamp closest to the center of the trigger identifier time window is retained as the baseline entry, and the remaining records are marked as duplicate candidates and enter the difference labeling queue.
[0061] Furthermore, in the item-by-item matching stage, the comparison engine uses the channel number and event sequence number as the primary matching key, combined with the consistency of the status bits as a prerequisite for matching. Specifically, for each baseline entry in the first-level event sequence, it first searches the set of candidate entries with matching keys in the second-level event sequence, then calculates the corrected timestamp difference within a preset matching window, and selects the candidate entry with the smallest absolute value and consistent status bits as the matching object. When multiple candidate entries satisfy the same minimum time difference, the entry with an empty anomaly mark in its source domain is selected first; if there are still ties, one is selected according to the stable sorting rules of the device identifier. Successfully matched event pairs are included in the matching set, and their time difference, channel number, event sequence number, and status bits are recorded for statistical analysis.
[0062] Furthermore, during the time difference threshold verification stage, the comparison engine calculates the absolute value of the time difference for each event pair in the matching set and compares it with the time difference threshold. Event pairs with a time difference not exceeding the threshold are recorded as within-threshold items, and event pairs exceeding the threshold are recorded as outside-threshold items and added to the difference labeling queue. For first-level source domain events that fail to find a matching object, they are labeled as missing in the second-level source domain; for second-level source domain events that fail to find a matching object, they are labeled as missing in the first-level source domain. If there is a discrepancy between the first-level source domain sequence order and the second-level source domain sequence order in adjacent events of a certain channel, it is recorded as out of order in the difference labeling, and a local sorting fragment of the adjacent keys of the two domains is retained in the out-of-order entry for subsequent location.
[0063] Furthermore, in the difference classification and aggregation stage, the central control layer archives the entries in the difference labeling queue into four categories: missing, duplicate, out-of-order, and threshold-crossing. For each category, it statistically analyzes the channel distribution, event sequence number distribution, and time difference distribution characteristics. Simultaneously, it uses the within-threshold items in the matching set to generate statistics on the time difference distribution, including the median, P95, P99, and extreme values. These statistics, along with batch parameters and the time difference threshold, are output as part of the consistency comparison results. To ensure the traceability of the results, each difference entry carries a reference to the original data and a corrected timestamp, maintaining consistency with the batch associated with the triggering identifier.
[0064] Through the above implementation methods, under the unified time base constraint, the number of entries in the first-level event sequence and the second-level event sequence are verified, the item-by-item matching based on the channel and event sequence number combined with the status bit is completed, and the time difference threshold is checked. Unmatched or threshold-crossing records are classified in a standardized manner as missing, duplicate, disordered and threshold-crossing, and finally a structured and consistent comparison result is formed to ensure the consistency of data standards and the integrity of the evidence chain required for subsequent indicator statistics and problem localization.
[0065] In some embodiments, based on the continuous jump records of each channel, the interval between adjacent events is calculated and compared with the expected interval to obtain the time-stamp accuracy verification result. The event resolution result is then calculated according to both simultaneous triggering and interval triggering methods, including: Under a unified time base, based on the first-level event sequence and the second-level event sequence respectively, the preceding and following events that are adjacent and constitute a valid transition pair are extracted for each channel; The difference between the time of the subsequent event and the time of the preceding event is calculated as the measured interval, and the measured interval is compared with the expected interval. The corresponding timescale accuracy verification result is obtained according to the preset error percentage threshold. Under a unified time base, event matrices are constructed based on first-level event sequences and second-level event sequences, respectively, with channels and sequence numbers as indices. Under simultaneous triggering conditions, the time difference of the same sequence number event in different channels is calculated within a preset time window and compared with a preset resolution threshold. Under the interval triggering caliber, the difference between the measured interval and the expected interval of adjacent sequence events for any channel is compared with the preset resolution threshold to generate the corresponding event resolution result.
[0066] Specifically, under a unified time base, each channel is traversed based on both the first-level and second-level event sequences. Adjacent records are read in ascending order of channel number and event sequence number to identify the preceding and following events that constitute a valid transition pair. A valid transition pair is defined as an adjacent pair in which the state bits of the preceding and following events form a 0→1→0 or 1→0→1 relationship, and the two events satisfy the debouncing timing window and edge preservation constraints. Records that do not meet the aforementioned constraints are marked as abnormal candidates and removed from the transition calculation set.
[0067] In this embodiment, the difference between the time of the event following a valid transition pair and the time of the previous event is used as the measured interval. The expected interval is determined by the pulse high-level time and the pulse low-level time. For each channel, the measured interval and the expected interval are compared in both the primary source domain and the secondary source domain, and compliance is determined according to a preset error percentage threshold. For consecutive non-compliant adjacent transition pairs, an abnormal segment is formed, and the event sequence number range, the corresponding corrected timestamp, and the source domain identifier are recorded. The time stamp accuracy verification results are then summarized.
[0068] Furthermore, regarding event resolution assessment, under a unified time base, event matrices are constructed based on both primary and secondary event sequences, with channels as rows and event numbers as columns. Matrix cells are filled with corresponding corrected timestamps; missing cells are marked as empty and the reason for the absence is recorded. For synchronous triggering, within a preset time window, the difference between the maximum and minimum timestamps of all channels under the same event number is calculated as the cross-channel time difference for that number, and compared with a preset resolution threshold. When the cross-channel time difference exceeds the threshold, the number and its corresponding channel set are registered as synchronous triggering resolution anomalies. For interval triggering, for any channel's adjacent event numbers, the absolute value of the difference between the measured interval and the expected interval is calculated, and compared with a preset resolution threshold. When the absolute value exceeds the threshold, the adjacent event numbers for that channel are registered as interval triggering resolution anomalies. The determination of the two types of calibers is completed independently within the primary and secondary source domains, and the event resolution results are output.
[0069] In this embodiment, to improve the stability of the results, a local repair strategy is first implemented for channels with missing, duplicate, or out-of-order markers: when multiple timestamps for the same event number appear in the same source domain, only the entry closest to the trigger identifier is retained as the baseline entry; when a unilateral missing event occurs, the synchronous caliber calculation of the missing unit is skipped, and the missing marker is retained in the result; when adjacent event numbers are out of order, the calculation of that channel under the interval caliber is discarded and counted separately in the abnormal segment statistics. All abnormalities carry original data references for traceability.
[0070] Through the above implementation method, the measured interval and the expected interval are checked one by one based on the continuous jump record of each channel to form the time-stamp accuracy check result; and the time difference behavior across channels and within channels is measured under the synchronous triggering caliber and the interval triggering caliber respectively to form the event resolution result, so as to realize the unified evaluation of the time accuracy and resolution capability of the two source domains and support the anomaly location.
[0071] In some embodiments, request and response messages related to the event are extracted from the primary communication network, paired according to source address and sequence number, the latency between the request and response is calculated, and the pairing rate is statistically analyzed to obtain redundancy pairing statistics, including: On the primary communication network side, information interaction entries containing event identifiers are filtered from the communication message records and classified into request messages and response messages; Using the source address and sequence number as the pairing key, request messages are paired one by one with corresponding response messages under a unified time base, and successfully paired entries and unpaired entries are recorded. Calculate the request-response latency for each successfully paired entry based on the corrected timestamp, and statistically analyze the pairing rate and latency distribution indicators. The matching rate, latency distribution index, and unmatched entries are summarized into redundant matching statistics.
[0072] Specifically, a message acquisition agent is deployed on the primary communication network side, and filtering rules associated with batch identifiers are enabled. These filtering rules combine the message type field and event identifier field of the protocol under test to filter communication message records containing event identifiers. The acquisition agent performs preliminary classification of the filtered communication message records, distinguishing them into request and response messages based on direction bits and function codes. It also parses and extracts the source address, destination address, sequence number, channel number, event sequence number, status bits, and event time field from the payload. To ensure consistency in time standards, the acquisition agent appends a local acquisition timestamp and source domain identifier when recording data, and adds a corrected timestamp to each record after a unified time base is established.
[0073] In this embodiment, the pairing of request and response messages is performed under a unified time base. The central control layer loads pairing window parameters and timeout thresholds for each batch. The pairing window is used to limit the maximum allowed time span between requests and responses, and the timeout threshold is used to determine unpaired entries. The comparison engine establishes a candidate set using the source address and sequence number as the pairing key: for each request message, it searches the secondary candidate table for response messages with the same source address and sequence number; if multiple candidates appear, it prioritizes response messages with the same connection session identifier and status bits that match the request expectation; when there are still ties, the one with the smallest time difference between the corrected timestamp and the request message is selected as the pairing object.
[0074] To handle retransmissions and out-of-order delivery, the matching engine maintains a set of paired keys. Subsequent messages with duplicate sequence numbers are marked as retransmission candidates and only participate in secondary matching when the original matching fails and the process reverts. Request messages that exceed the matching window and for which no match is found are registered as unmatched entries; response messages for which there is no corresponding request within the window are also registered as unmatched entries with the source reason noted.
[0075] Furthermore, in the latency calculation and statistics phase, for each successfully paired request and response message, the request-response latency is obtained by subtracting the corrected timestamp of the request message from the corrected timestamp of the response message. The central control layer statistically analyzes the pairing rate and latency distribution indicators by batch and channel dimension. The pairing rate is the ratio of the number of successfully paired entries to the total number of request messages; the latency distribution indicators include the median, P95, P99, and maximum value, and a list of entries exceeding the response latency limit is recorded. To reflect the impact of redundant handover on communication, when a change in master station role or a heartbeat interruption flag is detected, the pairing rate and latency distribution are independently statistically analyzed for three segments: before handover, within the handover window, and after handover, and the corrected timestamps of the segment boundaries are marked in the results.
[0076] Furthermore, regarding anomaly archiving, the comparison engine specifically labels the following situations: sequence number rollback, sequence number jump, duplicate response, no-request response, no-response request, payload verification failure, and session identifier change. Each anomaly entry retains the original data reference, source address, sequence number, and corrected timestamp of the communication message record, and establishes a traceable association with the batch identifier and trigger identifier. For request messages that time out and are not paired, the minimum time difference between them and the most recent response message, along with possible associated network congestion flags, are provided for subsequent location.
[0077] Through the above implementation methods, the primary communication network side can complete one-to-one pairing based on source address and sequence number under a unified time base constraint, forming a stable request-response latency metric and pairing rate statistics. It can also perform segmented quantification of retransmission, out-of-order, and redundant switching scenarios, and finally generate redundant pairing statistics, providing structured input and traceable evidence for main station redundancy reliability determination and link quality assessment.
[0078] The technical solutions provided by the above embodiments of this application have at least the following advantages: 1. Technically: It eliminates reliance on host computer software, reducing the test system's dependence on external software environments and improving its independence and stability. Automated testing processes and unified test tool management reduce errors introduced by manual operation, improving the accuracy of test results. Simultaneously, rapid data acquisition and processing capabilities significantly improve testing efficiency, enabling SOE functionality testing to be completed in a shorter time.
[0079] 2. Economically: It reduces reliance on expensive host computer software, lowering software procurement and maintenance costs. Automated testing processes reduce labor costs, and increased testing efficiency means more testing tasks can be completed in the same amount of time, thereby reducing unit testing costs and improving the company's economic benefits.
[0080] 3. Social benefits: It improves the efficiency and accuracy of SOE functional testing during product development and production, helping to launch high-quality products more quickly, meet market demands, and promote technological progress and development in related industries. At the same time, reducing manual intervention also lowers the workload of testing personnel and improves their working environment.
[0081] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0082] Figure 3 This is a schematic diagram of the structure of the automated event sequence testing device with dual-network collaboration provided in an embodiment of this application. Figure 3As shown, the dual-network collaborative event sequence automated testing device includes: The driving module 301 is used to drive a multi-channel pulse sequence through a signal control interface according to preset parameters, and generate a trigger identifier associated with the first pulse as a time reference. The association module 302 is used to collect slave logs on the secondary backplane bus side, collect communication messages on the primary communication network side, add time information and source identifier to the collected records, and establish an association with the trigger identifier. The correction module 303 is used to establish a unified time base based on the trigger identifier, correct the time offset and time drift between the primary communication network and the secondary backplane bus, standardize the collected records into event records according to the unified data model, and generate primary event sequences and secondary event sequences. The comparison module 304 is used to perform a consistency comparison between the first-level event sequence and the second-level event sequence under a unified time base, and obtain the consistency comparison result. The calculation module 305 is used to calculate the interval between adjacent events based on the continuous jump records of each channel and compare it with the expected interval to obtain the time stamp accuracy verification result, and calculate the event resolution result according to two methods: simultaneous triggering and interval triggering. The pairing module 306 is used to extract event-related request and response messages from the primary communication network, pair them according to the source address and sequence number, calculate the latency between the request and response, and calculate the pairing rate to obtain the redundancy pairing statistics. The generation module 307 is used to generate structured test results based on the consistency comparison results, event resolution results, timescale accuracy verification results, and redundancy pairing statistics results.
[0083] In some embodiments, Figure 3 The driving module 301 forms an instruction set according to preset parameters, including the number of channels, the number of events per channel, the high-level time and low-level time of the pulse, and the trigger mode identifier; the instruction set is sent to the signal control interface, a pulse sequence template is established according to the channel, and pulse output is generated in each channel according to the trigger mode; at the beginning of the pulse output, the edge of the first pulse is calibrated to generate a trigger identifier.
[0084] In some embodiments, Figure 3 The association module 302 obtains slave log records from the acquisition agent on the secondary backplane bus side and adds a local acquisition timestamp and source domain identifier to the slave log records; it obtains communication message records from the acquisition agent on the primary communication network side and adds a local acquisition timestamp and source domain identifier to the communication message records, and records the sequence number or event number provided by the protocol; based on the unified data model, it organizes the slave log records and communication message records into acquisition records, and establishes association between the acquisition records by batch and time window using the trigger identifier as the anchor point.
[0085] In some embodiments, Figure 3 The correction module 303 uses a trigger identifier to locate the first corresponding acquisition record in the primary communication network and the secondary backplane bus, respectively, and calculates the initial time offset of the corresponding acquisition record; within a preset time window, it calculates the time drift rate based on the time difference of the corresponding acquisition record, and obtains the offset and drift rate parameters used for correction; it corrects the timestamps of each acquisition record according to the offset and drift rate parameters to obtain the corrected timestamps; it maps the corrected acquisition records to event records according to the unified data model, and aggregates them according to the source domain identifier and sorts them according to the corrected timestamps and sequence numbers to generate primary event sequences and secondary event sequences.
[0086] In some embodiments, Figure 3 The comparison module 304 verifies the total number of events in the first-level event sequence and the second-level event sequence; using the channel and sequence number as the matching key and combined with the status, it matches the events in the first-level event sequence with the corresponding events in the second-level event sequence item by item within the preset time difference threshold to obtain a matching set; it marks the differences of events that do not enter the matching set or events whose time difference exceeds the time difference threshold, and generates a consistency comparison result according to the classification of missing, duplicate, out-of-order and threshold-crossing.
[0087] In some embodiments, Figure 3 The calculation module 305, under a unified time base, extracts the preceding and following events that constitute effective transition pairs for each channel based on both the first-level and second-level event sequences. It calculates the difference between the time of the following event and the time of the preceding event as the measured interval, compares the measured interval with the expected interval, and obtains the corresponding timescale accuracy verification result based on a preset error percentage threshold. Under a unified time base, it constructs an event matrix indexed by channel and sequence number based on both the first-level and second-level event sequences. Under simultaneous triggering, it calculates the time difference for the same sequence number event in different channels within a preset time window and compares it with a preset resolution threshold. Under interval triggering, it compares the difference between the measured interval and the expected interval for adjacent sequence number events in any channel with a preset resolution threshold to generate the corresponding event resolution result.
[0088] In some embodiments, Figure 3 On the primary communication network side, the pairing module 306 filters information interaction entries containing event identifiers from the communication message records and classifies them into request messages and response messages. Using the source address and sequence number as the pairing key, it pairs the request messages with the corresponding response messages one by one under a unified time base, recording successfully paired entries and unpaired entries. Based on the corrected timestamp, it calculates the request-response delay for each successfully paired entry and statistically analyzes the pairing rate and delay distribution index. The pairing rate, delay distribution index, and unpaired entries are then summarized into a redundant pairing statistical result.
[0089] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0090] Figure 4 This is a schematic diagram of the electronic device 4 provided in an embodiment of this application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, it implements the steps in the various method embodiments described above. Alternatively, when the processor 401 executes the computer program 403, it implements the functions of each module / unit in the various device embodiments described above.
[0091] Electronic device 4 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 4 may include, but is not limited to, processor 401 and memory 402. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or different components.
[0092] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0093] The memory 402 can be an internal storage unit of the electronic device 4, such as a hard disk or RAM of the electronic device 4. The memory 402 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 4. The memory 402 can also include both internal and external storage units of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0095] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which may be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0096] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A dual-network collaborative method for automated testing of event sequence, characterized in that, include: According to preset parameters, the multi-channel pulse sequence is driven through the signal control interface, and a trigger identifier associated with the first pulse is generated as a time reference. The slave station logs are collected on the secondary backplane bus side, and the communication messages are collected on the primary communication network side. Time information and source identifiers are added to the collected records, and an association is established with the trigger identifier. A unified time base is established based on the trigger identifier to correct the time offset and time drift between the primary communication network and the secondary backplane bus. The collected records are standardized into event records according to the unified data model to generate primary event sequences and secondary event sequences. Under the unified time base, the consistency comparison between the first-level event sequence and the second-level event sequence is performed to obtain the consistency comparison result; Based on the continuous jump records of each channel, the interval between adjacent events is calculated and compared with the expected interval to obtain the time stamp accuracy verification result. The event resolution result is calculated according to two methods: simultaneous triggering and interval triggering. The request and response messages related to the event are extracted from the primary communication network, paired according to the source address and sequence number, the delay between the request and response is calculated and the pairing rate is statistically analyzed to obtain the redundancy pairing statistics. Structured test results are generated based on the consistency comparison results, the event resolution results, the timescale accuracy verification results, and the redundancy pairing statistics results.
2. The method according to claim 1, characterized in that, The step of driving a multi-channel pulse sequence through a signal control interface according to preset parameters and generating a trigger identifier associated with the first pulse as a time reference includes: An instruction set is formed based on preset parameters, wherein the preset parameters include the number of channels, the number of events per channel, the pulse high-level time and low-level time, and the trigger mode identifier; The instruction set is sent to the signal control interface, a pulse sequence template is established for each channel, and pulse output is generated in each channel according to the triggering mode; At the start of the pulse output, the edge of the first pulse is calibrated to generate the trigger identifier.
3. The method according to claim 1, characterized in that, The process of collecting slave logs on the secondary backplane bus side and collecting communication messages on the primary communication network side, adding time information and source identifiers to the collected records, and establishing an association with the trigger identifier includes: The slave station log records are obtained by the acquisition agent on the secondary backplane bus side, and a local acquisition timestamp and source domain identifier are added to the slave station log records; The acquisition agent on the primary communication network side obtains communication message records, adds a local acquisition timestamp and source domain identifier to the communication message records, and records the sequence number or event number provided by the protocol. Based on a unified data model, the slave station log records and the communication message records are organized into collection records, and the collection records are associated by batch and time window using the trigger identifier as the anchor point.
4. The method according to claim 3, characterized in that, The process involves establishing a unified time base based on the trigger identifier, correcting the time offset and time drift between the primary communication network and the secondary backplane bus, standardizing the collected records into event records according to a unified data model, and generating primary event sequences and secondary event sequences, including: The first corresponding acquisition record is located in the primary communication network and the secondary backplane bus respectively using the trigger identifier, and the initial time offset of the corresponding acquisition record is calculated. Within a preset time window, the time drift rate is calculated based on the time difference of the corresponding acquisition records, and the offset and drift rate parameters used for correction are obtained. The timestamps of each collected record are corrected according to the offset and the drift rate parameters to obtain the corrected timestamps; The corrected collection records are mapped to event records according to the unified data model, and then aggregated according to the source domain identifier and sorted according to the corrected timestamp and the sequence number to generate the first-level event sequence and the second-level event sequence.
5. The method according to claim 1, characterized in that, The step of performing a consistency comparison between the first-level event sequence and the second-level event sequence under the unified time base to obtain the consistency comparison result includes: The total number of events in the first-level event sequence and the second-level event sequence is verified. Using channel and sequence number as matching keys and combined with state, the events in the first-level event sequence are matched item by item with the corresponding events in the second-level event sequence within a preset time difference threshold to obtain a matching set; Events that do not enter the matching set or whose time difference exceeds the time difference threshold are marked with differences, and the consistency comparison results are generated according to the categories of missing, duplicate, out-of-order and threshold crossing.
6. The method according to claim 1, characterized in that, The method calculates the interval between adjacent events based on the continuous jump records of each channel and compares it with the expected interval to obtain the time-stamp accuracy verification result. It also calculates the event resolution result according to two methods: simultaneous triggering and interval triggering, including: Under the unified time base, based on the first-level event sequence and the second-level event sequence respectively, the preceding and following events that are adjacent and constitute a valid transition pair are extracted for each channel; The difference between the time of the subsequent event and the time of the preceding event is calculated as the measured interval, and the measured interval is compared with the expected interval. The corresponding timescale accuracy verification result is obtained according to the preset error percentage threshold. Under the unified time base, an event matrix indexed by channel and sequence number is constructed based on the first-level event sequence and the second-level event sequence, respectively. Under simultaneous triggering conditions, the time difference of the same sequence number event in different channels is calculated within a preset time window and compared with a preset resolution threshold. Under the interval triggering caliber, the difference between the measured interval and the expected interval of adjacent sequence events of any channel is compared with the preset resolution threshold to generate the corresponding event resolution result.
7. The method according to claim 1, characterized in that, The step of extracting event-related request and response messages from the primary communication network, pairing them according to source address and sequence number, calculating the latency between requests and responses, and calculating the pairing rate to obtain redundancy pairing statistics includes: On the primary communication network side, information interaction entries containing event identifiers are filtered from the communication message records and classified into request messages and response messages; Using the source address and sequence number as the pairing key, request messages are paired one by one with corresponding response messages under the unified time base, and successfully paired entries and unpaired entries are recorded. Calculate the request-response latency for each successfully paired entry based on the corrected timestamp, and statistically analyze the pairing rate and latency distribution indicators. The pairing rate, the delay distribution index, and the unpaired entries are summarized into the redundant pairing statistics.
8. A dual-network collaborative automated event sequence testing device, characterized in that, include: The driving module is used to drive a multi-channel pulse sequence through a signal control interface according to preset parameters, and generate a trigger identifier associated with the first pulse as a time reference; The association module is used to collect slave logs on the secondary backplane bus side, collect communication messages on the primary communication network side, add time information and source identifier to the collected records, and establish an association with the trigger identifier; The correction module is used to establish a unified time base based on the trigger identifier, correct the time offset and time drift between the primary communication network and the secondary backplane bus, standardize the collected records into event records according to the unified data model, and generate primary event sequences and secondary event sequences. The comparison module is used to perform a consistency comparison between the first-level event sequence and the second-level event sequence under the unified time base, and obtain a consistency comparison result; The calculation module is used to calculate the interval between adjacent events based on the continuous jump records of each channel and compare it with the expected interval to obtain the time stamp accuracy verification result, and calculate the event resolution result according to two methods: simultaneous triggering and interval triggering. The pairing module is used to extract event-related request and response messages from the primary communication network, pair them according to source address and sequence number, calculate the delay between request and response and count the pairing rate to obtain redundancy pairing statistics. The generation module is used to generate structured test results based on the consistency comparison results, the event resolution results, the timescale accuracy verification results, and the redundancy pairing statistics results.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Cited By
Equipment time correction method and device, equipment, storage medium and program product
CN122044943A
Equipment time calibration methods, devices, equipment, storage media and program products
CN122044943B
