CN115378620A - Intelligent contract management method and device, computer equipment and storage medium - Google Patents

Intelligent contract management method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115378620A
CN115378620A CN202110550506.XA CN202110550506A CN115378620A CN 115378620 A CN115378620 A CN 115378620A CN 202110550506 A CN202110550506 A CN 202110550506A CN 115378620 A CN115378620 A CN 115378620A
Authority
CN
China
Prior art keywords
intelligent contract
contract
voting
node
endorsement
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
CN202110550506.XA
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.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202110550506.XA priority Critical patent/CN115378620A/en
Publication of CN115378620A publication Critical patent/CN115378620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to an intelligent contract management method, an intelligent contract management device, computer equipment and a storage medium. The method comprises the following steps: receiving a contract operation request sent by a first node in a alliance chain channel; triggering a verification unit deployed in the middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit at a middle layer of the alliance chain; and when the marking information is preset marking information, acquiring voting results fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain. By adopting the method, the intelligent contract management efficiency can be improved.

Description

Intelligent contract management method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to an intelligent contract management method and apparatus, a computer device, and a storage medium.
Background
A federation chain refers to a blockchain that is managed by several institutions participating together, each institution running one or more nodes, where data only allows different institutions in the system to read, write, and send transactions, and to collectively record transaction data. The intelligent contract is a computer program running on a reproducible and shared ledger and can process ledger information of an operation block chain. An intelligent contract is a computer agreement for propagating, verifying or executing contracts in an informatization mode, and is calculated according to certain constraint rules and even an agreement with legal effectiveness.
The intelligent contract occupies an important position in a block chain, and how to ensure the safety and reliability of the intelligent contract is very important.
Disclosure of Invention
In view of the above, it is necessary to provide an intelligent contract management method, apparatus, computer device, and storage medium capable of improving the intelligent contract management efficiency.
An intelligent contract management method, the method comprising:
receiving a contract operation request sent by a first node in a union link channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit of a middle layer of the alliance chain;
and when the marking information is preset marking information, obtaining voting results fed back by each second node in the alliance link channel, and deploying the intelligent contract on the alliance link channel.
In one embodiment, the method further comprises:
when an updating request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the updating request and generating a voting event;
acquiring a response result of an endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result;
and updating endorsement policy data of the intelligent contract according to the voting result.
In one embodiment, the updating of endorsement policy data of the intelligent contract according to the voting result includes:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the endorsement node number, updating endorsement policy data of the intelligent contract.
In one embodiment, the updating request carries a newly added third node, and when the number of preset voting results in the voting results is greater than a preset fraction of the number of endorsement nodes, the updating of the endorsement policy data of the intelligent contract is completed, including:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the number of the endorsement nodes, updating the endorsement nodes of the endorsement policy data according to the third node to finish the updating of the endorsement policy data of the intelligent contract.
In one embodiment, the method further comprises:
when the marking information is not preset marking information, triggering a second node in the alliance chain to check the legality of the intelligent contract, obtaining a second check result and generating the marking information of the second check result;
and when the marking information of the second check result is the marking information, executing the steps of obtaining the voting results fed back by each second node in the alliance chain channel and deploying the intelligent contract on the alliance chain channel.
In one embodiment, the triggering a verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request to obtain a first verification result includes:
triggering a verification unit deployed in the middle layer to generate a verification instruction;
and carrying out validity check on the source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the check instruction to generate a first check result.
An intelligent contract management apparatus, the apparatus comprising:
the receiving module is used for receiving a contract running request sent by a first node in a alliance chain channel;
the verification module is used for triggering a verification unit arranged in the middle layer to verify the intelligent contract corresponding to the contract operation request by responding to the contract operation request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit of a middle layer of the alliance chain;
and the deployment module is used for acquiring voting results fed back by each second node in the coalition chain channel when the marking information is preset marking information, and deploying the intelligent contract on the coalition chain channel.
A computer device comprising a memory storing a computer program and a processor implementing the following steps when the computer program is executed:
receiving a contract operation request sent by a first node in a alliance chain channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit of a middle layer of the alliance chain;
and when the marking information is preset marking information, obtaining voting results fed back by each second node in the alliance link channel, and deploying the intelligent contract on the alliance link channel.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a contract operation request sent by a first node in a alliance chain channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit at a middle layer of the union chain;
and when the marking information is preset marking information, obtaining voting results fed back by each second node in the alliance link channel, and deploying the intelligent contract on the alliance link channel.
In the intelligent contract management method, the intelligent contract management device, the computer equipment and the storage medium, the intelligent contract to be operated is obtained from the contract standardization unit arranged on the middle layer, the verification unit arranged on the middle layer is triggered to verify the intelligent contract according to the contract operation request sent by the first node in the alliance chain, and a first verification result is generated and label information of the first verification result is generated; when the marking information is preset marking information, the voting results fed back by each second node in the alliance chain channel are obtained, the deployment of the intelligent contract is completed, namely, the intelligent contract is decoupled from the contract layer and the ledger layer by adding an intermediate layer in the alliance chain, the management operation of the intelligent contract is simplified, the deployment of the intelligent contract is completed on the basis of ensuring the standardization, the safety and the reliability of the intelligent contract through a contract standardization unit and a verification unit which are deployed on the intermediate layer, and the management efficiency of the intelligent contract is improved.
Drawings
FIG. 1 is a schematic flow diagram of a method for intelligent contract management in one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a method for intelligent contract management in accordance with another embodiment;
FIG. 3 is a schematic flow chart diagram illustrating a method for intelligent contract management in accordance with another embodiment;
FIG. 4 is a block diagram that illustrates a framework for an intelligent contract management method in one embodiment;
FIG. 5 is a block diagram of an intelligent contract management apparatus in one embodiment;
FIG. 6 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, an intelligent contract management method is provided, and this embodiment is illustrated by applying the method to a blockchain, it is to be understood that the method may also be applied to a terminal, and may also be applied to a system including a terminal and a blockchain, and is implemented by interaction between the terminal and the blockchain. In this embodiment, the method includes the steps of:
step 102, receiving a contract running request sent by a first node in a federation chain channel.
The alliance chain comprises a plurality of channels, each channel can be used for processing different types of services (such as logistics services and supply chain services), each channel comprises a plurality of nodes (such as a node 1, a node 2, a node 3, a node n, and a node n), and each node corresponds to a client member; for example, the a channel of the federation chain includes a first node, a second node, a third node, and so on.
And 104, triggering a verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate the marking information of the first verification result.
Wherein the intelligent contract is obtained from a contract standardization unit at a middle layer of the federation chain. The existing federation chain's overall architecture includes a storage layer (including a ledger layer), a data layer, a channel layer, a network layer, a consensus layer, a contract layer, and an application layer. In the structure of the alliance chain in the embodiment, an intermediate layer is added between a contract layer and an account book layer, the contract layer and the account book layer are decoupled, and a contract marking unit, a verification unit and a voting unit are deployed on the intermediate layer; the contract standardization unit supports contract development and intelligent contract standardization processing to be deployed according to actual service requirements; the verification unit is used for detecting the security of the intelligent contract; the voting unit is used for voting on the uplink of the intelligent contract and the update of the intelligent contract endorsement strategy data.
Specifically, a contract running request sent by a first node is responded, a verification unit deployed in an intermediate layer is triggered to perform security verification on the contract running request correspondingly, a first verification result is obtained, namely the verification unit is triggered to obtain verification information of an intelligent contract and preset verification information stored in the intelligent contract is obtained from a contract standardization unit, the obtained verification information is compared with the preset verification information, and the first verification result is obtained and comprises a verification passing result and a verification failing result.
The marking information comprises first marking information and second marking information, namely when the file value is the same as the preset file value, the verification is passed, the generated marking information is the first marking information, the verification information is signed, the marking information of the intelligent contract is obtained and is the first marking information, and the first marking information is used for representing the safety (Safe) of the intelligent contract. And when the file value is different from the preset file value, the verification fails, the verification information is signed, the generated marking information is second marking information, the marking information of the intelligent contract is obtained to be the second marking information, and the second marking information is used for representing that the intelligent contract is unsafe (such as NotSafe) or undetected (such as NotDeprotected).
Optionally, in an embodiment, the verification information is a source file value, and a verification instruction is generated by triggering a verification unit deployed in the middle layer; and carrying out validity check on a source file value of the intelligent contract and a preset file value stored in a contract standardization unit according to the check instruction to generate a first check result.
And 106, when the marking information is the preset marking information, obtaining the voting result fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain.
The preset labeling information is first labeling information; the marking information is preset marking information, namely when the verification information of the intelligent contract is the same as the preset verification information, the verification passes, and the verification information is signed to obtain first marking information.
Specifically, when the mark information is preset mark information, at least one second node of the same channel on the chain alliance chain detects an intelligent contract voting transaction applied by a first node, the intelligent contract voting transaction is responded, a first check result of an intelligent contract is detected, when the first check result is detected to be a check pass and the corresponding mark information is the first mark information, the intelligent contract is voted, after a voting result fed back by the second node is obtained, the intelligent contract is deployed on the channel of the alliance chain, wherein the first node and the at least one second node are pre-designated endorsement nodes and are used for endorsement of the intelligent contract.
In the intelligent contract management method, an intelligent contract to be operated is obtained from a contract standardization unit deployed on an intermediate layer, a verification unit deployed on the intermediate layer is triggered to verify the intelligent contract according to a contract operation request sent by a first node in a coalition chain, a first verification result is generated, and label information of the first verification result is generated; when the marking information is preset marking information, the voting results fed back by each second node in the alliance chain channel are obtained, the deployment of the intelligent contract is completed, namely, the intelligent contract is decoupled from the contract layer and the ledger layer by adding an intermediate layer in the alliance chain, the management operation of the intelligent contract is simplified, the deployment of the intelligent contract is completed on the basis of ensuring the standardization, the safety and the reliability of the intelligent contract through a contract standardization unit and a verification unit which are deployed on the intermediate layer, and the management efficiency of the intelligent contract is improved.
In another embodiment, as shown in fig. 2, an intelligent contract management method is provided, and this embodiment is illustrated by applying the method to a blockchain, it is to be understood that the method may also be applied to a terminal, and may also be applied to a system including a terminal and a blockchain, and is implemented by interaction between the terminal and the blockchain. In this embodiment, the method includes the steps of:
step 202, a contract running request sent by a first node in a federation chain channel is received.
And 204, by responding to the contract running request, triggering a verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request, so as to obtain a first verification result and generate marking information of the first verification result.
Wherein the intelligent contract is obtained through a contract standardization unit at a middle layer of the federation chain.
Step 206, determining whether the label information is the preset label information, if yes, executing step 208, otherwise, executing step 210.
And step 208, obtaining the voting result fed back by each second node in the alliance chain channel, and deploying the intelligent contract on the alliance chain channel.
And step 210, triggering a second node in the alliance chain to verify the validity of the intelligent contract, obtaining a second verification result and generating marking information of the second verification result.
The second node detects the check information of the intelligent contract and the prediction check information in the contract standardization unit by calling the verification unit arranged in the middle to obtain a second check result; the second check result comprises a check pass and a check fail.
And the marking information of the second check result comprises third marking information and fourth marking information, namely when the check information is matched with the preset check information, the check is passed, the generated marking information is the third marking information, the check information is signed, the marking information of the intelligent contract is obtained and is the third marking information, and the third marking information is used for representing the safety (Safe) of the intelligent contract. And when the file value is different from the preset file value, the verification fails, the verification information is signed, the generated marking information is fourth marking information, the marking information of the intelligent contract is obtained to be the fourth marking information, and the fourth marking information is used for representing that the intelligent contract is unsafe (such as NotSafe) or undetected (such as NotDeprotected).
Optionally, in an embodiment, the verification information is a source file value, and the second node triggers the verification unit deployed in the middle layer to generate a verification instruction by calling the verification unit deployed in the middle layer; and carrying out validity check on the source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the check instruction to generate a second check result.
Step 212, determining whether the marking information of the second check result is the preset marking information, if so, executing step 208, otherwise, ending.
In the intelligent contract management method, an intelligent contract to be operated is obtained from a contract standardization unit deployed on an intermediate layer, a verification unit deployed on the intermediate layer is triggered to verify the intelligent contract according to a contract operation request sent by a first node in a coalition chain, a first verification result is generated, and label information of the first verification result is generated; the intelligent contract management method has the advantages that the marking information is detected, the disposition processing operation of the intelligent contract is executed according to different detection results, namely, the intelligent contract is decoupled from the contract layer and the account book layer by adding the middle layer in the alliance chain, the intelligent contract management operation is simplified, the disposition of the intelligent contract is completed on the basis of ensuring the standardization, the safety and the reliability of the intelligent contract through the contract standardization unit and the verification unit disposed on the middle layer, and the management efficiency of the intelligent contract is improved.
In another embodiment, as shown in fig. 3, an intelligent contract management method is provided, and this embodiment is illustrated by applying the method to a blockchain, it is to be understood that the method may also be applied to a terminal, and may also be applied to a system including a terminal and a blockchain, and is implemented by interaction between the terminal and the blockchain. In this embodiment, the method includes the steps of:
step 302, a contract running request sent by a first node in a federation chain channel is received.
And 304, triggering a verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate the marking information of the first verification result.
Wherein the intelligent contract is obtained through a contract standardization unit at a middle layer of the federation chain.
Step 306, determine whether the label information is the preset label information, if yes, go to step 312, otherwise go to step 308.
And 308, triggering a second node in the alliance chain to verify the validity of the intelligent contract, obtaining a second verification result and generating marking information of the second verification result.
In step 310, it is determined whether the label information of the second check result is the preset label information, if so, step 312 is executed, otherwise, the process is ended.
And step 312, obtaining the voting result fed back by each second node in the alliance chain channel, and deploying the intelligent contract on the alliance chain channel.
And step 314, when an update request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the update request, and generating a voting event.
And step 316, acquiring the response result of the endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain the voting result.
Specifically, when a endorsement request of a third node on a coalition chain channel to an intelligent contract is detected, a voting unit in a coalition chain intermediate layer is triggered to generate an update request of endorsement policy data of the intelligent contract, the update request of the endorsement policy data is sent to an endorsement node of the intelligent contract to perform voting operation, and a voting result is generated; wherein the endorsement node comprises a first node and a second node.
And step 318, updating endorsement policy data of the intelligent contract according to the voting result.
Specifically, after the endorsement node corresponding to the intelligent contract completes the voting operation of the update request, the voting result of each endorsement node is obtained, and the update of the endorsement policy data of the intelligent contract is completed.
Optionally, in an embodiment, when the voting number of the voting results is greater than the preset fraction of the endorsement node number, the update of the endorsement policy data of the intelligent contract is completed.
Optionally, in an embodiment, when the number of the preset voting results in the voting results is greater than the preset fraction of the number of endorsement nodes, the endorsement nodes of the endorsement policy data are updated according to the update request carrying the newly added third nodes, so that the update of the endorsement policy data of the intelligent contract is completed, that is, the preset endorsement nodes of the intelligent contract are increased, the number of the endorsement nodes of the intelligent contract is increased, and the reliability of the intelligent contract is improved.
The following is a diagram of a framework of the intelligent contract management method in one embodiment, as shown in fig. 4, the framework including: the system comprises a contract layer, a middle layer and an account book layer, wherein the middle layer is built between the contract layer and the account book layer, the contract layer and the account book layer are decoupled, and a voting unit (such as a voting plugin), a contract standardization unit (such as a contract mall plugin) and a verification unit (such as a verification plugin) are deployed on the middle layer.
Receiving a contract operation request sent by a first node in a alliance chain channel; triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit at a middle layer of the alliance chain; when the marking information is preset marking information, obtaining voting results fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain through an account book layer; when detecting that endorsement policy data of the intelligent contract needs to be updated, triggering a voting unit deployed on the middle layer to respond to the update and generating a voting event; and acquiring the response result of the endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result, and updating the endorsement strategy data of the intelligent contract according to the voting result.
For example, a channel in a certain alliance has user nodes Org1, org2, org3 and Org4, wherein Org1 and Org2 are designated as endorsement nodes, org1 obtains an intelligent contract a through a contract mall plug-in deployed in the middle layer, and starts the intelligent contract a as an external contract service; org1 applies for the intelligent contract A to operate to the middle layer I, namely, generates a contract operation request; by responding to the contract running request, the contract mall plug-in of the middle layer I is triggered to check the legality of the contract A, the checking method is to compare the source file value (sha 256 value) of the contract source file and sign the checking information of the contract source file, if the contract provided by the contract mall is marked as Safe, otherwise, the contract is marked as not detected NotDetected or unsafe NotSafe.
The back user organization Org2 finds that the organization Org1 applies for contract A voting, the Org2 checks signature information of a mall, if the contract is a Safe label, the Org2 can check contract service logic and then can carry out signature agreement, if the contract is a NotDetected label, the Org2 can independently check or apply for third party checking, and if the contract is a Notsafe user organization Org2 can refuse to participate in voting; after the vote passes, the contract A really starts to run in the channel; i.e., deployed on a channel of a federation chain.
When an organization Org3 wants to add the organization to endorse the contract A, the organization needs to apply for 'modification of key-level endorsement policy' to the intermediate layer I, namely, an update request of endorsement policy data of the intelligent contract is generated, and a voting unit deployed on the intermediate layer is triggered to respond to the update request to generate a voting event; and the channel endorsement organizations Org1 and Org2 find the application of 'modification of key-level endorsement strategy', respond to the voting event, sign and vote the application, and the strategy modification is effective after the voting rule is satisfied, thereby completing the update of the endorsement strategy data.
In the intelligent contract management method, an intelligent contract to be operated is obtained from a contract standardization unit deployed on an intermediate layer, a verification unit deployed on the intermediate layer is triggered to verify the intelligent contract according to a contract operation request sent by a first node in a coalition chain, a first verification result is generated, and label information of the first verification result is generated; when the marking information is detected and determined to be the preset marking information, obtaining voting results fed back by each second node in the alliance link channel, and completing deployment of the intelligent contract; the intelligent contract management method comprises the steps that an intermediate layer is added in a coalition chain, an intelligent contract is decoupled from a contract layer and an account layer, intelligent contract management operation is simplified, and deployment of the intelligent contract is completed through a contract standardization unit and a verification unit which are deployed on the intermediate layer; when an updating request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the updating request and generating a voting event; acquiring a response result of an endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result; the endorsement policy data of the intelligent contract is updated according to the voting result, and the endorsement node is not required to be modified by chain code upgrading operation, so that the management efficiency of the intelligent contract is improved.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in FIG. 5, there is provided an intelligent contract management apparatus comprising: a receiving module 502, a verification module 504, and a deployment module 506, wherein:
a receiving module 502, configured to receive a contract running request sent by a first node in a federation link channel.
The verification module 504 is configured to trigger a verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request by responding to the contract running request, obtain a first verification result, and generate label information of the first verification result; intelligent contracts are obtained through contract standardization units at the middle level of the federation chain.
And the deployment module 506 is configured to, when the label information is preset label information, obtain a voting result fed back by each second node in the federation chain channel, and deploy the intelligent contract on the federation chain channel.
In the intelligent contract management device, an intelligent contract to be operated is obtained from a contract standardization unit deployed on an intermediate layer, and a verification unit deployed on the intermediate layer is triggered to verify the intelligent contract according to a contract operation request sent by a first node in a coalition chain, so that a first verification result is generated and label information of the first verification result is generated; when the marking information is preset marking information, the voting results fed back by each second node in the alliance chain channel are obtained, the deployment of the intelligent contract is completed, namely, the intelligent contract is decoupled from the contract layer and the ledger layer by adding an intermediate layer in the alliance chain, the management operation of the intelligent contract is simplified, the deployment of the intelligent contract is completed on the basis of ensuring the standardization, the safety and the reliability of the intelligent contract through a contract standardization unit and a verification unit which are deployed on the intermediate layer, and the management efficiency of the intelligent contract is improved.
In one embodiment, an intelligent contract management apparatus is provided that includes, in addition to a receiving module 502, a verifying module 504, and a deploying module 506: trigger module, acquisition module and update module, wherein:
the triggering module is used for triggering the voting unit arranged on the middle layer to respond to the updating request and generate a voting event when the updating request of the endorsement policy data of the intelligent contract is detected;
the acquisition module is used for acquiring the response result of endorsement nodes participating in the endorsement of the intelligent contract to the voting event to obtain the voting event of the voting result;
and the updating module is used for finishing updating the endorsement policy data of the intelligent contract according to the voting result.
In one embodiment, the updating module is further configured to complete updating of endorsement policy data of the intelligent contract when the number of the preset voting results in the voting results is greater than the preset fraction of the number of endorsement nodes.
In an embodiment, the updating module is further configured to update the endorsement node of the endorsement policy data according to the third node when the number of the preset voting results in the voting results is greater than the preset fraction of the number of endorsement nodes, so as to complete updating of the endorsement policy data of the intelligent contract.
In an embodiment, the checking module 504 is further configured to, when the tagging information is not the preset tagging information, trigger a second node in the federation chain to check the validity of the intelligent contract, obtain a second checking result, and generate the tagging information of the second checking result.
In an embodiment, the deploying module 506 is further configured to, when the marking information of the second check result is the marking information, obtain a voting result fed back by each second node in the federation chain channel, and deploy the intelligent contract on the federation chain channel.
In one embodiment, the triggering module is further configured to trigger the verification unit disposed in the middle layer to generate the verification instruction.
In one embodiment, the verification module 504 is further configured to perform validity verification on a source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the verification instruction, and generate a first verification result.
In one embodiment, the contract execution request is sent by a first node in a federation chain channel; triggering a verification unit deployed in the middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained by a contract standardization unit at a middle layer of the alliance chain; when the marking information is preset marking information, obtaining voting results fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain through an account book layer; the intelligent contract management method is characterized in that an intermediate layer is added in a coalition chain, so that the intelligent contract is decoupled from a contract layer and an account book layer, the intelligent contract management operation is simplified, and the intelligent contract is deployed through a contract standardization unit and a verification unit which are deployed on the intermediate layer.
When detecting that endorsement policy data of the intelligent contract needs to be updated, triggering a voting unit deployed on the middle layer to respond to the update and generating a voting event; acquiring a response result of endorsement nodes participating in endorsement of the intelligent contract to the voting event to obtain a voting result, and updating endorsement strategy data of the intelligent contract according to the voting result; the endorsement node is not required to be modified by the operation of chain code upgrading, the update of the endorsement strategy is completed, and the management efficiency of the intelligent contract is improved.
For specific definition of the intelligent contract management apparatus, reference may be made to the definition of the intelligent contract management method in the foregoing, and details are not described here. The modules in the intelligent contract management apparatus may be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program when executed by a processor implements an intelligent contract management method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a contract operation request sent by a first node in a alliance chain channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit at a middle layer of the alliance chain;
and when the marking information is preset marking information, acquiring voting results fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when an updating request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the updating request and generating a voting event;
acquiring a response result of an endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result;
and finishing updating endorsement policy data of the intelligent contract according to the voting result.
In one embodiment, the processor when executing the computer program further performs the steps of:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the endorsement node number, updating endorsement policy data of the intelligent contract.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the number of endorsement nodes, updating the endorsement nodes of the endorsement policy data according to the third node to finish the updating of the endorsement policy data of the intelligent contract.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the marking information is not the preset marking information, triggering a second node in the alliance chain to check the validity of the intelligent contract, obtaining a second check result and generating the marking information of the second check result;
and when the marking information of the second check result is the marking information, executing the steps of obtaining the voting result fed back by each second node in the channel of the alliance chain and deploying the intelligent contract on the channel of the alliance chain.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
triggering a verification unit deployed in the middle layer to generate a verification instruction;
and carrying out validity check on the source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the check instruction to generate a first check result.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a contract operation request sent by a first node in a union link channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit at a middle layer of the alliance chain;
and when the marking information is preset marking information, acquiring voting results fed back by each second node in the channel of the alliance chain, and deploying the intelligent contract on the channel of the alliance chain.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when an updating request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the updating request and generating a voting event;
acquiring a response result of an endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result;
and finishing updating endorsement policy data of the intelligent contract according to the voting result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the endorsement node number, updating endorsement policy data of the intelligent contract.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and when the number of the preset voting results in the voting results is larger than the preset proportion number of the endorsement node number, updating the endorsement node of the endorsement policy data according to the third node to finish the updating of the endorsement policy data of the intelligent contract.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the marking information is not the preset marking information, triggering a second node in the alliance chain to check the validity of the intelligent contract, obtaining a second check result and generating the marking information of the second check result;
and when the marking information of the second check result is the marking information, executing the steps of obtaining the voting result fed back by each second node in the channel of the alliance chain and deploying the intelligent contract on the channel of the alliance chain.
In one embodiment, the computer program when executed by the processor further performs the steps of:
triggering a verification unit deployed in the middle layer to generate a verification instruction;
and carrying out validity check on the source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the check instruction to generate a first check result.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An intelligent contract management method, the method comprising:
receiving a contract operation request sent by a first node in a alliance chain channel;
triggering a verification unit deployed in a middle layer to verify an intelligent contract corresponding to the contract running request by responding to the contract running request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit of a middle layer of the alliance chain;
and when the marking information is preset marking information, obtaining voting results fed back by each second node in the alliance link channel, and deploying the intelligent contract on the alliance link channel.
2. The method of claim 1, further comprising:
when an updating request of endorsement policy data of the intelligent contract is detected, triggering a voting unit deployed on the middle layer to respond to the updating request and generating a voting event;
acquiring a response result of an endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain a voting result;
and finishing the updating of the endorsement policy data of the intelligent contract according to the voting result.
3. The method of claim 2, wherein said updating endorsement policy data for the intelligent contract in accordance with the voting results comprises:
and when the number of the preset voting results in the voting results is larger than the preset percentage of the endorsement node number, updating endorsement policy data of the intelligent contract.
4. The method according to claim 3, wherein the update request carries a newly added third node, and when the number of preset voting results in the voting results is greater than a preset fraction of the number of endorsement nodes, the updating of the endorsement policy data of the intelligent contract is completed, includes:
and when the number of the preset voting results in the voting results is larger than the preset proportion number of the endorsement strategy data, updating the endorsement nodes of the endorsement strategy data according to the third node to finish the updating of the endorsement strategy data of the intelligent contract.
5. The method of claim 1, further comprising:
when the marking information is not preset marking information, triggering a second node in the alliance chain to check the legality of the intelligent contract, obtaining a second check result and generating the marking information of the second check result;
and when the marking information of the second check result is the marking information, executing the steps of obtaining the voting results fed back by each second node in the alliance chain channel and deploying the intelligent contract on the alliance chain channel.
6. The method according to claim 1, wherein the triggering the verification unit deployed in the middle layer to verify the intelligent contract corresponding to the contract running request to obtain a first verification result includes:
triggering a verification unit deployed in the middle layer to generate a verification instruction;
and carrying out validity check on the source file value of the intelligent contract and a preset file value stored in the contract standardization unit according to the check instruction to generate a first check result.
7. An intelligent contract management apparatus, the apparatus comprising:
the receiving module is used for receiving a contract running request sent by a first node in a alliance chain channel;
the verification module is used for triggering a verification unit arranged in the middle layer to verify the intelligent contract corresponding to the contract operation request by responding to the contract operation request to obtain a first verification result and generate marking information of the first verification result; the intelligent contract is obtained through a contract standardization unit of a middle layer of the alliance chain;
and the deployment module is used for acquiring the voting result fed back by each second node in the channel of the alliance chain when the marking information is preset marking information, and deploying the intelligent contract on the channel of the alliance chain.
8. The apparatus of claim 7, further comprising:
the triggering module is used for triggering the voting unit deployed on the middle layer to respond to the updating request and generate a voting event when the updating request of the endorsement policy data of the intelligent contract is detected;
the acquisition module is used for acquiring the response result of the endorsement node participating in the endorsement of the intelligent contract to the voting event to obtain the voting event of the voting result;
and the updating module is used for finishing the updating of the endorsement policy data of the intelligent contract according to the voting result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202110550506.XA 2021-05-20 2021-05-20 Intelligent contract management method and device, computer equipment and storage medium Pending CN115378620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110550506.XA CN115378620A (en) 2021-05-20 2021-05-20 Intelligent contract management method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110550506.XA CN115378620A (en) 2021-05-20 2021-05-20 Intelligent contract management method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115378620A true CN115378620A (en) 2022-11-22

Family

ID=84059851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110550506.XA Pending CN115378620A (en) 2021-05-20 2021-05-20 Intelligent contract management method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115378620A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220393879A1 (en) * 2021-05-25 2022-12-08 Zhejiang University Decentralized mechanism for collaboratively governing multi-agent trade ecosystem

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474865A (en) * 2018-05-11 2019-11-19 北京轻信科技有限公司 Block chain user right system and implementation method
CN111291365A (en) * 2020-02-28 2020-06-16 上海哈世科技有限公司 Intelligent contract management method, device, equipment and storage medium for alliance chain system
CN111311255A (en) * 2020-01-19 2020-06-19 杭州云象网络技术有限公司 Intelligent contract formalization verification and error correction method based on prediction machine
US20200387500A1 (en) * 2019-06-05 2020-12-10 International Business Machines Corporation Flexible transaction validation
WO2021073452A1 (en) * 2019-10-15 2021-04-22 腾讯科技(深圳)有限公司 Blockchain network-based data processing method and device, electronic device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474865A (en) * 2018-05-11 2019-11-19 北京轻信科技有限公司 Block chain user right system and implementation method
US20200387500A1 (en) * 2019-06-05 2020-12-10 International Business Machines Corporation Flexible transaction validation
WO2021073452A1 (en) * 2019-10-15 2021-04-22 腾讯科技(深圳)有限公司 Blockchain network-based data processing method and device, electronic device and storage medium
CN111311255A (en) * 2020-01-19 2020-06-19 杭州云象网络技术有限公司 Intelligent contract formalization verification and error correction method based on prediction machine
CN111291365A (en) * 2020-02-28 2020-06-16 上海哈世科技有限公司 Intelligent contract management method, device, equipment and storage medium for alliance chain system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贺海武;延安;陈泽华: "基于区块链的智能合约技术与应用综述", 《计算机研究与发展》, 15 November 2018 (2018-11-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220393879A1 (en) * 2021-05-25 2022-12-08 Zhejiang University Decentralized mechanism for collaboratively governing multi-agent trade ecosystem

Similar Documents

Publication Publication Date Title
JP6698135B2 (en) Method and system for securing smart contracts within a blockchain
CN109981679B (en) Method and apparatus for performing transactions in a blockchain network
CN111191210B (en) Method and device for controlling data access authority, computer equipment and storage medium
CN110046841B (en) Logistics information tracing method and device based on block chain and electronic equipment
US9235840B2 (en) Electronic transaction notification system and method
KR20140039319A (en) Software run-time provenance
CN113468602A (en) Data inspection method, device and equipment
US20140208169A1 (en) Domain scripting language framework for service and system integration
US20140208294A1 (en) Domain scripting language framework for service and system integration
CN111090581A (en) Intelligent contract testing method and device, computer equipment and storage medium
CN108366132B (en) Method and device for managing service between servers, computer equipment and storage medium
CN112035350B (en) Test method and device for block chain system and computer equipment
CN111047327A (en) Intelligent contract execution method, device and equipment
CN115378620A (en) Intelligent contract management method and device, computer equipment and storage medium
CN109818965B (en) Personal identity verification device and method
Goyal et al. Sustainable E‐Infrastructure for Blockchain‐Based Voting System
CN111460256A (en) Webpage data crawling method and device, computer equipment and storage medium
CN111274612B (en) Practitioner trust verification method and system, witness service system and storage medium
CN116388982A (en) Equipment anonymization data association processing method, device and terminal
CN111666219B (en) Service function verification method and device, computer system and storage medium
CN112543194B (en) Mobile terminal login method and device, computer equipment and storage medium
CN114066277A (en) Business decision method, decision platform, readable medium and electronic device
CN112732676A (en) Data migration method, device, equipment and storage medium based on block chain
CN110633969A (en) Resource data transfer method, device, computer equipment and storage medium
CN112379918B (en) Code issuing method, device, computer equipment and storage medium

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