A method for processing multiple data link messages
Patent Information
- Application Number
- CN202310318920.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-03-28
AI Technical Summary
[0005]本发明旨在提供一种多数据链消息通用处理方法,以解决多数据链消息处理的硬件适配性和可移植性的问题
[0028]本发明通过对数据链消息格式进行对齐和拆分的方式,达到大端和小端序下的统一结构体定义,并在消息接收和发送处理时进行对应的合并或拆分操作,从而实现了数据链消息处理对不同端序硬件平台的通用化处理流程。这种处理方法仅需要对表示大小端序的宏常量进行设置,就可以使得多数据链消息处理软件运行在对应端序的处理器上,极大的降低了软件开发和测试成本,提升了多数据链消息处理软件的硬件平台适配性和可移植性,具备较强的工程应用价值。
Smart Images

Figure CN116418884B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a general processing method for multi-data-link messages. Background Technology
[0002] A data link is a wireless data communication system that transmits formatted digital information in real time in a bit-oriented manner according to a defined message format and communication protocol, enabling rapid information exchange and sharing. With the iterative development of data link technology and changes in application requirements, various types of data links have been designed and developed. These data links differ in their operating mechanisms, operating distances, transmission rates, latency, and the message format standards they employ. Therefore, when a platform system simultaneously connects to multiple data links, the issue of multi-data-link message integration and processing needs to be considered.
[0003] The Common Link Integration Processor (CLIP) in the United States is a typical example of a multi-datalink message processing system, capable of receiving, distributing, and forwarding various types of datalink messages. Addressing the issue of the tight binding between datalink message processing system implementation and message format, Guo Yaqin proposed a method using XML technology for datalink message processing. This reduces the impact of message format changes on the software and improves the scalability of datalink message processing. Wang Zhen et al. further refined the XML-based datalink information description scheme, designing conversion rules and information parsing processes between datalink messages and XML description documents. Zeng Tao et al. designed a multi-datalink collaborative processing module, comprising three parts: link protocol processing, link state control, and link data processing. This module shields the differences in physical transmission media among different types of datalinks, enabling collaborative processing of data information from multiple datalinks. Jiao Guanglun et al. proposed a multi-datalink integrated architecture. By constructing a general information processing service, a multi-datalink platform interface, and a datalink terminal interface, it can unify multi-link message processing and reduce the impact of the datalink system on the platform system. The patent "Method for Unified Division of Data Chain Information Processing Flow" (authorization announcement number: CN 105068862B) proposes a transaction-based data chain message processing flow division strategy, which facilitates the framework design of multi-data chain message processing.
[0004] Related research mainly addresses the message integration and processing issues arising from different data link message formats by focusing on message description methods or message processing architecture design. However, it does not consider the interpretation problems caused by different hardware platforms in data link message processing. As application software, multi-data link message processing needs to run on a general-purpose processor with an operating system. Due to the different memory endianness supported by different processors, hardware adaptation or portability issues arise for multi-data link message processing. Summary of the Invention
[0005] The present invention aims to provide a general processing method for multi-data-link messages to solve the problems of hardware adaptability and portability in multi-data-link message processing.
[0006] This invention provides a general method for processing multi-data-link messages, comprising:
[0007] By aligning and splitting data elements in the data chain message format, a unified structure definition for the data chain message format under both big-endian and little-endian orders is achieved.
[0008] For split data elements, the value of the data element is read through a merging operation during message reception and written out through a splitting operation during message sending, thereby enabling the message processing flow to adapt to hardware platforms with different endpoints.
[0009] Furthermore, the method for aligning and splitting data elements in the data link message format includes:
[0010] For bit-oriented message formats in data link messages, data elements in the data link message format are aligned and split according to the 32-bit unsigned integers of type UINT32.
[0011] Furthermore, when aligning and splitting data elements in the data link message format according to the 32-bit unsigned integer of type UINT32:
[0012] First, each data element is given a bit field in a 32-bit unsigned integer according to the big-endian mode of the data link message format, which represents the number of bits occupied by the data element. If a data element cannot be completely represented in a 32-bit unsigned integer due to its bit position, the data element is split into two 32-bit unsigned integers.
[0013] For little-endian mode, simply flip the positions of the data elements in each UINT32 type in big-endian mode to obtain the unified structure definition of the data chain message format in little-endian mode.
[0014] Furthermore, the method for splitting this data element into two 32-bit unsigned integers is as follows:
[0015] The data element is split into a high-order part and a low-order part. The high-order part is represented in the current 32-bit unsigned integer, and the low-order part is represented in the next 32-bit unsigned integer.
[0016] Furthermore, if there are remaining bits after the last 32-bit unsigned integer represents all data elements of the data chain message, then the remaining bit positions are defined as padding bits.
[0017] Furthermore, if padding bits are present, the bit length of the padded message word will become an integer multiple of 32 bits.
[0018] Furthermore, during message reception and processing, the message word of each data chain message is first read according to the endianness of the local hardware platform. If the local hardware platform is big-endian, the data element of the message word length is directly copied from the received message content. If the local hardware platform is little-endian, the received message content is converted from big-endian to little-endian every 32 bits, and then the endianness-converted data element is copied. Subsequently, since the data elements in the unified structure may be split, the value of the data element is read through a merging operation according to the bit allocation relationship after the split.
[0019] Furthermore, suppose a data element is represented by m bits in the message word structure. If this data element is split into a high-order part and a low-order part in the unified structure, and the proportion of the high-order part to the number of bits is k, and the proportion of the low-order part to the number of bits is mk; then the numerical representation of the data element read through the merge operation is:
[0020] The value of a data element = the value of the high-order part of the data element * pow(2,mk) + the value of the low-order part of the data element;
[0021] Where pow(2,mk) represents 2 raised to the power of mk.
[0022] Furthermore, when sending a message, since the data elements in the unified structure may be split, the value of the data element is written out through the splitting operation according to the bit allocation relationship after splitting.
[0023] Furthermore, the numerical representation of the data elements written through the splitting operation is as follows:
[0024] The value of the high-order part of the split data element = floor(data element value / pow(2,mk));
[0025] The value of the lower part of the split data element = mod(data element value, pow(2, mk));
[0026] Here, floor(·) represents the floor function, and mod(data element value, pow(2, mk)) represents the modulo of the data element value raised to the power of 2.
[0027] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0028] This invention achieves a unified structure definition for both big-endian and little-endian message formats by aligning and splitting the message format. Corresponding merging or splitting operations are performed during message reception and transmission, thus realizing a universal processing flow for data link message processing across different endianness hardware platforms. This method only requires setting macro constants representing big-endian and little-endian orders, enabling multi-data link message processing software to run on processors with the corresponding endianness. This significantly reduces software development and testing costs, improves the hardware platform adaptability and portability of multi-data link message processing software, and possesses strong engineering application value. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A schematic diagram of the external interface for multi-data-chain message processing.
[0031] Figure 2a This is a schematic diagram of the elements of a data link message receiving interface.
[0032] Figure 2b A schematic diagram of the elements of a data link message sending interface.
[0033] Figure 3 This is a flowchart illustrating the general processing method for multiple data chain messages in an embodiment of the present invention.
[0034] Figure 4 This is a schematic diagram of the initial word structure of the FJ series message format used in the Link-22 data link in this embodiment of the invention.
[0035] Figure 5 This is a schematic diagram of the unified structure definition of the initial characters of the FJ series message format after splitting and alignment in an embodiment of the present invention.
[0036] Figure 6 This is a schematic diagram illustrating the process of receiving and processing multiple data links under a unified structure definition in an embodiment of the present invention.
[0037] Figure 7 This is a schematic diagram illustrating the process of sending and processing multiple data links under a unified structure definition in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0039] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0040] Example
[0041] Figure 1 A schematic diagram of the external interface for multi-data-chain message processing is provided. The multi-data-chain message processing software receives formatted messages from various data chains through the data chain message receiving interface, performs message format parsing, and then reports them to the system application through the application information sending interface. The multi-data-chain message processing software also obtains information to be sent from the upper-layer system application through the application information receiving interface, assembles the messages into packets according to the message format, and then sends them to the corresponding data chains through the data chain message sending interface. The application information sending interface and information receiving interface are determined by the upper-layer system application, and the information interface elements differ between different system applications; this invention does not impose constraints on them. To achieve unified processing of multi-data-chain messages, the multi-data-chain message processing software imposes unified constraints on the interfaces, such as… Figure 2a As shown, the data elements included in the data link message receiving interface are timestamp, serial number, message link, message source ID, and received message content; for example... Figure 2b As shown, the data elements included in the data link message sending interface are timestamp, sequence number, message link, message destination ID, and message content. The received and sent message contents are data bits that conform to the corresponding data link message format standard and are transmitted in big-endian format according to the common network byte order.
[0042] To facilitate rapid portability of multi-data-link message processing across processors with both big-endian and little-endian storage modes, a unified structure definition for the data-link message format is required under both big-endian and little-endian order. Each data-link message generally consists of an initial word, an extension word, and consecutive words in that order. The initial word is mandatory, while the extension and consecutive words are added as needed based on the information content. Therefore, this embodiment proposes a general processing method for multi-data-link messages, such as... Figure 3 As shown, it includes:
[0043] By aligning and splitting data elements in the data chain message format, a unified structure definition for the data chain message format under both big-endian and little-endian orders is achieved.
[0044] For split data elements, the value of the data element is read through a merging operation during message reception and written out through a splitting operation during message sending, thereby enabling the message processing flow to adapt to hardware platforms with different endpoints.
[0045] Since data elements in the message word of the data link message format are defined bit-orientedly, a single data element typically does not exceed 32 bits. Therefore, in this embodiment, for the bit-oriented message format of the data link message, the data elements of the data link message format are aligned and split according to a 32-bit unsigned integer of type UINT32. Specifically:
[0046] First, following the big-endian format of the data link message, each data element is given a bit field in a 32-bit unsigned integer, representing the number of bits occupied by that data element. If a data element cannot be fully represented in a single 32-bit unsigned integer due to its bit position, it is split into two 32-bit unsigned integers. A preferred splitting method is to divide the data element into a high-order part and a low-order part. The high-order part is represented in the current 32-bit unsigned integer, and the low-order part is placed in the next 32-bit unsigned integer. Further, if there are remaining bits after the last 32-bit unsigned integer represents all data elements of the data link message, these remaining bit positions are defined as padding bits. Furthermore, if padding bits are present, the bit length of the padded message word will become an integer multiple of 32 bits. For little-endian, simply flipping the data element positions in each UINT32 type in the big-endian format yields the unified structure definition for the little-endian data link message format.
[0047] like Figure 4 As shown, taking the initial word of the FJ series message format used by the Link-22 data link as an example, this message word has a total of 72 bits. Besides the fixed information fields from the series indicator to the message length indicator, there is a 57-bit data field. Assume that this data field contains data elements A, B, and C, with bit positions 15 to 32, 33 to 51, and 52 to 71, respectively. According to the above rules, the unified structure definition of this initial word message format in both big-endian and little-endian modes is as follows: Figure 5As shown, the initial word for this message format uses three UNIT32 types. The last 32-bit unsigned integer has 24 bits remaining, which is represented by the padding bit msgPad. After padding, a message word is expanded from 72 bits to 96 bits. Of the three data elements in the data field, data element A is split into the first and second UNIT32 types, data element C is split into the second and third types, and data element B is retained intact in the second type. Under this unified structure definition, if the processor hardware supports big-endian, the macro constant Big_Endian is defined as 1, thus making big-endian valid in the unified structure definition of the data link message format; otherwise, the macro constant Big_Endian is defined as 0. Similarly, a unified structure definition can be used for extended words and consecutive words in the data link message format.
[0048] Under the above unified structure definition, the multi-data-link message receiving and processing flow is as follows: Figure 6 As shown, it includes the following steps:
[0049] Step 11: Identify the message format corresponding to the data bits in the received message content based on the message link field of the data link message receiving interface.
[0050] Step 12: For each message format, sequentially read the initial word, extended word, and contiguous word of each data link message from the received message content. During reading, if in big-endian mode (macro constant Big_Endian defined as 1), directly copy the data elements of the message word length from the received message content; if in little-endian mode (macro constant Big_Endian defined as 0), perform a big-endian to little-endian conversion on the received message content every 32 bits, and then copy the endian-converted data elements.
[0051] Step 13: Read the value of the data element through a merge operation. Suppose a data element is represented by m bits in the message word structure. Due to bit position, this data element is split into a high-order part and a low-order part in the unified structure. The proportion of the high-order part to the number of bits after splitting is k, and the proportion of the low-order part to the number of bits is mk. Then, the value of the data element read through the merge operation is represented as:
[0052] The value of a data element = the value of the high-order part of the data element * pow(2,mk) + the value of the low-order part of the data element;
[0053] Where pow(2,mk) represents 2 raised to the power of mk.
[0054] Step 14: After the data element values of each merge operation are adapted and converted such as precision, they are filled into the corresponding application information sending interface and reported to the upper-level system application.
[0055] Under the above unified structure definition, the multi-data-link message sending and processing flow is as follows: Figure 7 As shown, it includes the following steps:
[0056] Step 21: Obtain the data to be sent by the system application from the application information receiving interface, and determine the message sending data link according to the message processing agreement with the system application.
[0057] Step 22: Based on the selected data link message format, since data elements in the unified structure may be split, according to the bit allocation relationship after splitting, write out the value of the data element through the splitting operation and fill it into the high and low bits of the data element in the unified structure. The calculation is as follows:
[0058] The value of the high-order part of the split data element = floor(data element value / pow(2,mk));
[0059] The value of the lower part of the split data element = mod(data element value, pow(2, mk));
[0060] Here, floor(·) represents the floor function, and mod(data element value, pow(2, mk)) represents the modulo operation of the data element value raised to the power of 2 (mk). If the data element is not split within the unified structure, it can be directly assigned a value.
[0061] Step 23: Send the packaged data chain formatted message to the selected data via the data chain message sending interface.
[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A general processing method for multi-data-link messages, characterized in that, include: By aligning and splitting data elements in the data chain message format, a unified structure definition for the data chain message format under both big-endian and little-endian orders is achieved. For split data elements, the value of the data element is read through a merging operation during message reception and written out through a splitting operation during message sending, thereby enabling the message processing flow to adapt to hardware platforms with different end sequences. The method for aligning and splitting data elements in the data link message format includes: For bit-oriented message formats in data link messages, data elements in the data link message format are aligned and split according to the 32-bit unsigned integers of type UINT32; When aligning and splitting data elements in the data link message format according to the 32-bit unsigned integer of type UINT32: First, each data element is given a bit field in a 32-bit unsigned integer according to the big-endian mode of the data link message format, which represents the number of bits occupied by the data element. If a data element cannot be completely represented in a 32-bit unsigned integer due to its bit position, the data element is split into two 32-bit unsigned integers. For little-endian mode, simply flip the positions of the data elements in each UINT32 type in big-endian mode to obtain the unified structure definition of the data chain message format in little-endian mode; During message reception and processing, the message word of each data chain message is first read according to the endianness of the local hardware platform. If the local hardware platform is big-endian, the data element of the message word length is directly copied from the received message content. If the local hardware platform is little-endian, the received message content is converted from big-endian to little-endian every 32 bits, and then the endianness-converted data element is copied. Subsequently, since the data elements in the unified structure may be split, the value of the data element is read through a merging operation according to the bit allocation relationship after the split. When sending a message, since the data elements in the unified structure may be split, the value of the data element is written out through the splitting operation according to the bit allocation relationship after splitting.
2. The general processing method for multi-data-link messages according to claim 1, characterized in that, The method for splitting this data element into two 32-bit unsigned integers is as follows: The data element is split into a high-order part and a low-order part. The high-order part is represented in the current 32-bit unsigned integer, and the low-order part is represented in the next 32-bit unsigned integer.
3. The general processing method for multi-data-link messages according to claim 1, characterized in that, If the last 32-bit unsigned integer represents any remaining data elements after all data elements in the data chain message, then the remaining bits are positioned as padding bits.
4. The general processing method for multi-data-link messages according to claim 3, characterized in that, If padding bits are present, the bit length of the padded message word will become a multiple of 32 bits.
5. The general processing method for multi-data-link messages according to claim 1, characterized in that, Suppose a data element is represented by m bits in a message word structure. If this data element is split into a high-order part and a low-order part in a unified structure, and the high-order part accounts for k bits and the low-order part accounts for mk bits, then the numerical representation of the data element read through the merge operation is: The value of a data element = the value of the high-order part of the data element * pow(2,mk) + the value of the low-order part of the data element; Where pow(2,mk) represents 2 raised to the power of mk.
6. The general processing method for multi-data-link messages according to claim 5, characterized in that, The numerical representation of the data elements written through the splitting operation is as follows: The value of the high-order part of the split data element = floor(data element value / pow(2,mk)); The value of the lower part of the split data element = mod(data element value, pow(2, mk)); Among them, floor( The function mod(data element value, pow(2,mk)) represents the modulo function of the data element value raised to the power of 2.
Citation Information
Patent Citations
Method for Uniformly Dividing Data Link Information Processing Flow
CN105068862B
Uniform partitioning method for data link information process flow
CN105068862A
Data link variable message processing method and device for sea-land-air interaction scene
CN111770066A