Data processing method, data processing system and electronic equipment

By automatically parsing the ASN.1 description file and modeling the data structure, encoding and decoding tools are generated, solving the problems of low efficiency and poor reliability of ASN.1 data processing in the existing technology, and realizing efficient and automated data conversion and parsing in the communication process of eSIM devices.

CN121887882APending Publication Date: 2026-04-17GUANGDONG CHUTIAN DRAGON SMART CARD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG CHUTIAN DRAGON SMART CARD
Filing Date
2025-12-24
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies suffer from low development efficiency, high maintenance costs, and difficulty in guaranteeing data parsing reliability when processing ASN.1 data. In particular, in the configuration and management of eSIM devices, manual reconstruction or adaptation of related code is required when the protocol version is updated or the fields are changed.

Method used

By parsing the received ASN.1 description file, data structure information is generated, which is then converted into a data structure model for the target programming language. Target code, including data structure classes and encoding/decoding functions, is generated, and a data encoding/decoding tool is constructed to achieve bidirectional conversion between data objects and data formats.

Benefits of technology

It improves the conversion efficiency and processing accuracy of ASN.1 data, enhances the flexibility of protocol adaptation and the development efficiency and stability of the system, reduces the amount of manual coding work, and strengthens the maintainability and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121887882A_ABST
    Figure CN121887882A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, a data processing system and electronic equipment, and the method comprises the steps: analyzing a received ASN.1 description file, and obtaining data structure information corresponding to the ASN.1 description file; converting the data structure information into a data structure model corresponding to the target programming language; generating a target code corresponding to the target data format based on the data structure model; combining the target code with a preset basic coding and decoding method corresponding to the target data format to generate a data coding and decoding tool; and the data encoding and decoding tool is used for realizing bidirectional format conversion between the data object of the target programming language and the target data format. In the mode, the data structure model and the coding and decoding logic of the corresponding programming language are generated based on the ASN.1 description file, so that the conversion efficiency and the processing accuracy of ASN.1 data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data processing method, a data processing system, and an electronic device. Background Technology

[0002] eSIM (embedded SIM) technology, with its flexibility in remote configuration, has been widely used in IoT devices, smart wearables, and smartphones. In the configuration and management process of eSIM, the interaction of service data between network nodes strictly follows the ASN.1 (Abstract Syntax Notation One) data protocol specification. ASN.1 defines the rules for representing, encoding, and decoding structured data.

[0003] Currently, the processing of ASN.1 data commonly involves manually parsing the protocol document and writing data serialization and deserialization code. This approach often requires developers to manually refactor or adapt the code when the protocol version is updated or fields change, resulting in low development efficiency and high maintenance costs. Furthermore, ASN.1 uses a TLV (Tag-Length-Value) structure for encoding, and the rules for calculating and validating tag values ​​are complex. Manual implementation is prone to errors, making it difficult to guarantee the reliability of data parsing. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a data processing method, a data processing system, and an electronic device that can improve the conversion efficiency and processing accuracy of ASN.1 data.

[0005] In a first aspect, the present invention provides a data processing method, comprising: parsing a received ASN.1 description file to obtain data structure information corresponding to the ASN.1 description file; converting the data structure information into a data structure model corresponding to a target programming language; generating target code corresponding to a target data format based on the data structure model; the target code including a data structure class of the target programming language and data encoding / decoding functions adapted to the target data format; merging the target code with a preset basic encoding / decoding method corresponding to the target data format to generate a data encoding / decoding tool; the data encoding / decoding tool being used to implement bidirectional format conversion between data objects in the target programming language and the target data format.

[0006] In an optional implementation, the step of parsing the received ASN.1 description file to obtain the data structure information corresponding to the ASN.1 description file includes: performing lexical analysis on the ASN.1 description file to generate a set of lexical units; the set of lexical units includes at least one lexical unit; constructing a syntax tree corresponding to the ASN.1 description file based on preset syntax rules and the set of lexical units; traversing the syntax tree to extract the data structure information corresponding to the ASN.1 description file; the data structure information includes type name, field name and corresponding encoding identifier.

[0007] In an optional implementation, when the number of ASN.1 description files exceeds one, the step of parsing the received ASN.1 description files to obtain the data structure information corresponding to the ASN.1 description files includes: obtaining the dependency relationships between different ASN.1 description files; performing lexical analysis on each ASN.1 description file to generate a lexical unit set corresponding to each ASN.1 description file; the lexical unit set includes at least one lexical unit; constructing a syntax tree corresponding to each ASN.1 description file based on preset syntax rules and the lexical unit set; associating the syntax trees corresponding to each ASN.1 description file based on the dependency relationships to generate a structure definition model; traversing the structure definition model to extract data structure information and the dependency relationships between different data structure information; the data structure information includes type names, field names, and corresponding encoding identifiers.

[0008] In an optional implementation, the step of generating target code corresponding to the target data format based on the data structure model includes: identifying non-arbitrary type fields in the data structure model; calculating the tag value corresponding to each non-arbitrary type field based on the field type, structural attributes and context information corresponding to each non-arbitrary type field; and saving the tag value to the data encoding / decoding function.

[0009] In an optional implementation, the step of generating target code corresponding to the target data format based on the data structure model includes: identifying arbitrary type fields in the data structure model; and saving the arbitrary type fields to the data encoding / decoding function.

[0010] In an optional implementation, the target programming language is Java, and the target data format is a binary encoding format that conforms to basic encoding rules.

[0011] In an optional implementation, the method further includes: if a data packet conforming to the target data format is received from an eSIM device, converting the data packet into a task data object in the target programming language using a data encoding / decoding tool, and processing the task data object; after the task data object is processed, generating a response data object conforming to the target programming language based on the processing result; converting the response data object into a response message conforming to the target data format using a data encoding / decoding tool, and sending the response message to the eSIM device.

[0012] Secondly, the present invention provides a data processing system, comprising: a data structure information extraction module for parsing a received ASN.1 description file to obtain data structure information corresponding to the ASN.1 description file; a data structure model generation module for converting the data structure information into a data structure model corresponding to a target programming language; a code generation module for generating target code corresponding to a target data format based on the data structure model; the target code includes data structure classes of the target programming language and data encoding / decoding functions adapted to the target data format; and a data encoding / decoding tool management module for merging the target code with preset basic encoding / decoding methods corresponding to the target data format to generate a data encoding / decoding tool; the data encoding / decoding tool is used to implement bidirectional format conversion between data objects in the target programming language and the target data format.

[0013] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores computer-executable commands that can run on the processor, and the processor executes the computer-executable commands to implement the data processing method of any of the foregoing embodiments.

[0014] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the data processing method as described in any of the foregoing embodiments.

[0015] The data processing method, data processing system, and electronic device provided in this application can generate structure classes for the target programming language and encoding / decoding functions adapted to the target data format by automatically parsing the ASN.1 description file and modeling the data structure. This enables the construction of data encoding / decoding tools, realizes bidirectional conversion between data objects and binary messages, and supports the automatic parsing and generation of messages during eSIM device communication. This improves the flexibility of protocol adaptation, the degree of automation of data processing, and the overall development efficiency and stability of the system.

[0016] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application.

[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart of a data processing method provided in an embodiment of this application; Figure 2 A schematic diagram of a data processing system provided in an embodiment of this application; Figure 3 A schematic diagram of an electronic device provided in an embodiment of this application.

[0020] Icons: 1-Data structure information extraction module; 2-Data structure model generation module; 3-Code generation module; 4-Data encoding and decoding tool management module; 301-Processor; 302-Memory; 303-Bus; 304-Communication interface. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] To facilitate understanding of this embodiment, the embodiments of this application will be described in detail below.

[0023] Example 1: Figure 1 A flowchart illustrating the data processing method provided in this application embodiment.

[0024] Reference Figure 1 The data processing method includes: Step S101: Parse the received ASN.1 description file to obtain the data structure information corresponding to the ASN.1 description file.

[0025] In one embodiment, step S101 includes the following steps S201-S203.

[0026] Step S201: Perform lexical analysis on the ASN.1 description file to generate a lexical unit set; the lexical unit set includes at least one lexical unit.

[0027] Here, the preset lexical analyzer is invoked to read the characters in the ASN.1 description file (.asn file) and, according to the preset lexical rules (such as: which characters can form identifiers, which are keywords, and which are operators), the continuous character sequence is segmented and classified.

[0028] For example, consider a single line of code in the ASN.1 description file: "transactionId [0] IMPLICIT RSPDefinitions.TransactionId," The lexical analyzer converts it into a set of lexical units, which contains the following lexical units and their categories: transactionId (identifier - IDENTIFIER).

[0029] [ (left square bracket - L_BRACKET).

[0030] 0 (NUMBER).

[0031] (Right square bracket -R_BRACKET).

[0032] IMPLICIT (keyword-KEYWORD).

[0033] RSPDefinitions.TransactionId (Identifier with module prefix - QUALIFIED_IDENTIFIER).

[0034] , (comma-COMMA).

[0035] By parsing the ASN.1 description file, it can be transformed into an ordered list of structured lexical units with preliminary classification and meaning.

[0036] Step S202: Based on the preset syntax rules and lexical unit set, construct the syntax tree corresponding to the ASN.1 description file.

[0037] Here, lexical units are combined and organized into an attribute data structure that reflects grammatical structure and hierarchical relationships, namely a syntax tree. In this embodiment, the syntax tree is an abstract syntax tree (AST).

[0038] The pre-defined parser module is invoked to process the set of lexical units. The parser contains pre-defined syntax rules for describing the ASN.1 language. These rules define valid combinations of various lexical units, for example: "A type assignment statement must consist of a type name, an assignment operator (::=), and a type definition in that order."

[0039] The parser consumes lexical units one by one, matching and constructing them according to these grammatical rules. If the sequence of lexical units conforms to the preset grammatical rules, the parser creates corresponding tree nodes to represent this grammatical structure. For example, when it successfully matches a complete SEQUENCE definition, it creates a SequenceNode and attaches ComponentNodes representing its internal fields as its children. If the sequence does not conform to the preset grammatical rules (e.g., SEQUENCE is missing "{"), the parser reports a syntax error.

[0040] Based on this method, the received ASN.1 description file can be completely mapped into a syntax tree.

[0041] Step S203: Traverse the syntax tree and extract the data structure information corresponding to the ASN.1 description file; the data structure information includes the type name, field name and corresponding encoding identifier.

[0042] Here, starting from the root node of the syntax tree, each node in the tree is visited according to a depth-first or breadth-first strategy.

[0043] When accessing each node, extract the information it carries based on the node's type.

[0044] For example, when a node representing a SEQUENCE type definition is accessed, the program will extract its type name, such as AuthenticateClientRequest (client authentication request).

[0045] Then, continue to visit the child nodes of the SEQUENCE node, that is, its member list.

[0046] For each member field (ComponentNode) in the list, further extract the field name (such as transactionId) and its associated encoding identifier.

[0047] The encoded identifier here includes at least the Tag value (e.g., [0],

[56] ), the tag category (e.g., CONTEXT-SPECIFIC), and a declaration that the tag is explicit or implicit.

[0048] By traversing the syntax tree, all discrete information defined in the ASN.1 description file for constructing data structures is extracted.

[0049] In another feasible embodiment, in large protocol specifications (such as the eSIM standard defined by GSMA (Global System for Mobile Communications Association), different data type definitions are typically scattered across different module files (ASN.1 description files).

[0050] When the number of ASN.1 description files exceeds one, step S101 includes the following steps S301-S305.

[0051] Step S301: Obtain the dependency relationships between different ASN.1 description files.

[0052] Here, when the number of ASN.1 description files exceeds one, a quick scan is performed on each received ASN.1 description file before performing syntax analysis on each ASN.1 description file.

[0053] Identify and parse the IMPORTS statements in the header of each file. For example, when the following statement is found in a file named Module-A.asn: "IMPORTST ransactionId, ProfileMetadata FROM Common-Definitions;" This records a clear dependency: "Module-A depends on the Common-Definitions module, and references the TransactionId and ProfileMetadata types from it."

[0054] All these dependencies are stored in an in-memory data structure, such as a hash table or dependency graph, which forms a module index.

[0055] Step S302: Perform lexical analysis on each ASN.1 description file to generate a lexical unit set corresponding to each ASN.1 description file; the lexical unit set includes at least one lexical unit.

[0056] Here, after obtaining the dependencies between different ASN.1 description files, lexical analysis and syntax analysis are performed on each ASN.1 description file. The lexical analysis and syntax analysis process is the same as the analysis process in step S201 above, and will not be repeated here.

[0057] Step S303: Based on the preset syntax rules and lexical unit set, construct the syntax tree corresponding to each ASN.1 description file.

[0058] Here, a syntax tree is constructed for each ASN.1 description file, and each syntax tree completely contains the syntax structure within its corresponding ASN.1 description file. The method for constructing the syntax tree is the same as in step S202, and will not be repeated here.

[0059] Step S304: Based on the dependency relationship, associate the syntax tree corresponding to each ASN.1 description file to generate a structural definition model.

[0060] Here, when traversing a main syntax tree (e.g., the syntax tree corresponding to Module-A) to construct the structural definition model, specifically, when it encounters a field in the syntax tree of Module-A whose type is declared as TransactionId, it performs the following association operation: 1. Querying the module index revealed that the TransactionId type is defined in the Common-Definitions module.

[0061] 2. Then jump to the syntax tree corresponding to the Common-Definitions module.

[0062] 3. Locate and parse the complete definition of TransactionId in the syntax tree of Common-Definitions (e.g., it might be an OCTET STRING (SIZE(16))).

[0063] 4. Fill the currently constructed structural definition model with the complete definition information obtained from other syntax trees.

[0064] In this way, what was originally just an external reference in Module-A becomes a fully resolved entity with complete details in the structural definition model. This process is recursively performed until all cross-module references are resolved and associated, ultimately generating a unified and complete structural definition model. The structural definition model is a data model oriented towards the target programming language, which can be Java.

[0065] Step S305: Traverse the structure definition model and extract data structure information and dependencies between different data structure information; wherein, data structure information includes type name, field name and corresponding encoding identifier.

[0066] Here, traversing the structure definition model not only extracts data structure information (including type names, field names, and encoding identifiers), but also the dependencies between different data structure information. For example, for a certain type in Module-A, the extracted information will explicitly record that a certain field of its is referenced from the TransactionId type of the Common-Definitions module, and the specific definition of the TransactionId type (such as OCTET STRING (byte string)) is also obtained.

[0067] Step S102: Convert the data structure information into a data structure model corresponding to the target programming language.

[0068] Here, by traversing each field definition in the model, its complete tag information (including tag number, category, encoding form, explicit / implicit declaration, etc.) is read, and according to the encoding rules of the target data format, its final binary tag byte value is pre-calculated. This calculated byte array is then directly stored in the corresponding attribute of the field in the data structure model.

[0069] Specifically, the extracted data structure information is traversed, and a corresponding type definition object is created in memory for each ASN.1 type (such as a SEQUENCE or CHOICE).

[0070] If dependencies between different data structures are included, these dependencies are transformed from simple name references into actual object references (pointers) in the model. For example, if a field of type TypeA in Module-A references type TypeB in Module-B, then in the data structure model, the object representing that field will directly contain a reference to the object defining the corresponding type of TypeB.

[0071] Based on the characteristics of the target programming language, type mapping, code convention adaptation, and metadata annotation are performed on type definition objects and mapping relationships.

[0072] Type mapping is used to convert standard or custom types of ASN.1 into specific types in the target programming language according to preset mapping rules.

[0073] For example, the OCTET STRING type of ASN.1 will be mapped and recorded as the byte[] type in Java.

[0074] The ASN.1 INTEGER type will be mapped to the java.math.BigInteger type, which can handle integers of arbitrary precision.

[0075] For custom types referenced across modules, they are mapped to the corresponding class names in the target programming language based on the mapping relationship.

[0076] Code convention adaptation is used to pre-generate various names that will be used in the final code, based on the coding style of the target programming language. For example, for a field named transactionId, in its model object, additionally generate and store _transactionId (as a private member variable name), getTransactionId (as a getter method name), and setTransactionId (as a setter method name).

[0077] Metadata annotations are used to attach metadata to each field in the model, such as OPTIONAL tags, SIZE (length constraint) information, and special tags indicating whether it is of type ANY.

[0078] Step S103: Based on the data structure model, generate target code corresponding to the target data format; the target code includes data structure classes of the target programming language and data encoding / decoding functions adapted to the target data format.

[0079] Here, the target data format is a binary encoding format that conforms to the Basic Encoding Rule (BER).

[0080] The data structure class generates corresponding class files based on the class names, field names, and derived target language field types defined in the data structure model. For example, for Java, it will generate a POJO (Plain Old Java Object) class containing private member variables and public getter / setter methods.

[0081] Data encoding and decoding functions are generated in conjunction with data structure classes and are used to handle the core logic of serialization and deserialization.

[0082] In one embodiment, step S103 includes the following steps S401-S403.

[0083] Step S401: Identify non-arbitrary type fields in the data structure model.

[0084] Specifically, when a field is of a type explicitly defined in ASN.1, such as INTEGER, OCTET STRING, BOOLEAN, or a composite type such as SEQUENCE, CHOICE, the field will be recognized as a non-arbitrary type field.

[0085] Step S402: Calculate the tag value corresponding to each non-arbitrary type field based on the field type, structural attributes, and context information corresponding to each non-arbitrary type field.

[0086] Here, for each identified non-arbitrary type field, its binary tag value in the target data format is pre-calculated during the code generation phase using the parsed metadata information in the data structure model. The information used in the calculation process includes: field type, structural attributes, and context information.

[0087] For example, the Universal Class label number for INTEGER is 2, which is determined based on the field type.

[0088] The field is determined as either a primitive type or a structured type based on its structural attributes.

[0089] The label of the field is determined based on context information: whether it is context-specific or application-specific; and whether it is implicit or explicit.

[0090] Specifically, for a field defined as

[56] IMPLICIT SomeSequence, based on the above information and according to the bitwise operation rules of BER, the specific byte value corresponding to its tag is calculated to be 0xB8.

[0091] Step S403: Save the tag value to the data encoding / decoding function.

[0092] Here, when generating the Java data encoding / decoding function corresponding to this field, the pre-calculated binary Tag value is hard-coded into the function body as a byte array constant.

[0093] For example, the generated code includes: "writer.writeTag(new byte[] { (byte)0xB8});" When the final generated software library is run, no tag-related bit operations are required; this preset constant can be used directly.

[0094] In one embodiment, step S103 further includes the following steps S501-S502.

[0095] Step S501: Identify any type of field in the data structure model.

[0096] Here, the ASN.1 specification defines the ANY (any) type, which allows a field to hold data of any type at runtime.

[0097] When traversing the data structure model, if a field is found to be declared as ANY or ANY DEFINEDBY, then that field is identified as an arbitrary type field.

[0098] Step S502: Save any type of field to the data encoding / decoding function.

[0099] Here, when parsing a field of type ANY, the complete TLV (Tag-Length-Value) triple of the field is read from the input stream as a raw binary byte block and stored in the corresponding field of the data structure model object.

[0100] When writing to a field of type ANY, the original binary byte block previously saved is directly retrieved from the data structure model object and written to the output stream intact.

[0101] Step S104: Merge the target code with the preset basic encoding and decoding methods corresponding to the target data format to generate a data encoding and decoding tool; the data encoding and decoding tool is used to realize bidirectional format conversion between data objects of the target programming language and the target data format.

[0102] Here, basic encoding and decoding methods corresponding to the target data format are pre-stored, such as BERReader and BERWriter. The pre-defined basic encoding and decoding methods encapsulate the lowest-level operations, such as reading a byte and writing a variable-length encoding of an integer.

[0103] Data encoding / decoding functions call preset basic encoding / decoding methods to complete basic operations. For example, a dedicated `write` function is responsible for controlling the order and logic of writing to fields, but when it needs to write an integer value, it calls the general `BERWriter.writeInteger()` method.

[0104] All automatically generated specialized code files, along with preset general-purpose base code files, are compiled and packaged into a data encoding / decoding tool using a compiler and packaging tool. For the Java language, this data encoding / decoding tool is a JAR file (JavaArchive).

[0105] Upper-level applications can call data encoding and decoding tools through interfaces to achieve bidirectional conversion between data objects in the target programming language and binary data formats.

[0106] In one embodiment, the method further includes the following steps S601-S603.

[0107] Step S601: If a data packet conforming to the target data format is received from the eSIM device, the data packet is converted into a task data object in the target programming language using a data encoding and decoding tool, and the task data object is processed.

[0108] Here, when a user's eSIM device (such as a smartphone) needs to download a new carrier profile, the device constructs a profile download request according to the GSMA standard, encodes it into a data packet conforming to the target data format, and then sends it to the backend server over the network.

[0109] After receiving this data packet, the backend server invokes the data encoding / decoding tool. The received binary data packet is then passed as input to the decoding interface of the data encoding / decoding tool.

[0110] The data encoding / decoding tool converts this binary data message into a task data object defined in the target programming language (e.g., a Java object instance named ProfileDownloadRequest).

[0111] Once the conversion is complete, the backend server can interact with this task data object, such as calling its methods to obtain key information like device identifiers and verification codes. Based on this information, the server can execute subsequent business logic processing, such as parameter validation, user authentication, and data querying and storage.

[0112] Step S602: After the task data object is processed, a response data object conforming to the target programming language is generated based on the processing result.

[0113] Here, if both verification and authentication have passed, the backend server sends the requested eSIM configuration file to the device.

[0114] The backend server creates a response data object conforming to the target programming language (e.g., a Java object instance named ProfileDownloadResponse). All the information needed to be sent back to the eSIM device is populated into the properties of this object. This information may include the encrypted configuration file data body, session key, server digital signature, etc.

[0115] Step S603: Based on the data encoding and decoding tool, the reply data object is converted into a reply message that conforms to the target data format, and the reply message is sent to the eSIM device.

[0116] Here, the response information prepared inside the server is converted into a standard format that can be transmitted over the network and sent back to the device.

[0117] Specifically, the backend server will create and populate the ProfileDownloadResponse response data object, and then pass it to the encoding interface of the data encoding / decoding tool.

[0118] The data encoding / decoding tool calls its internal encoding functions to perform serialization. Specifically, it converts the structured Java object, along with all its complex internal data, into a binary response message that conforms to the target data format.

[0119] The backend server's communication module sends the encoded binary reply message back to the requesting eSIM device over the network. Upon receiving this message, the eSIM device decodes it using its built-in firmware parsing capabilities and then executes the subsequent configuration file installation and activation process.

[0120] The data processing method provided in this application automatically parses the ASN.1 description file, extracts structured data structure information, converts it into a data structure model of the target programming language, and further generates target code containing encoding and decoding functions, thereby constructing a data encoding and decoding tool for conversion between different formats; thus, it realizes automatic bidirectional conversion between data packets and program data objects in eSIM device communication, improves protocol adaptation efficiency, reduces manual coding workload, and enhances the maintainability and scalability of the system.

[0121] Example 2: Figure 2 This is a schematic diagram of a data processing system provided in an embodiment of this application.

[0122] Reference Figure 2 Data processing system, including: The data structure information extraction module 1 is used to parse the received ASN.1 description file to obtain the data structure information corresponding to the ASN.1 description file.

[0123] Data structure model generation module 2 is used to convert data structure information into a data structure model corresponding to the target programming language.

[0124] Code generation module 3 is used to generate target code corresponding to the target data format based on the data structure model; the target code includes data structure classes of the target programming language and data encoding and decoding functions adapted to the target data format.

[0125] The data encoding / decoding tool management module 4 is used to merge the target code with the preset basic encoding / decoding methods corresponding to the target data format to generate a data encoding / decoding tool; the data encoding / decoding tool is used to realize bidirectional format conversion between data objects of the target programming language and the target data format.

[0126] In one embodiment, the data structure information extraction module 1 is further configured to: Perform lexical analysis on the ASN.1 description file to generate a set of lexical units; the set of lexical units includes at least one lexical unit.

[0127] Based on the preset syntax rules and lexical unit set, construct the syntax tree corresponding to the ASN.1 description file.

[0128] Traverse the syntax tree and extract the data structure information corresponding to the ASN.1 description file; the data structure information includes type name, field name and corresponding encoding identifier.

[0129] The lexical analyzer is pre-installed in the data structure information extraction module 1 and is used to perform lexical analysis on the ASN.1 description file.

[0130] The parser is pre-installed in the data structure information extraction module 1, which receives the set of lexical units as input and performs grammatical structure recognition and tree construction on the lexical units according to the preset grammatical rules used to describe the ASN.1 language.

[0131] In one embodiment, when the number of ASN.1 description files exceeds one, the data structure information extraction module 1 is further configured to: Obtain the dependencies between different ASN.1 description files.

[0132] Lexical analysis is performed on each ASN.1 description file to generate a set of lexical units corresponding to each ASN.1 description file; the set of lexical units includes at least one lexical unit.

[0133] Based on the preset syntax rules and lexical unit set, a syntax tree is constructed for each ASN.1 description file.

[0134] Based on dependencies, the syntax tree corresponding to each ASN.1 description file is associated to generate a structural definition model.

[0135] Traverse the structure definition model to extract data structure information and the dependencies between different data structure information; the data structure information includes type name, field name and corresponding encoding identifier.

[0136] In one embodiment, the code generation module 3 is further configured to: Identify non-arbitrary type fields in a data structure model.

[0137] Calculate the tag value for each non-arbitrary type field based on its field type, structural attributes, and context information.

[0138] Save the tag value to the data encoding / decoding function.

[0139] In one embodiment, the code generation module 3 is further configured to: Identify fields of any type in a data structure model.

[0140] Save fields of any type to the data encoding / decoding function.

[0141] In one embodiment, the data encoding / decoding tool management module 4 is further configured to: If a data packet conforming to the target data format is received from an eSIM device, the data packet is converted into a task data object in the target programming language using a data encoding / decoding tool, and then the task data object is processed.

[0142] After the task data object is processed, a response data object conforming to the target programming language is generated based on the processing result.

[0143] The data encoding and decoding tool converts the response data object into a response message that conforms to the target data format, and then sends the response message to the eSIM device.

[0144] The data processing system provided in this application embodiment can automate the entire process from ASN.1 description file parsing, data structure model generation, target code generation to data encoding and decoding tool construction, thereby improving the stability and scalability of system operation and enhancing data parsing and adaptation capabilities under various protocol scenarios.

[0145] This application also provides an electronic device, such as... Figure 3The diagram shows the structure of the electronic device, which includes a processor 301 and a memory 302. The memory 302 stores computer-executable instructions that can be executed by the processor 301. The processor 301 executes the computer-executable instructions to implement the above-mentioned method for identifying the planned path.

[0146] exist Figure 3 In the illustrated embodiment, the electronic device further includes a bus 303 and a communication interface 304, wherein the processor 301, the communication interface 304, and the memory 302 are connected via the bus 303.

[0147] The memory 302 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 304 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 303 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 303 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0148] Processor 301 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 301 or by instructions in software form. The processor 301 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 302. Processor 301 reads the information in memory 302 and, in conjunction with its hardware, completes the steps of the data processing method of the aforementioned embodiment.

[0149] This application also provides a computer-readable storage medium storing a computer program. The computer program is executed by the processor 301 to perform the steps of the data processing method described above.

[0150] The computer program product provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0152] Furthermore, in the description of the embodiments of this application, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0153] In the description of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0154] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in this application, or make equivalent substitutions for some of the technical features. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application.

Claims

1. A data processing method, characterized by, include: The received ASN.1 description file is parsed to obtain the data structure information corresponding to the ASN.1 description file; The data structure information is converted into a data structure model corresponding to the target programming language; Based on the data structure model, generate target code corresponding to the target data format; The target code includes data structure classes of the target programming language and data encoding / decoding functions adapted to the target data format; The target code is merged with the preset basic encoding and decoding method corresponding to the target data format to generate a data encoding and decoding tool; the data encoding and decoding tool is used to realize bidirectional format conversion between the data object of the target programming language and the target data format.

2. The data processing method of claim 1, wherein, The step of parsing the received ASN.1 description file to obtain the data structure information corresponding to the ASN.1 description file includes: Lexical analysis is performed on the ASN.1 description file to generate a set of lexical units; the set of lexical units includes at least one lexical unit. Based on the preset syntax rules and the set of lexical units, construct the syntax tree corresponding to the ASN.1 description file; Traverse the syntax tree to extract the data structure information corresponding to the ASN.1 description file; the data structure information includes type name, field name and corresponding encoding identifier.

3. The data processing method of claim 1, wherein, When the number of ASN.1 description files exceeds one, the step of parsing the received ASN.1 description files to obtain the data structure information corresponding to the ASN.1 description files includes: Obtain the dependencies between different ASN.1 description files; Lexical analysis is performed on each of the ASN.1 description files to generate a lexical unit set corresponding to each ASN.1 description file; the lexical unit set includes at least one lexical unit. Based on the preset syntax rules and the set of lexical units, a syntax tree corresponding to each ASN.1 description file is constructed. Based on the aforementioned dependencies, the syntax tree corresponding to each ASN.1 description file is associated to generate a structural definition model; Traverse the structure definition model to extract the data structure information and the dependencies between different data structure information; the data structure information includes type name, field name and corresponding encoding identifier.

4. The data processing method of claim 1, wherein, The step of generating target code corresponding to the target data format based on the data structure model includes: Identify non-arbitrary type fields in the data structure model; Based on the field type, structural attributes, and context information corresponding to each of the non-arbitrary type fields, calculate the tag value corresponding to each of the non-arbitrary type fields; The tag value is saved to the data encoding / decoding function.

5. The data processing method of claim 1, wherein, The step of generating target code corresponding to the target data format based on the data structure model includes: Identify fields of any type in the data structure model; Save the field of any type to the data encoding / decoding function.

6. The data processing method of claim 1, wherein, The target programming language is Java, and the target data format is a binary encoding format that conforms to basic encoding rules.

7. The data processing method of claim 1, wherein, The method further includes: If a data packet conforming to the target data format is received from an eSIM device, the data packet is converted into a task data object in the target programming language based on the data encoding and decoding tool, and the task data object is processed. After the task data object is processed, a response data object conforming to the target programming language is generated based on the processing result; The data encoding and decoding tool converts the response data object into a response message that conforms to the target data format, and then sends the response message to the eSIM device.

8. A data processing system, characterized by include: The data structure information extraction module is used to parse the received ASN.1 description file to obtain the data structure information corresponding to the ASN.1 description file; A data structure model generation module is used to convert the data structure information into a data structure model corresponding to the target programming language; The code generation module is used to generate target code corresponding to the target data format based on the data structure model; the target code includes data structure classes of the target programming language and data encoding and decoding functions adapted to the target data format; The data encoding / decoding tool management module is used to merge the target code with the preset basic encoding / decoding methods corresponding to the target data format to generate a data encoding / decoding tool; the data encoding / decoding tool is used to realize bidirectional format conversion between the data objects of the target programming language and the target data format.

9. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-executable commands that can run on the processor, characterized in that the processor executes the computer-executable commands to implement the data processing method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the data processing method as described in any one of claims 1-7.