CN111625244B - ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol - Google Patents

ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol Download PDF

Info

Publication number
CN111625244B
CN111625244B CN202010472600.3A CN202010472600A CN111625244B CN 111625244 B CN111625244 B CN 111625244B CN 202010472600 A CN202010472600 A CN 202010472600A CN 111625244 B CN111625244 B CN 111625244B
Authority
CN
China
Prior art keywords
asn
text
decoding
type
static
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010472600.3A
Other languages
Chinese (zh)
Other versions
CN111625244A (en
Inventor
邵帅
顾鑫
张常滨
韩文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huachang Technology Dalian Co ltd
Original Assignee
Huachang Technology Dalian Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huachang Technology Dalian Co ltd filed Critical Huachang Technology Dalian Co ltd
Priority to CN202010472600.3A priority Critical patent/CN111625244B/en
Publication of CN111625244A publication Critical patent/CN111625244A/en
Application granted granted Critical
Publication of CN111625244B publication Critical patent/CN111625244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to the technical field of communication, and provides an ASN.1-PER dynamic and static coding and decoding method based on a 3GPP protocol, which comprises the following steps: step 100, acquiring compiling options and ASN.1 text configured by a user; the compiling options comprise protocol names, structure prefixes, constant type prefixes, macro definition prefixes, enumeration type prefixes and static dynamic and static information of control brake; step 200, taking the ASN.1 text and the compiling options as input, and inputting the input into an ASN.1 text compiler; step 300, the ASN.1 text compiler processes the ASN.1 text to generate needed interface files and data files; and 400, encoding or decoding according to the generated interface file and data file, and outputting an encoding result after encoding or outputting a decoding result after decoding. The invention can improve the flexibility of the product, and has the advantages of small volume of the dynamic structure and high efficiency of the static structure.

Description

ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol
Technical Field
The invention relates to the technical field of communication, in particular to an ASN.1-PER dynamic and static coding and decoding method based on a 3GPP protocol.
Background
The 3GPP organization was established in 12 months 1998, and the initial working area of the 3GPP was to make globally applicable technical specifications and technical reports for the third generation mobile communication system. The working range of 3GPP was subsequently improved, increasing the research and standard formulation of UTRA long term evolution systems. The fourth generation of mobile communication technology (LTE, LTE-a) and the current latest 5G standards are self-organizing.
The wireless communication technology of China is not participated in the 2G era, the standard of the independent intellectual property rights is issued in the 3G era, the influence of the independent intellectual property rights in the 3GPP is expanded in the 4G era, and the 5G communication technology is basically dominant in China until the current 5G era. The importance of ASN.1 starts to emerge from TD-SCDMA in the 3G era.
Because of the limited radio resources, the radio wave transmission data needs to use as few data streams as possible and express as much information as possible to achieve efficient transmission of radio communication data. And asn.1 just fulfills this need. Asn.1 (Abstract Syntax Notation One, first edition of generic syntax notation), describes a data format for data representation, encoding, transmission and decoding. The method provides a mode for describing the object mechanism, is not conscious of an environment platform, is not conscious of programming language, and is a set of independent abstract structure method. PER (Packed Encoding Rules, compression coding rules) better fulfills the need to express the most content with the least number of bytes.
At present, a common encoding and decoding system needs to do special script encoding and decoding according to a specific communication protocol, the structure mechanism is difficult to adjust in a self-defined mode, the system is large in size, and the resource consumption is large.
Disclosure of Invention
The invention mainly solves the technical problems that the existing coding and decoding system needs to do special script coding and decoding according to a specific communication protocol, the structure mechanism is difficult to self-define and adjust, and the like, and provides an ASN.1-PER dynamic and static coding and decoding method based on a 3GPP protocol, which can generate a dynamic data structure or a static data structure or a dynamic and static combined data structure, and is convenient for a user to adjust the generated structure file according to the needs; the advantages of improving the flexibility of the product and having small volume of the dynamic structure and high efficiency of the static structure are achieved; meanwhile, the aim of accuracy and reliability of encoding and decoding is achieved.
The invention provides an ASN.1-PER dynamic and static coding and decoding method based on a 3GPP protocol, which comprises the following steps:
step 100, acquiring compiling options and ASN.1 text configured by a user; the compiling options comprise protocol names, structure prefixes, constant type prefixes, macro definition prefixes, enumeration type prefixes and static dynamic and static information of control brake;
step 200, taking the ASN.1 text and the compiling options as input, and inputting the input into an ASN.1 text compiler;
step 300, the asn.1 text compiler processes the asn.1 text to generate the required interface file and data file, comprising steps 301-302:
step 301, an asn.1 text compiler reads the whole content of the asn.1 text, analyzes the read content byte by byte, matches each type of keyword information, and converts the asn.1 text into different types of C structures according to the keyword information in the asn.1 text; converting into a data file according to other information in the ASN.1 text;
step 302, reading the content in the compiling options, determining to generate a data structure with a pointer or a data structure with an array according to dynamic and static information, adjusting the generated C structure name through prefix name information, and generating interface files output by different types of structures;
and 400, encoding or decoding according to the generated interface file and data file, and outputting an encoding result after encoding or outputting a decoding result after decoding.
Preferably, in step 400, the encoding method includes: assigning a corresponding message structure in the generated interface file according to a C language assignment mode, calling a coding function, converting data of the C structure into binary code stream according to a compression coding rule by using the generated data file, and outputting a coding result;
the decoding method comprises the following steps: and taking the compressed binary code stream as an input parameter, calling a decoding function, and converting the binary code stream into data with a C structure by the decoding function by utilizing a data file and a decoding rule, wherein the data structure with the C structure is a data structure in an interface file, so that decoding is realized.
Preferably, the data types supported by the asn.1 text include: NULL type, boost type, ENUMERATED type, inter type, BIT stream type, octestung type, choking type, SEQUENCE type, and SEQUENCE OF type.
The ASN.1-PER dynamic and static coding and decoding method based on the 3GPP protocol has the following advantages compared with the prior art:
1. different from the scripted realization of other partial manufacturers, the invention adopts a universal encoding and decoding mode, does not need to do special script encoding and decoding according to a specific communication protocol, and can adapt to the main stream communication protocol only by using a set of encoding and decoding software.
2. The invention only adapts to the part of ASN.1 type supported by the wireless communication protocol, reduces the resource consumption of ASN.1 software in the MODEM, ensures the simplification of the volume of the ASN.1 software, greatly reduces the volume of the software and the complexity of the software, and improves the efficiency and the reliability of the software.
The C structure generated by the ASN.1 text structure can be customized, all messages can be customized to be dynamic structures, all messages can be customized to be static structures, and different messages can be respectively generated to be dynamic or static structures. The flexibility of the use of the user is improved. On the basis of volume optimization, the system also has the function of adjusting the dynamic and static structures of the interface file data types, and can be adjusted to a dynamic pointer structure according to the needs of users to further save space, or a static array structure is adopted to further improve efficiency, or different messages respectively use dynamic or static combined coding and decoding modes to meet different needs of users.
4. The invention can realize the customization of the interface file, and a user can adjust the naming mode, the abbreviation mode and the like of the interface file generated by the ASN.1 according to the self requirement.
5. The invention can be applied to the field of wireless communication, and is convenient and reliable in compression coding technology no matter the wireless communication of a mobile phone or the wireless communication of a vehicle, and the coding and decoding method can more conveniently customize interface files in the coding and decoding process and is more convenient for developing related software products of the wireless communication.
Drawings
FIG. 1 is a flow chart of an ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol;
FIG. 2 is a schematic diagram of the process of step 300;
fig. 3 is a schematic process diagram of step 400.
Detailed Description
In order to make the technical problems solved by the invention, the technical scheme adopted and the technical effects achieved clearer, the invention is further described in detail below with reference to the accompanying drawings and the embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present invention are shown in the accompanying drawings.
Fig. 1 is a flow chart of an implementation of an asn.1-PER dynamic-static coding and decoding method based on 3GPP protocol provided by the present invention. As shown in fig. 1, the asn.1-PER dynamic-static coding and decoding method based on 3GPP protocol provided by the embodiment of the present invention includes the following procedures:
step 100, obtain compiling options and asn.1 text of user configuration.
Step 101, acquiring compiling options configured by a user.
The compiling options comprise the characteristics of protocol names, structure prefixes, constant type prefixes, macro definition prefixes, enumeration type prefixes, static dynamic and static information of control brake and the like. In this embodiment, the compiling option adopts a profile.
Figure BDA0002514826570000041
Wherein [ STATIC ] of the MESSAGE parameter is a STATIC parameter, and [ DYNAMIC ] of the MESSAGE parameter is a DYNAMIC parameter, which affects the state of the generated interface file. If static parameters are selected, the various types of data generated are primarily in the form of groups of numbers. If the dynamic parameters are selected, the generated data of each type is mainly in the form of pointers. The invention can flexibly adjust dynamic and static information, can greatly reduce the memory occupied by the system and improve the coding and decoding efficiency.
Step 102, acquiring ASN.1 text configured by the user according to the description of the ASN.1 text in the 3GPP protocol.
Step 200, the ASN.1 text and the compiling options are input into an ASN.1 text compiler. Wherein the compiling option is a profile.
Step 300, the ASN.1 text compiler processes the ASN.1 text to generate the required interface files and data files. Fig. 2 is a schematic process diagram of step 300. Referring to fig. 2, the specific process is as follows:
step 301, an asn.1 text compiler reads the whole content of the asn.1 text, analyzes the read content byte by byte, matches each type of keyword information, and converts the asn.1 text into different types of C structures according to the keyword information in the asn.1 text; according to other information in the ASN.1 text, the information is converted into a data file, and the support of relevant information is provided for the encoding and decoding processes.
And 302, reading the content in the compiling options, determining to generate a data structure with a pointer or a data structure with an array according to the dynamic and static information, adjusting the generated C structure name through the information of the prefix name, and generating interface files output by different types of structures.
The data types supported by the ASN.1 text supported by the invention comprise: NULL type, boost type, enable type, inter type, BIT stream type, OCTET stream type, CHOICE type, SEQUENCE type, and SEQUENCE OF type.
And 400, encoding or decoding according to the generated interface file and data file, and outputting an encoding result after encoding or outputting a decoding result after decoding.
Fig. 3 is a schematic process diagram of step 400. Referring to fig. 3, the encoding method includes: and assigning the corresponding message structure in the generated interface file according to a C language assignment mode, calling a coding function, and converting the data of the C structure into a binary code stream according to a compression coding rule (packet EncodingRules, PER) by using the generated data file by the coding function, and outputting a coding result. The embodiment adopts PER to better realize the requirement of representing the most content by the least byte number, and can be converted into a more simplified binary code stream through PER.
The decoding method comprises the following steps: and taking the compressed binary code stream as an input parameter, calling a decoding function, and converting the binary code stream into data with a C structure by the decoding function by utilizing a data file and a decoding rule, wherein the data structure with the C structure is a data structure in an interface file, and outputting a decoding result to realize decoding.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments is modified or some or all of the technical features are replaced equivalently, so that the essence of the corresponding technical scheme does not deviate from the scope of the technical scheme of the embodiments of the present invention.

Claims (3)

1. An ASN.1-PER dynamic-static coding and decoding method based on 3GPP protocol is characterized by comprising the following steps:
step 100, acquiring compiling options and ASN.1 text configured by a user; the compiling options comprise protocol names, structure prefixes, constant type prefixes, macro definition prefixes, enumeration type prefixes and static dynamic and static information of control brake;
step 200, taking the ASN.1 text and the compiling options as input, and inputting the input into an ASN.1 text compiler;
step 300, the asn.1 text compiler processes the asn.1 text to generate the required interface file and data file, comprising steps 301-302:
step 301, an asn.1 text compiler reads the whole content of the asn.1 text, analyzes the read content byte by byte, matches each type of keyword information, and converts the asn.1 text into different types of C structures according to the keyword information in the asn.1 text; converting into a data file according to other information in the ASN.1 text;
step 302, reading the content in the compiling options, determining to generate a data structure with a pointer or a data structure with an array according to dynamic and static information, adjusting the generated C structure name through prefix name information, and generating interface files output by different types of structures;
and 400, encoding or decoding according to the generated interface file and data file, and outputting an encoding result after encoding or outputting a decoding result after decoding.
2. The asn.1-PER dynamic-static coding method based on 3GPP protocol according to claim 1, wherein in step 400, the coding method comprises: assigning a corresponding message structure in the generated interface file according to a C language assignment mode, calling a coding function, converting data of the C structure into binary code stream according to a compression coding rule by using the generated data file, and outputting a coding result;
the decoding method comprises the following steps: and taking the compressed binary code stream as an input parameter, calling a decoding function, and converting the binary code stream into data with a C structure by the decoding function by utilizing a data file and a decoding rule, wherein the data structure with the C structure is a data structure in an interface file, so that decoding is realized.
3. The asn.1-PER dynamic-static codec method based on 3GPP protocol according to claim 1 or 2, wherein the data types supported by the asn.1 text include: NULL type, boost type, enable type, inter type, BIT stream type, OCTET stream type, CHOICE type, SEQUENCE type, and SEQUENCE OF type.
CN202010472600.3A 2020-05-29 2020-05-29 ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol Active CN111625244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010472600.3A CN111625244B (en) 2020-05-29 2020-05-29 ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010472600.3A CN111625244B (en) 2020-05-29 2020-05-29 ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol

Publications (2)

Publication Number Publication Date
CN111625244A CN111625244A (en) 2020-09-04
CN111625244B true CN111625244B (en) 2023-04-25

Family

ID=72260147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010472600.3A Active CN111625244B (en) 2020-05-29 2020-05-29 ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol

Country Status (1)

Country Link
CN (1) CN111625244B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239394B (en) * 2021-05-06 2021-10-29 国家计算机网络与信息安全管理中心 Firmware protection method, device and equipment
CN113742294A (en) * 2021-08-23 2021-12-03 宜通世纪科技股份有限公司 Method, system, device and medium for decoding ASN.1-PER signaling message

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101511094A (en) * 2009-03-06 2009-08-19 北京泰合佳通信息技术有限公司 Dynamic decode method for GSM/TD wireless network null port protocol
CN101631126A (en) * 2009-08-06 2010-01-20 中兴通讯股份有限公司 Self-adaptive coding/decoding method and self-adaptive coding/decoding device
CN105867991A (en) * 2016-03-25 2016-08-17 苏州简约纳电子有限公司 A conversion method suitable for an ASN.1 compiler symbol table

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005027247B4 (en) * 2005-06-13 2013-11-07 Intel Mobile Communications GmbH Communication devices, methods for forming a transport protocol message and method for processing a transport protocol message
US20170302619A1 (en) * 2016-04-19 2017-10-19 Virtual Network Element, Inc. System and Method for Automating Protocol Implementation in a Diameter Wireless Network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101511094A (en) * 2009-03-06 2009-08-19 北京泰合佳通信息技术有限公司 Dynamic decode method for GSM/TD wireless network null port protocol
CN101631126A (en) * 2009-08-06 2010-01-20 中兴通讯股份有限公司 Self-adaptive coding/decoding method and self-adaptive coding/decoding device
CN105867991A (en) * 2016-03-25 2016-08-17 苏州简约纳电子有限公司 A conversion method suitable for an ASN.1 compiler symbol table

Also Published As

Publication number Publication date
CN111625244A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN101567065B (en) Cross-platform online file editing system and method thereof
CN111625244B (en) ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol
US9146732B2 (en) Systems and methods for executing an application on a mobile device
CA2514832C (en) System and method for compression of wireless applications expressed in a structured definition language
US8775649B2 (en) Optimizing client code through automated server specialization
US20110264819A1 (en) Binary data serialization system using machine dependant data alignement
CN101631261B (en) Signaling tracking method, signaling tracking background device and tracking system
CN113162977B (en) Information processing method and device, equipment and storage medium
CN111782882A (en) TCP message conversion method, device, system and computer storage medium
US7912984B2 (en) System and method for generating a wireless application from a web service definition
CN110839022A (en) Vehicle-mounted control software communication protocol analysis method based on xml language
CN115525260A (en) Code generation method and device based on protobuf
KR100619879B1 (en) Email attatched file reviewing method using mobile communication terminal
CN110855727A (en) System and method for transmitting data objects based on byte serialization and deserialization
CN116561202A (en) Method and device for serializing object
KR100951837B1 (en) Method and system for creating interface
CN113448751A (en) DSL-based interface response method, device, equipment and medium
CN115968543A (en) Resource mapping method, device, equipment and storage medium
CN102821116B (en) A kind of online service provides method, device and information system
CN116821166B (en) Distributed data export method
CN115276720B (en) High-speed carrier data transmission device and method and electronic equipment
CN111125207B (en) Data acquisition method and device, connector and presto engine
CN107276968A (en) A kind of network transfer method and system
Poeschl et al. Message Compression Concept for Software Defined IoT Edge Devices
CN116112582A (en) Configurable UDP protocol analysis method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: ASN.1-PER dynamic and static encoding and decoding method based on 3GPP protocol

Effective date of registration: 20230920

Granted publication date: 20230425

Pledgee: China Merchants Bank Co.,Ltd. Dalian Branch

Pledgor: Huachang Technology (Dalian) Co.,Ltd.

Registration number: Y2023210000237