Message processing method and apparatus, message encoding method and apparatus, message decoding method and apparatus, device, and medium

By introducing a second cell into the message data structure to achieve byte alignment, the problem of low cell granular encoding and decoding efficiency under Unaligned PER encoding is solved, and more efficient message processing is achieved.

WO2025124317A1PCT designated stage expired Publication Date: 2025-06-19VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137586
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-11
Filing Date
2024-12-06
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

Message encoding based on Unaligned PER poorly performs in cell granularity encoding and decoding efficiency, resulting in excessive consumption of computing resources and increased latency.

Method used

By introducing an additional second cell into the message data structure, it is positioned in front of the first cell for byte alignment, bit operations are avoided during encoding and decoding.

Benefits of technology

It improves the encoding and decoding efficiency of cell granularity, reduces the consumption and delay of computing resources, and realizes more efficient message processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137586_19062025_PF_FP_ABST
    Figure CN2024137586_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses a message processing method and apparatus, a message encoding method and apparatus, a message decoding method and apparatus, a device, and a medium. The message processing method in embodiments of the present application comprises: a first device performs message processing on a first message on the basis of unaligned packed encoding rules (Unaligned PERs), wherein the first message comprises a first cell and a second cell, the second cell precedes the first cell, and the second cell is used for enabling the first cell to be encoded or decoded under a byte aligned condition.
Need to check novelty before this filing date? Find Prior Art

Description

Message processing method, message encoding and decoding method, device, equipment and medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 11, 2023, with application number 202311697173.9 and titled “Message Processing Method, Message Encoding and Decoding Method and Apparatus, Equipment and Medium,” the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application belongs to the field of communication technology, and specifically relates to a message processing method, a message encoding and decoding method and apparatus, equipment and medium. Background Art

[0004] When encoding messages based on non-aligned compression coding rules, although maximum compression coding can be achieved, the coding and decoding efficiency of the cell granularity will be reduced due to the existence of a large number of byte dislocations. Summary of the Invention

[0005] The embodiments of the present application provide a message processing method, a message encoding and decoding method and apparatus, a device, and a medium, which can solve the problem of low encoding and decoding efficiency of the cell granularity caused by the use of Unaligned PER.

[0006] In a first aspect, a message processing method is provided, which is performed by a first device. The method includes:

[0007] The first device processes the first message based on the unaligned compression encoding rule Unaligned PER;

[0008] The first message includes a first information element and a second information element, wherein the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded with byte alignment.

[0009] In a second aspect, a message encoding method is provided, which is performed by an encoding device, and the method includes:

[0010] The encoding device encodes the first message using a non-aligned compression encoding rule and a first method;

[0011] The first method includes:

[0012] In a case where a code stream obtained by encoding a cell preceding the first cell has byte misalignment, byte aligning the code stream;

[0013] Encoding the first information element at the beginning of a byte of the byte-aligned code stream;

[0014] The first message includes at least the first information element and an information element preceding the first information element.

[0015] In a third aspect, a message decoding method is provided, which is performed by a decoding device, and the method includes:

[0016] The decoding device decodes the encoded first message using a decoding rule corresponding to the Unaligned PER and a third method;

[0017] The third method includes:

[0018] Before starting to decode the first encoded cell, skip decoding the target code stream;

[0019] The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and the encoded other symbols. The target code stream is used to byte-align the code stream obtained by encoding other symbols located before the first symbol in the first message.

[0020] In a fourth aspect, a message processing apparatus is provided, applied to a first device, the apparatus including:

[0021] A message processing module, configured to perform message processing on the first message based on an unaligned compression encoding rule Unaligned PER;

[0022] The first message includes a first information element and a second information element, wherein the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded with byte alignment.

[0023] In a fifth aspect, a message encoding apparatus is provided, which is applied to an encoding device, and the apparatus includes:

[0024] A message encoding module, configured to encode the first message using a non-aligned compression encoding rule and a first method;

[0025] The first method includes:

[0026] In a case where a code stream obtained by encoding a cell preceding the first cell has byte misalignment, byte aligning the code stream;

[0027] Encoding the first information element at the beginning of a byte of the byte-aligned code stream;

[0028] The first message includes at least the first information element and an information element preceding the first information element.

[0029] In a sixth aspect, a message decoding apparatus is provided, which is applied to a decoding device, and the apparatus includes:

[0030] a message decoding module, configured to decode the encoded first message using a decoding rule corresponding to the Unaligned PER and a third method;

[0031] The third method includes:

[0032] Before starting to decode the first encoded cell, skip decoding the target code stream;

[0033] The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and the encoded other symbols. The target code stream is used to byte-align the code stream obtained by encoding other symbols located before the first symbol in the first message.

[0034] In the seventh aspect, a communication device is provided, which includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the message processing method as described in the first aspect, or implements the steps of the message encoding method as described in the second aspect, or implements the steps of the message decoding method as described in the third aspect.

[0035] In an eighth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the message processing method as described in the first aspect are implemented, or the steps of the message encoding method as described in the second aspect are implemented, or the steps of the message decoding method as described in the third aspect are implemented.

[0036] In the ninth aspect, a wireless communication system is provided, comprising: an encoding device and a decoding device, wherein the encoding device can be used to execute the steps of the message encoding method as described in the second aspect, and the decoding device can be used to execute the steps of the message decoding method as described in the third aspect.

[0037] In the tenth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a program or instructions to implement the steps of the message processing method described in the first aspect, or implement the steps of the message encoding method described in the second aspect, or implement the steps of the message decoding method described in the third aspect.

[0038] In the eleventh aspect, a computer program / program product is provided, which is stored in a storage medium, and the program / program product is executed by at least one processor to implement the steps of the message processing method as described in the first aspect, or the steps of the message encoding method as described in the second aspect, or the steps of the message decoding method as described in the third aspect.

[0039] In an embodiment of the present application, the data structure used by the first message includes a second information element for achieving byte alignment, and the second information element is located in front of the first information element in the data structure, so that when the first message is processed using Unaligned PER, the information element in front of the first information element is in a byte-aligned state after encoding due to the presence of the second information element, so that the first information element can be encoded and decoded at the beginning of the byte, thereby eliminating the bit operation of the first information element during the encoding and decoding process, and achieving improved encoding and decoding efficiency of the first information element (i.e., information element granularity). BRIEF DESCRIPTION OF THE DRAWINGS

[0040] FIG1 is a block diagram of a wireless communication system to which embodiments of the present application may be applied;

[0041] FIG2 is a schematic diagram of a code stream obtained by encoding a ULInformationTransfer message in the related art;

[0042] FIG3 is a flowchart of an implementation method of a message processing method in an embodiment of the present application;

[0043] FIG4 is a schematic diagram of a code stream obtained by encoding a ULInformationTransfer message after data structure optimization in an embodiment of the present application;

[0044] FIG5 is a flowchart of an implementation method of a message encoding method in an embodiment of the present application;

[0045] FIG6 is a flowchart of an implementation method of a message decoding method in an embodiment of the present application;

[0046] FIG7 is a structural block diagram of a message processing device according to an embodiment of the present application;

[0047] FIG8 is a structural block diagram of a message encoding device according to an embodiment of the present application;

[0048] FIG9 is a structural block diagram of a message decoding device according to an embodiment of the present application;

[0049] FIG10 is a structural block diagram of a communication device in an embodiment of the present application;

[0050] FIG11 is a schematic diagram of the hardware structure of a terminal device in an embodiment of the present application;

[0051] FIG12 is a schematic diagram of the hardware structure of a network device in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0053] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "show or B shows that it covers three schemes, namely, scheme one: including A and excluding B; scheme two: including B and excluding A; scheme three: including both A and B. The character " character generally indicates that the objects related before and after are in an "or" relationship.

[0054] The term "indication" in this application can be either a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, the operation to be performed, or the requested result, etc. in the instruction sent; an indirect indication can be understood as the receiver determining the corresponding information based on the instruction sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. based on the judgment result.

[0055] It is worth noting that the technology described in the embodiments of the present application is not limited to the Long Term Evolution (LTE) / LTE-Advanced (LTE-A) system, but can also be used in other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency Division Multiple Access (SC-FDMA) or other systems. The terms "system" and "network" in the embodiments of the present application are often used interchangeably, and the described technology can be used for the systems and radio technologies mentioned above, as well as for other systems and radio technologies. The following description describes a New Radio (NR) system for example purposes, and NR terminology is used in most of the following description, but these technologies can also be applied to systems other than NR systems, such as 6th Generation (6G) communication systems.

[0056] FIG1 is a block diagram of a wireless communication system applicable to an embodiment of the present application. The wireless communication system includes a terminal 11 and a network-side device 12. The terminal 11 may be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer), a notebook computer, a personal digital assistant (PDA), a handheld computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile internet device (MID), an augmented reality (AR), a virtual reality (VR) device, a robot, a wearable device (Wearable Device), an aircraft (Flight Vehicle), a vehicle-mounted device (VUE), a ship-mounted device, a pedestrian user equipment (PUE), a smart home (home appliances with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), a game console, a personal computer (PC), an ATM, or a self-service machine, or other terminal-side devices. Wearable devices include: smart watches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart bracelets, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. Among them, the vehicle-mounted device can also be called a vehicle-mounted terminal, a vehicle-mounted controller, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip or a vehicle-mounted unit, etc. It should be noted that the specific type of the terminal 11 is not limited in the embodiment of the present application. The network side device 12 may include an access network device or a core network device, wherein the access network device may also be called a radio access network (Radio Access Network, RAN) device, a radio access network function or a radio access network unit. The access network device may include a base station, a wireless local area network (WLAN) access point (AP) or a wireless fidelity (WiFi) node, etc.Among them, the base station can be referred to as Node B (NB), Evolved Node B (eNB), the next generation Node B (gNB), New Radio Node B (NR Node B), access point, Relay Base Station (RBS), Serving Base Station (SBS), Base Transceiver Station (BTS), radio base station, radio transceiver, Basic Service Set (BSS), Extended Service Set (ESS), Home Node B (HNB), Home Evolved Node B (home evolved Node B), Transmission Reception Point (TRP) or other appropriate terms in the field. As long as the same technical effect is achieved, the base station is not limited to specific technical vocabulary. It should be noted that in the embodiment of the present application, only the base station in the NR system is used as an example for introduction, and the specific type of the base station is not limited.

[0057] To facilitate understanding of the technical solutions provided by this application, the main technical concepts involved in the embodiments of this application are briefly described below.

[0058] 1. Abstract Syntax Notation One (ASN.1) encoding rules

[0059] In order to ensure that the structural relationship of structured data in high-level languages ​​can be restored when transmitted over the network at the destination, the following data serialization methods have emerged in history: ASN.1, eXtensible Markup Language (XML), JavaScript Object Notation (JSON), etc.

[0060] ASN.1 is an International Organization for Standardization (ISO) or International Telecommunication Union Telecommunication Standardization Sector (ITU-T) standard that describes a data format for representing, encoding, transmitting, and decoding data, and provides a set of formal formats for describing the structure of objects. ASN.1 itself only defines an abstract syntax for representing information, but does not specify how it is encoded. The various ASN.1 encoding rules provide the transfer syntax (concrete representation) of the data values ​​whose abstract syntax is described by ASN.1.

[0061] The standard ASN.1 encoding rules include Basic Encoding Rules (BER), Canonical Encoding Rules (CER), Distinguished Encoding Rules (DER), Packed Encoding Rules (PER) and eXtensible Markup Language Encoding Rules (XER, also known as XML encoding rules).

[0062] PER can be divided into two types: Aligned Packed Encoding Rules (APER) and Unaligned Packed Encoding Rules (UPER, also known as Unaligned PER). The key difference between the two is that APER encoding requires that each cell (also known as the data format) be eight-bit aligned after encoding (after completion). This means that either the high or low bits must be padded with zeros. UPER encoding requires that eight-bit alignment be performed only after all cells are encoded.

[0063] 2. Unaligned PER encoding of octet string type information

[0064] Taking the uplink information transfer (ULInformationTransfer) message in the related art as an example, the data format used is as follows:

[0065] Related technologies use Unaligned PER encoding. According to the above analysis, when encoding a dedicated NAS-Message, the previously encoded information element occupies 9 bits, meaning the second octet (hereinafter referred to as the octet) has 7 bits remaining for the subsequent encoded content. When encoding a dedicated NAS-Message, one or two bytes are first used to indicate the length of the dedicated NAS-Message byte stream (corresponding to the data from the second bit position (bit 1) at Oct 2 to the first bit position (bit 0) at Oct 4 in the codestream shown in Figure 2). The byte stream content of the dedicated NAS-Message is then encoded (corresponding to the data from the second bit position (bit 1) at Oct 4 to the first bit position (bit 0) at Oct 2004 in the codestream shown in Figure 2).

[0066] It should be noted that the storage system stores data in bytes. Since there are 7 bits remaining in the second byte, the above-mentioned information used to represent the byte stream length of the dedicated NAS-Message and the byte stream content of the dedicated NAS-Message both need to perform bit operations (i.e., left shift by 7 bits) when encoding.

[0067] Taking the case where the byte stream length of a dedicated NAS-Message is 2000 and the information describing the byte stream length (Len of dedicated NAS-Message) occupies two bytes after encoding, as shown in FIG2 , the data from the second bit position (Bit 1) at Oct 2 to the first bit position (Bit 0) at the fourth byte (Oct 4) in the code stream obtained by encoding the ULInformationTransfer message is the encoded Len of dedicated NAS-Message, the data from the second bit position (Bit 1) at Oct 4 to the first bit position (Bit 0) at the 2004th byte (Oct 2004) is the byte stream content of the encoded dedicated NAS-Message, and the data after Bit 0 at Oct 2004 is the encoded information element or padding bits following the dedicated NAS-Message (i.e., the bits padded by performing an octet alignment operation after encoding all the data of the ULInformationTransfer message).

[0068] In related technologies, taking the 4th Generation mobile communication technology (4G) or 5th Generation mobile communication technology (5G) systems as an example, in 4G / 5G systems, protocols such as Radio Resource Control (RRC) and Long Term Evolution Positioning Protocol (LPP) use Unaligned PER to encode corresponding messages. That is, all RRC messages or LPP messages are encoded using Unaligned PER. Although Unaligned PER can achieve maximum compression coding, the encoding and decoding efficiency of Unaligned PER is significantly reduced when encoding and decoding certain types of information cells.

[0069] Taking a dedicated NAS-Message of the OCTET STRING type as an example, as shown in Figure 2, the byte stream length of the dedicated NAS-Message is 2000 bytes. When encoding and decoding this cell based on the Unaligned PER, at least 2000 bit operations need to be performed because the cell needs to be shifted bit by bit (i.e., shifted left by 7 bits).

[0070] In practical applications, the byte stream length of OCTET STRING-type information elements such as dedicated NAS-Message (especially OCTET STRING-type information elements in the 3GPP protocol) is typically large (up to several thousand bytes). When the codec encodes and decodes OCTET STRING-type information elements based on Unaligned PER, a large number of bit operations are required, resulting in extremely low encoding and decoding efficiency for these information elements, significantly consuming the computing resources of related nodes and increasing latency. In addition, with the introduction of features such as the 6G data plane and artificial intelligence (AI) model transmission, it may be necessary to transmit a large number of OCTET STRING-type information elements in the future through RRC messages, LPP messages, or new protocols, which will also significantly consume the computing resources of related nodes and increase latency.

[0071] It should be noted that since the Aligned PER encoder performs byte alignment when encoding each cell, the low encoding and decoding efficiency problem at the aforementioned cell granularity can be solved if the related technology adopts Aligned PER. However, since byte alignment is also performed when encoding other cells, the encoded code stream is larger, which consumes more wireless resources when transmitted on the wireless interface. This is why the related technology adopts Unaligned PER encoding instead of Aligned PER. Therefore, there is an urgent need for a solution that can improve the encoding and decoding efficiency at the cell granularity using Unaligned PER encoding.

[0072] In response to the problems existing in the related art, the present application provides a message processing method, a message encoding and decoding method and apparatus, a device and a medium, which improves the encoding and decoding efficiency of the first information element (i.e., the information element granularity) under the Unaligned PER encoding mode by optimizing the data structure or encoding rules adopted by the message.

[0073] In a first aspect of an embodiment of the present application, a message processing method is provided. The method is executed by a first device. FIG3 is a flowchart of an implementation of a message processing method provided in an embodiment of the present application. The method may include the following steps:

[0074] Step S101: The first device processes the first message based on the Unaligned PER encoding rule.

[0075] Among them, the first message includes a first information element and a second information element, the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded with byte alignment. The first device can be a terminal device or a network device. For example, the first device can be the terminal 11 or the network side device 12 in Figure 1. For examples of the terminal 11 and the network side device 12, please refer to the previous text and will not be repeated here.

[0076] In specific implementations, based on actual needs, the information element (also known as the data format) whose encoding and decoding efficiency needs to be improved can be determined as the first information element. For example, an information element with a byte stream structure (such as the dedicated NAS-Message described above, or an information element of the OCTET STRING type) can be determined as the first information element. By encoding and decoding the first information element under byte alignment, encoding, decoding, storage, and other processing operations are performed on the information element at a byte granularity, thereby eliminating a large number of bit operations caused by bit-by-bit shifting of the first information element during the encoding and decoding process, thereby significantly improving the encoding and decoding efficiency of the first information element.

[0077] After determining the first signal element whose encoding and decoding efficiency needs to be improved, the data structure containing the first signal element can be optimized. According to the length occupied by each signal element located in front of the first signal element in the data structure after encoding, so that the first signal element can be encoded and decoded as a target under byte alignment, the target length that the second signal element should occupy after encoding is determined, the second signal element is designed according to the target length, and the designed second signal element is inserted in front of the first signal element in the data structure to obtain the optimized data structure.

[0078] When the first device encodes or decodes a message (i.e., the above-mentioned first message) that uses the optimized data structure for message description, the first device can encode or decode the first element at the beginning of a byte by means of the filling effect of the second element in the first message on the code stream obtained by encoding the element preceding the first element. For example, the code stream obtained by encoding the first element is directly copied, stored, and encoded and decoded in units of bytes. This can reduce or eliminate bit operations in the encoding and decoding process of the first element, thereby improving the encoding and decoding efficiency of the first element.

[0079] In some implementations, the first device performs message processing on the first message based on an unaligned compression encoding rule (Unaligned PER), including at least one of the following:

[0080] When the first device is an encoding device, the first message is encoded based on the Unaligned PER. For example, the first device may encode the first message according to a traditional or optimized encoding rule corresponding to the Unaligned PER. This embodiment does not limit the specific encoding rule corresponding to the Unaligned PER used to encode the first message.

[0081] When the first device is a decoding device, the first message is decoded based on a decoding rule corresponding to the Unaligned PER. For example, the first device may decode the first message based on a traditional or optimized decoding rule corresponding to the Unaligned PER. This embodiment does not limit the specific decoding rule corresponding to the Unaligned PER used to decode the first message.

[0082] As can be seen from the above steps, the data structure used by the first message includes a second symbol for achieving byte alignment, and the second symbol is located before the first symbol in the data structure. Therefore, when the first message is processed using Unaligned PER, the symbol preceding the first symbol is in a byte-aligned state after encoding due to the presence of the second symbol. As a result, the first symbol can be encoded and decoded at the beginning of a byte, thereby eliminating bit operations on the first symbol during the encoding and decoding process, thereby improving the encoding and decoding efficiency of the first symbol (i.e., the symbol granularity).

[0083] The message processing method is further described below in conjunction with the first embodiment.

[0084] Implementation Method 1

[0085] When optimizing the data structure required for encoding and decoding the first signal element, the second signal element is designed to occupy a fixed length after encoding (the fixed length is determined based on the fixed bit length required for byte alignment of other signals) based on the bit length required for byte alignment of other signals (the bit length needs to be fixed), and the designed second signal element is inserted in front of the first signal element in the data structure to obtain the optimized data structure.

[0086] It can be understood that the above-mentioned other information elements are the information elements located in front of the first information element in the data structure before optimization, that is, the information elements other than the second information element located in front of the first information element in the above-mentioned first message; this embodiment mainly optimizes the data structure in which the byte stream length of the other information elements remains unchanged, so as to ensure that the second information element pre-inserted into the data structure can always fill the bytes that are not occupied after the other information elements are actually encoded.

[0087] In some embodiments, the above-mentioned first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format. This embodiment optimizes the ASN.1 data structure based on the above-mentioned second information element, thereby effectively improving the encoding and decoding efficiency of the first information element carried by the relevant message in the protocol (i.e., the first protocol) applied by the optimized ASN.1 data structure.

[0088] Optionally, the above-mentioned first protocol can be a 3GPP protocol such as a radio resource control protocol using ASN.1, or a positioning protocol (such as LPP protocol), or a data plane protocol (such as a potential 6G data plane protocol), or the first protocol can also be any communication protocol using ASN.1.

[0089] In some embodiments, the second information element is a mandatory information element (i.e., an information element that must appear (mandatory present) and be encoded when encoding a message) to ensure that the actual length occupied by the second information element in the encoded message is fixed. This is to avoid the situation where, when using an optimized data structure to encode a message, the non-mandatory nature of the second information element (i.e., the second information element can be chosen to be encoded (present) or not encoded (absent) when encoding the message) causes the actual length occupied by the second information element in the encoded message to be variable (e.g., the encoded first message does not contain the second information element so that the occupied length is zero), resulting in the inability to achieve byte alignment of the information element preceding the first information element after encoding.

[0090] In some embodiments, a fixed-length information element (i.e., a second information element) can be designed after encoding through the following two embodiments, wherein the sum of the fixed length occupied by the designed second information element after encoding and the total length occupied by the above-mentioned other information elements after encoding should be a positive integer multiple of 8 bits, thereby ensuring that the newly added second information element in the data structure can enable the first information element to be encoded or decoded at the beginning of a byte (i.e., when byte aligned).

[0091] Embodiment 1: The second information element is designed to occupy the bit string of the above fixed length after encoding.

[0092] Taking the code stream obtained by encoding the ULInformationTransfer message shown in FIG2 as an example, the dedicated NAS-Message is determined as the first information element. That is, the information indicating the byte stream length of the dedicated NAS-Message (Len of dedicated NAS-Message) and the byte stream content are determined as the data required to be encoded for the first information element. As shown in FIG2 , the fixed bit length required for padding to byte-align other information elements is 7 bits. Therefore, the second information element can be designed as a bit string with a fixed length of 7 bits (or 15 bits, or 23 bits, etc.) after encoding. This ensures that the second information element added to the data structure can achieve byte alignment with the code stream obtained by encoding the other information elements. The value of each bit in the second information element carried by the first message can be determined based on actual needs, such as randomly or based on required indication information.

[0093] Embodiment 2: The second information element is designed to be an integer type with a fixed upper and lower value range, and the fixed upper and lower value range is determined according to the fixed length.

[0094] In this embodiment, considering that the upper and lower value ranges of an integer type are strongly correlated with the length occupied by the integer type after encoding, the second information element can be designed as an integer type with a fixed upper and lower value range based on the fixed length required to be occupied by the second information element after encoding. Taking the example of a fixed length of 7 bits required to be occupied by the second information element after encoding, the second information element can be designed as an integer type with a fixed upper and lower value range of 0 to 127. This ensures that the second information element newly added to the data structure can achieve byte alignment with the code stream obtained by encoding the other information elements. The specific value of the second information element carried by the first message within the fixed upper and lower value range can be determined according to actual needs, such as randomly, or based on required indication information.

[0095] In some embodiments, the fixed length required to be occupied by the above-mentioned second signal element after encoding can be further constrained to: a length greater than 0 bits and less than 8 bits; thereby, on the premise of ensuring that the second signal element can achieve byte alignment with the code stream obtained by encoding the above-mentioned other signal elements, the length occupied by the second signal element after encoding can be reduced as much as possible, thereby reducing the length occupied by the first message after encoding as much as possible.

[0096] It can be understood that, in addition to being used to byte-align the above-mentioned other information elements, the above-mentioned second information element can also be used as a reserved information element (or a spare information element, or a virtual information element) for future expansion, that is, the above-mentioned second information element can be given meaning in the future to indicate other information to save overhead. The embodiment of the present application does not impose specific restrictions on the name description of this type of information element that can be used for expansion in the future.

[0097] Taking the reserved information element (i.e., the second information element) of a fixed length (e.g., 7 bits) after encoding designed in the above-mentioned embodiment 1 as an example, the second information element is a bit string that occupies a length of 7 bits after encoding, and the bit string includes bits that can be used for extension, i.e., reserved bits, or spare bits, or dummy bits. After optimizing the data structure used in the above-mentioned ULInformationTransfer message based on the second information element, the partial data format in the obtained optimized data structure is represented as follows:

[0098] Taking the reserved information element (i.e., the second information element) of a fixed length (e.g., 7 bits) after encoding according to the design of the second embodiment as an example, the second information element is an integer type with a fixed upper and lower value range of 0 to 127. After optimizing the data structure used in the ULInformationTransfer message based on the second information element, the data format of part of the optimized data structure is shown as follows:

[0099] Referring to the code stream obtained by encoding the ULInformationTransfer message after the data structure is optimized as shown in Figure 4, the second information element obtained by the design of the above embodiment 1 or 2 fills the remaining bits at Oct 2 after encoding, so that the first information element can be encoded or decoded from the beginning of the byte (that is, from the Bit 0 position at Oct 3), thereby avoiding a large number of bit operations on the first information element during the encoding and decoding process, thereby greatly improving the encoding and decoding efficiency of the first information element.

[0100] It should be noted that the reserved bits in the related art are mainly placed at the end of the message to make the length of the message reach a certain fixed length, while the reserved bits in the embodiment of the present application are not placed at the end of the message, but are placed before the first signal element as the second signal element during the design stage of the data structure, so that the signal element before the first signal element can also be byte aligned when using Unaligned PER encoding, so that the first signal element can be encoded or decoded with byte alignment, so as to reduce or avoid bit operations in the encoding and decoding process of the first signal element, thereby improving the encoding and decoding efficiency of the first signal element.

[0101] In some embodiments, in the optimized data structure, the second cell is the first n cells of the first cell, where n is a positive integer. Preferably, n is 1, that is, the second cell is the previous cell of the first cell, which makes it easier to determine the length of the second cell for byte alignment.

[0102] Taking the second signal element as the previous signal element of the first signal element as an example, when the first device encodes and decodes the message (i.e., the first message) using the optimized data structure, the second signal element, after being encoded, just fills the bytes that are not occupied after the signal elements preceding the second signal element (i.e., other signal elements) are encoded, thereby enabling the first signal element to be encoded or decoded at the beginning of the byte (i.e., the first signal element is encoded or decoded with byte alignment), thereby avoiding the bit operation caused by shifting all the data of the first signal element bit by bit during the encoding and decoding process of the first signal element due to the need to move part of the data of the first signal element from the bytes that are not occupied after the encoding of other signal elements to the beginning of the next byte.

[0103] It should be noted that the message processing method based on data structure optimization provided in the embodiment of the present application is mainly to improve the encoding and decoding efficiency of the first signal element when there are residual bits in the last byte of the code stream obtained after the signal element preceding the first signal element is encoded, and the residual bits occupy a fixed length. The entire implementation process does not require modification of the encoding and decoding rules.

[0104] To improve applicability, a second aspect of an embodiment of the present application provides a message encoding method, which is performed by an encoding device. Referring to FIG5 , which is a flowchart of an implementation of a message encoding method provided in an embodiment of the present application, the method may include the following steps:

[0105] Step S201: The encoding device encodes the first message using a non-aligned compression encoding rule and a first method.

[0106] The first method includes:

[0107] In a case where a code stream obtained by encoding a cell preceding the first cell has byte misalignment, byte aligning the code stream;

[0108] Encoding the first information element at the beginning of a byte of the byte-aligned code stream;

[0109] Among them, the first message includes at least the first information element and the information element located in front of the first information element. The first information element can be determined according to actual needs, such as the information element structure can be a byte stream type information element (such as the dedicated NAS-Message mentioned above, or the OCTET STRING type information element) determined as the first information element; the encoding device can be a terminal device or a network device, such as the encoding device can be the terminal 11 or the network side device 12 in Figure 1. For examples of the terminal 11 and the network side device 12, please refer to the previous text and will not be repeated here.

[0110] In a specific implementation, a first method is introduced to optimize the non-aligned compression coding rule. When the encoding device uses the optimized non-aligned compression coding rule to encode the first message, the encoding device will, when completing the encoding of the information element preceding the first information element, additionally detect whether the code stream obtained by the current encoding (i.e., the code stream obtained by encoding the information element preceding the first information element) is byte-aligned based on the above-mentioned first method. In the case that the code stream obtained by the current encoding is byte-unaligned, the code stream is first byte-aligned, and then the first information element is encoded at the beginning of the byte of the byte-aligned code stream. In this way, the code stream obtained by encoding the information element preceding the first information element is actively byte-aligned by the encoding device to ensure that the first information element can be encoded with byte alignment, thereby avoiding the bit operation caused by shifting the first information element, thereby improving the encoding efficiency of the first information element.

[0111] In some embodiments, to improve processing efficiency, if the encoding device detects that the code stream obtained by encoding the code element preceding the first code element is byte aligned, the byte alignment step can be skipped and the first code element can be encoded directly at the beginning of the byte of the byte-aligned code stream.

[0112] In some implementations, the encoding device may first determine a first length of padding required for byte-aligning the code stream, and pad the code stream with bits that satisfy the first length to achieve byte alignment for the code stream.

[0113] For example, if the last byte of the code stream obtained by encoding the symbol preceding the first symbol has one bit remaining, the encoder may determine the length of this one bit (or a length of nine bits, etc.) as the first length (i.e., the first length may be the remaining bit length of the currently obtained code stream, or the sum of a positive integer multiple of the length of eight bits and the remaining bit length of the currently obtained code stream), and automatically fill the code stream with bits that satisfy the first length (e.g., fill the code stream with one zero bit). This embodiment does not impose any restrictions on the specific value of the filled bits.

[0114] It can be seen from the above steps that by optimizing the traditional non-aligned compression encoding rules, the encoding device can actively byte-align the code stream obtained by encoding the signal preceding the first signal, thereby avoiding or reducing the bit operation of the first signal during the encoding process, thereby improving the encoding efficiency of the first signal. Compared with the method of optimizing the data structure, the embodiment of the present application adopts the method of optimizing the encoding rules to improve the encoding efficiency, so that the encoding device can flexibly perform byte alignment according to the actual situation of the code stream obtained by encoding (that is, the encoder can automatically fill in the number of bits remaining in the last byte of the code stream obtained by the encoding for byte alignment), which can avoid the limitations brought about by pre-determining the fixed length occupied by the second signal after encoding in the data structure design stage, so that the message encoding method provided by this embodiment can be further applied to messages with variable-length signals preceding the first signal, thereby improving the applicability of the method.

[0115] The message encoding method is further described below in conjunction with the second embodiment.

[0116] Implementation Method 2

[0117] The encoding device determines whether to adopt the above-mentioned first method to encode the message according to the following two implementation methods. When it is determined to adopt the above-mentioned first method to encode the message, the encoding device will first byte-align the code stream obtained by encoding the information element preceding the first information element, and then start encoding the first information element; when it is determined not to adopt the above-mentioned first method to encode the message, the encoding device can adopt traditional non-aligned compression encoding rules to encode the first message, that is, byte alignment is performed only after all information elements in the first message are encoded.

[0118] In some embodiments, the above-mentioned first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format. By using the above-mentioned first method to encode the first message, the encoding rules of the ASN.1 protocol (i.e., the first protocol) are enhanced.

[0119] Optionally, the above-mentioned first protocol can be a 3GPP protocol such as a radio resource control protocol using ASN.1, or a positioning protocol (such as LPP protocol), or a data plane protocol (such as a potential 6G data plane protocol), or the first protocol can be any communication protocol using ASN.1.

[0120] Embodiment 1: The encoding device determines whether to use the first method mentioned above to encode the message according to the first indication information.

[0121] In this embodiment, the first indication information can be a message that directly indicates whether the encoding device adopts the above-mentioned first method to encode the message. For example, the first indication information can directly indicate whether the encoding device adopts the above-mentioned first method to encode the message through different bit values ​​(such as 0 and 1). The first indication information can also be a message that indirectly indicates whether the encoding device adopts the above-mentioned first method to encode the message. For example, the first indication information can indicate which encoding rule or method (such as using UPER optimized based on the first method, or using UPER optimized based on other methods, or using traditional UPER or APER, etc.) the encoding device needs to adopt for message encoding through the identifier of different encoding methods. The encoding device further determines whether to adopt the above-mentioned first method to encode the message based on the received encoding method identifier.

[0122] In some embodiments, before receiving the above-mentioned first indication information, the encoding device determines not to use the above-mentioned first method to encode the message, and uses the second method to encode the message, and the second method is to use only Unaligned PER for encoding, that is, the encoding device uses traditional Unaligned PER to encode the message before receiving the first indication information; after receiving the first indication information, the encoding device determines to use the above-mentioned first method to encode the message, and uses Unaligned PER and the above-mentioned first method to encode the message, that is, after receiving the first indication information, the encoding device uses the encoding rule of Unaligned PER optimized based on the first method to encode the message to improve the encoding efficiency of the first symbol.

[0123] In some embodiments, the first indication information is configured by a network device. For example, the network device may configure (or send) the first indication information to a terminal device to instruct the terminal device to use the first method for message encoding when acting as a coding device. The network device may also configure the first indication information for itself (such as a network management device sending the first indication information to a base station) to instruct itself to use the first method for message encoding when acting as a coding device.

[0124] In some embodiments, when the encoding device is a terminal device, the encoding device reports to the network device whether it supports a first capability, where the first capability is the ability to byte align the encoded code stream before starting to encode the first signal element. Based on the first capability reported by the terminal device, the network device can know whether the terminal device has the ability to execute the encoding rules of the Unaligned PER optimized based on the above-mentioned first method, and the network device can then configure the first indication information for the terminal device.

[0125] Optionally, the first indication information is configured by the network device according to the first capability reported by the terminal device. When the network device determines that the terminal device supports the first capability, it can instruct the terminal device to use the first method to encode the message through the first indication information, thereby ensuring the normal execution of the message encoding.

[0126] Embodiment 2: The encoding device determines whether to use the first method mentioned above to encode the message according to the protocol agreement.

[0127] In this embodiment, it can be agreed in a protocol that adopts the Unaligned PER encoding rule (such as the 3GPP protocol, or other protocols that adopt ASN.1) whether to adopt the above-mentioned first method for message encoding. For example, a relevant agreement can be added to a certain 3GPP protocol to stipulate that all OCTET STRING type information elements in the protocol are encoded using the above-mentioned first method for message encoding to improve encoding efficiency.

[0128] In some embodiments, the protocol stipulates that the first method is used to encode messages of all types or some types in the first protocol (the above-mentioned first message belongs to the messages in the first protocol). For example, it can be agreed in a certain 3GPP protocol (such as the RRC protocol, the LPP protocol, the data plane protocol, etc.) that all types of messages in the 3GPP protocol (such as all messages carrying OCTET STRING type information elements) are encoded using the first method to improve the coding efficiency of the first information elements carried by all types of messages in the 3GPP protocol. It can also be agreed that the first method is used to encode messages for some types of messages in the 3GPP protocol to specifically improve the coding efficiency of the first information elements carried by some types of messages in the 3GPP protocol; or

[0129] The protocol stipulates that the first information element with a specific tag is encoded using the first method. For example, it can be agreed that the first method is used to encode the message for the OCTET STRING type information element with a specific tag (such as a dedicated NAS-Message and other information elements with a longer byte stream length), and the second method is used to encode the message for the OCTET STRING type information element without the specific tag (such as other OCTET STRING type information elements with a shorter byte stream length), so as to greatly improve the encoding efficiency; or

[0130] The protocol stipulates that the first method is used to encode messages for sub-messages in the first message with a specific mark. For example, by using the first method to encode messages for sub-messages with a longer byte stream length in the first message with a specific mark, the encoding efficiency of the first message can be greatly improved.

[0131] For example, taking a special annotation method to specifically mark the dedicated NAS-Message as an example, the dedicated NAS-Message after the special marking can be expressed as:

[0132] Similarly, the "--Aligned" annotation can also be added to other types of cells or sub-cells of other types of cells to indicate that the other types of cells or sub-cells of other types of cells are the first cells with a specific tag or the sub-cells of the first cells with a specific tag.

[0133] In some embodiments, when the protocol stipulates that the first information element with a specific mark or a sub-information element in the first information element is to be message encoded using the first method, the encoding device determines not to perform byte alignment on the encoded code stream before starting to encode the first information element without the specific mark or the sub-information element in the first information element. That is, at this time, the encoding device can use the traditional Unaligned PER encoding rule (such as the second method mentioned above) to encode the message, so as to avoid the additional byte alignment step.

[0134] In a third aspect of the embodiments of the present application, a message decoding method is provided. The method is performed by a decoding device. FIG6 is a flowchart of an implementation of a message decoding method provided in an embodiment of the present application. The method may include the following steps:

[0135] Step S301: The decoding device decodes the encoded first message using the decoding rule corresponding to the Unaligned PER and the third method.

[0136] The third method includes:

[0137] Before starting to decode the first encoded cell, skip decoding the target code stream;

[0138] The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and the encoded other symbols. The target code stream is used to perform byte alignment on a code stream obtained by encoding other symbols preceding the first symbol in the first message. The first symbol can be determined according to actual needs. For example, a symbol having a byte stream length greater than a set value (such as the dedicated NAS-Message described above) can be determined as the first symbol, or a symbol having a byte length that is a positive integer multiple of 8 bits (such as the OCTET STRING type symbol described above) can be determined as the first symbol. The decoding device can be a terminal device or a network device. For example, the encoding device can be the terminal 11 or the network-side device 12 in Figure 1. For examples of the terminal 11 and the network-side device 12, please refer to the previous text and will not be repeated here.

[0139] In a specific implementation, after encoding a first message using the message encoding method described in the second aspect of the embodiment of the present application, the encoding device transmits the encoded first message to a decoding device. The decoding device receives the encoded first message and, during message decoding of the encoded first message, detects the target code stream additionally padded by the encoding device in the encoded first message (i.e., the bits that satisfy the first length padded by the encoding device described in the second aspect of the embodiment of the present application). If the target code stream is detected, the decoding of the target code stream (which generally does not contain valid data content) is skipped to ensure decoding efficiency.

[0140] In some embodiments, the decoding device determines whether the current code stream to be decoded in the code stream of the encoded first message is at the beginning of a byte when decoding the encoded third code element, wherein the third code element includes the code element located before the first code element in the first message.

[0141] If the current code stream to be decoded is not at the beginning of a byte, it means that the current code stream to be decoded includes a target code stream additionally padded by the encoding device. According to the message encoding method described in the second aspect of the embodiment of the present application, the target code stream is the code stream before the next byte of the current code stream to be decoded, and the first encoded symbol corresponds to the next byte (or the next byte and its subsequent bytes) of the current code stream to be decoded. Therefore, the decoding device jumps to the beginning of the next byte of the current code stream to be decoded to skip decoding the target code stream and start decoding the first encoded symbol.

[0142] If the current code stream to be decoded is at the beginning of a byte, it means that the current code stream to be decoded does not contain the target code stream additionally padded by the encoding device (that is, the code stream obtained by encoding the symbol preceding the first symbol is byte-aligned, or the message encoding is not performed using the first method described above). In this case, the decoding device decodes from the beginning of the byte of the current code stream to be decoded.

[0143] It can be seen from the above steps that by optimizing the traditional non-aligned compression encoding rules, the encoding device can actively byte-align the code stream obtained by encoding the signal preceding the first signal, and encode the first signal at the beginning of the byte, so that the decoding device can decode the first signal at the beginning of the byte accordingly, thereby avoiding or reducing bit operations in the decoding process of the first signal, so as to improve the decoding efficiency of the first signal, and the decoding device can ensure the decoding efficiency of the first message by skipping the target code stream filled with additional byte alignment by the encoding device.

[0144] The message decoding method is further described below in conjunction with the third embodiment.

[0145] Implementation Method 3

[0146] The decoding device determines whether to adopt the third method for message decoding according to the following two implementation methods. When it is determined that the third method is adopted for message decoding, the decoding device skips decoding the target code stream during decoding of the encoded first message. When it is determined not to adopt the third method for message decoding, the decoding device may adopt a decoding rule corresponding to a traditional non-aligned compression encoding rule to decode the encoded first message, that is, the target code stream is not detected and skipped.

[0147] In some embodiments, the above-mentioned first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format. By using the above-mentioned third method to decode the encoded first message, the decoding rules of the ASN.1 protocol (i.e., the first protocol) are enhanced.

[0148] Optionally, the above-mentioned first protocol can be a 3GPP protocol such as a radio resource control protocol using ASN.1, or a positioning protocol (such as LPP protocol), or a data plane protocol (such as a potential 6G data plane protocol), or the first protocol can be any communication protocol using ASN.1.

[0149] Embodiment 1: The decoding device determines whether to adopt the third method to decode the message according to the second indication information.

[0150] In this embodiment, the second indication information can be a message that directly indicates whether the decoding device adopts the above-mentioned third method to decode the message. For example, the second indication information can directly indicate whether the decoding device adopts the above-mentioned third method to decode the message through different bit values ​​(such as 0 and 1). The second indication information can also be a message that indirectly indicates whether the decoding device adopts the above-mentioned third method to decode the message. For example, the second indication information can indicate which decoding rule or method the decoding device needs to adopt through the identifier of different decoding methods (such as adopting the decoding rule corresponding to the UPER optimized based on the third method, or adopting the decoding rule corresponding to the UPER optimized based on other methods, or adopting the decoding rule corresponding to the traditional UPER or APER, etc.) to decode the message. The decoding device further determines whether to adopt the above-mentioned third method to decode the message based on the received decoding method identifier.

[0151] In some embodiments, before receiving the second indication information, the decoding device determines not to use the third method to decode the message, and instead uses a fourth method to decode the message. The fourth method is to use only the decoding rules corresponding to the Unaligned PER for decoding. That is, before receiving the second indication information, the decoding device uses the traditional decoding rules corresponding to the Unaligned PER to decode the message. After receiving the second indication information, the decoding device determines to use the third method to decode the message, and uses the decoding rules corresponding to the Unaligned PER as well as the third method to decode the message. That is, after receiving the first indication information, the decoding device uses the decoding rules corresponding to the Unaligned PER optimized based on the third method to decode the message, to ensure decoding efficiency.

[0152] In some embodiments, the second indication information is configured by the network device. For example, the network device can configure (or send) the second indication information to the terminal device to instruct the terminal device to use the third method to perform message decoding when acting as a decoding device. The network device can also configure the second indication information for itself (such as the network management device sends the second indication information to the base station) to instruct itself to use the third method to perform message decoding when acting as a decoding device.

[0153] In some embodiments, when the decoding device is a terminal device, the decoding device reports to the network device whether it supports a second capability, where the second capability is the ability to skip decoding the target code stream before starting to decode the encoded first symbol. The network device can know whether the terminal device has the ability to execute the decoding rules corresponding to the Unaligned PER optimized based on the above-mentioned third method based on the second capability reported by the terminal device. The network device can then perform operations such as removing or adding the second capability on the terminal device.

[0154] Optionally, the second indication information is configured by the network device according to the second capability reported by the terminal device. When the network device determines that the terminal device supports the second capability, it can instruct the terminal device to use a third method to decode the message through the second indication information, thereby ensuring the normal execution of the message decoding.

[0155] Embodiment 2: The decoding device determines whether to adopt the third method mentioned above to decode the message according to the protocol.

[0156] In this embodiment, it can be agreed in the protocol of the Unaligned PER encoding rule (such as the 3GPP protocol, or other protocols that adopt ASN.1) whether to adopt the above-mentioned third method for message decoding. For example, a relevant agreement can be added to a certain 3GPP protocol to stipulate that the above-mentioned third method is adopted for message decoding for all OCTET STRING type information elements in the protocol to improve encoding efficiency.

[0157] In some embodiments, the protocol stipulates that the third method is used to decode all or some types of messages encoded in the first protocol (the above-mentioned first message belongs to the message in the first protocol). For example, it can be agreed in a certain 3GPP protocol (such as RRC protocol, LPP protocol, data plane protocol, etc.) that all types of messages in the encoded 3GPP protocol (such as all messages carrying OCTET STRING type information elements) are decoded using the third method to ensure the decoding efficiency of all types of messages in the 3GPP protocol. It can also be agreed that the third method is used to decode some types of messages in the encoded 3GPP protocol to specifically ensure the decoding efficiency of some types of messages in the 3GPP protocol; or

[0158] The protocol stipulates that the third method is used to decode the encoded fourth information element (i.e., the first information element with a specific tag). For example, it may be stipulated that the third method is used to decode the encoded OCTET STRING type information element with a specific tag (such as a dedicated NAS-Message), and the fourth method is used to decode the encoded OCTET STRING type information element without the specific tag; or

[0159] The protocol stipulates that the third method is used to decode the message for the encoded first sub-element (i.e., the sub-element in the first element with a specific mark). For example, it can be agreed that the third method is used to decode the message for the sub-element with a longer byte stream length in the encoded first element with a specific mark to ensure decoding efficiency.

[0160] In some embodiments, when the protocol stipulates that the third method is used to decode the encoded fourth symbol or the encoded first sub-symbol, the decoding device determines not to skip decoding of the target codestream before starting to decode the encoded fifth symbol (i.e., the first symbol without the specific tag) or the encoded second sub-symbol (i.e., the sub-symbol within the first symbol without the specific tag). In other words, the decoding device can use the decoding rules corresponding to the traditional Unaligned PER (such as the fourth method) to perform message decoding, thereby avoiding the additional target codestream detection and skipping steps.

[0161] The message processing method, message encoding method, and message decoding method provided in the embodiments of the present application may be executed by a message processing device, a message encoding device, and a message decoding device. In the embodiments of the present application, the message processing device, message encoding device, and message decoding device are used as examples to illustrate the message processing device, message encoding method, and message decoding method, respectively, provided in the embodiments of the present application.

[0162] In a fourth aspect, an embodiment of the present application provides a message processing apparatus, which can be applied to a first device. As shown in FIG7 , the message processing apparatus 100 includes:

[0163] The message processing module 101 is configured to process the first message based on an unaligned compression encoding rule Unaligned PER;

[0164] The first message includes a first information element and a second information element, wherein the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded with byte alignment.

[0165] Optionally, the second information element is an information element that occupies a fixed length after encoding, and the fixed length is determined based on the fixed bit length required to fill other information elements for byte alignment. The other information elements are information elements in the first message that are located in front of the first information element except the second information element.

[0166] Optionally, the second information element is a bit string that occupies the fixed length after encoding.

[0167] Optionally, the second information element is of an integer type having a fixed upper and lower value range, and the fixed upper and lower value range is determined according to the fixed length.

[0168] Optionally, the fixed length is: a length greater than 0 bits and less than 8 bits.

[0169] Optionally, the second information element is the previous information element of the first information element.

[0170] Optionally, the second information element is a mandatory information element.

[0171] Optionally, the second cell is a reserved cell, a spare cell, or a dummy cell.

[0172] Optionally, the type of the first information element is an octet string OCTET STRING type.

[0173] Optionally, the first message belongs to a message in a first protocol, and the first protocol uses Abstract Syntax Notation (ASN.1) to describe the message format.

[0174] Optionally, the first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.1.

[0175] Optionally, the 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

[0176] Optionally, the first device is a terminal device or a network device.

[0177] Optionally, the message processing module 101 includes at least one of the following:

[0178] A first message processing submodule, configured to, when the first device is an encoding device, perform message encoding on the first message based on Unaligned PER;

[0179] The second message processing submodule is configured to, when the first device is a decoding device, decode the first message based on a decoding rule corresponding to the Unaligned PER.

[0180] The message processing device provided in the embodiment of the present application can implement the various processes implemented by the message processing method embodiment described in the first aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0181] In a fifth aspect, an embodiment of the present application provides a message encoding device, which can be applied to an encoding device. As shown in FIG8 , the message encoding device 200 includes:

[0182] A message encoding module 201 is configured to encode a first message using a non-aligned compression encoding rule and a first method;

[0183] The first method includes:

[0184] In a case where a code stream obtained by encoding a cell preceding the first cell has byte misalignment, byte aligning the code stream;

[0185] Encoding the first information element at the beginning of a byte of the byte-aligned code stream;

[0186] The first message includes at least the first information element and an information element preceding the first information element.

[0187] Optionally, the step of byte-aligning the code stream in the first manner includes:

[0188] Determine a first length of padding required for byte alignment of the code stream, and pad the code stream with bits that satisfy the first length.

[0189] Optionally, the device further comprises:

[0190] The first encoding module 202 is used to determine whether to use the first method to encode the message based on the first indication information or protocol agreement.

[0191] Optionally, the first encoding module 202 includes:

[0192] A first encoding submodule, configured to, before the encoding device receives the first indication information, perform message encoding in a second manner, where the second manner is encoding using only Unaligned PER;

[0193] The second encoding submodule is configured to perform message encoding using Unaligned PER and the first method after the encoding device receives the first indication information.

[0194] Optionally, the protocol stipulates that the first method is used to encode messages of all or some types of messages in the first protocol; or

[0195] The protocol stipulates that the first information element with a specific tag is message-encoded in the first manner; or

[0196] The protocol stipulates that the sub-information cells in the first information cell with a specific mark are encoded using the first method;

[0197] The first message belongs to a message in the first protocol.

[0198] Optionally, when the protocol stipulates that the first information element having the specific mark or a sub-information element in the first information element is message-encoded in the first manner, the apparatus further includes:

[0199] The second encoding module 203 is configured to determine not to perform byte alignment on the encoded code stream before starting to encode the first cell or a sub-cell in the first cell without the specific mark.

[0200] Optionally, the first indication information is configured by a network device.

[0201] Optionally, when the encoding device is a terminal device, the apparatus further includes:

[0202] The first capability reporting module 204 is configured to report to the network device whether it supports a first capability, where the first capability is a capability of performing byte alignment on the encoded code stream before starting to encode the first information element.

[0203] Optionally, the first indication information is configured by the network device according to the first capability reported by the terminal device.

[0204] Optionally, the type of the first information element is OCTET STRING type.

[0205] Optionally, the first message belongs to a message in a first protocol, and the first protocol uses Abstract Syntax Notation (ASN.1) to describe the message format.

[0206] Optionally, the first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.1.

[0207] Optionally, the 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

[0208] Optionally, the encoding device is a terminal device or a network device.

[0209] The message encoding device provided in the embodiment of the present application can implement the various processes implemented by the message encoding method embodiment described in the second aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0210] In a sixth aspect, an embodiment of the present application provides a message decoding apparatus, which can be applied to a decoding device. As shown in FIG9 , the message decoding apparatus 300 includes:

[0211] A message decoding module 301 is configured to decode the encoded first message using a decoding rule corresponding to the Unaligned PER and a third method;

[0212] The third method includes:

[0213] Before starting to decode the first encoded cell, skip decoding the target code stream;

[0214] The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and the encoded other symbols. The target code stream is used to byte-align the code stream obtained by encoding other symbols located before the first symbol in the first message.

[0215] Optionally, in the third manner, before starting to decode the encoded first symbol, skipping the step of decoding the target code stream includes:

[0216] determining whether a code stream currently to be decoded in the code stream of the encoded first message is at the beginning of a byte when decoding of the encoded third information element is completed, the third information element including an information element preceding the first information element in the first message;

[0217] If the current code stream to be decoded is not at the beginning of a byte, jump to the beginning of the next byte of the current code stream to be decoded and perform decoding;

[0218] If the code stream to be decoded currently is at the beginning of a byte, decoding is performed from the beginning of the byte of the code stream to be decoded currently.

[0219] Optionally, the device further comprises:

[0220] The first decoding module 302 is configured to determine whether to use the third method to decode the message based on the second indication information or protocol agreement.

[0221] Optionally, the first decoding module 302 includes:

[0222] a first decoding submodule, configured to, before the decoding device receives the second indication information, perform message decoding using a fourth manner, wherein the fourth manner is to perform decoding using only a decoding rule corresponding to the Unaligned PER;

[0223] The second decoding submodule is configured to decode the message using the decoding rule corresponding to the Unaligned PER and the third method after the decoding device receives the second indication information.

[0224] Optionally, the protocol stipulates that the third method is used to decode all or some types of messages encoded in the first protocol; or

[0225] The protocol stipulates that the encoded fourth information element is decoded using the third method; or

[0226] The protocol stipulates that the encoded first sub-element is decoded using the third method;

[0227] The first message belongs to a message in a first protocol, the fourth cell is a first cell with a specific tag, and the first sub-cell is a sub-cell in the first cell with a specific tag.

[0228] Optionally, when the protocol stipulates that the encoded fourth information element or the encoded first sub-information element is decoded using the third method, the apparatus further includes:

[0229] A second decoding module 303 is configured to determine not to skip decoding of the target code stream before starting to decode the encoded fifth symbol or the encoded second sub-symbol;

[0230] The fifth cell is the first cell without the specific mark, and the second sub-cell is a sub-cell in the first cell without the specific mark.

[0231] Optionally, the second indication information is configured by the network device.

[0232] Optionally, when the decoding device is a terminal device, the apparatus further includes:

[0233] The second capability reporting module 304 is configured to report to the network device whether it supports a second capability, where the second capability is a capability of skipping decoding of the target code stream before starting to decode the encoded first information element.

[0234] Optionally, the second indication information is configured by the network device according to the second capability reported by the terminal device.

[0235] Optionally, the type of the first information element is OCTET STRING type.

[0236] Optionally, the first message belongs to a message in a first protocol, and the first protocol uses Abstract Syntax Notation (ASN.1) to describe the message format.

[0237] Optionally, the first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.1.

[0238] Optionally, the 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

[0239] Optionally, the decoding device is a terminal device or a network device.

[0240] The message decoding device provided in the embodiment of the present application can implement the various processes implemented by the message decoding method embodiment described in the third aspect and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0241] The message processing device, message encoding device, and message decoding device in the embodiments of the present application can be electronic devices, such as electronic devices with an operating system, or components in electronic devices, such as integrated circuits or chips. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include but is not limited to the types of terminal 11 listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiments of the present application.

[0242] As shown in Figure 10, an embodiment of the present application also provides a communication device 1000, including a processor 1001 and a memory 1002, and the memory 1002 stores a program or instruction that can be run on the processor 1001. The communication device 1000 can be a terminal or a network device. When the program or instruction is executed by the processor 1001, it can implement the various steps of the message processing method embodiment described in the first aspect above, or implement the various steps of the message encoding method embodiment described in the second aspect above, or implement the various steps of the message decoding method embodiment described in the third aspect above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0243] An embodiment of the present application also provides a terminal device, including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps in the message processing method embodiment as described in the first aspect, or to implement the steps in the message encoding method embodiment as described in the second aspect, or to implement the steps in the message decoding method embodiment as described in the third aspect. This terminal device embodiment corresponds to the above-mentioned first device side method embodiment, or encoding device side method embodiment, or decoding device side method embodiment. Each implementation process and implementation method of the above-mentioned method embodiments can be applied to the terminal device embodiment and can achieve the same technical effect. Specifically, Figure 11 is a schematic diagram of the hardware structure of a terminal device that implements an embodiment of the present application.

[0244] The terminal device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109 and at least some of the components of the processor 1110.

[0245] Those skilled in the art will appreciate that the terminal device 1100 may further include a power source (such as a battery) to power various components. The power source may be logically connected to the processor 1110 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal device structure shown in FIG11 does not limit the terminal device. The terminal device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0246] It should be understood that in an embodiment of the present application, the input unit 1104 may include a graphics processing unit (GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and at least one of other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0247] In the embodiment of the present application, after receiving downlink data from a network device, the RF unit 1101 may transmit the data to the processor 1110 for processing. Furthermore, the RF unit 1101 may send uplink data to a network-side device. Typically, the RF unit 1101 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like.

[0248] The memory 1109 can be used to store software programs or instructions and various data. The memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1109 may include a volatile memory or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 1109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0249] Processor 1110 may include one or more processing units. Optionally, processor 1110 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1110.

[0250] The embodiment of the present application also provides a network device, including a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the message processing method embodiment as described in the first aspect, or the steps of the message encoding method embodiment as described in the second aspect, or the steps of the message decoding method embodiment as described in the third aspect. This network device embodiment corresponds to the above-mentioned first device-side method embodiment, or encoding device-side method embodiment, or decoding device-side method embodiment, and each implementation process and implementation method of the above-mentioned method embodiments can be applied to this network device embodiment and can achieve the same technical effect.

[0251] Specifically, embodiments of the present application also provide a network device. As shown in Figure 12, network device 1200 includes an antenna 121, a radio frequency device 122, a baseband device 123, a processor 124, and a memory 125. Antenna 121 is connected to radio frequency device 122. In the uplink direction, radio frequency device 122 receives information via antenna 121 and sends the received information to baseband device 123 for processing. In the downlink direction, baseband device 123 processes the information to be transmitted and sends it to radio frequency device 122. Radio frequency device 122 processes the received information and then sends it through antenna 121.

[0252] The method executed by the network device in the above embodiment may be implemented in the baseband device 123 , which includes a baseband processor.

[0253] The baseband device 123 may include, for example, at least one baseband board, on which multiple chips are arranged, as shown in Figure 12, one of the chips is, for example, a baseband processor, which is connected to the memory 125 through a bus interface to call the program in the memory 125 and execute the network device operations shown in the above method embodiment.

[0254] The network device may further include a network interface 126 , which is, for example, a Common Public Radio Interface (CPRI).

[0255] Specifically, the network device 1200 of an embodiment of the present application also includes: instructions or programs stored in the memory 125 and executable on the processor 124. The processor 124 calls the instructions or programs in the memory 125 to execute the method executed by each module in the message processing device described in the fourth aspect, or executes the method executed by each module in the message encoding device described in the fifth aspect, or executes the method executed by each module in the message decoding device described in the sixth aspect, and achieves the same technical effect. To avoid repetition, it will not be repeated here.

[0256] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the message processing method embodiment described in the first aspect above, or the various processes of the message encoding method embodiment described in the second aspect above, or the various processes of the message decoding method embodiment described in the third aspect above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0257] The processor is a processor in the communication device, network device, or terminal device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.

[0258] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the message processing method embodiment described in the first aspect above, or to implement the various processes of the message encoding method embodiment described in the second aspect above, or to implement the various processes of the message decoding method embodiment described in the third aspect above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0259] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0260] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the message processing method embodiment described in the first aspect above, or to implement the various processes of the message encoding method embodiment described in the second aspect above, or to implement the various processes of the message decoding method embodiment described in the third aspect above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0261] An embodiment of the present application also provides a wireless communication system, including: an encoding device and a decoding device, the encoding device can be used to execute the steps of the message encoding method as described in the second aspect, and the decoding device can be used to execute the steps of the message decoding method as described in the third aspect.

[0262] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0263] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.

[0264] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.

Claims

1. A message processing method, wherein: The method comprises: The first device processes the first message based on the unaligned compression encoding rule Unaligned PER; The first message includes a first information element and a second information element, wherein the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded under byte alignment.

2. The method according to claim 1, wherein: The second information element is an information element that occupies a fixed length after encoding, and the fixed length is determined based on the fixed bit length required to fill other information elements for byte alignment. The other information elements are information elements in the first message that are located in front of the first information element except the second information element.

3. The method according to claim 2, wherein: The second information element is a bit string that occupies the fixed length after being encoded.

4. The method according to claim 2, wherein: The second information element is an integer type having a fixed upper and lower value range, and the fixed upper and lower value range is determined according to the fixed length.

5. The method according to any one of claims 2 to 4, wherein: The fixed length is: a length greater than 0 bits and less than 8 bits.

6. The method according to any one of claims 1 to 5, wherein: The second information element is a previous information element of the first information element.

7. The method according to any one of claims 1 to 6, wherein: The second information element is a mandatory information element.

8. The method according to any one of claims 1 to 7, wherein: The second cell is a reserved cell, a spare cell, or a dummy cell.

9. The method according to any one of claims 1 to 8, wherein: The type of the first information element is an octet string OCTET STRING type.

10. The method according to any one of claims 1 to 9, wherein: The first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format.

11. The method according to claim 10, wherein: The first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.

1.

12. The method according to claim 11, wherein: The 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

13. The method according to any one of claims 1 to 12, wherein: The first device is a terminal device or a network device.

14. The method according to any one of claims 1 to 13, wherein: The first device performs message processing on the first message based on an unaligned compression encoding rule Unaligned PER, including at least one of the following: When the first device is an encoding device, performing message encoding on the first message based on Unaligned PER; In the case where the first device is a decoding device, the first message is decoded based on a decoding rule corresponding to the Unaligned PER.

15. A message encoding method, wherein: The method comprises: The encoding device encodes the first message using a non-aligned compression encoding rule and a first method; The first method includes: In the case that a code stream obtained by encoding the information element preceding the first information element has byte misalignment, byte alignment is performed on the code stream; Encoding the first information element at the beginning of a byte of the byte-aligned code stream; The first message at least includes the first information element and an information element preceding the first information element.

16. The method according to claim 15, wherein: The step of byte aligning the code stream comprises: Determine a first length of padding required for byte alignment of the code stream, and pad the code stream with bits satisfying the first length.

17. The method according to claim 15 or 16, wherein: The method further comprises: The encoding device determines whether to adopt the first method to encode the message based on the first indication information or protocol agreement.

18. The method according to claim 17, wherein: The encoding device determines, based on the first indication information or the protocol agreement, whether to adopt the first manner to encode the message, including: Before receiving the first indication information, the encoding device uses a second method to encode the message, where the second method is to use only Unaligned PER for encoding; After receiving the first indication information, the encoding device uses Unaligned PER and the first method to encode the message.

19. The method according to claim 17, wherein: The protocol stipulates that the first method is used to encode messages of all types or some types of messages in the first protocol; or The protocol stipulates that the first information element with a specific mark is message-encoded in the first manner; or The protocol stipulates that the sub-information cells in the first information cell with a specific mark are encoded by the first method; The first message belongs to a message in the first protocol.

20. The method according to claim 19, wherein: In the case where the protocol stipulates that the first information element having the specific mark or a sub-information element in the first information element is message encoded in the first manner, the method further includes: The encoding device determines not to perform byte alignment on the encoded code stream before starting to encode the first cell or the sub-cell in the first cell without the specific mark.

21. The method according to claim 17, wherein: The first indication information is configured by the network device.

22. The method according to claim 21, wherein: In the case where the encoding device is a terminal device, the method further includes: The encoding device reports to the network device whether it supports a first capability, where the first capability is a capability of byte-aligning a coded code stream before starting to encode the first information element.

23. The method according to claim 22, wherein: The first indication information is configured by the network device according to the first capability reported by the terminal device.

24. The method according to any one of claims 15 to 23, wherein: The type of the first information element is OCTET STRING type.

25. The method according to any one of claims 15 to 24, wherein: The first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format.

26. The method according to claim 25, wherein: The first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.

1.

27. The method according to claim 26, wherein: The 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

28. The method according to any one of claims 15 to 27, wherein: The encoding device is a terminal device or a network device.

29. A message decoding method, wherein: The method comprises: The decoding device decodes the encoded first message using a decoding rule corresponding to the Unaligned PER and a third method; Wherein, the third method includes: Before starting to decode the first encoded cell, skip decoding the target code stream; The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and other encoded symbols. The target code stream is used to byte-align the code stream obtained by encoding other symbols in the first message that are located in front of the first symbol.

30. The method of claim 29, wherein: The step of skipping decoding of a target bitstream before decoding the first encoded symbol includes: determining whether a code stream currently to be decoded in the code stream of the encoded first message is at the beginning of a byte when decoding of the encoded third information element is completed, the third information element including an information element in the first message that is located before the first information element; If the current code stream to be decoded is not at the beginning of a byte, jump to the beginning of the next byte of the current code stream to be decoded and perform decoding; If the current code stream to be decoded is at the beginning of a byte, decoding is performed from the beginning of the byte of the current code stream to be decoded.

31. The method according to claim 29 or 30, wherein: The method further comprises: The decoding device determines whether to adopt the third method to decode the message based on the second indication information or the protocol agreement.

32. The method according to claim 31, wherein: The decoding device determines whether to use the third method to decode the message based on the second indication information or the protocol agreement, including: Before receiving the second indication information, the decoding device uses a fourth method to decode the message, and the fourth method is to use only a decoding rule corresponding to the Unaligned PER for decoding; After receiving the second indication information, the decoding device uses the decoding rule corresponding to the Unaligned PER and the third method to decode the message.

33. The method according to claim 31 or 32, wherein: The protocol stipulates that the third method is used to decode all or some types of messages encoded in the first protocol; or The protocol stipulates that the encoded fourth information element is decoded by the third method; or The protocol stipulates that the encoded first sub-element is decoded using the third method; The first message belongs to a message in a first protocol, the fourth cell is a first cell with a specific mark, and the first sub-cell is a sub-cell in the first cell with a specific mark.

34. The method of claim 33, wherein: In the case where the protocol stipulates that the encoded fourth information element or the encoded first sub-information element adopts the third mode to perform message decoding, the method further includes: The decoding device determines not to skip decoding of the target code stream before starting to decode the encoded fifth symbol or the encoded second sub-symbol; The fifth cell is the first cell without the specific mark, and the second sub-cell is a sub-cell in the first cell without the specific mark.

35. The method according to any one of claims 31 to 34, wherein: The second indication information is configured by the network device.

36. The method of claim 35, wherein: In the case where the decoding device is a terminal device, the method further includes: The decoding device reports to the network device whether it supports a second capability, where the second capability is a capability of skipping decoding of the target code stream before starting to decode the encoded first information element.

37. The method of claim 36, wherein: The second indication information is configured by the network device according to the second capability reported by the terminal device.

38. The method according to any one of claims 29 to 37, wherein: The type of the first information element is OCTET STRING type.

39. The method according to any one of claims 29 to 38, wherein: The first message belongs to a message in a first protocol, and the first protocol uses abstract syntax notation ASN.1 to describe the message format.

40. The method according to any one of claims 39, wherein: The first protocol is a 3rd Generation Partnership Project 3GPP protocol using ASN.1, or any communication protocol using ASN.

1.

41. The method of claim 40, wherein: The 3GPP protocol is a radio resource control protocol, a positioning protocol, or a data plane protocol.

42. The method according to any one of claims 29 to 41, wherein: The decoding device is a terminal device or a network device.

43. A message processing device, wherein: Applied to a first device, the apparatus comprises: A message processing module, used for performing message processing on the first message based on an unaligned compression encoding rule Unaligned PER; The first message includes a first information element and a second information element, wherein the second information element is in front of the first information element, and the second information element is used to enable the first information element to be encoded or decoded under byte alignment.

44. The message processing device according to claim 43, wherein: The second information element is an information element that occupies a fixed length after encoding, and the fixed length is determined based on the fixed bit length required to fill other information elements for byte alignment. The other information elements are information elements in the first message that are located in front of the first information element except the second information element.

45. A message encoding device, wherein: Applied to an encoding device, the device comprises: A message encoding module, used to encode the first message using a non-aligned compression encoding rule and a first method; The first method includes: In the case that a code stream obtained by encoding the information element preceding the first information element has byte misalignment, byte alignment is performed on the code stream; Encoding the first information element at the beginning of a byte of the byte-aligned code stream; The first message at least includes the first information element and an information element preceding the first information element.

46. ​​The message encoding device according to claim 45, wherein: The message encoding module is used for: Determine a first length of padding required for byte alignment of the code stream, and pad the code stream with bits satisfying the first length.

47. A message decoding device, wherein: Applied to a decoding device, the device comprises: A message decoding module, used to decode the encoded first message using a decoding rule corresponding to the Unaligned PER and a third method; Wherein, the third method includes: Before starting to decode the first encoded cell, skip decoding the target code stream; The encoded first message is encoded based on a non-aligned compression encoding rule, and the encoded first message includes the target code stream, the encoded first symbol, and other encoded symbols. The target code stream is used to byte-align the code stream obtained by encoding other symbols in the first message that are located in front of the first symbol.

48. The message decoding apparatus according to claim 47, wherein: The message decoding module is used for: determining whether a code stream currently to be decoded in the code stream of the encoded first message is at the beginning of a byte when decoding of the encoded third information element is completed, the third information element including an information element in the first message that is located before the first information element; If the current code stream to be decoded is not at the beginning of a byte, jump to the beginning of the next byte of the current code stream to be decoded and perform decoding; If the current code stream to be decoded is at the beginning of a byte, decoding is performed from the beginning of the byte of the current code stream to be decoded.

49. A communication device, wherein: It includes a processor and a memory, the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the message processing method as described in any one of claims 1 to 14, or implements the steps of the message encoding method as described in any one of claims 15 to 28, or implements the steps of the message decoding method as described in any one of claims 29 to 42.

50. A readable storage medium, wherein: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, it implements the steps of the message processing method as described in any one of claims 1 to 14, or implements the steps of the message encoding method as described in any one of claims 15 to 28, or implements the steps of the message decoding method as described in any one of claims 29 to 42.

Citation Information

Patent Citations

  • Efficient coding and decoding method of OLSR routing protocol based on ASN.1

    CN114828084A

  • Efficient packed encoding method for ASN.1

    US5638066A

  • History-based compression pipeline for data compression accelerator of a data processing unit

    WO2020106626A1