ASN.1 TLV Encoding for Cross-Version Protocol Compatibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In communication systems using ASN.1, different versions of message protocols between Client and Server often lead to intercommunication failures due to the inability to customize the data type 'T' in the TLV encoding, resulting in protocol version inconsistencies.
Innovation Solution
The method involves extending the ASN.1 format to allow customization of the integer type 'T' by defining it as a SEQUENCE, SET, or CHOICE type, enabling net increases or decreases in members while maintaining type consistency, and using integration encoding and decoding functions to handle message processing across different versions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the data type T in TLV encoding is fixed and cannot be customized, then the encoding structure is simple and standardized, but different versions of message protocols cannot intercommunicate due to protocol version inconsistencies
Solution Approach 1:
The patent embeds the data type T within the existing TLV structure by placing it in the optional fields of the SEQUENCE. The type field contains the integer type information, and the value field contains the actual data, creating a nested structure where the type is contained within the value container. This allows customization of data types while maintaining the overall TLV structure integrity.
Solution Approach 2:
The patent makes the data type T dynamic and customizable by allowing it to be defined as SEQUENCE, SET, or CHOICE types with optional members. The type can be net increased or decreased in members while maintaining type consistency, enabling flexible adaptation to different protocol versions without breaking the fixed structure constraint.
2Adaptability or versatility
If the ASN.1 format is extended to allow customization of integer type T, then different versions of protocols can intercommunicate, but the ASN.1 format complexity increases
Solution Approach 1:
The patent segments the ASN.1 format into distinct components: a fixed header portion and a flexible body portion. The SEQUENCE structure divides the data into type field, length field, and value field, allowing the type T to be customized in the value field while the header structure remains standardized. This segmentation enables version compatibility without overwhelming format complexity.
Solution Approach 2:
The patent introduces an intermediary SEQUENCE structure that mediates between the fixed TLV encoding requirements and the customizable data type needs. The SEQUENCE acts as a container that holds the integer type T in its value field, providing a buffer zone that allows type customization while maintaining the standardized TLV outer structure for version compatibility.
3Adaptability or versatility
If integration encoding and decoding functions are used to handle message processing across different versions, then intercommunication between different versions is enabled, but the processing complexity increases
Solution Approach 1:
The patent creates universal encoding and decoding functions that can handle multiple data types (SEQUENCE, SET, CHOICE) through a single integrated interface. The integration encoding function processes the ASN.1 format with customizable type T, and the integration decoding function reconstructs it, providing multi-functional capability that handles different protocol versions through the same code path, reducing overall system complexity despite the enhanced functionality.
Data Source
Figure 1
Figure 2~3
Figure 4
AI summary
The present invention provides a method for processing a TLV format of communication data, including the following steps: defining a type T of an integer type in an ASN.1 format; a sending side filling in a message in the ASN.1 format, with the message including a data structure example; and the sending side encoding the message into a code stream, wherein the code stream of the data structure example in the message includes a V, or includes an integer type of the V, a L of the V, and the V The present invention can realize intercommunication among different versions of the ASN. 1.