Modeling and coding methods of object-oriented protocols based on blockchain

Through the blockchain-based object-oriented protocol modeling and encoding method, the problem of difficulty in extending object-oriented communication protocols in the power information collection system is solved, and the consistency of the protocol and the expansion of power Internet of Things applications are achieved.

CN115499516BActive Publication Date: 2025-02-11NANJING LINYANG POWER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210911751.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-02-11
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

Object-oriented communication protocols face difficulties in expansion in power information collection systems, and how to ensure the consistency of the protocol and adapt to the characteristics of each device has become a challenge.

Method used

Using blockchain-based object-oriented protocol modeling and encoding methods, the object model is described through ASN.1, a private chain is established to ensure the immutability of protocol transmission, and JSON encoding of APDU during the transmission process to adapt to the Internet of Things demand.

Benefits of technology

It effectively ensures the consistency of object-oriented protocols, expands the application of protocols in the field of power Internet of Things, and adapts to the needs of different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115499516B_ABST
    Figure CN115499516B_ABST
Patent Text Reader

Abstract

The present invention discloses a modeling and coding method of an object-oriented protocol based on blockchain, which is applied to an electric power Internet of Things power consumption information collection system. The method includes: extracting various object models in the object-oriented protocol, describing various object models in ASN.1, creating various object models described in ASN.1, using each object model described in ASN.1 as a block, and establishing a private chain of the ASN.1 object model; displaying each object model in the private chain in a graphical configuration, and editing and selecting and combining multiple graphically configured object models according to specific application scenarios, and outputting a corresponding ASN.1 object model set; in the process of protocol transmission, JSON encoding is performed on the APDU described in ASN.1. The present invention can ensure the consistency of the object-oriented protocol and expand the application of the object-oriented protocol in the field of the electric power Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system automation communication technology, and more specifically, to a modeling and coding method of an object-oriented protocol based on blockchain. Background Art

[0002] With the development of power system power consumption information collection technology, the requirements for the collection system are getting higher and higher, mainly reflected in the increasing scope of the collected data, which has gradually expanded from the settlement day freeze to the daily freeze, 96-point curve and 5-minute data, etc.; the real-time requirements for the collected data are getting higher and higher, and 1-minute data collection is gradually being widely used; the connected equipment is becoming more and more complex, with a wide variety and a large number, and is gradually developing towards the power Internet of Things. The power consumption information collection system is built based on the object-oriented communication protocol. In order to adapt to the development of the power consumption information collection system, the object-oriented communication protocol is facing more and more expansions. How to ensure the consistency of the protocol and adapt to the characteristics of each device has become the first problem to be solved. Summary of the invention

[0003] The purpose of this invention is to propose a modeling and coding method for an object-oriented protocol based on blockchain, so as to ensure the consistency of the object-oriented protocol and expand the application of the object-oriented protocol in the field of power Internet of Things.

[0004] To achieve the above purpose, the present invention proposes a modeling and coding method of an object-oriented protocol based on blockchain, which is applied to the power consumption information collection system of the power Internet of Things. The method includes:

[0005] Extract various object models in object-oriented protocols, describe various object models in ASN.1, and create various object models described in ASN.1;

[0006] Each object model described by ASN.1 is used as a block to establish a private chain of ASN.1 object models;

[0007] Display each object model in the private chain in a graphically configured manner, edit and select and combine multiple graphically configured object models according to specific application scenarios, and output a corresponding ASN.1 object model set;

[0008] During the protocol transmission process, the APDU described by ASN.1 is encoded in JSON.

[0009] Optionally, the various types of object models include: a general object model, an APDU class object model, a CLASS basic class object model, an OAD class model and a DATA data class object model;

[0010] The OAD class object model is extended by inheriting the CLASS base class object model.

[0011] Optionally, the block includes: an index, a timestamp, a transaction list, a checksum of the current block, and a hash value of a preceding block;

[0012] The index and the timestamp are generated by a blockchain system;

[0013] The transaction list includes: an ASN.1 object model flag, an ASN.1 object model, and a binary hash value of the ASN.1 object model;

[0014] The checksum value of this block is generated based on the POW algorithm, which is an algorithm in which the last three digits of the hash value of the object model described in ASN.1 in the leading block are multiplied by the checksum modulus 100, which equals 7.

[0015] Optionally, extending the OAD class object model by inheriting the CLASS base class object model includes:

[0016] The capabilities of the CLASS base class object model and the OAD class object model are described with attributes and methods, and the OAD class model is implemented and extended based on inheritance.

[0017] Optionally, the APDU class object model described in ASN.1 is stored in a text format, and the corresponding file name is apdu.asn. All APDU class object models described in ASN.1 are stored in this file.

[0018] Optionally, the OAD object model described in ASN.1 is stored in a text format with the name xxx.asn, where xxx is the base class name or oad number of the OAD.

[0019] Optionally, for the files of the CLASS base class object model, the ASN.1 descriptions of the corresponding attributes and methods are defined in the corresponding files;

[0020] The properties or methods implemented in the extension class of the AOD object model are marked as instance-specific, and the marked properties must be implemented in the extension class;

[0021] In the extended class, in the description file of oad.asn, first point out the base class, implement the instance-specific methods and properties in the base class, and then implement other properties and methods that need to be newly added; the newly created OAD object model is implemented through inheritance and rewriting based on the existing OAD object model.

[0022] Optionally, displaying each object model in the private chain in a graphical configuration includes:

[0023] Parsing the .asn file of each object model in the private chain as a graphic element, the graphic element includes parameters and methods of the object model;

[0024] The parameters and methods of the primitives are configured and increased or decreased to form new primitives and saved as .asn files of object models described in ASN.1 as blocks of the blockchain.

[0025] Optionally, the editing and selecting and combining the multiple object models configured by the graphics according to the specific application scenario and outputting the corresponding ASN.1 object model set include:

[0026] Select and combine multiple primitives corresponding to multiple object models described by ASN.1, output an ASN.1 object model set, and calculate the MD5 checksum of the ASN.1 object model set to adapt to specific application scenarios;

[0027] Each .asn file of an object model described in ASN.1 and the corresponding graphic element can be converted into each other, and the ASN.1 object model set is displayed through a graphical program configuration, and the graphical program includes a web page and a client program.

[0028] Optionally, the step of performing JSON encoding on the APDU described in ASN.1 includes:

[0029] During the protocol transmission process, the ASN.1 description APDU is JSON-encoded, wherein the APDU includes LINK-APDU, Client-APDU, Server-APDU and SECURITY-APDU.

[0030] The beneficial effects of the present invention are:

[0031] The method of the present invention describes various object models in the object protocol in ASN.1, creates various object models described in ASN.1, and uses each object model described in ASN.1 as a block to establish a private chain of the ASN.1 object model. Based on the anti-tampering feature of the blockchain, the consistency of the object-oriented protocol can be effectively guaranteed. Each object model in the private chain is displayed in a graphically configured manner, and multiple graphically configured object models are edited and selected and combined according to specific application scenarios, and a corresponding ASN.1 object model set is output, which can adapt to the specific needs of different application scenarios. In the process of protocol transmission, the APDU described in ASN.1 is JSON-encoded, which can expand the application of the object-oriented protocol in the field of power Internet of Things.

[0032] The system of the present invention has other characteristics and advantages, which will be apparent from the drawings incorporated herein and the following detailed description, or will be described in detail in the drawings incorporated herein and the following detailed description, which together serve to explain the specific principles of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, in which like reference numerals generally represent like components.

[0034] Figure 1 A flowchart of the steps of a modeling and encoding method of an object-oriented protocol based on blockchain according to an embodiment of the present invention is shown.

[0035] Figure 2 A schematic diagram of the inheritance relationship of the AOD class object model in a modeling and encoding method of an object-oriented protocol based on blockchain in an embodiment of the present invention is shown.

[0036] Figure 3 A schematic diagram of the ASN.1 object model configuration in a modeling and encoding method of an object-oriented protocol based on blockchain in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0037] The present invention proposes a method for modeling an object-oriented protocol based on blockchain technology and encoding an ASN.1 model in JSON, which mainly includes the following contents: taking a model described by an object-oriented protocol based on ASN.1 as a block in a blockchain, establishing an object-oriented protocol private chain, preventing the protocol from being modified without permission during transmission through blockchain technology, ensuring the consistency of the protocol, and thus ensuring interconnection and interoperability; the model described by the object-oriented protocol based on ASN.1 mainly includes a general object model, an APDU class object model, a CLASS base class object model and an OAD object model. In the use of the protocol, it mainly involves the expansion of the OAD object according to the needs, so the OAD object model is extended by inheriting the CLASS base class; in the process of protocol private chain management, the creation of an object model class, the selection of an object protocol function set and the verification of the function set, a graphical configuration scheme is adopted; in the process of protocol transmission, on the basis of the original A-XDR encoding, a data stream encoding based on JSON is added to adapt to the development of the power Internet of Things.

[0038] The present invention will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0039] Example

[0040] This embodiment provides a modeling and coding method based on a blockchain object-oriented protocol, which is applied to a power consumption information collection system of the power Internet of Things. The method includes:

[0041] Step S1: extracting various object models in the object-oriented protocol, describing the various object models in ASN.1, and creating various object models described in ASN.1, wherein the various object models include: a general object model, an APDU (Application Protocol Data Unit) class object model, a CLASS basic class object model, an OAD (Object Attribute Descriptor) class model and a DATA data class object model;

[0042] Among them, ASN.1 Abstract Syntax Notation One is an ISO / ITU-T standard that describes a data format for representing, encoding, transmitting and decoding data. ASN.1 provides a complete set of formal formats for describing the structure of objects, describing data structures in a way that is independent of computer architecture and language.

[0043] In this embodiment, the APDU class object model described in ASN.1 is stored in text format, and the corresponding file name is apdu.asn. All APDU class object models described in ASN.1 are stored in this file. The OAD object model described in ASN.1 is stored in text format, and the name is xxx.asn, where xxx is the base class name of OAD or the oad number.

[0044] Among them, the OAD class object model is extended by inheriting the CLASS base class object model;

[0045] Specifically, the capabilities of the CLASS basic class object model and the OAD class model are described with attributes and methods, and the OAD class model is implemented and extended based on inheritance. That is, the ASN.1 model of OAD is constructed based on the inheritance method combined with the ASN.1 model of the CLASS basic class to implement the business function extension of the object-oriented protocol; the CLASS basic class of the object-oriented protocol is composed of attributes and methods, and OAD is used to describe the specific functions of the object-oriented protocol. OAD inherits from the CLASS basic class, and through rewriting, implements and extends attributes and methods to describe the specific functions of OAD.

[0046] For the files of the CLASS basic class object model, the ASN.1 descriptions of the corresponding attributes and methods are defined in the corresponding files;

[0047] The properties or methods implemented in the extension class of the OAD object model are marked as instance-specific, and the marked properties must be implemented in the extension class;

[0048] In the extended class, in the description file of oad.asn, first point out the base class, implement the instance-specific methods and properties in the base class, and then implement other properties and methods that need to be newly added; the newly created OAD object model is implemented through inheritance and rewriting based on the existing OAD object model.

[0049] Step S2: Each object model described by ASN.1 is used as a block to establish a private chain of the ASN.1 object model;

[0050] The block includes: index, timestamp, transaction list, proof value of the block and hash value of the preceding block;

[0051] The index and the timestamp are generated by a blockchain system;

[0052] The transaction list includes: an ASN.1 object model flag, an ASN.1 object model, and a binary hash value of the ASN.1 object model;

[0053] The checksum value of this block is generated based on the POW (Proof of Work) algorithm, and the POW algorithm is: the last three digits of the hash value of the object model described in ASN.1 in the leading block are multiplied by the checksum modulus 100, which is equal to 7.

[0054] That is, the algorithm is hash (the leading asn_hash followed by the last 3 digits * proof) % 100 = 7. For ASN.1 number: the APDU class object model described by ASN.1 is marked with the model name, such as Client-APDU; the OAD object model described by ASN.1 is marked with the OAD number, such as 45000200.

[0055] Step S3: Display each object model in the private chain in a graphically configured manner, edit and select and combine multiple graphically configured object models according to specific application scenarios, and output a corresponding ASN.1 object model set;

[0056] The step of displaying each object model in the private chain in a graphical configuration includes:

[0057] Based on the graphic configuration technology, combined with the ASN.1 model private chain, the .asn file of each object model in the private chain is parsed as a graphic element, and the graphic element includes the parameters and methods of the object model;

[0058] The parameters and methods of the primitives are configured and increased or decreased to form new primitives and saved as .asn files of object models described in ASN.1 as blocks of the blockchain.

[0059] The editing and selection of multiple object models configured by graphics according to specific application scenarios, and outputting corresponding ASN.1 object model sets, include:

[0060] Based on the graphic configuration technology, multiple graphic elements corresponding to multiple object models described by ASN.1 are selected and combined, and the ASN.1 object model set is output. At the same time, the MD5 check value of the ASN.1 object model set is calculated to adapt to specific application scenarios.

[0061] Based on the graphic configuration technology, each .asn file of the object model described in ASN.1 and the corresponding graphic element can be converted into each other, and the ASN.1 object model set is displayed through the graphical program configuration, and the graphical program includes a web page and a client program.

[0062] Step S4: During the protocol transmission process, the APDU described by ASN.1 is encoded by JSON.

[0063] Specifically, based on JSON technology, during the protocol transmission process, the ASN.1 description APDU is JSON-encoded, wherein the APDU includes LINK-APDU, Client-APDU, Server-APDU and SECURITY-APDU. On the basis of the original A-XDR encoding, JSON-based data stream encoding is added to adapt to the development of the power Internet of Things.

[0064] Application Examples

[0065] The present invention is further explained below through a specific application example.

[0066] The implementation process of this application example is as follows Figure 1 As shown,

[0067] S101: Load the private chain of the object-oriented protocol and obtain the storage path of the model file .asn;

[0068] S102: Create an object model, which includes a general object model, an APDU class object model, a basic class object model and an OAD object model in the object-oriented protocol. The rules are as follows:

[0069] Common object model: All types are described using ASN.1 and placed in the common.asn file

[0070] APDU class object model: All APDU types are described in ASN.1 and placed in the apdu.asn file

[0071] Basic class object model: described in ASN.1, one file for each class, named in the format of Class01.asn

[0072] OAD class object model: described in ASN.1, one file for each OAD, named in the format of 2001.asn

[0073] In both the base class and the OAD class, attributes and methods are used to describe their capabilities, and the OAD class is implemented and extended based on inheritance, such as Figure 1 shown.

[0074] During the model creation process, the .asn file script is supported for direct creation and graphical configuration creation. The specific methods are as follows: Figure 2 shown.

[0075] S103: Block creation. The specific format of the block in the object-oriented protocol is as follows:

[0076] Each object model corresponds to a block one by one. The block includes the following data: index, timestamp, transaction, proof, and previous_hash;

[0077] The transaction contains the specific information of the object model, including: object model identifier and object model .asn file hash value, where the identifier of APDU class object model is APDU, the identifier of common object model is common, the identifier of basic class object model is Class01, and the identifier of OAD object model is OAD value, such as 4500 and 4501 for wireless remote communication module;

[0078] The following is a sample block in Json format:

[0079]

[0080] If the block is an initial block, there is no previous_hash value because the block has no predecessor block. At the same time, the proof value in the block is set to 1234.

[0081] The block index and timestamp are assigned by the system;

[0082] The specific process of block creation is as follows Figure 1 As shown in step S107, step S107 includes:

[0083] Initialize block information through the object model asn file, calculate the hash value of the asn file to initialize the model_hash field, and initialize the model_mark model according to the model type;

[0084] Based on the POW algorithm, the proof value is calculated and stored in the corresponding block. In this private chain, the POW algorithm is selected: hash (the last 3 digits of the leading picture_hash * proof) % 100 = 7.

[0085] The hash value of the leading block is calculated using the hash algorithm and placed in the created block.

[0086] A specific object model block is created through step S107.

[0087] S104: Add the block created in S103 to the block private chain, and save the corresponding object model .asn file to the corresponding location;

[0088] S105: storing the corresponding object model .asn into a database, including but not limited to a database such as sqlite, or directly filing it into a database in the form of a document;

[0089] S106: The private chain and model library are used as the basic data of the configuration software, and the block is associated with the entire blockchain through proof. Due to the existence of the leading hash value, the data location of the blockchain has the unique and unchangeable characteristics. Due to the existence of the object model hash value in the transaction, combined with the leading hash value of the blockchain, the immutability of the model is guaranteed. Therefore, the modeling method of the model object protocol based on blockchain technology ensures the uniqueness of the model, thereby ensuring the consistency of the protocol. The specific usage process is as follows Figure 3 shown.

[0090] The method of extending the OAD object model by inheriting the CLASS base class model is as follows Figure 2 As shown:

[0091] S201: Taking the phase variable class CLASS03 as an example, this basic class includes 4 attributes and 2 methods, specifically:

[0092] Attribute 1 logical name: octet-string

[0093] Attribute 2 phase value array: array phase value (instance-specific)

[0094] Attribute 3 Conversion and Unit: Scaler_Unit

[0095] Attribute 31 Phased numerical array with quality

[0096] Method 1 reset(): integer(0)

[0097] Method 2 Execute():Data

[0098] Attribute 2 has an instance-specific flag, indicating that the attribute must be implemented in the subclass.

[0099] S202: is the implementation of OAD2001, which inherits Class03 and adds attributes 4, 5 and 6 on its basis, and implements attribute 2 at the same time, specifically:

[0100] Attribute 2 item value array: array double-long

[0101] Attribute 4 Neutral current: double-long

[0102] Attribute 5 Residual current: double-long

[0103] Attribute 6 Zero sequence current: double-long

[0104] At the same time, when extending the OAD protocol, all attribute methods can be rewritten when inherited.

[0105] like Figure 3 As shown, a specific implementation method of an object-oriented protocol based on graphical configuration is provided. In the process of protocol private chain management, creation of object model class, selection of object-oriented protocol function set and function set verification, a graphical configuration scheme is adopted, combined with diagrams, to explain in detail:

[0106] S301: It is the menu column of the software, mainly including: File, Edit, Select, View and Test.

[0107] S302: Data list of the protocol object model private chain.

[0108] S303: A list of selected protocol object models.

[0109] S304: Graphically display the selected model.

[0110] S305: Displaying the ASN.1 object model of the selected model.

[0111] After the software is started, select the file menu in S301, find the open model private chain menu, select the corresponding directory to open the private chain, and the nodes of the private chain are displayed in the form of a list in S302; then select the file menu, find the model set directory, open the corresponding model set to be edited, and all elements of the model set are displayed in the form of a list in S303. If you need to create a new model set, select the new menu in the file menu.

[0112] In the list of graphics elements in S302 and S303, you can select any graphics element, and the graphical configuration of the model corresponding to the graphics element will be displayed in S304. For details, refer to Figure 3 , the ASN.1 description of the model is shown in S305.

[0113] The Edit and View menus in S301 are used together. The selected element in S302 or S303 is displayed in the default viewing mode in S305 and S306. When you need to edit it, click Edit, and the object element enters the editing mode. You can modify its properties and methods in the configuration, or directly modify it in the ASN.1 mode. After the modification is completed, click File to save it to the private chain. Click the View button to enter the viewing mode.

[0114] Model editing can only be done in the S302 private chain, and only super administrators can do this. Ordinary users can only view models and build model sets. Click the Select button to enter the model set building mode, select the graphics element in the private chain, and display it in S304 and S305. At the same time, the graphics element is added to S303. If you want to delete it, right-click in S303 and select Delete. After building the model set, click the Verify button to output the corresponding model set and provide MD5 verification. The main function of the model set is to select the appropriate subset according to different platform resources and different device types to adapt to hardware with insufficient resources. At the same time, according to requirements, model subsets in binary, ASN.1, JSON and other formats can be output to adapt to different requirements.

[0115] The traditional object-oriented protocol only supports the A-XDR encoding format. For details, please refer to the DL / T 698.45-2017 specification. In the present invention, the encoding method of the JSON format is proposed to adapt to the development of the power Internet of Things. The following takes reading a record type data as an example to illustrate the encoding of the JSON format.

[0116] The terminal reads the total forward active power and rate energy of the electric energy meter at 2016-01-20 00:00:00. The following is the A-XDR encoding format

[0117] Send: 05 03 03 50 04 02 00 01 20 21 02 00 07 E0 16 01 14 00 00 00 0200 20 21 02 00 00 00 10 02 00 00

[0118] 05——[5]GET-Request

[0119] 03——[3]GetRequestRecord

[0120] 03——PIID

[0121] 50 04 02 00——OAD day freeze

[0122] 01——RSD, selection method 1

[0123] 20 21 02 00——OAD, data freeze time

[0124] 1C 07 E0 01 14 00 00 00——Time

[0125] 02——RCSD, number of SEQUENCE OF = 2

[0126] 00——[0]OAD

[0127] 20 21 02 00——OAD

[0128] 00——[0]OAD

[0129] 00 10 02 00——OAD

[0130] 00 - No time stamp

[0131] Response: 85 03 03 50 04 02 00 02 00 20 21 02 00 00 00 10 02 00 01 01 1C07 EO 01 14 00 00 00 01 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 0000 00 00 00 00

[0132] 85——

[133] GET-Response

[0133] 03——[3]GeResponseRecord

[0134] 03——PIID-ACD

[0135] 50 04 02 00——OAD

[0136] 02——RCSD, number of SEQUENCE OF = 2

[0137] 00 20 21 02 00 - Column 1 OAD

[0138] 00 00 10 02 00 - Column 2 OAD

[0139] 01——Record Data

[0140] 01——M records, M=1

[0141] 1C 07E0 01 14 00 00 00——Data in the first column

[0142] 01——Data in the second column 05 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00

[0149] 00——FollowReport OPTIONAL=0 means no report information

[0150] 00 - No time stamp

[0151] The corresponding JSON encoding format is:

[0152] send:

[0153]

[0154]

[0155] response:

[0156]

[0157]

[0158] In summary, the present invention provides a modeling of an object-oriented protocol based on blockchain technology, and a method for JSON encoding of an ASN.1 model. By using the model of the object-oriented protocol described based on ASN.1 as a block in the blockchain, an object-oriented protocol private chain is established, and the blockchain technology is used to prevent the protocol from being modified without permission during the transmission process, thereby ensuring the consistency of the protocol and thus ensuring interconnection and interoperability. In the use of the protocol, the OAD object is mainly expanded according to the needs, so the OAD object model is extended by inheriting the CLASS base class. In the management of the protocol private chain, the creation of the object model class, the selection of the object protocol function set and the verification of the function set, a graphical configuration scheme is adopted. In the process of protocol transmission, on the basis of the original A-XDR encoding, a data stream encoding based on JSON is added to adapt to the development of the power Internet of Things.

[0159] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.

Claims

1. A modeling and coding method of an object-oriented protocol based on blockchain, applied to the power consumption information collection system of the power Internet of Things, characterized in that: The method comprises: Extract various object models in object-oriented protocols, describe various object models in ASN.1, and create various object models described in ASN.1; Each object model described by ASN.1 is used as a block to establish a private chain of ASN.1 object models; Display each object model in the private chain in a graphically configured manner, edit and select and combine multiple graphically configured object models according to specific application scenarios, and output a corresponding ASN.1 object model set; During the protocol transmission process, the APDU described by ASN.1 is encoded in JSON; The step of displaying each object model in the private chain in a graphical configuration includes: Parsing the .asn file of each object model in the private chain as a graphic element, the graphic element includes parameters and methods of the object model; Configure and add or subtract the parameters and methods of the primitives to form new primitives and save them as .asn files of object models described in ASN.1 as blocks of the blockchain; The editing and selection of multiple object models configured by graphics according to specific application scenarios, and outputting corresponding ASN.1 object model sets, include: Select and combine multiple primitives corresponding to multiple object models described by ASN.1, output an ASN.1 object model set, and calculate the MD5 checksum of the ASN.1 object model set to adapt to specific application scenarios; Each .asn file of an object model described in ASN.1 and the corresponding graphic element can be converted into each other, and the ASN.1 object model set is displayed through a graphical program configuration, and the graphical program includes a web page and a client program.

2. The method according to claim 1, characterized in that: The various object models include: general object model, APDU class object model, CLASS basic class object model, OAD class object model and DATA data class object model; The OAD class object model is extended by inheriting the CLASS base class object model.

3. The method according to claim 1, characterized in that The block includes: index, timestamp, transaction list, checksum of the current block and hash value of the preceding block; The index and the timestamp are generated by a blockchain system; The transaction list includes: an ASN.1 object model flag, an ASN.1 object model, and a binary hash value of the ASN.1 object model; The checksum value of this block is generated based on the POW algorithm, which is an algorithm in which the last three digits of the hash value of the object model described in ASN.1 in the leading block are multiplied by the checksum modulus 100, which equals 7.

4. The method according to claim 2, characterized in that: The extending the OAD class object model by inheriting the CLASS base class object model comprises: The capabilities of the CLASS base class object model and the OAD class object model are described with attributes and methods, and the OAD class model is implemented and extended based on inheritance.

5. The method according to claim 2, characterized in that: The APDU class object model described in ASN.1 is stored in text format. The corresponding file name is apdu.asn. All APDU class object models described in ASN.1 are stored in this file.

6. The method according to claim 2, characterized in that The OAD object model described in ASN.1 is stored in text format with the name xxx.asn, where xxx is the base class name or oad number of OAD.

7. The method according to claim 2, characterized in that For the files of the CLASS basic class object model, the ASN.1 descriptions of the corresponding attributes and methods are defined in the corresponding files; The properties or methods implemented in the extension class of the AOD object model are marked as instance-specific, and the marked properties must be implemented in the extension class; In the extended class, in the description file of oad.asn, first point out the base class, implement the instance-specific methods and properties in the base class, and then implement other properties and methods that need to be newly added; the newly created OAD object model is implemented through inheritance and rewriting based on the existing OAD object model.

8. The method according to claim 1, characterized in that: The JSON encoding of the APDU described by ASN.1 includes: During the protocol transmission process, the ASN.1 description APDU is JSON-encoded, wherein the APDU includes LINK-APDU, Client-APDU, Server-APDU and SECURITY-APDU.

Citation Information

Patent Citations

  • ASN.1 packet object oriented processing method

    CN101197818A

  • Transcoding implementation method and device

    CN112188211A