Universal bus test system based on XML (Extensible Markup Language)

By designing a general-purpose bus testing system based on XML, the standardization and generalization issues of bus testing systems were solved. This enabled efficient acquisition, parsing, and display of multi-standard bus data, improving the overall level of the testing system and reducing development costs.

CN121658296APending Publication Date: 2026-03-13SHENYANG AIRCRAFT DESIGN INST AVIATION IND CORP OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The lack of standardization and universality in existing bus testing systems leads to redundant construction of basic hardware and difficulties in data sharing between systems, failing to meet the needs of integrated verification and automated comprehensive testing.

Method used

Design a general-purpose bus testing system based on XML. The system preprocesses the bus protocol and converts it into an XML-formatted bus interface control file through the ICD management subsystem. It adopts a tree structure for management and achieves multi-threaded parallel operation through bus monitoring, data storage, and human-computer interaction threads. It supports data acquisition, unpacking, and display of multiple bus standards.

Benefits of technology

A multi-standard bus test system that is easy to maintain and port, has been implemented, which improves the efficiency of bus data testing and the level of comprehensive test integration, while reducing development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658296A_ABST
    Figure CN121658296A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of bus testing, and particularly relates to a universal bus testing system based on XML. The system comprises an ICD management subsystem used for preprocessing a bus protocol, converting the preprocessed bus protocol into a bus interface control file in an XML format, and managing the bus interface control file by adopting a tree structure; the bus test subsystem comprises a bus monitoring thread, a data storage thread and a man-machine interaction thread, and the bus monitoring thread is used for collecting bus data and unpacking the bus data; the data storage thread is used for storing the data packet generated by the bus monitoring thread; the man-machine interaction thread is used for responding to man-machine interaction interface operation, and when the man-machine interaction interface operation is data real-time analysis display, the data packet generated by the bus monitoring thread is analyzed and displayed. According to the invention, the bus data test efficiency and the test integration level can be improved, and the development cost of the test system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of bus testing technology, and specifically relates to a general bus testing system based on XML. Background Technology

[0002] Bus technology is widely used in the industrial field. Bus testing usually involves designing dedicated test systems based on different bus standards and bus communication protocols under different usage scenarios. This leads to redundant construction of basic hardware for the test system and the need to establish additional physical channels for data sharing between systems. With the increasing requirements for integrated verification and automated comprehensive testing, the standardization and generalization of bus test systems are becoming more and more urgent.

[0003] Therefore, there is an urgent need for a technical solution to overcome or mitigate at least one of the aforementioned defects in the existing technology. Summary of the Invention

[0004] The purpose of this application is to provide a general-purpose bus testing system based on XML to solve at least one problem existing in the prior art.

[0005] The technical solution of this application is:

[0006] A general-purpose bus testing system based on XML, comprising:

[0007] The ICD management subsystem is used to preprocess the bus protocol, convert the preprocessed bus protocol into an XML format bus interface control file, and manage the bus interface control file in a tree structure.

[0008] The bus testing subsystem includes a bus monitoring thread, a data storage thread, and a human-computer interaction thread.

[0009] The bus monitoring thread is used for bus data acquisition and bus data unpacking.

[0010] The data storage thread is used to store the data packets generated by the bus monitoring thread;

[0011] The human-computer interaction thread is used to respond to human-computer interaction interface operations. When the human-computer interaction interface operation is real-time data parsing and display, it parses and displays the data packets generated by the bus monitoring thread.

[0012] In at least one embodiment of this application, the ICD management subsystem preprocesses the bus protocol, including:

[0013] The bus protocols of 1394b bus, HB6096 bus, and RS422A bus are summarized, and the common divisor part and the differential part are extracted. The common divisor part is processed uniformly, and the differential part is configured and managed.

[0014] In at least one embodiment of this application, the ICD management subsystem converts the preprocessed bus protocol into a bus interface control file in XML format, including:

[0015] Based on the characteristics of the bus data packets and data types, the preprocessed bus protocol is converted into an XML-formatted bus interface control file.

[0016] In at least one embodiment of this application, the ICD management subsystem manages the bus interface control file using a tree structure, including:

[0017] The root node is of bus type, and the child nodes are designed according to different bus types:

[0018] In the 1394b bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are data blocks, the child nodes of the data blocks are signal words, the child nodes of the signal words are signal fields, and the signal fields define the data type and data length.

[0019] In the HB6096 bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are signal words, the child nodes of the signal words are signal fields, and the data type and data length are defined in the signal field;

[0020] In the RS422A bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are receiving devices, the child nodes of the receiving devices are data words, the child nodes of the data words are signal fields, and the data type and data length are defined in the signal fields.

[0021] In at least one embodiment of this application, the bus monitoring thread performs 1394b bus data unpacking in the following manner:

[0022] Extract the 1394 header and ASM header according to the 1394b bus protocol, obtain the data packet channel number and message ID, extract the 32-bit data word source code based on the byte offset of the data word within the packet, extract the signals within the data word, and extract the signal source code based on the bit offset and length of the signal within the data word.

[0023]

[0024] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0025] In at least one embodiment of this application, the bus monitoring thread performs HB6096 bus data unpacking in the following manner:

[0026] Extract the LABEL and SDL according to the HB6096 bus protocol, obtain the message label and source / target device, extract the signals within the data word based on the message label and source / target device, and extract the signal source code based on the signal offset and length within the data word.

[0027]

[0028] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0029] In at least one embodiment of this application, the bus monitoring thread performs RS422A bus data unpacking in the following manner:

[0030] Extract the signal source code based on the signal offset and length within the data word:

[0031]

[0032] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0033] In at least one embodiment of this application, the human-computer interaction thread parses and displays the data packets generated by the bus monitoring thread, including:

[0034] When the data type is Boolean, it is parsed directly, and valid or invalid parsing is performed according to the definition of 0 and 1.

[0035] When the data type is an enumeration, key-value pairs are parsed.

[0036] When the data type is numeric, it is parsed according to the definition of whether there is a sign bit, LSB or MSB, or according to the specified algorithm.

[0037] In at least one embodiment of this application, the human-computer interaction interface operation further includes initialization, monitoring control, storage control, playback control, and data filtering.

[0038] The invention has at least the following beneficial technical effects:

[0039] This application presents an XML-based universal bus testing system. By summarizing and analyzing different bus standards and leveraging the simplicity and convenience of XML in data description and exchange, it designs a test system that is easy to maintain, easy to port, and applicable to multiple bus standards. This improves the efficiency of bus data testing, enhances the comprehensiveness of experimental testing, and reduces the development cost of the test system. Attached Figure Description

[0040] Figure 1 This is an XML-based general bus test system architecture diagram of one embodiment of this application;

[0041] Figure 2 This is an ICD management flowchart of an ICD management subsystem according to one embodiment of this application;

[0042] Figure 3 This is a thread diagram of the bus test subsystem according to one embodiment of this application;

[0043] Figure 4 This is the initial interface of a general bus test system according to one embodiment of this application;

[0044] Figure 5 This is a bus test information display interface of a general bus test system according to one embodiment of this application;

[0045] Figure 6 This is a query and display interface for a general bus test system according to one embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0047] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the scope of protection of this application.

[0048] The following is in conjunction with the appendix Figures 1 to 6 This application will be described in further detail.

[0049] This application provides a general-purpose bus testing system based on XML, such as... Figure 1As shown, it includes:

[0050] The ICD management subsystem is used to preprocess the bus protocol, convert the preprocessed bus protocol into an XML format bus interface control file, and manage the bus interface control file in a tree structure.

[0051] The bus testing subsystem includes a bus monitoring thread, a data storage thread, and a human-computer interaction thread.

[0052] The bus monitoring thread is used for bus data acquisition and bus data unpacking.

[0053] The data storage thread is used to store the data packets generated by the bus monitoring thread;

[0054] The human-computer interaction thread is used to respond to human-computer interaction interface operations. When the human-computer interaction interface operation is real-time data parsing and display, it parses and displays the data packets generated by the bus monitoring thread.

[0055] This application presents an XML-based universal bus testing system. The ICD management subsystem is used to convert, manage, and store bus interface control files according to different bus protocols, solving the problem that different bus ICD file formats and description languages ​​cannot be read using a universal method. It provides standard configuration parameters for the bus testing subsystem. The bus testing subsystem is used to complete functions such as bus data acquisition, data parsing and display, and storage and playback.

[0056] In a preferred embodiment of this application, the ICD management subsystem preprocesses the bus protocol, including:

[0057] The bus protocols of 1394b bus, HB6096 bus, and RS422A bus are summarized, and the common divisor and differential parts are extracted. The common divisor parts are processed uniformly, and the differential parts are configured and managed.

[0058] The 1394b bus data packets are asynchronous stream packets, consisting of a 1394 header, an ASM header, payload data, a trailer, and a 1394 data CRC. Data is organized and ordered in 32-bit increments, and addressed based on the channel number and message ID within the ASM header. STOF packets are special asynchronous stream packets, excluding the ASM header and trailer. The 1394 header, trailer, and 1394 data CRC are used for data validity verification. The HB6096 bus basic information unit is a 32-bit data word, composed of LABEL, SDL, DATA, and SSM. Addressing is based on LABEL and SDL, and SSM is used for data validity verification. The RS422A bus transmits data packets, which include a header, data, and trailer. The header and trailer are used for data verification, and the data is organized in 8-bit increments.

[0059] In this embodiment, the ICD management subsystem converts the preprocessed bus protocol into an XML-formatted bus interface control file, including:

[0060] Based on the characteristics of the bus data packets and data types, the preprocessed bus protocol is converted into an XML-formatted bus interface control file.

[0061] XML is a simple data storage language that can describe data using a series of simple tags. It is easy to read and write data in any application, and it is also easy to load XML data into programs for use, facilitating the implementation of general ICD management.

[0062] In this embodiment, the ICD management subsystem manages the bus interface control files using a tree structure, including:

[0063] The root node is of bus type, and the child nodes are designed according to different bus types, as follows:

[0064] In the 1394b bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are data blocks (with unique message IDs), the child nodes of the data blocks are signal words (32 bits in length), and the child nodes of the signal words are signal fields. The signal fields define the data type and data length in detail, realizing the precise definition of each signal for automatic mapping and parsing.

[0065] In the HB6096 bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are signal words (32 bits in length), and the child nodes of the signal words are signal fields. The signal fields define the data type and data length in detail, realizing the precise definition of each signal for automatic mapping and parsing.

[0066] In the RS422A bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are receiving devices, the child nodes of the receiving devices are data words, and the child nodes of the data words (8 bits in length) are signal fields. The signal fields define the data type and data length in detail, realizing the precise definition of each signal for automatic mapping and parsing.

[0067] In one embodiment of this application, the ICD management subsystem performs the ICD management process of user-edited bus interface control files as follows: Figure 2 As shown.

[0068] This application discloses an XML-based general-purpose bus testing system. The bus testing subsystem employs a multi-threaded parallel design, comprising a bus monitoring thread, a data storage thread, and a human-computer interaction thread. The bus monitoring thread is responsible for monitoring bus data, acquiring new data, and unpacking the acquired data. It also handles related bus hardware operations. The data storage thread ensures complete, lossless storage of data packets generated by the bus monitoring thread for data playback. The human-computer interaction thread responds to user interface operations, including initialization, monitoring control, storage control, playback control, real-time data parsing and display, and data filtering. In one embodiment of this application, when monitoring and control are performed through the bus testing subsystem, the flow of the bus monitoring thread, data storage thread, and human-computer interaction thread is as follows: Figure 3 As shown.

[0069] In one embodiment of this application, since different bus protocols use different packet assembly methods, the bus monitoring thread needs to design a corresponding unpacking method when unpacking bus data. The specific methods for the 1394b bus, HB6096 bus, and RS422A bus are as follows:

[0070] The bus monitoring thread unpacks 1394b bus data in the following way:

[0071] Extract the 1394 header (double words 0-1) and ASM header (double words 2-5) according to the 1394b bus protocol, obtain the data packet channel number and message ID, extract the 32-bit data word source code based on the byte offset of the data word within the packet, extract the signals within the data word, and extract the signal source code based on the bit offset and length of the signal within the data word:

[0072]

[0073] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0074] The bus monitoring thread unpacks HB6096 bus data in the following way:

[0075] Extract the LABEL and SDL according to the HB6096 bus protocol, obtain the message label and source / target device, extract the signals within the data word based on the message label and source / target device, and extract the signal source code based on the signal offset and length within the data word.

[0076]

[0077] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0078] The bus monitoring thread performs RS422A bus data unpacking in the following way:

[0079] Extract the signal source code based on the signal offset and length within the data word:

[0080]

[0081] Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

[0082] In this embodiment, after the bus data is unpacked, signal parsing is performed to convert the raw data into actual engineering quantities. The human-computer interaction thread parses and displays the data packets generated by the bus monitoring thread according to different data types, including:

[0083] When the data type is Boolean, it is parsed directly, and valid or invalid parsing is performed according to the definition of 0 and 1.

[0084] When the data type is enumeration, it is parsed as a key-value pair; ICD defines the enumeration signal as a key-value pair and retrieves the corresponding value based on the original data value obtained from unpacking.

[0085] When the data type is numeric, it is parsed according to the definition of whether there is a sign bit, LSB or MSB, or according to the specified algorithm.

[0086] The complete set of commonly used data types for the three types of buses is shown in the table below. By merging similar items according to the parsing method, the data types can be summarized as Boolean (bit), enumeration, and numeric.

[0087] Table 1 Commonly Used Bus Data Types and Bus Resolution Methods

[0088]

[0089] In one embodiment of this application, the operation process of the XML-based universal bus testing system is as follows:

[0090] a) Enter ICD data according to test requirements and generate XML-based ICD files for automatic parsing of bus data;

[0091] b) Start the bus test subsystem; the initial interface is as follows: Figure 4 As shown, the main interface consists of a menu bar, status bar, ICD display area, data display area, log output area, etc. The menu bar contains the main function menu of the system. The status bar displays the startup status of three types of hardware boards. The ICD display area automatically imports ICD files of buses such as 1394b and displays them in a tree structure. Each node can be set to select a status. The data display area displays the parsed value of the selected signal, and also displays the data block where the signal is located and the timestamp.

[0092] c) Click "Start Monitoring" to activate the bus data acquisition function;

[0093] d) Select the signal of interest in the tree structure on the left for analysis and display, as shown in the interface below. Figure 5 As shown;

[0094] e) Enter the desired signal in the text box to query and display it. The tree structure will perform fuzzy matching and highlight and expand the matched signals, such as... Figure 6 As shown;

[0095] f) Click "Stop Monitoring" to stop the bus data acquisition function;

[0096] g) After “Start Monitoring”, you can click the save button on the corresponding bus to save the data.

[0097] This application presents an XML-based universal bus testing system that is easy to maintain, easy to port, and applicable to multiple bus standards. It helps improve the efficiency of bus data testing, the level of comprehensive testing, and reduces the development cost of the testing system. The implementation of the testing system for the 1394b bus, HB6096 bus, and RS422A bus is described in detail. Other bus tests can be implemented by following this approach.

[0098] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A universal bus testing system based on XML, characterized in that, include: The ICD management subsystem is used to preprocess the bus protocol, convert the preprocessed bus protocol into an XML format bus interface control file, and manage the bus interface control file in a tree structure. The bus testing subsystem includes a bus monitoring thread, a data storage thread, and a human-computer interaction thread. The bus monitoring thread is used for bus data acquisition and bus data unpacking. The data storage thread is used to store the data packets generated by the bus monitoring thread; The human-computer interaction thread is used to respond to human-computer interaction interface operations. When the human-computer interaction interface operation is real-time data parsing and display, it parses and displays the data packets generated by the bus monitoring thread.

2. The XML-based universal bus testing system according to claim 1, characterized in that, The ICD management subsystem preprocesses the bus protocol, including: The bus protocols of 1394b bus, HB6096 bus, and RS422A bus are summarized, and the common divisor part and the differential part are extracted. The common divisor part is processed uniformly, and the differential part is configured and managed.

3. The XML-based universal bus testing system according to claim 2, characterized in that, The ICD management subsystem converts the preprocessed bus protocol into an XML-formatted bus interface control file, including: Based on the characteristics of the bus data packets and data types, the preprocessed bus protocol is converted into an XML-formatted bus interface control file.

4. The XML-based universal bus testing system according to claim 3, characterized in that, The ICD management subsystem manages the bus interface control files using a tree structure, including: The root node is of bus type, and the child nodes are designed according to different bus types: In the 1394b bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are data blocks, the child nodes of the data blocks are signal words, the child nodes of the signal words are signal fields, and the signal fields define the data type and data length. In the HB6096 bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are signal words, the child nodes of the signal words are signal fields, and the data type and data length are defined in the signal field; In the RS422A bus tree structure, the child nodes under the bus type are transmitting devices, the child nodes of the transmitting devices are receiving devices, the child nodes of the receiving devices are data words, the child nodes of the data words are signal fields, and the data type and data length are defined in the signal fields.

5. The XML-based universal bus testing system according to claim 4, characterized in that, The bus monitoring thread performs 1394b bus data unpacking in the following way: Extract the 1394 header and ASM header according to the 1394b bus protocol, obtain the data packet channel number and message ID, extract the 32-bit data word source code based on the byte offset of the data word within the packet, extract the signals within the data word, and extract the signal source code based on the bit offset and length of the signal within the data word. Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

6. The XML-based universal bus testing system according to claim 5, characterized in that, The bus monitoring thread performs HB6096 bus data unpacking in the following way: Extract the LABEL and SDL according to the HB6096 bus protocol, obtain the message label and source / target device, extract the signals within the data word based on the message label and source / target device, and extract the signal source code based on the signal offset and length within the data word. Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

7. The XML-based universal bus testing system according to claim 6, characterized in that, The bus monitoring thread performs RS422A bus data unpacking in the following way: Extract the signal source code based on the signal offset and length within the data word: Where Signal_Value is the signal source code, Data_Value is the data word source code, Offset is the bit offset of the signal within the data word, and Size is the signal length.

8. The XML-based universal bus testing system according to claim 7, characterized in that, The human-computer interaction thread parses and displays the data packets generated by the bus monitoring thread, including: When the data type is Boolean, it is parsed directly, and valid or invalid parsing is performed according to the definition of 0 and 1. When the data type is an enumeration, key-value pairs are parsed. When the data type is numeric, it is parsed according to the definition of whether there is a sign bit, LSB or MSB, or according to the specified algorithm.

9. The XML-based universal bus testing system according to claim 8, characterized in that, Human-computer interaction interface operations also include initialization, monitoring and control, storage control, playback control, and data filtering.