CN111625244A - 3GPP protocol-based ASN.1-PER dynamic and static encoding and decoding method - Google Patents

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

Info

Publication number
CN111625244A
CN111625244A CN202010472600.3A CN202010472600A CN111625244A CN 111625244 A CN111625244 A CN 111625244A CN 202010472600 A CN202010472600 A CN 202010472600A CN 111625244 A CN111625244 A CN 111625244A
Authority
CN
China
Prior art keywords
asn
text
decoding
static
dynamic
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.)
Granted
Application number
CN202010472600.3A
Other languages
Chinese (zh)
Other versions
CN111625244B (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 encoding and decoding method based on a 3GPP protocol, which comprises the following steps: step 100, acquiring a compiling option and an ASN.1 text configured by a user; the compiling options comprise protocol names, structure body prefixes, constant type prefixes, macro definition prefixes, enumeration prefixes and dynamic and static information for controlling dynamic and static states; step 200, inputting the ASN.1 text and the compiling options into an ASN.1 text compiler as input; step 300, an ASN.1 text compiler processes the ASN.1 text to generate a required interface file and a required data file; and step 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 advantage of product flexibility and has the advantages of small volume of a dynamic structure and high efficiency of a static structure.

Description

3GPP protocol-based ASN.1-PER dynamic and static encoding and decoding method
Technical Field
The invention relates to the technical field of communication, in particular to an ASN.1-PER dynamic and static encoding and decoding method based on a 3GPP protocol.
Background
The 3GPP organization was established in 1998, month 12, and the 3GPP initially worked to set globally applicable specifications and technical reports for the third generation mobile communication system. The working range of 3GPP has subsequently improved, increasing the research and standardization efforts for UTRA long term evolution systems. The subsequent fourth generation mobile communication technology (LTE, LTE-a), and the latest 5G at present, are emerging from this organization.
The wireless communication technology of China does not participate in the 2G era, the standard of the proprietary intellectual property rights is released in the 3G era, the influence of the proprietary property rights on the 3GPP is expanded in the 4G era, and the 5G communication technology is basically dominated by China until the current 5G era. The importance of ASN.1 has become apparent from TD-SCDMA in the 3G era.
Due to limited radio resources, radio wave transmission of data is required to express as much information as possible with as few data streams as possible to achieve efficient transmission of wireless communication data. And asn.1 just fulfills this requirement. Asn.1(Abstract Syntax Notation One, first edition of common Syntax Notation) describes a data format for data representation, encoding, transmission and decoding. The method provides a mode for describing an object mechanism, does not recognize an environment platform, does not recognize a programming language, and is a set of independent abstract structure methods. PER (Packed Encoding Rules) can better meet the requirement that the most content is represented by the least number of bytes.
At present, a common coding and decoding system needs to do special script coding and decoding according to a specific communication protocol, the self-defined adjustment of a structural mechanism is difficult, the system volume is large, 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 self-defined adjustment of a structural mechanism is difficult, 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 data structure combined with dynamic and static states and is convenient for a user to adjust the generated structural file according to the requirement; the advantages of improving the flexibility of the product, small volume of the dynamic structure and high efficiency of the static structure are taken into consideration; meanwhile, the purpose of both the accuracy and the 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 processes:
step 100, acquiring a compiling option and an ASN.1 text configured by a user; the compiling options comprise protocol names, structure body prefixes, constant type prefixes, macro definition prefixes, enumeration prefixes and dynamic and static information for controlling dynamic and static states;
step 200, inputting the ASN.1 text and the compiling options into an ASN.1 text compiler as input;
step 300, the asn.1 text compiler processes the asn.1 text to generate the required interface file and data file, including steps 301 to 302:
301, reading all contents of the ASN.1 text by the ASN.1 text compiler, analyzing the read contents byte by byte, matching keyword information of each type, and converting the ASN.1 text into C structural bodies of different types according to the keyword information in the ASN.1 text; converting the ASN.1 text 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 the dynamic and static information, and adjusting the name of the generated C structure through the information of the prefix name to generate interface files output by different types of structures;
and step 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 the data of the C structure into a binary code stream according to a compression coding rule by using the generated data file through the coding function, 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, converting the binary code stream into data with a C structure by using the data file and a decoding rule by using the decoding function, wherein the data structure with the C structure is a data structure in the interface file, and realizing decoding.
Preferably, the data types supported by the asn.1 text include: NULL type, BOOLEAN type, ENUMERATED type, INTEREGER type, BIT STRING type, OCTETSTRING type, CHOICE type, SEQUENCE type, and SEQUENCE OF type.
Compared with the prior art, the ASN.1-PER dynamic and static coding and decoding method based on the 3GPP protocol has the following advantages that:
1. different from the scripted realization of other part manufacturers, the invention adopts a universal coding and decoding mode, does not need to carry out special script coding and decoding according to a specific communication protocol, and can adapt to the main communication protocol only by using one set of coding and decoding software.
2. The invention only adapts to part of ASN.1 types supported by the wireless communication protocol, reduces the resource consumption of ASN.1 software in MODEM, ensures the simplification of the ASN.1 software volume, greatly reduces the software volume and the software complexity, and improves the software efficiency and reliability.
The C structural body generated by the ASN.1 text structure is customizable, all messages can be customized into a dynamic structure, all messages can be customized into a static structure, and different messages can be respectively generated into a dynamic or static structure. The flexibility of use of the user is improved. On the basis of volume optimization, the method also has the function of adjusting the dynamic and static structures of the data types of the interface files, and can be adjusted into a dynamic pointer structure according to the requirements of users to further save space, or a static array structure is adopted to further improve efficiency, or different messages respectively use dynamic and static combined coding and decoding modes of dynamic or static modes to meet different requirements of the users.
4. The invention can realize the customization of the interface file, and the 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 both mobile phone wireless communication and vehicle-mounted wireless communication need convenient and reliable compression coding technology.
Drawings
FIG. 1 is a flow chart of the ASN.1-PER dynamic and static encoding and decoding method based on 3GPP protocol provided by the present invention;
FIG. 2 is a schematic process diagram of step 300;
fig. 3 is a process diagram of step 400.
Detailed Description
In order to make the technical problems solved, technical solutions adopted and technical effects achieved by the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Fig. 1 is a flow chart of the implementation of the asn.1-PER dynamic and static encoding and decoding method based on the 3GPP protocol provided in the present invention. As shown in fig. 1, the asn.1-PER dynamic and static encoding and decoding method based on the 3GPP protocol provided in the embodiment of the present invention includes the following processes:
step 100, compiling options and ASN.1 texts configured by a user are obtained.
Step 101, obtaining a compiling option configured by a user.
The compiling options comprise characteristics of protocol names, structure body prefixes, constant type prefixes, macro definition prefixes, enumeration prefixes, dynamic and static information for controlling dynamic and static states and the like. In this embodiment, the compiling option uses 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 may affect the state of the generated interface file. If the static parameters are selected, each type of data generated is mainly in an array form. If dynamic parameters are selected, each type of data generated is primarily in the form of pointers. The invention flexibly adjusts the dynamic and static information, can greatly reduce the memory occupied by the system and improve the coding and decoding efficiency.
Step 102, acquiring the ASN.1 text configured by the user according to the description of the ASN.1 text in the 3GPP protocol.
Step 200, inputting the ASN.1 text and the compiling options into an ASN.1 text compiler. Wherein the compilation option is a profile.
Step 300, the ASN.1 text compiler processes the ASN.1 text to generate the required interface file and data file. Fig. 2 is a schematic process diagram of step 300. Referring to fig. 2, the specific process is as follows:
301, reading all contents of the ASN.1 text by the ASN.1 text compiler, analyzing the read contents byte by byte, matching keyword information of each type, and converting the ASN.1 text into C structural bodies of different types according to the keyword information in the ASN.1 text; and according to other information in the ASN.1 text, converting the ASN.1 text into a data file, and providing support of related information for the encoding and decoding processes.
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 the dynamic and static information, and adjusting the name of the generated C structure through the information of the prefix name to generate interface files output by different types of structures.
The data types supported by the ASN.1 text supported by the invention comprise: NULL type, BOOLEAN type, ENUMERATED type, INTEREGER type, BIT STRING type, OCTET STRING type, CHOICE type, SEQUENCE type, and SEQUENCE OF type.
And step 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 process diagram of step 400. Referring to fig. 3, the encoding method includes: and 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 a binary code stream by using the generated data file according to a Packed Encoding Rule (PER) by the coding function, and outputting a coding result. The embodiment adopts the PER to better realize the requirement that the most content is represented by the least number of bytes, and the PER can be converted into a more simplified binary code stream.
The decoding method comprises the following steps: and taking the compressed binary code stream as an input parameter, calling a decoding function, converting the binary code stream into data with a C structure by using the data file and a decoding rule by using the decoding function, outputting a decoding result and realizing decoding, wherein the data structure with the C structure is a data structure in the interface file.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: modifications of the technical solutions described in the embodiments or equivalent replacements of some or all technical features may be made without departing from the scope of the technical solutions of the embodiments of the present invention.

Claims (3)

1. An ASN.1-PER dynamic and static encoding and decoding method based on 3GPP protocol is characterized by comprising the following processes:
step 100, acquiring a compiling option and an ASN.1 text configured by a user; the compiling options comprise protocol names, structure body prefixes, constant type prefixes, macro definition prefixes, enumeration prefixes and dynamic and static information for controlling dynamic and static states;
step 200, inputting the ASN.1 text and the compiling options into an ASN.1 text compiler as input;
step 300, the asn.1 text compiler processes the asn.1 text to generate the required interface file and data file, including steps 301 to 302:
301, reading all contents of the ASN.1 text by the ASN.1 text compiler, analyzing the read contents byte by byte, matching keyword information of each type, and converting the ASN.1 text into C structural bodies of different types according to the keyword information in the ASN.1 text; converting the ASN.1 text 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 the dynamic and static information, and adjusting the name of the generated C structure through the information of the prefix name to generate interface files output by different types of structures;
and step 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 and static codec method based on 3GPP protocol as claimed in 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 the data of the C structure into a binary code stream according to a compression coding rule by using the generated data file through the coding function, 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, converting the binary code stream into data with a C structure by using the data file and a decoding rule by using the decoding function, wherein the data structure with the C structure is a data structure in the interface file, and realizing decoding.
3. The ASN.1-PER dynamic and 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, BOOLEAN type, ENUMERATED type, INTEREGER type, BIT STRING type, OCTET STRING type, CHOICE type, SEQUENCE type, and SEQUENCEEF 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 true CN111625244A (en) 2020-09-04
CN111625244B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239394A (en) * 2021-05-06 2021-08-10 国家计算机网络与信息安全管理中心 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060285545A1 (en) * 2005-06-13 2006-12-21 Infineon Technologies Ag Communication device, method for generating a transport protocol message and method for processing a transport protocol message
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
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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060285545A1 (en) * 2005-06-13 2006-12-21 Infineon Technologies Ag Communication device, method for generating a transport protocol message and method for processing a transport protocol message
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
US20170302619A1 (en) * 2016-04-19 2017-10-19 Virtual Network Element, Inc. System and Method for Automating Protocol Implementation in a Diameter Wireless Network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239394A (en) * 2021-05-06 2021-08-10 国家计算机网络与信息安全管理中心 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

Also Published As

Publication number Publication date
CN111625244B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CA2514832C (en) System and method for compression of wireless applications expressed in a structured definition language
Hasemann et al. RDF provisioning for the Internet of Things
US20090131035A1 (en) Systems and methods for executing an application on a mobile device
CN111625244B (en) ASN.1-PER dynamic and static coding and decoding method based on 3GPP protocol
US20040255005A1 (en) Web server resident on a mobile computing device
US6711740B1 (en) Generic code book compression for XML based application programming interfaces
CN101567065A (en) Cross-platform online file editing system and method thereof
CN113467972B (en) Communication interface construction method and device, computer equipment and storage medium
CN111880446A (en) Control instruction sending method and control instruction receiving method
CN101631261B (en) Signaling tracking method, signaling tracking background device and tracking system
CN109861998A (en) A kind of plug-in type dynamic analysis system and method based on Big Dipper short message agreement
CN113162977B (en) Information processing method and device, equipment and storage medium
CN114040018A (en) Data receiving and transmitting method and device based on JSON data format
US20070156839A1 (en) Web services for wireless pervasive devices
CN116156012B (en) Universal heterogeneous Internet of things equipment standardized access and data analysis system and method
EP2566292B1 (en) Method, system and mobile terminal for configuring access point and application information
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
CN116561202A (en) Method and device for serializing object
KR100619879B1 (en) Email attatched file reviewing method using mobile communication terminal
CN113448751A (en) DSL-based interface response method, device, equipment and medium
Pfisterer et al. Energy-optimized data serialization for heterogeneous WSNs using middleware synthesis
CN102821116B (en) A kind of online service provides method, device and information system
CN115878344A (en) Data processing method, device, medium and equipment based on protobuf

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