CN113961647A - Data deserialization method and device and related equipment - Google Patents

Data deserialization method and device and related equipment Download PDF

Info

Publication number
CN113961647A
CN113961647A CN202111320200.1A CN202111320200A CN113961647A CN 113961647 A CN113961647 A CN 113961647A CN 202111320200 A CN202111320200 A CN 202111320200A CN 113961647 A CN113961647 A CN 113961647A
Authority
CN
China
Prior art keywords
data
abi
intelligent contract
deserialization
parameter
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.)
Pending
Application number
CN202111320200.1A
Other languages
Chinese (zh)
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.)
Zhongchao Credit Card Industry Development Co ltd
Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute
Original Assignee
Zhongchao Credit Card Industry Development Co ltd
Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute
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 Zhongchao Credit Card Industry Development Co ltd, Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute filed Critical Zhongchao Credit Card Industry Development Co ltd
Priority to CN202111320200.1A priority Critical patent/CN113961647A/en
Publication of CN113961647A publication Critical patent/CN113961647A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24535Query rewriting; Transformation of sub-queries or views
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data deserialization method, which comprises the following steps: acquiring intelligent contract data; analyzing the intelligent contract data to obtain ABI parameter identification; determining a target data type according to the ABI parameter identifier; and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result. By applying the technical scheme provided by the application, the target data type can be determined through the ABI parameter identification in the intelligent contract data, and then the deserialization of the intelligent contract data is realized based on the target data type. The application also discloses a data deserialization device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Data deserialization method and device and related equipment
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a data deserialization method, and further, to a data deserialization apparatus, device, and computer readable storage medium.
Background
On the blockchain, reading of the related data of the intelligent contract needs to use an ABI (application binary interface), otherwise, the corresponding data cannot be analyzed. Therefore, it becomes difficult to directly read the parse blockchain smart contract data without ABI.
In the related technology, an intelligent contract ABI hash identifier is added to a transaction message, a community maintains a database of the ABI hash identifier and the ABI, and the commonly used ABI is uploaded to the database. Therefore, when the related data of the intelligent contract of the block chain is analyzed, the needed ABI can be obtained by inquiring the ABI hash identification through the database, and then the data is deserialized to obtain the data original text. However, since the ABI is composed of a method name and a parameter list, and the same parameter list may correspond to different method names, inconsistency of the method name may result in inconsistency of the ABI, thereby reducing a hit rate of querying the ABI.
Therefore, how to effectively improve the hit rate of querying the ABI and further improve the success rate of data deserialization is a problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The data deserialization method can effectively improve the hit rate of inquiring the ABI and further improve the success rate of data deserialization; another object of the present application is to provide a data deserializing device, apparatus and computer readable storage medium, all of which have the above beneficial effects.
In a first aspect, the present application provides a data deserialization method, including:
acquiring intelligent contract data;
analyzing the intelligent contract data to obtain ABI parameter identification;
determining a target data type according to the ABI parameter identifier;
and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result.
Preferably, the acquiring of the intelligent contract data includes:
calling an intelligent contract method to initiate a data request to the block chain;
and receiving the intelligent contract data fed back by the block chain according to the data request.
Preferably, the determining the target data type according to the ABI parameter identifier includes:
and querying a mapping database to obtain a target data type corresponding to the ABI parameter identification.
Preferably, the ABI parameter identifier is a hash value of the ABI parameter.
Preferably, the hash value of the ABI parameter and the mapping database are generated by enumerating the parameter types and the parameter numbers of the intelligent contract data.
Preferably, the deserializing the intelligent contract data according to the target data type to obtain a processing result includes:
and performing deserialization processing on the intelligent contract data based on the target data type by combining a data assembly protocol to obtain the processing result.
In a second aspect, the present application also discloses a data deserializing device, comprising:
the data acquisition module is used for acquiring intelligent contract data;
the data analysis module is used for analyzing the intelligent contract data to obtain ABI parameter identification;
the type determining module is used for determining the type of the target data according to the ABI parameter identifier;
and the deserializing module is used for deserializing the intelligent contract data according to the target data type to obtain a processing result.
Preferably, the data acquisition module is specifically configured to invoke an intelligent contract method to initiate a data request to the block chain; and receiving the intelligent contract data fed back by the block chain according to the data request.
In a third aspect, the present application also discloses a data deserializing device, including:
a memory for storing a computer program;
a processor for implementing the steps of any of the data deserialization methods described above when executing the computer program.
In a fourth aspect, the present application also discloses a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the data deserialization methods described above.
The data deserialization method comprises the steps of obtaining intelligent contract data; analyzing the intelligent contract data to obtain ABI parameter identification; determining a target data type according to the ABI parameter identifier; and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result.
By applying the technical scheme provided by the application, the ABI only containing the parameter list and not containing the method name is predefined, then the ABI is subjected to identification calculation to obtain ABI parameter identification, and the ABI parameter identification is added into intelligent contract data. Therefore, when the intelligent contract data is deserialized, the target data type can be determined through the ABI parameter identification in the intelligent contract data, and the deserialization of the intelligent contract data is realized based on the target data type. As the ABI parameter identification is not influenced by the method name change, the ABI query hit rate is higher, and the success rate of data deserialization is further effectively improved. In addition, the implementation mode does not need a block chain application openers to provide complete ABI, and design details can be effectively protected.
The data deserialization device, the equipment and the computer readable storage medium provided by the application all have the beneficial effects, and are not described again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
FIG. 1 is a schematic flow chart of a data deserialization method provided by the present application;
FIG. 2 is a diagram illustrating an example of a portion of a mapping database provided herein;
FIG. 3 is a schematic structural diagram of a data deserializing device provided by the present application;
fig. 4 is a schematic structural diagram of a data deserializing device provided in the present application.
Detailed Description
The core of the application is to provide a data deserialization method, which can effectively improve the hit rate of inquiring ABI and further improve the success rate of data deserialization; another core of the present application is to provide a data deserializing device, apparatus and computer readable storage medium, which also have the above beneficial effects.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data deserialization method.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data deserialization method provided in the present application, where the data deserialization method may include:
s101: acquiring intelligent contract data;
the step aims to realize the acquisition of intelligent contract data, which refers to various transaction messages generated by data interaction with the block chain, so that the intelligent contract data can be acquired from the block chain.
It can be understood that, in order to facilitate data transmission and storage, transaction messages on the blockchain are generally data after serialization processing, and therefore, when intelligent contract data on the blockchain is read for relevant processing, deserialization processing needs to be performed on the intelligent contract data. The intelligent contract data obtained in the step is the data which needs to be deserialized.
S102: analyzing the intelligent contract data to obtain ABI parameter identification;
this step is intended to implement intelligent contract data parsing to obtain ABI parameter identification therein. Specifically, when the intelligent contract data is generated on the blockchain, the corresponding ABI parameter identifier may be calculated at the same time, and the ABI parameter identifier may be added to the intelligent contract data. Therefore, after the intelligent contract data is acquired, the ABI parameter identification in the intelligent contract data can be acquired through a data analysis technology.
The ABI parameter identifier refers to identification information calculated based on a parameter list in the ABI. In the prior art, the ABI hash identification is directly calculated and added to the intelligent contract data, then after the intelligent contract data is analyzed to obtain the ABI hash identification, the corresponding ABI is obtained by inquiring the ABI hash identification, and finally the data original text is obtained by deserializing the data. However, since the ABI is composed of a method name and a parameter list, and different parameter lists may correspond to different method names, inconsistency of the method name may result in inconsistency of the ABI, thereby reducing hit rate of querying the ABI. In order to solve the problem, the ABI which only contains the parameter list and does not contain the method name can be defined in advance, then the ABI parameter identification is obtained by performing identification calculation on the ABI parameter identification, and the ABI parameter identification is added into the intelligent contract data. Obviously, the ABI parameter identification is irrelevant to the method name of the ABI, so that the ABI parameter identification is not influenced by the change of the method name, and the hit rate of the ABI query can be improved.
S103: determining the type of target data according to the ABI parameter identifier;
the method comprises the following steps of determining a target data type based on ABI parameter identification, wherein the target data type is used for realizing deserialization processing of corresponding intelligent contract data. Specifically, after obtaining the ABI parameter identifier by parsing from the intelligent contract data, the target data type corresponding to the ABI parameter identifier may be obtained by querying, for example, a database or a data table where the ABI parameter identifier corresponds to the data type may be maintained in advance, so that the target data type corresponding to the ABI parameter identifier may be obtained by querying the database or the data table.
S104: and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result.
The method comprises the steps of obtaining a target data type, directly performing deserialization on the target data type to obtain a corresponding processing result, wherein the processing result is the deserialization data of the intelligent contract data.
Therefore, the data deserialization method defines the ABI which only contains the parameter list and does not contain the method name in advance, then carries out identification calculation on the ABI, obtains the ABI parameter identification and adds the ABI parameter identification into the intelligent contract data. Therefore, when the intelligent contract data is deserialized, the target data type can be determined through the ABI parameter identification in the intelligent contract data, and the deserialization of the intelligent contract data is realized based on the target data type. As the ABI parameter identification is not influenced by the method name change, the ABI query hit rate is higher, and the success rate of data deserialization is further effectively improved. In addition, the implementation mode does not need a block chain application openers to provide complete ABI, and design details can be effectively protected.
In an embodiment of the application, the acquiring of the intelligent contract data may specifically include the following steps:
step one, calling an intelligent contract method to initiate a data request to a block chain;
and step two, receiving intelligent contract data fed back by the block chain according to the data request.
As described above, the intelligent contract data refers to various transaction messages generated by data interaction with the blockchain, and therefore, the intelligent contract data can be obtained by data interaction with the blockchain. Specifically, the intelligent contract method may be invoked to initiate a data request to the blockchain, where the data request is a request for performing data interaction with the blockchain, and the specific type of the data request may be set by a technician according to actual needs, which is not limited in the present application. Furthermore, when the block chain receives a data request, corresponding intelligent contract data can be fed back to the request end, and therefore the intelligent contract data is obtained.
In an embodiment of the application, the determining the target data type according to the ABI parameter identifier may specifically include:
and querying the mapping database to obtain the target data type corresponding to the ABI parameter identification.
Specifically, a mapping database may be maintained in advance, and mapping relationships between various types of ABI parameter identifiers and data types are stored in the mapping database, so that when a target data type is determined according to an ABI parameter, the target data type corresponding to the ABI parameter identifier may be directly obtained by querying the mapping database.
As described above, in the related art, the ABI hash identifier of the intelligent contract is added to the transaction packet, the community maintains a database of ABI hash identifiers and ABIs, and uploads the common ABIs to the database. However, the cost of maintaining a database by the community is relatively high, from zero to long available. However, in the embodiment of the application, the query of the target data type is realized by maintaining a mapping database storing mapping relations between various ABI parameter identifications and data types, and the maintenance cost of the database is greatly reduced because the scale of the database is relatively fixed and community maintenance is not needed.
In an embodiment of the present application, the ABI parameter identifier may specifically be a hash value of the ABI parameter.
In the embodiment of the present application, a specific type of ABI parameter identifier is provided, that is, a hash value of an ABI parameter may be used as the ABI parameter identifier. Specifically, when the blockchain generates intelligent contract data, hash calculation may be performed on ABIs that only include the parameter list and do not include the method name, so as to obtain corresponding hash values, and the hash values are used as ABI parameter identifiers.
In an embodiment of the present application, the hash value of the ABI parameter and the mapping database may be generated by enumerating parameter types and parameter numbers of the smart contract data.
In the embodiment of the application, a method for generating a hash value of an ABI parameter and a mapping database is provided. As described above, the ABI that only includes the parameter list and does not include the method name may be predefined, and then hash calculation may be performed on the ABI to obtain the ABI parameter identifier, that is, the ABI parameter identifier is only related to the parameter list and is not related to the method name, so that the ABI parameter identifier and the mapping database may be automatically generated by enumerating the parameter type and the parameter number of the intelligent contract data.
In an embodiment of the application, the deserializing the intelligent contract data according to the target data type to obtain the processing result may specifically include:
and performing deserialization processing on the intelligent contract data based on the target data type by combining a data assembly protocol to obtain a processing result.
In the embodiment of the application, a method for implementing deserialization processing on intelligent contract data based on a target data type obtained by query is provided, and specifically, the method can be implemented by combining a data assembly protocol, and deserialization processing is performed on the intelligent contract data by combining the data assembly protocol and the target data type, so that a corresponding processing result can be obtained.
Based on the foregoing embodiments, another data deserialization method is provided in the embodiments of the present application.
1. Intelligent contract data generation stage:
(1) defining ABI which only contains a parameter list and does not contain a method name as ABIL;
(2) when the block chain generates a transaction message, calculating the hash value of the ABIL to obtain an ABIL hash identifier (namely an ABI parameter identifier);
(3) a mapping database including ABIL hash identifiers and ABIL (i.e., data types) is automatically generated in advance by enumerating parameter types and parameter numbers of smart contracts, for example, please refer to fig. 2, where fig. 2 is an exemplary diagram of a part of data of a mapping database provided in this application.
2. And (3) intelligent contract data deserialization stage:
first, the intelligent contract code example is as follows:
Figure BDA0003344910280000071
further, the parameter calculation method is as follows:
ABI is "baz (uint32, bool)";
the hash of ABI is identified as the first four bytes of Keccak-256("baz (agent 32, boul)") which is 0xcdcd77c0 in hexadecimal strings, where Keccak-256 is a hashing algorithm.
ABIL is "uint32, boul";
the hash of ABIL identifies the first four bytes of Keccak-256("uint32, boul"), which is 0x915548c8 in hexadecimal strings.
Finally, the realization process of the intelligent contract data deserialization is as follows:
(1) and initiating a transaction to the blockchain, and calling an intelligent contract method 'function baz (agent 32 x, pool)'.
(2) The following transaction data is obtained:
0xcdcd77c0915548c800000000000000000000000000000000000000000000000000000000000000450000000000000000000000000000000000000000000000000000000000000001;
where cdcd77c0 is the hash of ABI, 915548c8 is the hash of ABIL, and the remaining data types are unknown because deserialization cannot be performed.
(3) Searching ABIL: taking fig. 2 as an example, looking up 915548c8 in the mapping database yields "fluid 32, pool", from which it can be seen that the remaining data consists of one unit32 and one pool.
(4) Deserialization data: with the remaining data, the remaining data type (i.e., "uint32, boul") and the published data assembly protocol, the original text 69 and true can be deserialized.
Therefore, the data deserialization method provided by the embodiment of the application defines the ABI which only contains the parameter list and does not contain the method name in advance, then carries out identification calculation on the ABI, obtains the ABI parameter identification and adds the ABI parameter identification into the intelligent contract data. Therefore, when the intelligent contract data is deserialized, the target data type can be determined through the ABI parameter identification in the intelligent contract data, and the deserialization of the intelligent contract data is realized based on the target data type. As the ABI parameter identification is not influenced by the method name change, the ABI query hit rate is higher, and the success rate of data deserialization is further effectively improved. In addition, the implementation mode does not need a block chain application openers to provide complete ABI, and design details can be effectively protected.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data deserializing device provided in the present application, where the data deserializing device may include:
the data acquisition module 1 is used for acquiring intelligent contract data;
the data analysis module 2 is used for analyzing the intelligent contract data to obtain ABI parameter identification;
the type determining module 3 is used for determining the type of the target data according to the ABI parameter identifier;
and the deserializing module 4 is used for deserializing the intelligent contract data according to the target data type to obtain a processing result.
Therefore, the data deserialization device provided by the embodiment of the application predefines the ABI which only contains the parameter list and does not contain the method name, then carries out identification calculation on the ABI, obtains the ABI parameter identification, and adds the ABI parameter identification into the intelligent contract data. Therefore, when the intelligent contract data is deserialized, the target data type can be determined through the ABI parameter identification in the intelligent contract data, and the deserialization of the intelligent contract data is realized based on the target data type. As the ABI parameter identification is not influenced by the method name change, the ABI query hit rate is higher, and the success rate of data deserialization is further effectively improved. In addition, the implementation mode does not need a block chain application openers to provide complete ABI, and design details can be effectively protected.
As a preferred embodiment, the data obtaining module 1 may be specifically configured to invoke an intelligent contract method to initiate a data request to a block chain; and receiving intelligent contract data fed back by the block chain according to the data request.
As a preferred embodiment, the type determining module 3 may be specifically configured to obtain a target data type corresponding to the ABI parameter identifier by querying from the mapping database.
As a preferred embodiment, the ABI parameter identifier may be a hash value of the ABI parameter.
As a preferred embodiment, the hash value of the ABI parameter and the mapping database may be generated by enumerating the parameter types and the parameter numbers of the smart contract data.
As a preferred embodiment, the deserializing module 4 may be specifically configured to perform deserialization processing on the intelligent contract data based on the target data type in combination with the data assembly protocol to obtain a processing result.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data deserializing device provided in the present application, where the data deserializing device may include:
a memory for storing a computer program;
a processor, configured to execute a computer program, may implement the steps of any of the data deserialization methods described above.
As shown in fig. 4, which is a schematic diagram of a component structure of a network access control device, the network access control device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of the network access control method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
acquiring intelligent contract data;
analyzing the intelligent contract data to obtain ABI parameter identification;
determining the type of target data according to the ABI parameter identifier;
and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result.
In one possible implementation, the memory 11 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a request interception function, an information acquisition function), and the like; the storage data area can store data created in the using process, such as safety index data, application protection strategy data and the like.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 12 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 4 does not constitute a limitation of the network access control device in the embodiment of the present application, and in practical applications, the network access control device may include more or less components than those shown in fig. 4, or some components may be combined.
The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is capable of implementing the steps of any of the above-mentioned data deserialization methods.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. A method of deserializing data, comprising:
acquiring intelligent contract data;
analyzing the intelligent contract data to obtain ABI parameter identification;
determining a target data type according to the ABI parameter identifier;
and performing deserialization processing on the intelligent contract data according to the target data type to obtain a processing result.
2. The data deserialization method of claim 1, wherein the obtaining intelligent contract data comprises:
calling an intelligent contract method to initiate a data request to the block chain;
and receiving the intelligent contract data fed back by the block chain according to the data request.
3. The data deserialization method of claim 1, wherein the identifying a target data type according to the ABI parameter comprises:
and querying a mapping database to obtain a target data type corresponding to the ABI parameter identification.
4. The data deserialization method of claim 3, wherein the ABI parameter identification is specifically a hash value of the ABI parameter.
5. The data deserialization method of claim 4, wherein the hash value of the ABI parameter and the mapping database are generated by enumerating parameter types and parameter numbers of intelligent contract data.
6. The data deserialization method of claim 1, wherein the deserializing the intelligent contract data according to the target data type to obtain a processing result comprises:
and performing deserialization processing on the intelligent contract data based on the target data type by combining a data assembly protocol to obtain the processing result.
7. A data deserialization apparatus, comprising:
the data acquisition module is used for acquiring intelligent contract data;
the data analysis module is used for analyzing the intelligent contract data to obtain ABI parameter identification;
the type determining module is used for determining the type of the target data according to the ABI parameter identifier;
and the deserializing module is used for deserializing the intelligent contract data according to the target data type to obtain a processing result.
8. The data deserialization device of claim 7, wherein the data obtaining module is specifically configured to invoke an intelligent contract method to initiate a data request to a block chain; and receiving the intelligent contract data fed back by the block chain according to the data request.
9. A data deserialization device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data deserialization method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data deserialization method according to any one of claims 1 to 6.
CN202111320200.1A 2021-11-09 2021-11-09 Data deserialization method and device and related equipment Pending CN113961647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111320200.1A CN113961647A (en) 2021-11-09 2021-11-09 Data deserialization method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111320200.1A CN113961647A (en) 2021-11-09 2021-11-09 Data deserialization method and device and related equipment

Publications (1)

Publication Number Publication Date
CN113961647A true CN113961647A (en) 2022-01-21

Family

ID=79469866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111320200.1A Pending CN113961647A (en) 2021-11-09 2021-11-09 Data deserialization method and device and related equipment

Country Status (1)

Country Link
CN (1) CN113961647A (en)

Similar Documents

Publication Publication Date Title
CN104320312A (en) Network application safety test tool and fuzz test case generation method and system
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN114090671A (en) Data import method and device, electronic equipment and storage medium
CN111338716A (en) Data processing method and device based on rule engine and terminal equipment
CN111464515A (en) Data conversion method, device, equipment and storage medium
CN111209326A (en) Data query method and device, electronic equipment and storage medium
CN112883088B (en) Data processing method, device, equipment and storage medium
CN113961647A (en) Data deserialization method and device and related equipment
CN115967604A (en) Message transmission method and device, electronic equipment and computer readable storage medium
CN116233164A (en) Method, apparatus, storage medium and processor for collecting device data
CN112130860B (en) JSON object analysis method and device, electronic equipment and storage medium
CN113342647A (en) Test data generation method and device
CN112433943A (en) Method, device, equipment and medium for detecting environment variable based on abstract syntax tree
US20150309788A1 (en) Function module modularizing method in data distribution service and modularizing apparatus thereof
CN112052267B (en) Data query method, equipment, server and storage medium
CN110990000A (en) Data request processing method, device and equipment for MVC (model view controller) pattern design model layer
CN112968825B (en) Message sending method, device, equipment and storage medium
CN114115833B (en) Automatic protocol audit code generation method and device
CN116861455B (en) Event data processing method, system, electronic device and storage medium
CN115378824B (en) Model similarity determination method, device, equipment and storage medium
CN112181539B (en) File processing method, device, equipment and medium
CN114465829B (en) Access time management method and device, electronic equipment and storage medium
CN114785847B (en) Network control software development configuration method, terminal and storage medium
CN111178044B (en) Method and device for determining target text elements
CN117971932A (en) Real-time warehousing method and device for state data of node instrument

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