Embedded software testing system and method based on protocol node flow and multi-dimensional correlation verification

The embedded software testing system based on protocol node flow and multi-dimensional correlation verification solves the problems of single verification dimensions and reliance on manual judgment in aerospace embedded software testing, and achieves deeper and more efficient testing and accurate problem localization, supporting model reuse and data traceability.

CN121901099APending Publication Date: 2026-04-21BEIJING XUANYU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XUANYU INFORMATION TECH CO LTD
Filing Date
2025-12-08
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing aerospace embedded software testing methods suffer from problems such as limited verification dimensions, reliance on manual judgment, and difficulty in problem localization when verifying protocol data. These methods are unable to effectively detect logical errors in the protocol interaction process, resulting in low testing efficiency and difficulties in troubleshooting.

Method used

An embedded software testing system based on protocol node flow and multi-dimensional correlation verification is adopted. Through the protocol node flow definition and model construction module, verification engine module, verification result report generation module, and protocol node flow model and report storage module, multi-dimensional verification of embedded software is realized, including static compliance and dynamic correlation verification, and intelligent diagnostic reports are generated.

Benefits of technology

It enables in-depth testing of protocol interaction logic, improves test automation, enhances testing efficiency and problem localization accuracy, shortens the test debugging cycle, and supports model reuse and data traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901099A_ABST
    Figure CN121901099A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded software testing system and method based on protocol node flow and multi-dimensional correlation verification. The embedded software testing system comprises a protocol node flow definition and model construction module, a verification engine module, a verification result report generation module and a protocol node flow model and report storage module. According to the method, the traditional data format correctness level is improved to the protocol interaction logic correctness and system behavior correctness level, and more hidden design logic defects can be found. Test personnel are thoroughly liberated from back lock and error-prone manual protocol analysis work, only a node flow model needs to be defined in advance, and complex logic judgment is automatically completed by an engine. The verification of hundreds of logic association points can be automatically completed through the execution of one test case, the test coverage is more sufficient, the efficiency is greatly improved, and meanwhile human negligence is avoided. And an intelligent diagnosis report can directly point out the breaking point of the problem chain, so that the test debugging and fault checking time is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aerospace embedded software testing technology, specifically to an embedded software testing system and method based on protocol node stream and multi-dimensional correlation verification. Background Technology

[0002] In the testing of aerospace embedded software, simulation testing is a crucial step in verifying the software's functionality, performance, and reliability. During testing, stimulus data is injected into the simulation platform, and response data output by the software under test is received. These input and output data typically follow strict communication protocols, the format of which includes fields such as frame header, data length, valid data payload, and checksum.

[0003] Currently, testing and verification methods for this type of protocol data have several limitations. First, the verification dimensions are limited. Existing automated test scripts or tools are mostly limited to verifying the static correctness of single-frame data, such as whether the frame header identifier is correct, whether the data length matches, and whether the checksum passes. This verification cannot detect logical errors in the protocol interaction process. Second, it relies on manual judgment of the results. For the temporal relationships, logical causal relationships, and state consistency between data frames (e.g., whether a successful response to a command triggers subsequent correct state reporting, whether data packet sequence numbers are consecutive), testers typically need to manually compare the test script output data with the requirements document, which is inefficient and prone to overlooking defects due to human error. Finally, there is a lack of intelligent analysis and localization. When a test fails, existing methods usually only provide simple prompts such as "checksum error" or "frame header error," failing to pinpoint exactly which link in the protocol interaction chain the error occurred in, hindering rapid problem localization and prolonging the testing and debugging cycle. Summary of the Invention

[0004] The purpose of this invention is to provide an embedded software testing system and method based on protocol node stream and multi-dimensional correlation verification, so as to solve the problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: an embedded software testing system based on protocol node flow and multi-dimensional correlation verification, including a protocol node flow definition and model construction module, a verification engine module, a verification result report generation module, and a protocol node flow model and report storage module; The protocol node flow definition and model building module is used to define nodes in the communication protocol frames of embedded software and build a protocol node flow model based on the timing and logical constraints between nodes. The verification engine module interacts with the simulation platform to obtain test data from the embedded software, performs static compliance verification and dynamic correlation verification on the test data based on the protocol node flow model, and outputs the verification results. The verification result report generation module receives the verification results output by the verification engine module, performs classification statistics and error analysis on the verification results, and generates a verification report containing diagnostic information. The protocol node flow model and report storage module is used to store protocol node flow definition information, protocol node flow model and verification report, and supports the reuse of protocol node flow model and the traceability of verification data.

[0006] Preferably, the protocol node flow definition and model building module includes a node definition unit, a model building unit, and an interface display unit; The node definition unit is used to define a corresponding protocol node for each type of communication protocol frame. Each protocol node includes static verification rules and dynamic association rules. The static verification rules describe the inherent structure of the protocol frame, including the frame header, length field offset, valid data, checksum algorithm, and the range of valid values ​​or data types for each data field. The dynamic association rules define the behavioral logic of protocol nodes in the data stream, including predecessor nodes, successor nodes, and data association rules; the predecessor node rules define which types of nodes can trigger this node; the successor node rules define the types of nodes expected to appear within a preset time window after this node appears; the data association rules define the logical relationship between this node and other node data, including sequence continuity, state consistency, and data rationality. The model building unit is used to construct a protocol node flow model by associating multiple protocol nodes through a directed graph structure according to the software requirements specification. The nodes of the directed graph are protocol nodes, and the directed edges represent the temporal and logical constraint relationships between the nodes. The interface display unit is used to visually display the directed graph structure of the protocol node flow model, and supports building and editing the model by dragging and connecting lines.

[0007] Preferably, the verification engine module includes an online verification engine and an offline verification engine. The online verification engine works synchronously with the simulation platform, and the offline verification engine works after the simulation ends. The online verification engine includes a virtual port collector, a first model intelligent matching unit, a first static rule verifier, and a first dynamic rule verifier; The virtual port collector is used to capture test data of embedded software in the simulation platform in real time. The test data includes input and output data, interface information and transmission time information. The first model intelligent matching unit is used to match the corresponding protocol node stream model based on the frame header information of the test data; The first static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model; The first dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of the protocol nodes in the matching model; The offline verification engine includes a file collector, a second model intelligent matching unit, a second static rule verifier, and a second dynamic rule verifier; The file collector is used to capture test data of embedded software from the test data file of the simulation platform. The test data includes input / output data, interface information, and transmission time information. The second model intelligent matching unit is used to match the corresponding protocol node stream model based on the frame header information of the test data; The second static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model; The second dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of protocol nodes in the matching model.

[0008] Preferably, both the first dynamic rule validator and the second dynamic rule validator include a context management subunit and a rule triggering and evaluation subunit; The context management subunit is used to maintain the test context and record recently occurring key events, including recently sent instructions, received nodes and their key data; The rule triggering and evaluation subunit is used to activate the dynamic association rule of the node after successfully matching and parsing the protocol node, and to start timing verification and logic verification. The timing verification is used to check whether the arrival time of the current node is within the time window defined by its predecessor node, and to start a timeout timer for the expected successor node of the current node. The logic verification is used to extract relevant data from the test context and verify the data association rule.

[0009] Preferably, both the first and second model intelligent matching units quickly match the best protocol node flow model by scanning the software interface attributes of the current model library and combining the protocol content weight matching degree; if the matching fails, the corresponding test data is discarded; if the matching is successful, the subsequent static and dynamic verification process is triggered.

[0010] Preferably, the verification result report generation module includes a result receiving unit, a classification and statistics unit, an error accumulation unit, and a report generation unit; The result receiving unit is used to receive the static verification results and dynamic verification results output by the verification engine module; The classification and statistics unit is used to classify and statistically analyze the verification results according to the protocol node flow model, distinguishing between three result types: verification passed, warning, and error. The error accumulation unit is used to accumulate the number of repeated identical errors. The report generation unit is used to generate a verification report containing semantic diagnostic information. The diagnostic information includes a detailed description of errors such as static frame content errors, predecessor and successor node protocol errors, and response timeouts. The report also displays the classification statistics and cumulative error information in the form of charts.

[0011] Preferably, the protocol node flow model and report storage module includes a file storage unit and a database storage unit; The file storage unit uses JSON file format to store protocol node definition information, protocol node flow model and verification report, supports import and reuse of protocol nodes and models, as well as format conversion of verification report; The database storage unit adopts the protocol nodes, protocol node flow model, and verification results used in the MongoDB database storage project to ensure persistent data storage and efficient querying.

[0012] A testing method for an embedded software testing system based on protocol node stream and multi-dimensional correlation verification includes the following steps: Step 1: Protocol Node Definition and Model Construction The protocol node flow definition and model building module defines protocol nodes for each communication protocol frame in the embedded software, clarifies the static verification rules and dynamic association rules of each node, and builds a protocol node flow model by associating each protocol node through a directed graph structure according to the software requirements specification. Step 2: Test Data Acquisition Depending on the testing requirements, select either online or offline verification mode. In online mode, the test data of the embedded software in the simulation platform is captured in real time through a virtual port collector. In offline mode, the test data is captured from the test data file of the simulation platform through a file collector. Step 3: Model matching and multi-dimensional validation The model intelligent matching unit matches the corresponding protocol node flow model based on the frame header information of the test data; after successful matching, the static rule validator performs basic format verification, and the dynamic rule validator performs timing verification and logic verification. Step 4: Verification Result Processing and Report Generation The verification result report generation module receives the verification results, classifies and statistically analyzes the results and accumulates errors, and generates a verification report containing semantic diagnostic information. Step 5: Data Storage and Reuse The protocol node flow model and report storage module stores protocol node definition information, protocol node flow model and verification report in the form of files or databases, supporting the reuse of the model and the traceability of test data in subsequent regression testing.

[0013] Compared with the prior art, the beneficial effects of the present invention are: (1) In-depth testing: From the traditional level of correct data format, it is elevated to the level of correct protocol interaction logic and correct system behavior, which can discover more hidden design logic defects.

[0014] (2) Highly automated testing: It completely liberates testers from the work of manual protocol analysis that is locked and prone to errors. They only need to predefine the node flow model, and the engine will automatically complete the complex logical judgments.

[0015] (3) Increased efficiency and quality: The execution of a single test case can automatically complete the verification of hundreds or thousands of logical connection points, resulting in more comprehensive test coverage, greatly improved efficiency, and avoidance of human negligence.

[0016] (4) Precise problem location: Intelligent diagnostic reports can directly point out the breakpoints in the problem chain, greatly shortening the testing, debugging and troubleshooting time.

[0017] (5) Reusability: The constructed "protocol node flow" model can be used as a valuable test asset and reused for regression testing of different versions of software to ensure the consistency and traceability of the test. Attached Figure Description

[0018] Figure 1 This is a system structure diagram of the present invention; Figure 2 This is a schematic diagram of the protocol node flow model of the present invention; Figure 3 This is a timing diagram illustrating the static and dynamic correlation verification of the present invention; Figure 4 This is a flowchart of the online verification engine of the present invention; Figure 5 This is a flowchart of the offline verification engine of the present invention. Detailed Implementation

[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0020] Please see Figure 1-5This invention provides an embedded software testing system based on protocol node flow and multi-dimensional correlation verification, including a protocol node flow definition and model construction module, a verification engine module, a verification result report generation module, and a protocol node flow model and report storage module; The protocol node flow definition and model building module is used to define nodes in the communication protocol frames of embedded software and build protocol node flow models based on the timing and logical constraints between nodes. The protocol node flow definition and model construction module includes a node definition unit, a model construction unit, and an interface display unit; The node definition unit is used to define the corresponding protocol node for each type of communication protocol frame. Communication protocol frames include command response frames, periodic telemetry frames, event reporting frames, etc. Each protocol node contains static verification rules and dynamic association rules. Static verification rules describe the inherent structure of the protocol frame, including the frame header, length field offset, valid data, checksum algorithm, legal value range or data type of each data field, and clarify the standard requirements for each component of the protocol frame. Dynamic association rules define the behavioral logic of protocol nodes in the data flow, including predecessor nodes, successor nodes, and data association rules; The predecessor node rule defines which types of nodes can trigger this node. For example, the predecessor of the mode switching response node is the mode switching instruction node. The successor node rule defines the type of node expected to appear within a preset time window after this node appears. For example, after the mode switching response node appears successfully, a node with the new mode status word is expected to appear within a preset time window. Data association rules define the logical relationship between this node and other nodes' data, including sequence continuity, state consistency, and data rationality. Sequence continuity means that the packet counter field in the telemetry frame should continuously increment. State consistency means that after a command is successfully responded to, the corresponding state in the subsequent related state frames must be updated to the expected value. Data rationality means that the associated data in different nodes should meet the physical logic. The model building unit is used to connect multiple protocol nodes through a directed graph structure according to the software requirements specification to build a protocol node flow model. The nodes of the directed graph are protocol nodes, and the directed edges represent the temporal and logical constraints between nodes. This model describes the expected behavior sequence of the software output flow under a specific test scenario. The interface display unit is implemented using Qt programming and is used to visually display the directed graph structure of the protocol node flow model. It allows testers to quickly build and edit the model by dragging and dropping and connecting lines, and intuitively presents the relationships between nodes.

[0021] The node flow definition unit can complete the node definition of input and output protocol data for all simulation software. It is programmed in Python and categorizes data protocols according to software interface type, as shown in the attached diagram. Figure 2 As shown; the model building unit and the interface display unit work together to construct one or more verification models by associating the logical relationships between different nodes through a directed graph. The models are independent of each other and can be selected and used simultaneously. The directed graph is programmed in Qt, and the verification models are quickly built by dragging and connecting. The protocol node flow definition information and model building information are shown in Tables 1 and 2 below: Table 1. List of Software Protocol Data Node Stream Information serial number name property illustrate Node stream data content must Define the specific data content or valid range of the protocol node stream frame header, frame sequence number, valid data, and checksum. Node Stream Software Interface Attributes must Define the interface information to which the node flow belongs. Predecessor Node Optional The node trigger condition can be configured to specify that a node is only allowed to trigger after other nodes have appeared. successor node Optional After this node appears, what types of nodes should be expected to appear within what time window? Data association rules Optional Define the logical data relationships between this node and related nodes. These relationships may include sequence continuity, state consistency, and data validity. Table 2 Validation Model Information List serial number name property illustrate Model Name must Define the model name and describe the model's functionality. Node-directed graph must Define the expected sequence of behaviors for different node flows, and use a directed graph to connect the predecessor and successor nodes of different nodes. Master Node Stream must Each model must contain a master node stream, from which static and dynamic validation rules are expanded. The verification engine module interacts with the simulation platform to obtain test data from the embedded software. Based on the protocol node flow model, it performs static compliance verification and dynamic correlation verification on the test data and outputs the verification results. The verification engine module includes an online verification engine and an offline verification engine. The online verification engine works synchronously with the simulation platform, while the offline verification engine works after the simulation is completed. The online verification engine includes a virtual port collector, a first model intelligent matching unit, a first static rule validator, and a first dynamic rule validator. See the attached flowchart. Figure 4 ; The online verification engine acquires software input and output data from the running simulation platform in real time. First, the virtual port collector collects test input and output data, time, and interface information from the simulation platform. Then, the virtual port collector transmits the collected data to the first model intelligent matching unit asynchronously. The first model intelligent matching unit quickly matches the best verification model by scanning the software interface attributes of the current model library and combining the protocol content weight matching degree. If the matching fails, the data is discarded. If the model matching is successful, the static and dynamic rules of the verification protocol are verified. The specific verification indicators are shown in Table 3 below.

[0022] Table 3 List of Verification Indicators serial number name property illustrate Frame header static Does the frame header match the expectation? Frame number static The serial number may change periodically or remain unchanged, as expected. Valid data static Are the effective data consistent with expectations? Checksum static Does the checksum result satisfy the defined check algorithm (cumulative sum, CRC, etc.)? Response time dynamic Verify whether the response time is within a reasonable range. Previous node dynamic Verify whether the current protocol trigger is the expected predecessor node protocol. successor node dynamic Verify whether the protocol data that appears after the current protocol appears is the expected successor node protocol. The virtual port collector is used to capture test data of embedded software in the simulation platform in real time. The test data includes input and output data, interface information and transmission time information. The captured data is transmitted back to the verification engine through the communication unit. The first model intelligent matching unit is used to scan the software interface attributes of the current model library based on the frame header information of the test data, and combine the protocol content weight matching degree to quickly match the best protocol node flow model; if the matching fails, the corresponding test data is discarded; if the matching is successful, the subsequent static and dynamic verification process is triggered. The first static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model, and to check whether the frame header, length field offset, valid data, checksum, etc. of the test data meet the requirements of the static verification rules. The first dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of protocol nodes in the matching model. The offline verification engine includes a file collector, a second model intelligent matching unit, a second static rule validator, and a second dynamic rule validator. See the attached flowchart. Figure 5 ; The offline verification engine obtains software input and output data from the verification data file after the simulation verification platform finishes running. See the attached flowchart. Figure 5 First, the file collector collects test input / output data, time, and interface information from the simulation platform result file. Then, the file collector sequentially transmits the collected data to the second model intelligent matching unit in chronological order. The second model intelligent matching unit quickly matches the best verification model by scanning the software interface attributes of the current model library and combining the protocol content weight matching degree. If the match fails, the data is discarded. If the model matches successfully, the static and dynamic rules of the verification protocol are verified. Specific verification indicators are shown in Table 3 above. The file collector is used to capture test data of embedded software from the test data file of the simulation platform. The test data includes input and output data, interface information and transmission time information, and the captured data is organized in chronological order. The second model intelligent matching unit is used to scan the software interface attributes of the current model library based on the frame header information of the test data, and combine the protocol content weight matching degree to quickly match the best protocol node flow model; if the matching fails, the corresponding test data is discarded; if the matching is successful, the subsequent static and dynamic verification process is triggered. The second static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model. The second dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of protocol nodes in the matching model.

[0023] Both the first dynamic rule validator and the second dynamic rule validator include a context management subunit and a rule triggering and evaluation subunit; The context management subunit is used to maintain the test context and record recently occurring key events, including recently sent instructions, received nodes and their key data, to provide data support for dynamic verification. The rule triggering and evaluation subunit is used to activate the dynamic association rules of a node after successfully matching and parsing the protocol node, and to start timing verification and logic verification. Timing checks are used to verify whether the arrival time of the current node is within the time window defined by its predecessor node, and to start a timeout timer for the expected successor node of the current node, ensuring that the timing relationship between nodes meets the requirements. Logical verification is used to extract relevant data from the test context, verify data correlation rules, and check whether the sequence number is continuous, the state is consistent, and the data conforms to physical logic, etc.

[0024] The verification result report generation module receives the verification results output by the verification engine module, performs classification statistics and error analysis on the verification results, and generates a verification report containing diagnostic information. The verification result report generation module includes a result receiving unit, a classification and statistics unit, an error accumulation unit, and a report generation unit; The result receiving unit is used to receive the static and dynamic verification results output by the verification engine module, including three result types: verification passed, warning, and error. The classification and statistics unit is used to classify and statistically analyze the verification results according to the protocol node flow model, and to statistically analyze the verification situation according to different models, clearly presenting the test effect of each model; The error accumulation unit is used to accumulate the number of repeated identical errors and record the frequency of error occurrence. The report generation unit is used to generate a verification report containing semantic diagnostic information. The diagnostic information includes a detailed description of errors such as static frame content errors, predecessor and successor node protocol errors, and response timeouts. For example, "Error: After successfully responding to instruction A, the expected status reporting node was not received within the preset time window." At the same time, the classification statistics and error accumulation are displayed in the form of charts to intuitively reflect the test results.

[0025] The verification result report generation module obtains the verification results from the verification engine, integrates static and dynamic verification, and can identify errors such as static frame content errors in data protocol frames, protocol errors in associated predecessor and successor nodes, and response timeouts. The report categorizes and statistically analyzes the verification results according to the verification model, and accumulates the number of recurring identical errors, displaying the results in a chart format. Specific statistical information is shown in Table 4 below: Table 4 Statistical Information of Verification Report serial number name illustrate Total number of verifications Number of validations after a successful model match in the current project Number of times the verification passed Number of times the test protocol data matches the expected verification model Number of times the verification failed Number of times the test protocol data does not match the expected value of the verification model Total number of verifications for a single verification model Current number of validations for the validation model Number of times a single validation model passes validation Number of times the test protocol data matches the expectations of the current verification model Number of times a single validation model fails validation Number of times the test protocol data does not match the expectations of the current verification model Number of times data content validation fails in a single validation model Number of times the test protocol data does not match the protocol content expected by the current verification model Number of times the predecessor node of a single validation model fails validation The number of times the test protocol data does not match the predecessor node expected by the current verification model Number of times a single validation model's successor node fails validation The number of times the test protocol data does not match the expected successor nodes of the current verification model Number of times a single validation model fails to respond The test protocol's data response time exceeded the expected response time of the current verification model. The protocol node flow model and report storage module is used to store protocol node flow definition information, protocol node flow models and verification reports, and supports the reuse of protocol node flow models and the traceability of verification data; The protocol node flow model and report storage module includes a file storage unit and a database storage unit; The file storage unit uses JSON file format to store protocol node definition information, protocol node flow model and verification report. It supports the import and reuse of protocol nodes and models, which can be directly imported and used in other projects. It also supports converting the JSON verification report file into a Word version verification report through a Word generator, which is convenient for document archiving and sharing. The database storage unit uses the protocol nodes, protocol node flow model, and verification results used in the MongoDB database storage project to ensure persistent data storage and efficient querying, facilitating subsequent querying of historical test data and tracing of issues.

[0026] This invention also discloses an embedded software testing method based on protocol node stream and multi-dimensional correlation verification, comprising the following steps: Step 1: Protocol Node Definition and Model Construction The node definition unit of the protocol node flow definition and model building module defines protocol nodes for each communication protocol frame of the embedded software, and clarifies the static verification rules and dynamic association rules of each node; the model building unit constructs the protocol node flow model by associating each protocol node through a directed graph structure according to the software requirements specification; the interface display unit displays the model in a visual way, and testers can edit and optimize the model by dragging and connecting lines.

[0027] Step 2: Test Data Acquisition Depending on the testing requirements, select either online or offline verification mode. In online mode, the virtual port collector of the verification engine module captures the test data of the embedded software in the simulation platform in real time, including input / output data, interface information, and transmission time information. In offline mode, the file collector captures test data from the test data file of the simulation platform and organizes the data in chronological order.

[0028] Step 3: Model matching and multi-dimensional validation The intelligent model matching unit scans the software interface attributes of the current model library based on the frame header information of the test data, and quickly matches the best protocol node flow model by combining the protocol content weight matching degree. After successful matching, the static rule validator performs basic format verification on the test data based on the static verification rules of the protocol node. The context management subunit of the dynamic rule validator maintains the test context, and the rule triggering and evaluation subunit activates the dynamic association rules, starts timing verification and logic verification, and checks the timing relationship and data logic relationship between nodes.

[0029] Step 4: Verification Result Processing and Report Generation The result receiving unit of the verification result report generation module receives the verification results output by the verification engine module; the classification and statistics unit classifies and statistically analyzes the results according to the protocol node flow model; the error accumulation unit accumulates the number of duplicate errors; and the report generation unit generates a verification report containing semantic diagnostic information, displaying the statistical results and error accumulation in the form of charts.

[0030] Step 5: Data Storage and Reuse Through the protocol node flow model and report storage module, the file storage unit stores protocol node definition information, protocol node flow model and verification report in JSON file format, supporting model import and reuse and report format conversion; the database storage unit uses MongoDB database to store relevant data, ensuring persistent storage and efficient query of data. In subsequent regression testing, the constructed protocol node flow model can be directly reused to ensure the consistency and traceability of the test.

[0031] Example 1: Aerospace Embedded Software Protocol Interaction Test Scenario In aerospace embedded software testing, it is necessary to verify the data correctness and logical consistency of the software during protocol interaction. The test software includes functional modules such as command response, status reporting, and telemetry data transmission. The test environment is built based on the self-developed simulation platform VTest.

[0032] Test process: Step 1: Protocol Node Definition and Model Construction Testers used the protocol node flow definition and model building module to define protocol nodes for various communication protocol frames, including command response frames, periodic telemetry frames, and event reporting frames. Static verification rules were defined for command response frames, specifying the frame header identifier, data length, checksum algorithm, and the legal value range for each data field. Dynamic association rules were defined, designating the predecessor node as the corresponding command sending node and the successor node as the status reporting node. Data association rules required that the status information of the command response data be consistent with that of the subsequent status reporting data. Based on the software requirements specification, the command sending nodes, command response nodes, status reporting nodes, and telemetry data nodes were associated through a directed graph using the drag-and-drop and connection functions of the interface display unit, constructing a protocol node flow model that describes the timing and logical constraints of each node.

[0033] Step 2: Test Data Acquisition Select the online verification mode, start the simulation platform VTest to run the embedded software. The virtual port collector of the verification engine module captures the input and output data, interface information and transmission time information of the software in the simulation platform in real time, including command transmission data, command response data, status reporting data, telemetry data, etc., and transmits the data back to the verification engine through the communication unit.

[0034] Step 3: Model matching and multi-dimensional validation The first model intelligent matching unit scans the software interface attributes in the model library based on the frame header information of the test data, and matches the corresponding protocol node flow model by combining the protocol content weight matching degree. The first static rule validator performs basic format verification on the captured test data based on the static verification rules of each protocol node in the model, checking whether the frame header is correct, whether the data length matches, whether the checksum meets the algorithm requirements, and whether each data field is within the legal value range. The context management subunit of the first dynamic rule validator maintains the test context, recording the most recently sent instructions, received nodes and their key data; the rule triggering and evaluation subunit activates dynamic association rules, and the timing verification checks whether the arrival time of the instruction response node is within the time window defined by the instruction sending node, and starts a timeout timer for the status reporting node; the logical verification extracts data from the test context to verify the consistency of the status of the instruction response data and the status reporting data, the sequence continuity of the telemetry data, etc.

[0035] Step 4: Verification Result Processing and Report Generation The result receiving unit of the verification result report generation module receives static and dynamic verification results; the classification and statistics unit classifies and statistically analyzes the results according to the constructed protocol node flow model; the error accumulation unit accumulates the number of repeated errors; and the report generation unit generates a verification report containing semantic diagnostic information, such as "Error: After successful response to instruction B, the expected status reporting node was not received within the preset time window," and displays the classification and statistics results and error accumulation in chart form.

[0036] Step 5: Data Storage and Reuse The file storage unit of the protocol node flow model and report storage module stores the protocol node definition information, protocol node flow model and verification report in JSON file format. In subsequent software testing of other versions, the model can be directly imported for regression testing. The database storage unit stores the relevant data in the MongoDB database, which is convenient for subsequent querying of historical test data and tracing issues.

[0037] Example 2: Embedded Software Regression Testing Scenario After an iterative update of a certain aerospace embedded software, regression testing is required to verify that the new functions do not affect the original protocol interaction logic, and the previously built protocol node flow model is reused for testing.

[0038] Test process: Step 1: Protocol Node Definition and Model Construction Import the previously built protocol node flow model from the file storage unit of the protocol node flow model and report storage module. This model has defined the protocol nodes of various communication protocol frames and the relationships between nodes. Testers can make minor modifications and adjustments to the model through the interface display unit according to the needs of the software update, without having to rebuild the model.

[0039] Step 2: Test Data Acquisition When the offline verification mode is selected, the simulation platform VTest runs the iterated embedded software and completes the test, generating a test data file. The file collector of the verification engine module captures the test data from this data file, including input and output data, interface information and sending time information, and organizes the data in chronological order.

[0040] Step 3: Model matching and multi-dimensional validation The second model intelligent matching unit matches the imported protocol node stream model based on the frame header information of the test data. After a successful match, the second static rule validator performs basic format verification on the test data. The second dynamic rule validator performs timing verification and logic verification to check whether the timing relationship between nodes and the consistency of data logic meet the model requirements.

[0041] Step 4: Verification Result Processing and Report Generation The verification result report generation module receives the verification results, the classification and statistics unit compiles the verification status according to the model, and the error accumulation unit accumulates duplicate errors; the report generation unit generates a verification report, which clearly defines the errors found during the test and their specific descriptions, and displays the test results in the form of charts.

[0042] Step 5: Data Storage and Reuse The verification report of this test and the adjusted protocol node flow model are stored in the file storage unit and the database storage unit to update the test assets and provide reusable models and traceable test data for regression testing in subsequent versions.

[0043] This invention effectively solves the problems of single verification dimensions, reliance on manual judgment, and difficulty in problem localization in traditional embedded software testing by constructing an innovative protocol node flow model and a multi-dimensional correlation verification mechanism, and has important engineering application value.

[0044] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An embedded software testing system based on protocol node stream and multi-dimensional correlation verification, characterized in that: It includes a protocol node flow definition and model building module, a verification engine module, a verification result report generation module, and a protocol node flow model and report storage module; The protocol node flow definition and model building module is used to define nodes in the communication protocol frames of embedded software and build a protocol node flow model based on the timing and logical constraints between nodes. The verification engine module interacts with the simulation platform to obtain test data from the embedded software, performs static compliance verification and dynamic correlation verification on the test data based on the protocol node flow model, and outputs the verification results. The verification result report generation module receives the verification results output by the verification engine module, performs classification statistics and error analysis on the verification results, and generates a verification report containing diagnostic information. The protocol node flow model and report storage module is used to store protocol node flow definition information, protocol node flow model and verification report, and supports the reuse of protocol node flow model and the traceability of verification data.

2. The embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 1, characterized in that: The protocol node flow definition and model construction module includes a node definition unit, a model construction unit, and an interface display unit; The node definition unit is used to define a corresponding protocol node for each type of communication protocol frame. Each protocol node includes static verification rules and dynamic association rules. The static verification rules describe the inherent structure of the protocol frame, including the frame header, length field offset, valid data, checksum algorithm, and the range of valid values ​​or data types for each data field. The dynamic association rules define the behavioral logic of protocol nodes in the data stream, including predecessor nodes, successor nodes, and data association rules; the predecessor node rules define which types of nodes can trigger this node; the successor node rules define the types of nodes expected to appear within a preset time window after this node appears; the data association rules define the logical relationship between this node and other node data, including sequence continuity, state consistency, and data rationality. The model building unit is used to construct a protocol node flow model by associating multiple protocol nodes through a directed graph structure according to the software requirements specification. The nodes of the directed graph are protocol nodes, and the directed edges represent the temporal and logical constraint relationships between the nodes. The interface display unit is used to visually display the directed graph structure of the protocol node flow model, and supports building and editing the model by dragging and connecting lines.

3. The embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 1, characterized in that: The verification engine module includes an online verification engine and an offline verification engine. The online verification engine works synchronously with the simulation platform, while the offline verification engine works after the simulation is completed. The online verification engine includes a virtual port collector, a first model intelligent matching unit, a first static rule verifier, and a first dynamic rule verifier; The virtual port collector is used to capture test data of embedded software in the simulation platform in real time. The test data includes input and output data, interface information and transmission time information. The first model intelligent matching unit is used to match the corresponding protocol node stream model based on the frame header information of the test data; The first static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model; The first dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of the protocol nodes in the matching model; The offline verification engine includes a file collector, a second model intelligent matching unit, a second static rule verifier, and a second dynamic rule verifier; The file collector is used to capture test data of embedded software from the test data file of the simulation platform. The test data includes input / output data, interface information, and transmission time information. The second model intelligent matching unit is used to match the corresponding protocol node stream model based on the frame header information of the test data; The second static rule validator is used to perform basic format verification on the test data based on the static verification rules of the protocol nodes in the matching model; The second dynamic rule validator is used to perform temporal and logical verification on the test data based on the dynamic association rules of protocol nodes in the matching model.

4. The embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 3, characterized in that: Both the first dynamic rule validator and the second dynamic rule validator include a context management subunit and a rule triggering and evaluation subunit; The context management subunit is used to maintain the test context and record recently occurring key events, including recently sent instructions, received nodes and their key data; The rule triggering and evaluation subunit is used to activate the dynamic association rule of the node after successfully matching and parsing the protocol node, and to start timing verification and logic verification. The timing verification is used to check whether the arrival time of the current node is within the time window defined by its predecessor node, and to start a timeout timer for the expected successor node of the current node. The logic verification is used to extract relevant data from the test context and verify the data association rule.

5. An embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 3, characterized in that: Both the first and second model intelligent matching units quickly match the best protocol node flow model by scanning the software interface attributes of the current model library and combining the protocol content weight matching degree. If the matching fails, the corresponding test data is discarded. If the matching is successful, the subsequent static and dynamic verification process is triggered.

6. The embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 1, characterized in that: The verification result report generation module includes a result receiving unit, a classification and statistics unit, an error accumulation unit, and a report generation unit; The result receiving unit is used to receive the static verification results and dynamic verification results output by the verification engine module; The classification and statistics unit is used to classify and statistically analyze the verification results according to the protocol node flow model, distinguishing between three result types: verification passed, warning, and error. The error accumulation unit is used to accumulate the number of repeated identical errors. The report generation unit is used to generate a verification report containing semantic diagnostic information. The diagnostic information includes a detailed description of errors such as static frame content errors, predecessor and successor node protocol errors, and response timeouts. The report also displays the classification statistics and cumulative error information in the form of charts.

7. An embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to claim 1, characterized in that: The protocol node flow model and report storage module includes a file storage unit and a database storage unit; The file storage unit uses JSON file format to store protocol node definition information, protocol node flow model and verification report, supports import and reuse of protocol nodes and models, and format conversion of verification report; The database storage unit adopts the protocol nodes, protocol node flow model, and verification results used in the MongoDB database storage project to ensure persistent data storage and efficient querying.

8. A testing method for an embedded software testing system based on protocol node stream and multi-dimensional correlation verification according to any one of claims 1-7, characterized in that: Includes the following steps: Step 1: Protocol Node Definition and Model Construction The protocol node flow definition and model building module defines protocol nodes for each communication protocol frame in the embedded software, clarifies the static verification rules and dynamic association rules for each node, and builds a protocol node flow model by associating each protocol node through a directed graph structure according to the software requirements specification. Step 2: Test Data Acquisition Choose between online or offline verification modes based on your testing needs. In online mode, test data of embedded software in the simulation platform is captured in real time through a virtual port collector; in offline mode, test data is captured from the test data file of the simulation platform through a file collector. Step 3: Model matching and multi-dimensional validation The model intelligent matching unit matches the corresponding protocol node flow model based on the frame header information of the test data; after successful matching, the basic format is verified by the static rule validator, and the timing and logic are verified by the dynamic rule validator. Step 4: Verification Result Processing and Report Generation The verification result report generation module receives the verification results, classifies and statistically analyzes the results and accumulates errors, and generates a verification report containing semantic diagnostic information. Step 5: Data Storage and Reuse The protocol node flow model and report storage module stores protocol node definition information, protocol node flow model and verification report in the form of files or databases, supporting the reuse of the model and the traceability of test data in subsequent regression testing.