Data verification method and device

文档序号:192428 发布日期:2021-11-02 浏览:34次 中文

阅读说明:本技术 数据验证的方法和装置 (Data verification method and device ) 是由 穆长春 狄刚 钱友才 杜金钊 于 2021-07-02 设计创作,主要内容包括:本发明公开了一种数据验证的方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:对待验证数据进行第一验证,待验证数据包括第一合约参数、智能合约标识和第一执行结果;在第一验证通过后,对第一合约参数进行处理得到第二合约参数,并根据第二合约参数执行智能合约,以得到第二执行结果;将第二合约参数、智能合约标识和第二执行结果发送给共识验证节点以进行共识验证。该实施方式能够通过多节点联合验证的机制确保合约执行结果的准确,避免由于执行合约与验证合约的运营机构为同一家而导致的智能合约的验证可信度低的情况发生,从而提高了合约执行和验证的可信度。(The invention discloses a method and a device for data verification, and relates to the technical field of computers. One embodiment of the method comprises: performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for consensus verification. The method and the system can ensure the accuracy of the contract execution result through a multi-node joint verification mechanism, avoid the situation that the verification reliability of the intelligent contract is low because the operating mechanism for executing the contract and verifying the contract is the same, and further improve the reliability of the contract execution and verification.)

1. A method of data verification, comprising:

performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results;

after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result;

and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for consensus verification.

2. The method of claim 1, wherein performing the first verification on the data to be verified comprises:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the first contract parameter to obtain a third execution result;

comparing the third execution result with the first execution result to perform a first verification.

3. The method of claim 1, wherein each consensus verification node verifies by:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the second contract parameter to obtain a fourth execution result;

and comparing the fourth execution result with the second execution result to obtain a second verification result.

4. The method according to claim 1 or 3, wherein the step of consensus verification comprises:

judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node;

if the consensus achieving condition is met, the consensus verification is successful;

otherwise, the consensus verification fails.

5. The method of claim 1, wherein processing the first contract parameter to obtain a second contract parameter comprises:

and carrying out data desensitization processing on the first contract parameters to obtain second contract parameters.

6. An apparatus for data verification, comprising:

the first verification module is used for performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results;

the contract execution module is used for processing the first contract parameter to obtain a second contract parameter after the first verification is passed, and executing the intelligent contract according to the second contract parameter to obtain a second execution result;

and the second verification module is used for sending the second contract parameters, the intelligent contract identifiers and the second execution results to a consensus verification node for consensus verification.

7. The apparatus of claim 6, wherein the first authentication module is further configured to:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the first contract parameter to obtain a third execution result;

comparing the third execution result with the first execution result to perform a first verification.

8. The apparatus of claim 6, wherein each consensus verification node verifies by:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the second contract parameter to obtain a fourth execution result;

and comparing the fourth execution result with the second execution result to obtain a second verification result.

9. The apparatus of claim 6 or 8, wherein the second authentication module is further configured to:

judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node;

if the consensus achieving condition is met, the consensus verification is successful;

otherwise, the consensus verification fails.

10. An electronic device for data verification, comprising:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.

11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for data verification.

Background

The basic characteristics of an intelligent contract include: consistency, customizability, observability, verifiability, enforcement, privacy protection. Where verifiability refers to the ability of a principal to prove contract performance or a breach to an arbitrator, or the arbitrator's ability to ascertain this by other means. In order to ensure the accuracy of the intelligent contract execution result, the intelligent contract execution result needs to be verified. How to guarantee the credibility of verifying the execution result of the intelligent contract is a technical problem to be solved urgently at present.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method and an apparatus for data verification, which can ensure that a contract execution result is accurate through a multi-node joint verification mechanism, and avoid a situation that a verification reliability of an intelligent contract is low due to the fact that an operating mechanism executing the contract and an operating mechanism verifying the contract are the same, thereby improving reliability of contract execution and verification.

To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of data verification.

A method of data validation, comprising:

performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results;

after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result;

and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for consensus verification.

Optionally, the performing the first verification on the data to be verified includes:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the first contract parameter to obtain a third execution result;

comparing the third execution result with the first execution result to perform a first verification.

Optionally, each consensus verification node verifies by:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the second contract parameter to obtain a fourth execution result;

and comparing the fourth execution result with the second execution result to obtain a second verification result.

Optionally, the step of consensus verification comprises:

judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node;

if the consensus achieving condition is met, the consensus verification is successful;

otherwise, the consensus verification fails.

Optionally, the processing the first contract parameter to obtain a second contract parameter includes:

and carrying out data desensitization processing on the first contract parameters to obtain second contract parameters.

According to another aspect of the embodiments of the present invention, there is provided an apparatus for data verification.

An apparatus for data validation, comprising:

the first verification module is used for performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results;

the contract execution module is used for processing the first contract parameter to obtain a second contract parameter after the first verification is passed, and executing the intelligent contract according to the second contract parameter to obtain a second execution result;

and the second verification module is used for sending the second contract parameters, the intelligent contract identifiers and the second execution results to a consensus verification node for consensus verification.

Optionally, the first verification module is further configured to:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the first contract parameter to obtain a third execution result;

comparing the third execution result with the first execution result to perform a first verification.

Optionally, each consensus verification node verifies by:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the second contract parameter to obtain a fourth execution result;

and comparing the fourth execution result with the second execution result to obtain a second verification result.

Optionally, the second verification module is further configured to:

judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node;

if the consensus achieving condition is met, the consensus verification is successful;

otherwise, the consensus verification fails.

Optionally, the contract execution module is further configured to:

and carrying out data desensitization processing on the first contract parameters to obtain second contract parameters.

According to another aspect of the embodiments of the present invention, there is provided an electronic device for data verification.

An electronic device for data verification, comprising: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the data verification method provided by the embodiment of the invention.

According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.

A computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of data validation provided by embodiments of the present invention.

One embodiment of the above invention has the following advantages or benefits: performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; the second contract parameter, the intelligent contract identifier and the second execution result are sent to the consensus verification node for consensus verification, so that contract verification platform formed by a plurality of verification nodes is combined to perform contract execution verification, the accuracy of the contract execution result is ensured through a multi-node joint verification mechanism, the situation that the verification reliability of the intelligent contract is low due to the fact that the operation mechanism for executing the contract and the operation mechanism for verifying the contract are the same is avoided, and the reliability of contract execution and verification is improved.

Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.

Drawings

The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:

FIG. 1 is a schematic diagram of the main steps of a method of data validation according to an embodiment of the present invention;

FIG. 2 is a system schematic of data validation of one embodiment of the present invention;

FIG. 3 is a schematic diagram of a consensus verification mechanism according to an embodiment of the present invention;

FIG. 4 is a schematic diagram of the main blocks of an apparatus for data verification according to an embodiment of the present invention;

FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;

fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.

Detailed Description

Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

In the execution process of the intelligent contract, after the intelligent contract execution unit executes the intelligent contract according to the contract parameters to obtain an execution result, the execution result is verified by the intelligent contract verification unit. In order to solve the problem of how to ensure the reliability of verifying the intelligent contract execution result, the invention ensures the accuracy of the contract execution result through a multi-node joint verification mechanism, prevents the condition that the operation mechanism for executing the contract and verifying the contract is the same, avoids the condition of self verification, and further improves the reliability of the contract execution and verification. In general, the intelligent contract verification unit and the intelligent contract execution unit of the intelligent contract operating mechanism such as the same bank or enterprise are corresponding, and the plurality of joint verification nodes refer to the intelligent contract verification units of a plurality of operating mechanisms.

Fig. 1 is a schematic diagram of main steps of a data verification method according to an embodiment of the present invention. As shown in fig. 1, the method for data verification according to the embodiment of the present invention mainly includes the following steps S101 to S103.

Step S101: performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results;

step S102: after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result;

step S103: and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for consensus verification.

In an embodiment of the invention, multi-node data verification is achieved through a consensus mechanism. The so-called 'consensus mechanism' is that the verification and confirmation of the transaction are completed in a short time through the voting of a special node; for a transaction, if several nodes with irrelevant benefits can achieve consensus, we can consider that the whole network can achieve consensus for the node.

According to the steps S101 to S103, the contract verification platform composed of a plurality of verification nodes can be combined to perform contract execution verification, so that the credibility of contract execution and verification is improved.

According to an embodiment of the present invention, the step of performing the first verification on the data to be verified may include, when performing the first verification, the following steps: acquiring an intelligent contract according to the intelligent contract identification; executing the intelligent contract according to the first contract parameter to obtain a third execution result; comparing the third execution result with the first execution result to perform a first verification. In this embodiment, by sending the contract parameters and the execution results of the intelligent contract execution unit to the intelligent contract verification unit of the operating mechanism corresponding to the intelligent contract execution unit for preliminary verification, the execution results can be preliminarily verified before the intelligent contract verification units of a plurality of different operating mechanisms perform consensus verification, and the consensus verification is performed only after the preliminary verification passes, thereby saving the verification cost and improving the verification efficiency.

After the first verification is passed, the first contract parameter is processed to obtain a second contract parameter, wherein the processing of the first contract parameter is data desensitization processing, for example. Because user data needs to be kept secret among different operation organizations such as banks or enterprises, when consensus verification is performed through a plurality of consensus verification nodes, data desensitization processing needs to be performed on contract parameters sent to the consensus verification nodes. When data desensitization processing is performed, data replacement, data invalidation, data randomization, data mask masking and the like can be generally adopted. In an embodiment of the invention, the data desensitization of the first contract parameter is performed by hashing the first contract parameter.

According to another embodiment of the invention, each consensus verification node may verify by: acquiring an intelligent contract according to the intelligent contract identification; executing the intelligent contract according to the second contract parameter to obtain a fourth execution result; and comparing the fourth execution result with the second execution result to obtain a second verification result. The consensus verification node performs intelligent contract execution according to the processed second contract parameter, can verify the contract execution result without acquiring the original contract parameter, not only ensures the privacy and data security of contract participants, but also realizes multi-party combined verification.

According to yet another embodiment of the invention, the step of consensus verification comprises: judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node; if the consensus achieving condition is met, the consensus verification is successful; otherwise, the consensus verification fails. The consensus achievement condition can be flexibly set according to the requirement of data verification, for example: the consensus verification is successful when the verification results of more than half of the consensus verification nodes are passed.

The following describes specific implementation procedures of the embodiment of the present invention with reference to specific embodiments. FIG. 2 is a system schematic of data validation according to one embodiment of the present invention. As shown in fig. 2, after the contract execution is completed, the contract execution unit of the operating mechanism sends the contract parameters, the contract identifiers, and the real operation records including the contract execution results to a contract verification platform composed of the contract verification units of multiple operating mechanisms, respectively, to perform consensus verification of the contract execution results, where the contract verification unit of each operating mechanism is a consensus verification node (e.g., consensus verification nodes 1 to N in the figure). In the contract verification process, each consensus verification node can acquire an intelligent contract from a contract library according to the intelligent contract identifier. When the execution result verification is carried out by each consensus verification node, intelligent contracts can be executed according to contract parameters (data desensitization is required), when the processing on a database and the fund processing on a digital currency wallet are involved, the last desensitization wallet data can be extracted from a wallet history stack library local to a verification platform, calculation processing is carried out according to a real operation record to obtain a contract execution result, and the calculated desensitization wallet information is added into the wallet history stack library to serve as a data base for the next verification.

FIG. 3 is a schematic diagram of a consensus verification mechanism according to an embodiment of the present invention. When an intelligent contract execution unit of an operation mechanism needs to verify an execution result, the intelligent contract verification unit of the operation mechanism firstly performs primary verification; after the primary verification is passed, executing the intelligent contract again according to the contract parameters after desensitization processing to obtain an intermediate execution result; and then sending the contract parameters and the intermediate execution results after desensitization treatment to intelligent contract verification units (namely: consensus verification nodes) of other operation organizations participating in consensus verification, collecting verification results (pass/fail) of all the consensus verification nodes, and judging whether consensus is achieved according to consensus achieving conditions. For example: if the consensus verification nodes of the operation organizations generate the same result after the contract is verified and executed, namely the consensus is achieved among the consensus verification nodes, which marks that the contract execution verification is successful. In a specific implementation, the consensus may not be achieved when the results of all the consensus verification nodes are the same, and specifically, the consensus achieving condition may be flexibly set according to the application requirement.

In a specific embodiment of the present invention, when a smart contract execution unit of an operator needs to perform contract execution result verification, first, a first contract parameter (including related wallet information, interface parameters required for contract execution, and the like), a smart contract identification ID, and a real operation record (or a hash value thereof) including a first execution result of a smart contract are sent to a smart contract verification unit of the operator for first verification. The intelligent contract verifying unit of the operating mechanism acquires the intelligent contract from the contract library according to the intelligent contract identification, operates the intelligent contract according to the first contract parameter baffle plate to obtain a third execution result, and compares the third execution result with the first execution result to perform first verification. If the first verification is passed, it indicates that the intelligent contract verification unit of the operation mechanism passes the preliminary verification of the execution result of the intelligent contract execution unit, and subsequent consensus verification can be performed, otherwise, the verification failure is directly returned, and the subsequent consensus verification is not performed, so that the intelligent contract execution unit performs rollback processing and re-execution. The operation of the baffle is similar to black box test, because the intelligent contract verification unit can not realize a real intelligent contract execution environment, an operation environment is simulated, in order to not influence the verification result, certain parameters are preset, and only the concerned parameters are used as a verification method for inputting the input parameters.

After the first verification is passed, the intelligent contract verification platform of the operation mechanism performs data desensitization processing on the first contract parameters by using a hash algorithm to obtain second contract parameters, and then executes the intelligent contract by using the second contract parameters to obtain a second execution result.

And then, the intelligent contract verification platform of the operation mechanism sends the second contract parameters, the intelligent contract identification and the second execution result to each consensus verification node. Each consensus verification node acquires an intelligent contract from the contract library, executes the intelligent contract by using second contract parameters to obtain a fourth execution result, compares the fourth execution result with the second execution result to perform second verification, and if the fourth execution result is consistent with the second execution result, the verification is passed (or the verification result of the consensus verification node can be considered as 'agreement'); otherwise, the verification is not passed.

Finally, second verification results of all consensus verification nodes are collected, and whether consensus is achieved is judged according to set consensus achieving conditions, wherein the consensus achieving conditions are as follows: the common identification verification nodes passing the verification reach more than half of the total number of all the common identification verification nodes. If the consensus is achieved, the consensus verification is successful; otherwise, the consensus verification fails. And after the verification fails, the intelligent contract execution unit performs rollback processing and re-executes.

Fig. 4 is a schematic diagram of main blocks of a data verification apparatus according to an embodiment of the present invention. As shown in fig. 4, the apparatus 400 for data verification according to the embodiment of the present invention mainly includes a first verification module 401, a contract execution module 402, and a second verification module 403.

The first verification module 401 is configured to perform first verification on data to be verified, where the data to be verified includes a first contract parameter, an intelligent contract identifier, and a first execution result;

the contract execution module 402 is configured to, after the first verification is passed, process the first contract parameter to obtain a second contract parameter, and execute the intelligent contract according to the second contract parameter to obtain a second execution result;

a second verification module 403, configured to send the second contract parameter, the intelligent contract identifier, and the second execution result to a consensus verification node for consensus verification.

According to an embodiment of the invention, the first verification module 401 may further be configured to:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the first contract parameter to obtain a third execution result;

comparing the third execution result with the first execution result to perform a first verification.

According to another embodiment of the invention, each consensus verification node verifies by:

acquiring an intelligent contract according to the intelligent contract identification;

executing the intelligent contract according to the second contract parameter to obtain a fourth execution result;

and comparing the fourth execution result with the second execution result to obtain a second verification result.

According to yet another embodiment of the present invention, the second verification module 403 may be further configured to:

judging whether a set consensus achievement condition is met or not according to a second verification result of each consensus verification node;

if the consensus achieving condition is met, the consensus verification is successful;

otherwise, the consensus verification fails.

According to yet another embodiment of the invention, the contract execution module 402 may be further operable to:

and carrying out data desensitization processing on the first contract parameters to obtain second contract parameters.

According to the technical scheme of the embodiment of the invention, data to be verified is subjected to first verification, and the data to be verified comprises a first contract parameter, an intelligent contract identifier and a first execution result; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; the second contract parameter, the intelligent contract identifier and the second execution result are sent to the consensus verification node for consensus verification, so that contract verification platform formed by a plurality of verification nodes is combined to perform contract execution verification, the accuracy of the contract execution result is ensured through a multi-node joint verification mechanism, the situation that the verification reliability of the intelligent contract is low due to the fact that the operation mechanism for executing the contract and the operation mechanism for verifying the contract are the same is avoided, and the reliability of contract execution and verification is improved.

Fig. 5 illustrates an exemplary system architecture 500 of a data verification apparatus or method to which embodiments of the invention may be applied.

As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various communication client applications installed thereon, such as a bank-type application, a digital currency-type application, a data validation-type application, an intelligent contract management-type application, a mailbox client, social platform software, etc. (by way of example only).

The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.

The server 505 may be a server providing various services, such as a background management server (for example only) providing support for data to be verified sent by a user using the terminal device 501, 502, 503. The background management server can perform first verification on data to be verified, such as a received data verification request, and the like, wherein the data to be verified comprises a first contract parameter, an intelligent contract identifier and a first execution result; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for processing such as consensus verification, and feeding back a processing result (such as a consensus verification result-just an example) to the terminal device.

It should be noted that the method for data verification provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for data verification is generally disposed in the server 505.

It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.

As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.

The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.

In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.

It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a first validation module, a contract execution module, and a second validation module. Where the names of these units or modules do not in some cases constitute a limitation of the unit or module itself, for example, the first authentication module may also be described as "a module for first authenticating data to be authenticated".

As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: performing first verification on data to be verified, wherein the data to be verified comprises first contract parameters, intelligent contract identifiers and first execution results; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; and sending the second contract parameter, the intelligent contract identifier and the second execution result to a consensus verification node for consensus verification.

According to the technical scheme of the embodiment of the invention, data to be verified is subjected to first verification, and the data to be verified comprises a first contract parameter, an intelligent contract identifier and a first execution result; after the first verification is passed, processing the first contract parameter to obtain a second contract parameter, and executing the intelligent contract according to the second contract parameter to obtain a second execution result; the second contract parameter, the intelligent contract identifier and the second execution result are sent to the consensus verification node for consensus verification, so that contract verification platform formed by a plurality of verification nodes is combined to perform contract execution verification, the accuracy of the contract execution result is ensured through a multi-node joint verification mechanism, the situation that the verification reliability of the intelligent contract is low due to the fact that the operation mechanism for executing the contract and the operation mechanism for verifying the contract are the same is avoided, and the reliability of contract execution and verification is improved.

The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能合约的执行方法、装置和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!