Protocol conversion gateway design method based on semantic mapping
By introducing a semantic mapping mechanism into the protocol conversion gateway, the problems of coarse protocol conversion granularity and insufficient edge computing capabilities in existing technologies are solved, enabling fine-grained conversion and multi-source protocol data fusion, thereby improving the compatibility and efficiency of the data processing system.
Patent Information
- Application Number
- CN202511576474.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-01-30
AI Technical Summary
Existing protocol conversion gateways suffer from coarse-grained payload processing, insufficient utilization of edge computing capabilities, and a single source of target protocol data, leading to wasted network resources and complicated distribution paths.
By introducing a semantic mapping mechanism, protocol conversion is extended to the semantic level. Through a protocol semantic description library, a semantic mapping table, and a protocol conversion processing module, fine-grained data conversion and multi-source protocol data fusion are achieved, making full use of edge computing capabilities.
It achieves fine-grained protocol conversion, improves the compatibility and efficiency of the data processing system, reduces computational pressure, and enriches the data sources for the target protocol.
Smart Images

Figure CN121442014A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of protocol conversion, and particularly relates to a protocol conversion gateway design method based on semantic mapping, which is suitable for precise data interaction between multiple application layer protocols and can be widely applied to cross-unit data exchange, target range telemetry data processing, multi-system data fusion and the like scenes. BACKGROUND
[0002] A network protocol is a set of rules, standards or conventions that must be observed when exchanging information between peer entities in a computer network for mutual communication. According to business requirements, application layer protocols for data interaction include HTTP, FTP, PDXP and many other protocols, and also include redis, message queues, communication middleware and the like, which can realize peer information interaction through their own application layer protocols.
[0003] Different application layer protocols exchange information, which is usually implemented by using a protocol conversion gateway, as shown in the following formula. Figure 1 The main function of the gateway is to simultaneously compatible with the two protocols before and after conversion, to receive data from the input end according to the source protocol, to parse the data according to the protocol specification, to extract the payload content, and to encapsulate the payload content into a new protocol according to the target protocol specification and send it out.
[0004] The existing protocol conversion gateway has limitations in payload processing granularity and edge computing capability utilization. According to the protocol conversion process, the source protocol is parsed to the entire payload stage. In actual use, the payload content may have large or small extreme cases. When the payload granularity is large, direct encapsulation and forwarding may only require a small part of the target protocol, and full payload conversion may cause waste of network resources. In the case of small payload granularity, separate encapsulation and payload transmission may require the target protocol end to accept a variety of protocol payloads to obtain complete information, causing the distribution path to be complicated. With the development of chip technology, the computing capability of the protocol conversion gateway has been greatly improved, and only protocol parsing and encapsulation business may cause a great waste of computing capability.
[0005] In the prior art, patent CN201510886499.5 is mainly used for ship communication protocol conversion systems and conversion processes, but this method is too specific and has a narrow application scope. Patent CN202210733438.5 generates target fields corresponding to feature domains based on mapping templates, and determines the target message body or target message header to which the target field belongs based on the message body and message header in the business scenario, generating a second message, but this method is complex to operate and does not involve semantic conversion. Patent CN202510461983.7 relates to the field of protocol conversion gateways and provides a deployment method, but does not involve specific implementation methods or semantic conversion. Patent CN202310440474.7 relates to a hardware description language semantic conversion method, which is completely different from the principle of data protocol conversion. Patent CN202310834552.1 discloses a CNC equipment data semantic conversion method, but does not provide a specific implementation method, and the final result is the standard data semantic information of the equipment, rather than a real-time communication protocol.
[0006] Therefore, existing technologies lack a protocol conversion gateway design method that can perform fine-grained protocol conversion at the semantic level, fully utilize edge computing capabilities, and support the integration of multi-source protocol data to solve the aforementioned limitations and problems. Summary of the Invention
[0007] (a) Technical problems to be solved This invention aims to address the technical problems of existing protocol conversion gateways, such as coarse-grained payload processing, insufficient utilization of edge computing capabilities, and a single source of target protocol data. Specifically, these problems include: existing protocol conversion only performs conversion at the entire payload level, resulting in imprecise conversion granularity, wasted network resources, or complicated distribution paths; the surplus edge computing capabilities of protocol conversion gateways are not fully utilized; and target protocol data originating from only a single source protocol may lead to incomplete data content.
[0008] (II) Technical Solution To achieve the above objectives, this invention provides a protocol conversion gateway design method based on semantic mapping. Its core idea is to introduce a semantic mapping mechanism into the protocol conversion gateway, extending protocol conversion from the payload layer to the semantic layer, achieving finer-grained data conversion, and fully utilizing edge computing capabilities to realize the fusion and flexible mapping of multi-source protocol data, such as... Figure 2 As shown. The protocol conversion gateway includes a protocol semantic description library module 1, a semantic mapping table module 2, and a protocol conversion processing module 3. Its functions and design method flow are as follows: S1 Constructing a Protocol Semantic Description Library: The protocol semantic description library module 1 formulates a set of metadata specifications for each semantic data point in the protocol payload data. These metadata specifications include a unique data identifier, data location, data length, data type, unit of measurement, dimension, default value, and data representation format specifications. Semantic data is decomposed using data location and data length to obtain the original data value; standard data measurement values are calculated and analyzed based on data type and dimension. During gateway initialization, for each preset protocol to be parsed, a record describing each semantic data point in the protocol is created according to the metadata specifications. Records for one protocol form a table, and the collection of all protocol tables constitutes the protocol semantic description library, serving as the rules for protocol semantic parsing.
[0009] S2 configures the semantic mapping table: The semantic mapping table module 2 describes the correspondence between source protocol semantic data and target protocol semantic data. This correspondence supports four mapping modes: 1:1, 1:N, N:1, and M:N, which can be combined according to actual business needs. 1:1 mapping is the basic operating mode, directly mapping the entire payload field. 1:N mapping decomposes large-granularity payload data, mapping one source protocol payload data to multiple target protocol data. N:1 mapping merges small-granularity payload data, mapping multiple source protocol payload data to one target protocol data. M:N mapping is a combination of 1:N and N:1 mappings, combining the characteristics of both. For complex mappings involving multiple source protocols, a data packet alignment field must be specified in the multiple source protocols; only packets that meet the alignment conditions can complete the protocol conversion.
[0010] S3 Protocol Conversion Processing: The protocol conversion processing module 3 parses the received source data, encapsulates it according to the target protocol, and then sends it. Its workflow includes four stages: data reception, semantic parsing, data preparation, and protocol encapsulation. Figure 3 As shown.
[0011] S31 Data Reception: Establish a listening mechanism according to the communication rules of the source protocol. After receiving data, identify the data type and query the protocol semantic description library based on the data type identifier to find the semantic description table of the source protocol. If identification fails or the protocol type is not within the preset processing range, an error is reported.
[0012] S32 Semantic parsing: Traverse the records in the semantic description table one by one, extract data according to data position and length, set the correct data type to contain the data, and obtain the semantic data truth value after unifying the units; S33 Data Preparation: Query the semantic mapping table of the source protocol to obtain the target protocol type, then query the semantic description table of the target protocol, process the semantic data one by one, and process it according to the position and dimension of the target protocol. If there are multiple target protocols, the target conversion protocol type must be specified. If the semantic parsing fails, an error is reported. S34 protocol encapsulation: Encapsulates the prepared target protocol data into a data format that can be directly transmitted according to the protocol specification and sends it out.
[0013] (III) Beneficial Effects This invention, by introducing a semantic mapping mechanism, achieves fine-grained protocol conversion, full utilization of edge computing capabilities, and integration of multi-source protocol data. Specific beneficial effects are as follows: 1. Extending protocol conversion to the semantic level allows for finer-grained conversion. Fine-grained conversion can shield the complexity of processors for different protocols, making the target protocol processor more versatile. It eliminates the need for customized modifications to address the limitations of the source protocol, indirectly improving the compatibility of the data processing system and effectively enhancing data processing efficiency in scenarios with a surge in data types and quantities.
[0014] 2. Fully leverage edge computing capabilities. When faced with massive amounts of data, centralized processing leads to reduced timeliness and performance bottlenecks. This invention decomposes complex problems by performing semantic parsing and mapping at a protocol conversion gateway, reducing overlapping computational pressure and mitigating data processing performance bottlenecks.
[0015] 3. By using a semantic mapping table to support the combination of multi-source protocol data, the target protocol's data can contain data from multiple source protocols, making the data sources in the target protocol richer and solving the problem of incomplete payload content from a single source protocol. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of traditional protocol conversion; Figure 2 This is a schematic diagram of protocol conversion based on semantic mapping; Figure 3 This is a flowchart of semantic-based protocol conversion. Detailed Implementation
[0017] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so that those skilled in the art can implement the present invention.
[0018] Example 1: Cross-unit multi-protocol data exchange When three different organizations exchange data, they cannot do so directly due to different protocols. This method can be used to solve this problem. The specific implementation steps are as follows: S1 Protocol Semantic Description Library Construction: In the protocol semantic description library module, three protocols from three organizations are entered respectively, and information such as unique data number, data location, data length, data type, unit of measurement, dimension, default value and data representation format specification are improved according to metadata specifications.
[0019] S2 Semantic Mapping Table Configuration: In the semantic mapping table module, mapping relationships are defined according to the rule of [source protocol, target protocol, source protocol field, target protocol field]. Mapping items with the same [source protocol, target protocol] form a set, resulting in a total of 6 sets. The matching relationship of [source protocol field, target protocol field] can be freely selected from four modes: 1:1, 1:N, N:1, and M:N.
[0020] S3 protocol conversion processing, the process is as follows: Figure 2 As shown.
[0021] S31 Data Reception: The protocol conversion processing module establishes a listening position according to the source protocol communication rules. After receiving data, it identifies the data type and matches the corresponding source protocol semantic description table in the protocol semantic description library. If the source protocol is not within the preset range or the identification fails, an error is handled.
[0022] S32 Semantic parsing: Iterate through the records in the source protocol semantic description table one by one, extract data according to data location and length, store it according to the corresponding data type, and calculate the semantic data truth value through unified dimensional calculation.
[0023] S33 Data Preparation: Query the semantic mapping table corresponding to the source protocol to determine the target protocol type, then query the semantic description table of the target protocol, process the semantic data line by line, and complete the data adaptation according to the position and scale of the target protocol; if there are missing data sources or data that does not conform to the mapping relationship, perform error handling.
[0024] S34 protocol encapsulation: The adapted target protocol data is encapsulated into a format that can be directly transmitted according to the corresponding protocol specifications and then sent.
[0025] Example 2: Target Range Telemetry Data Selection and Framing Processing In the field of range data, after receiving telemetry data, it is necessary to perform point selection and framing processing. This method can be applied to solve this problem. The specific implementation steps are as follows: S1 Protocol Semantic Description Library Construction: In the protocol semantic description library module, the format information of telemetry data protocol and target framing data protocol is entered, including unique data number, data location, data length, data type, unit of measurement, dimension, default value and data representation format specification, etc.
[0026] S2 Semantic Mapping Table Configuration: Using the telemetry data frame protocol as the source protocol and the target frame data protocol as the target protocol, semantic mapping is completed according to the rule of [source protocol, target protocol, source protocol field, target protocol field]. The appropriate mapping mode is selected according to the point-based frame assembly requirements.
[0027] S3 Data reception to protocol encapsulation: The steps are the same as S31 to S34 in Embodiment 1, that is, the telemetry data is converted into points and frames through data reception, semantic parsing, data preparation and protocol encapsulation.
[0028] Example 3: Multi-system data fusion processing at the test range S1 Protocol Semantic Description Library Construction: In the protocol semantic description library module, the format information of the flight control system protocol, measurement system protocol and target protocol is entered, covering data unique number, data location, data length, data type, measurement unit, dimension, default value and data representation format specification, etc.
[0029] S2 Semantic Mapping Table Configuration: Semantic mapping is completed according to the rule of [Source Protocol, Target Protocol, Source Protocol Field, Target Protocol Field]. Since two source protocols, flight control system and measurement system, are involved, the packet sequence number is specified as the data packet alignment field. Subsequent conversion is only performed when two source protocol packets with the same packet sequence number are received; otherwise, an error is reported.
[0030] S3 Data reception to protocol encapsulation: The steps are the same as S31 to S34 in Embodiment 1, and the final result is that the target protocol data simultaneously includes the positioning data of the flight control system and the attitude data of the measurement system, which meets the requirements of pointing discrimination calculation.
[0031] The above description, in conjunction with specific embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A protocol conversion gateway design method based on semantic mapping, characterized in that, The protocol conversion gateway includes a protocol semantic description library module, a semantic mapping table module, and a protocol conversion processing module. These three modules work together to achieve semantic-level conversion from the source protocol to the target protocol. The protocol semantic description library module defines metadata specifications and constructs a protocol semantic record set to provide rule support for semantic parsing; The semantic mapping table module defines the correspondence between source protocol and target protocol semantic data, and supports multi-mode mapping; The protocol conversion processing module completes the extraction, processing and encapsulation of semantic data through the processes of data reception, semantic parsing, data preparation and protocol encapsulation, thereby realizing the flexible integration of multi-source protocol data.
2. The protocol conversion gateway design method based on semantic mapping according to claim 1, characterized in that, The protocol semantic description library module defines metadata specifications for protocol payload data. These metadata specifications include unique data number, data location, data length, data type, unit of measurement, dimension, default value, and data representation format specifications.
3. The protocol conversion gateway design method based on semantic mapping according to claim 2, characterized in that, During gateway initialization, the protocol semantic description library module establishes semantic data records for each preset parsing protocol according to the metadata specification. The records for each protocol form a table, and the collection of all protocol tables constitutes the protocol semantic description library.
4. The protocol conversion gateway design method based on semantic mapping according to claim 1, characterized in that, The semantic mapping table module describes the correspondence between source protocol semantic data and target protocol semantic data. The correspondence includes four mapping modes: 1:1, 1:N, N:1, and M:N.
5. The method according to claim 1, characterized in that, The protocol conversion processing module includes four parts: data reception, semantic parsing, data preparation, and protocol encapsulation.
6. The method according to claim 5, characterized in that, The data reception establishes a listening mechanism according to the communication rules of the source protocol. After receiving data, it identifies the data type and queries the protocol semantic description library based on the data type identifier to find the semantic description table of the source protocol. If the identification fails or the protocol type is not within the preset processing range, an error is reported.
7. The method according to claim 5, characterized in that, The semantic parsing process iterates through the records in the semantic description table, extracts data based on its location and length, sets the correct data type to accommodate the data, and obtains the semantic data truth value after unifying the units.
8. The method according to claim 5, characterized in that, The data preparation involves querying the semantic mapping table of the source protocol to obtain the target protocol type, then querying the semantic description table of the target protocol, processing the semantic data line by line, and processing it according to the position and dimension of the target protocol. If there are multiple target protocols, the target conversion protocol type must be specified. If semantic parsing fails, an error is reported.
9. The method according to claim 5, characterized in that, The protocol encapsulation process encapsulates the prepared target protocol data into a data format that can be directly transmitted according to the protocol specifications and then sends it out.
10. The protocol conversion gateway design method based on semantic mapping according to claim 4, characterized in that, The 1:1 mapping mode supports dimension conversion; the 1:N mapping mode enables the decomposition of large-granularity payload data; the N:1 mapping mode enables the combination of small-granularity payload data; the M:N mapping mode is a combination of 1:N and N:1 mappings, suitable for complex business scenarios.
Citation Information
Patent Citations
Protocol conversion system and process between shipborne Beidou-2 equipment and shipboard Ethernet
CN105491037B
Message protocol conversion method and device
CN115103034A
A method and device for hardware description language semantic conversion
CN116661794B
Numerical control equipment data semantic conversion method and system, medium and equipment
CN116822461A
Internet of Things equipment interoperability protocol conversion gateway and deployment method thereof
CN120416349A