Search

CN-122027704-A - Signaling coding method and device

CN122027704ACN 122027704 ACN122027704 ACN 122027704ACN-122027704-A

Abstract

The application provides a signaling coding method and a signaling coding device, wherein the method comprises the steps of determining that a first information unit with a memory occupation index larger than a preset threshold value exists in an ASN.1 structure of a target signaling, wherein the memory occupation index is used for representing the memory occupation degree when the information unit is coded, dividing the ASN.1 structure of the target signaling into a plurality of segments based on the first information unit, and coding each segment to obtain a segmented code stream. The signaling coding method and the signaling coding device provided by the application determine the information unit occupying larger memory during coding, divide the ASN.1 structure of signaling into a plurality of segments and code each segment respectively, thereby reducing the requirement on the memory of the equipment during coding, avoiding the frequent error reporting during the coding process and ensuring the smooth progress of the coding test process.

Inventors

  • LIU CHANG

Assignees

  • 大唐联仪科技有限公司

Dates

Publication Date
20260512
Application Date
20241111

Claims (13)

  1. 1. A signaling encoding method, comprising: determining that a first information unit with a memory occupation index larger than a preset threshold exists in an ASN.1 structure of a target signaling, wherein the memory occupation index is used for representing the memory occupation degree when the information unit is coded; Dividing an asn.1 structure of the target signaling into a plurality of segments based on the first information element; And encoding each segment to obtain a segmented code stream.
  2. 2. The signaling encoding method of claim 1, wherein the dividing the asn.1 structure of the target signaling into a plurality of segments based on the first information unit comprises: Determining a type of the first information unit; the asn.1 structure of the target signaling is divided into a plurality of segments based on the type of the first information element.
  3. 3. The signaling encoding method of claim 2, wherein the dividing the asn.1 structure of the target signaling into a plurality of segments based on the type of the first information unit comprises: In case the type of the first information unit is a non-extended item information unit, the first information unit is individually taken as one segment and other information units in the asn.1 structure of the target signaling are divided into at least one segment.
  4. 4. The signaling encoding method of claim 2, wherein the dividing the asn.1 structure of the target signaling into a plurality of segments based on the type of the first information unit comprises: In case the type of the first information unit is an extended term information unit, the first information unit is taken as a segment alone, and other information units in the asn.1 structure of the target signaling are divided into at least one segment, and one non-extended term segment is added.
  5. 5. The signaling encoding method according to claim 3 or 4, wherein said dividing other information units in the asn.1 structure of the target signaling into at least one segment comprises: And in the case that the first information unit is located at the middle position of the ASN.1 structure of the target signaling, dividing the information unit before the first information unit into at least one segment, and dividing the information unit after the first information unit into at least one segment.
  6. 6. The signaling encoding method according to claim 3 or 4, wherein said dividing other information units in the asn.1 structure of the target signaling into at least one segment comprises: In case the first information unit is located at a head position of an asn.1 structure of the target signaling, an information unit following the first information unit is divided into at least one segment.
  7. 7. The signaling encoding method according to claim 3 or 4, wherein said dividing other information units in the asn.1 structure of the target signaling into at least one segment comprises: In case the first information unit is located at a tail position of an asn.1 structure of the target signaling, an information unit preceding the first information unit is divided into at least one segment.
  8. 8. The signaling encoding method of claim 1, wherein each segment is comprised of a valid portion, an end flag, and an invalid portion.
  9. 9. The signaling encoding method of claim 8, wherein the structure type of the invalid portion is a bootean type.
  10. 10. The signaling encoding method of claim 1 wherein each segmented code stream includes an end identifier.
  11. 11. A signaling encoding apparatus, comprising: The determining module is used for determining that a first information unit with a corresponding memory occupation index larger than a preset threshold exists in an ASN.1 structure of the target signaling, wherein the memory occupation index is used for representing the degree of occupying memory when the information unit is encoded; A segmentation module for dividing the asn.1 structure of the target signaling into a plurality of segments based on the first information element; And the coding module is used for coding each segment to obtain a segmented code stream.
  12. 12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the signalling coding method according to any of claims 1 to 10 when executing the computer program.
  13. 13. A non-transitory readable storage medium storing a computer program for causing a processor to perform the signaling encoding method of any one of claims 1 to 10.

Description

Signaling coding method and device Technical Field The present application relates to the field of mobile communications technologies, and in particular, to a signaling coding method and apparatus. Background At present, in the protocol consistency test of a terminal, a test script is used for verifying whether the tested terminal meets the protocol specification and the target requirement. In the related protocol, the signaling structure is defined by an abstract syntax notation (Abstract Syntax Notation One, asn.1) standard, and the use case flow encodes the signaling according to the asn.1 standard when the signaling needs to be sent. Along with the continuous expansion of signaling structures, the requirements on the running memory of a computer are higher and higher when coding is performed according to the ASN.1 standard. The problem of code error reporting occurs in the environment with poor computer performance, so that complete use case test cannot be performed. Disclosure of Invention The application provides a signaling coding method and a signaling coding device, which are used for solving the technical problem that in the prior art, the signaling coding test cannot be smoothly carried out due to error reporting caused by insufficient memory in the signaling coding process. In a first aspect, the present application provides a signaling encoding method, including: determining that a first information unit with a memory occupation index larger than a preset threshold exists in an ASN.1 structure of a target signaling, wherein the memory occupation index is used for representing the memory occupation degree when the information unit is coded; Dividing an asn.1 structure of the target signaling into a plurality of segments based on the first information element; And encoding each segment to obtain a segmented code stream. In some embodiments, the dividing the asn.1 structure of the target signaling into a plurality of segments based on the first information element comprises: Determining a type of the first information unit; the asn.1 structure of the target signaling is divided into a plurality of segments based on the type of the first information element. In some embodiments, the dividing the asn.1 structure of the target signaling into a plurality of segments based on the type of the first information element comprises: In case the type of the first information unit is a non-extended item information unit, the first information unit is individually taken as one segment and other information units in the asn.1 structure of the target signaling are divided into at least one segment. In some embodiments, the dividing the asn.1 structure of the target signaling into a plurality of segments based on the type of the first information element comprises: In case the type of the first information unit is an extended term information unit, the first information unit is taken as a segment alone, and other information units in the asn.1 structure of the target signaling are divided into at least one segment, and one non-extended term segment is added. In some embodiments, the dividing the other information units in the asn.1 structure of the target signaling into at least one segment includes: And in the case that the first information unit is located at the middle position of the ASN.1 structure of the target signaling, dividing the information unit before the first information unit into at least one segment, and dividing the information unit after the first information unit into at least one segment. In some embodiments, the dividing the other information units in the asn.1 structure of the target signaling into at least one segment includes: In case the first information unit is located at a head position of an asn.1 structure of the target signaling, an information unit following the first information unit is divided into at least one segment. In some embodiments, the dividing the other information units in the asn.1 structure of the target signaling into at least one segment includes: In case the first information unit is located at a tail position of an asn.1 structure of the target signaling, an information unit preceding the first information unit is divided into at least one segment. In some embodiments, each segment is composed of a valid portion, an end identifier, and an invalid portion. In some embodiments, the structure type of the inactive portion is a bootan type. In some embodiments, an end identification is included in each segmented code stream. In a second aspect, the present application further provides a signaling encoding apparatus, including: The determining module is used for determining that a first information unit with a corresponding memory occupation index larger than a preset threshold exists in an ASN.1 structure of the target signaling, wherein the memory occupation index is used for representing the degree of occupying memory when the information unit is encoded; A segment