CN110874741A - Contract management method, block chain system and storage medium - Google Patents

Contract management method, block chain system and storage medium Download PDF

Info

Publication number
CN110874741A
CN110874741A CN201910959845.6A CN201910959845A CN110874741A CN 110874741 A CN110874741 A CN 110874741A CN 201910959845 A CN201910959845 A CN 201910959845A CN 110874741 A CN110874741 A CN 110874741A
Authority
CN
China
Prior art keywords
contract
stop
management
service
service contract
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.)
Granted
Application number
CN201910959845.6A
Other languages
Chinese (zh)
Other versions
CN110874741B (en
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Beijing Haiyi Tongzhan Information 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 Beijing Haiyi Tongzhan Information Technology Co Ltd filed Critical Beijing Haiyi Tongzhan Information Technology Co Ltd
Priority to CN201910959845.6A priority Critical patent/CN110874741B/en
Publication of CN110874741A publication Critical patent/CN110874741A/en
Application granted granted Critical
Publication of CN110874741B publication Critical patent/CN110874741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The embodiment of the invention provides a contract management method, a block chain system and a storage medium, wherein a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the block chain system, and the start-stop service contract is a peer contract of an intelligent contract, and the method comprises the following steps: when a start-stop management instruction is received through a start-stop management contract, controlling the running state of a start-stop service contract through the start-stop management contract based on the start-stop management instruction; when a service request aiming at a start-stop service contract is received through a start-stop control contract, inquiring the running state of the start-stop service contract from a start-stop management contract through the start-stop control contract; and when the running state of the start-stop service contract is not stopped, rejecting the service request through the start-stop control contract.

Description

Contract management method, block chain system and storage medium
Technical Field
The present invention relates to communications technologies, and in particular, to a contract management method, a blockchain system, and a storage medium.
Background
An intelligent contract is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible.
Intelligent contracts are a typical technical feature of current blockchain systems, extending blockchains from the original cryptocurrency to a wider business area and application scenario. The intelligent contract brings rich and flexible block chain service functions, and simultaneously introduces a larger security attack surface, so that the security maintenance of the intelligent contract is particularly important.
At present, modes such as intelligent contract examination, intelligent contract destruction and intelligent contract upgrading can be used for realizing the safety maintenance of an intelligent contract, however, once the intelligent contract is deployed, the intelligent contract is always in an operating state and cannot be stopped or started, the flexibility is poor, and the safety maintenance of the intelligent contract is in the operating process of the intelligent contract and is still difficult to avoid loss caused by the intelligent contract.
Disclosure of Invention
Embodiments of the present invention provide a contract management method, a block chain system, and a storage medium, which implement start-stop management of a start-stop service contract equivalent to an intelligent contract by a start-stop management contract and a start-stop control contract, and improve flexibility of contract management, so that the safe maintenance of the contract can be implemented more safely.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a contract management method, which is applied to a blockchain system, where a start-stop management contract, a start-stop control contract, and a start-stop service contract are deployed on the blockchain system, where the start-stop service contract is a peer-to-peer contract of an intelligent contract, and the method includes:
when a start-stop management instruction is received through the start-stop management contract, controlling the running state of the start-stop service contract through the start-stop management contract based on the start-stop management instruction;
when a service request aiming at the start-stop service contract is received through the start-stop control contract, the running state of the start-stop service contract is inquired from the start-stop management contract through the start-stop control contract;
and when the running state of the start-stop service contract is stop, rejecting the service request through the start-stop control contract.
In the contract management method, after querying the running state of the start-stop service contract through the start-stop management contract, the method further includes:
and when the running state of the start-stop service contract is running, calling the start-stop service contract to execute the service request through the start-stop control contract.
In the contract management method, the invoking the start-stop service contract by the start-stop control contract to execute the service request includes:
forwarding the service request to the start-stop service contract through the start-stop control contract;
and executing the service request through the start-stop service contract.
In the contract management method, the blockchain system further includes a contract switching tool, and before the start-stop management contract is received through the start-stop management contract and the start-stop management instruction is used to control the running state of the start-stop service contract, the method further includes:
and converting the intelligent contract into a unique start-stop service contract which supports the start-stop service contract called by the start-stop control contract through the contract conversion tool.
In the contract management method, the blockchain system further includes a start-stop management tool, and when a start-stop management instruction is received by the start-stop management contract, before controlling an operating state of the start-stop service contract based on the start-stop management instruction by the start-stop management contract, the method further includes:
and receiving the start-stop management instruction through the start-stop management tool, and transmitting the start-stop management instruction to the start-stop management contract.
In the contract management method, the controlling, by the start-stop management contract, an operation state of the start-stop service contract based on the start-stop management instruction includes:
comparing a user signature in the start-stop management instruction with a preset contract management strategy through the start-stop management contract;
and when the user signature meets the contract management strategy, executing the start-stop operation indicated by the start-stop management instruction on the start-stop service contract through the start-stop management contract to complete the control of the running state of the start-stop service contract.
In a second aspect, an embodiment of the present invention provides a blockchain system, where a start-stop management contract, a start-stop control contract, and a start-stop service contract are deployed on the blockchain system, where the start-stop service contract is a peer-to-peer contract of an intelligent contract,
the start-stop management contract is used for controlling the running state of the start-stop service contract based on the start-stop management instruction when the start-stop management instruction is received;
the start-stop control contract is used for inquiring the running state of the start-stop service contract from the start-stop management contract when receiving a service request aiming at the start-stop service contract; and when the running state of the start-stop service contract is stop, rejecting the service request.
In the above block chain system, the start-stop control contract is further configured to invoke the start-stop service contract to execute the service request when the operation state of the start-stop service contract is running.
In the above block chain system, the start-stop control contract is specifically configured to forward the service request to the start-stop service contract;
the start-stop service contract is specifically used for executing the service request.
In the above blockchain system, the blockchain system further comprises a contract transformation tool,
and the contract conversion tool is used for converting the intelligent contract into a unique start-stop service contract which supports the start-stop service contract called by the start-stop control contract.
In the above blockchain system, the blockchain system further includes a start-stop management tool,
and the start-stop management tool is used for receiving the start-stop management instruction and transmitting the start-stop management instruction to the start-stop management contract.
In the block chain system, the start-stop management contract is specifically used for comparing a user signature in the start-stop management instruction with a preset contract management policy; and when the user signature meets the preset contract management strategy, executing start-stop operation indicated by the start-stop management instruction on the start-stop service contract to complete control on the running state of the start-stop service contract.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the contract management method described above.
The embodiment of the invention provides a contract management method, which is applied to a block chain system, wherein a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the block chain system, and the start-stop service contract is a peer-to-peer contract of an intelligent contract, and the method comprises the following steps: when a start-stop management instruction is received through a start-stop management contract, controlling the running state of a start-stop service contract through the start-stop management contract based on the start-stop management instruction; when a service request aiming at a start-stop service contract is received through a start-stop control contract, inquiring the running state of the start-stop service contract from a start-stop management contract through the start-stop control contract; and when the running state of the start-stop service contract is not stopped, rejecting the service request through the start-stop control contract. According to the technical scheme of the embodiment of the invention, the start-stop management of the start-stop business contract equivalent to the intelligent contract is realized through the start-stop management contract and the start-stop control contract, and the flexibility of contract management is improved, so that the contract is controlled to stop when the conditions such as contract safety maintenance are met, and the safety of contract safety maintenance is ensured.
Drawings
Fig. 1 is a schematic diagram of a block chain system according to an embodiment of the present invention;
fig. 2 is a first schematic flowchart of a contract management method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a contract management method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a block chain system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before further detailed description of the embodiments of the present invention, terms and expressions referring to a blockchain system in the prior art are explained in detail.
A Block (Block), which is a data structure for recording the updated account book data of the transaction in a period of time, is marked with a timestamp and a unique mark (e.g. a digital fingerprint) of a previous Block, and the Block is added to the end of the Block chain to become a new Block after being verified by the nodes in the Block chain network.
A Blockchain (Blockchain) is a storage structure for encrypted, chained transactions formed of blocks.
A Blockchain Network (Blockchain Network) is a set of a series of nodes that incorporate a new block into a Blockchain in a consensus manner, i.e., a set of Blockchain nodes. The type of blockchain network is flexible and may be any of a public chain, a private chain, or a federation chain, for example.
Consensus (Consensus), a process in a blockchain network, is used to agree on the transaction results among the nodes involved, and the mechanisms for achieving Consensus include Proof of workload (PoW), Proof of rights and interests (PoS, Proof of approval of stamp), Proof of share authorization (DPoS), Proof of Elapsed Time (PoET, Proof of Elapsed Time), and so on.
The account book (Legger) is the sum of data recorded by taking an account as a dimension in the block chain network, and comprises elements such as account book data, an account book state, account book state certification and a block index.
The ledger data, the actual block data storage, i.e. the record of a series of ordered and non-falsifiable transactions recorded in the block chain, may be expressed in the form of a file system, and the update of the data in the account/account is realized when an intelligent contract called in the transaction is executed.
The ledger state, also referred to as state data, i.e. the state of the ledger data, may be in the form of key-value pairs in a database, where the real-time ledger state is used to represent the latest record of key-value pairs updated by the agreed-upon exchange and the historical ledger state is used to represent the historical record of key-value pairs.
Intelligent Contracts (Smart Contracts), also called chain codes (chainodes), are programs that trigger execution of a blockchain network in a blockchain system according to conditions, and are used for operating an account book through query, addition and modification so as to realize query or update of the account book. In the life cycle management of the intelligent contracts deployed in the block chain system, once the intelligent contracts are deployed and operated, the intelligent contracts cannot be controlled to stop or start until the intelligent contracts are destroyed.
The embodiment of the invention provides a contract management method which is applied to a block chain system. Fig. 1 is a relationship diagram of a block chain system according to an embodiment of the present invention. As shown in fig. 1, the blockchain system includes a blockchain network, and the blockchain network includes blockchain nodes, and a start-stop management contract, a start-stop control contract, and a start-stop service contract are deployed in the blockchain virtual machine at the blockchain node, and in addition, the blockchain system further includes related management tools. The block chain network can interact with external application, so that the calling of a service contract capable of being started and stopped is realized aiming at a service request sent by the external application.
It should be noted that, in the embodiment of the present invention, the start-stop service contract is a peer-to-peer contract of an intelligent contract, and the functions that are finally realized by the both are peer-to-peer, but the start-stop service contract may be controlled by start-stop, and is associated with the start-stop management contract and the start-stop control contract, and only receives the service request forwarded by the start-stop control contract, that is, only the call of the start-stop service contract may be realized by the start-stop control contract.
It should be noted that, in the prior art, for an intelligent contract deployed in a blockchain network, intelligent contract review is a currently commonly used intelligent contract security risk discovery and prevention method. In addition, the intelligent contract upgrading and intelligent contract destroying functions supported by the built-in parts of the blockchain system or realized by other modes can also be used as a coping method for the safety problem of the intelligent contract. The intelligent contract examination is mainly used for discovering and preventing potential security risks, security vulnerabilities are usually analyzed based on existing experience, digital assets and service data in the intelligent contract can be inaccessible due to destruction of the intelligent contract, related asset transfer and data migration need to be carried out in advance, workload is large, the influence range is large, the security vulnerabilities can be repaired through updating and replacing during upgrading of the intelligent contract, security accidents are avoided, and the processing period is long. Therefore, the invention provides the start-stop management method of the start-stop service contract equivalent to the intelligent contract, so that the contract repair and other maintenance schemes can be executed more safely under the condition of needing safety maintenance.
It should be noted that, in the embodiment of the present invention, as shown in fig. 1, the start-stop management contract includes a preset contract management policy and a contract service state, where the preset contract management policy may be a management policy of a start-stop service contract commonly approved by multiple users, and the contract service state may be an operation state of the start-stop service contract, and the start-stop management contract further includes a construction method, a management method, and an inquiry method, and based on these methods, the start-stop management contract may implement a specific function. The method for constructing the start-stop management contract is to initialize a preset contract management strategy, the query method can query the running state of the start-stop service contract, and the management method is executed only when the user signature in the received start-stop management instruction meets the preset contract management strategy.
It should be noted that, in the embodiment of the present invention, as shown in fig. 1, the start/stop control contract includes a management contract address, that is, an address of the start/stop management contract, and further includes a construction method and an agent method. The proxy method of the start-stop control contract is to judge whether to call the start-stop service contract to execute the service request according to the running state of the start-stop service contract and forward the service request to the start-stop service contract when the call is determined, and the construction method is to construct or initialize the related information.
It should be noted that, in the embodiment of the present invention, as shown in fig. 1, the start-stop service contract includes a control contract address, that is, an address of the start-stop control contract, and further includes a construction method and a service method. The service method of the start-stop service contract is to only receive the service request forwarded by the start-stop control contract for execution, and the construction method is to construct or initialize the related information.
It should be noted that, in the embodiment of the present invention, as shown in fig. 1, an external application may interact with a blockchain system, and the external application may send a service request to invoke a startable service contract to execute the service request, so as to implement a required service. The embodiment of the present invention is not limited to the specific content of the service provided by the start-stop service contract, the source of the received service request, and the service request sent by the external application.
The following describes in detail the contract management method provided by the embodiment of the present invention based on the relationship diagram of the above-mentioned blockchain system.
Fig. 2 is a first schematic flowchart of a contract management method according to an embodiment of the present invention. As shown in fig. 2, the method mainly comprises the following steps:
s201, when a start-stop management instruction is received through a start-stop management contract, controlling the running state of a start-stop service contract through the start-stop management contract based on the start-stop management instruction.
In the embodiment of the invention, when the start-stop management contract receives the start-stop management instruction, the running state of the start-stop service contract is controlled based on the gas management instruction.
It should be noted that, in the embodiment of the present invention, the start-stop management contract is deployed in the blockchain network, and is used in a blockchain virtual machine of a blockchain node to manage and maintain the running state of the start-stop service contract. That is to say, the start-stop management contract can realize the start-stop control of the start-stop service contract, and the start-stop service contract is the peer contract of the intelligent contract, so that the start-stop control of the intelligent contract is actually realized.
Specifically, in the embodiment of the present invention, the controlling, by the start-stop management contract, the running state of the start-stop service contract based on the start-stop management instruction includes: comparing a preset contract management strategy with a user signature in a start-stop management instruction through a start-stop management contract; and when the user signature meets the preset contract management strategy, executing the start-stop operation indicated by the start-stop management instruction on the start-stop service contract through the start-stop management contract, and finishing the control on the running state of the start-stop service contract.
It should be noted that, in the embodiment of the present invention, the start-stop management contract includes a preset contract management policy, and the start-stop management instruction includes a user signature of a user that sends the start-stop management instruction. And the start-stop management contract can execute the start-stop operation indicated by the start-stop management instruction only when the user signature meets the preset contract management strategy initialized in the start-stop management contract after receiving the start-stop management instruction.
It can be understood that, in the embodiment of the present invention, for a start-stop service contract, actually, a multi-user side may be configured to perform start-stop management, and accordingly, a user signature of a user side that can perform management may be defined in a preset contract management policy, so that after the start-stop management contract receives a start-stop management instruction, the validity of the user signature is determined by using the preset contract management policy, so as to perform a subsequent start-stop operation, thereby implementing control on an operation state of the start-stop service contract.
It should be noted that, in the embodiment of the present invention, the start-stop management instruction is a management instruction sent by the user according to the relevant situation of the current start-stop service contract. For example, when a user analyzes that a start-stop service contract has a security vulnerability based on existing experience, the start-stop management instruction can be sent to instruct the start-stop management contract to perform stop operation aiming at the start-stop service contract, so that the security vulnerability can be repaired after the start-stop service contract stops running, loss caused by security problems can be avoided or controlled in time, correspondingly, after the repair of the security vulnerability of the start-stop service contract is completed, the user can send the start-stop management instruction again to instruct the start-stop management contract to perform start operation aiming at the start-stop service contract, and thus after the start-stop service contract runs again, a service request of external application is processed.
It should be noted that, in the embodiment of the present invention, the start-stop management contract includes, in addition to the preset contract management policy, a contract service state in which a service contract can be started and stopped, that is, an operation state of the service contract can be started and stopped.
It should be noted that, in an embodiment of the present invention, the management tool shown in fig. 1 may include a start-stop management tool, and when a start-stop management instruction is received by a start-stop management contract, before controlling an operation state of a start-stop service contract based on the start-stop management instruction by the start-stop management contract, the method further includes: and receiving a start-stop management instruction through the start-stop management tool, and transmitting the start-stop management instruction to a start-stop management contract.
It can be understood that, in the embodiment of the present invention, the start-stop management tool is actually an operation interface for the user side, and the start-stop management tool can receive the start-stop management instruction sent by the user side, so as to further transmit the start-stop management contract, and the start-stop management contract can manage and maintain the operation state of the start-stop service contract based on the start-stop management instruction.
It should be noted that, in an embodiment of the present invention, the management tool shown in fig. 1 may include a contract conversion tool, and when a start-stop management instruction is received by the start-stop management contract, before controlling, by the start-stop management contract, an operation state of a start-stop service contract based on the start-stop management instruction, the method further includes: and converting the intelligent contract into a sole start-stop service contract which supports the call of the start-stop control contract through a contract conversion tool.
It should be noted that, in the embodiment of the present invention, in order to ensure security and reject an illegal service request, the contract conversion tool converts the intelligent contract into a service contract that can be started and stopped. The start-stop service contract is actually a peer-to-peer contract of an intelligent contract deployed in a block chain network in the prior art, and the functions of the start-stop service contract and the intelligent contract are the same, but only a service request forwarded by the start-stop control contract is allowed to be received, namely only calling through the start-stop control contract is supported.
S202, when a service request aiming at a start-stop service contract is received through a start-stop control contract, the running state of the start-stop service contract is inquired from a start-stop management contract through the start-stop control contract.
In the embodiment of the invention, when the start-stop control contract receives the service request aiming at the start-stop service contract, the operation state of the start-stop service contract is inquired from the start-stop management contract through the start-stop control contract.
It should be noted that, in the embodiment of the present invention, the start-stop control contract is used to determine whether to grant access to the start-stop service contract according to the running state of the start-stop contract. The start-stop control contract comprises an address of a start-stop management contract, namely a management contract address, so that the start-stop control contract can use the address to inquire the running state of a start-stop service contract from the start-stop management contract.
And S203, when the running state of the start-stop service contract is stop, rejecting the service request through the start-stop control contract.
In the embodiment of the invention, when the running state of the start-stop service contract is stop, the start-stop control contract rejects the service request.
It can be understood that, in the embodiment of the present invention, when the start-stop control contract inquires that the operation state of the start-stop service contract is not stopped, the received service request may be rejected, that is, the start-stop control contract does not invoke the start-stop service contract to execute the service request, and in addition, a message representing rejection of the service request may be fed back to a sender of the service request and an external application.
It can be understood that, in the embodiment of the present invention, the start-stop service contract is a peer-to-peer contract of an intelligent contract, and is associated with the start-stop management contract and the start-stop control contract, so that a contract start-stop management mechanism is provided, and contract start-stop management can be flexibly performed, so that the safety maintenance of the contract can be realized in a medium scene in the contract stop process, and the safety of the contract maintenance is ensured.
Fig. 3 is a schematic flowchart of a contract management method according to an embodiment of the present invention. As shown in fig. 3, in the embodiment of the present invention, after step S202, step S301 may be further included, and the specific steps are as follows:
s301, when the running state of the start-stop service contract is running, calling the start-stop service contract to execute the service request through the start-stop control contract.
In the embodiment of the invention, when the running state of the start-stop service contract is running, the start-stop service contract is called by the start-stop control contract to execute the service request.
It can be understood that, in the embodiment of the present invention, when it is found that the operation state of the start-stop service contract is not running, the start-stop service contract may be invoked to execute the received service request, so as to provide the corresponding service.
Specifically, in the embodiment of the present invention, invoking a start-stop service contract to execute a service request through a start-stop control contract includes: forwarding the service request to a start-stop service contract through a start-stop control contract; and executing the service request through the service contract capable of being started and stopped.
It should be noted that, in the embodiment of the present invention, the start-stop service contract only receives the service request sent by the start-stop control contract, so as to execute the service request, and therefore, the start-stop control contract is actually used as an upper-layer contract of the start-stop service contract, which ensures the security and the validity of the start-stop service contract for executing the service request.
It should be noted that, in the embodiment of the present invention, as shown in fig. 1, the related method in each contract, which is actually the processing manner performed by each contract in the running process, is the basic implementation method of the contract. The details of the related methods may be included in the detailed description of the embodiments above.
The embodiment of the invention provides a contract management method, which is applied to a block chain system, wherein a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the block chain system, and the start-stop service contract is a peer-to-peer contract of an intelligent contract, and the method comprises the following steps: when a start-stop management instruction is received through a start-stop management contract, controlling the running state of a start-stop service contract through the start-stop management contract based on the start-stop management instruction; when a service request aiming at a start-stop service contract is received through a start-stop control contract, inquiring the running state of the start-stop service contract from a start-stop management contract through the start-stop control contract; and when the running state of the start-stop service contract is not stopped, rejecting the service request through the start-stop control contract.
The embodiment of the invention provides a block chain system. Fig. 4 is a schematic structural diagram of a block chain system according to an embodiment of the present invention. As shown in fig. 4, a start-stop management contract 401, a start-stop control contract 402, and a start-stop service contract 403 are deployed on the blockchain system, the start-stop service contract 403 is a peer-to-peer contract of an intelligent contract,
the start-stop management contract 401 is configured to control an operation state of the start-stop service contract 403 based on a start-stop management instruction when the start-stop management instruction is received;
the start-stop control contract 402 is configured to, when a service request for the start-stop service contract 403 is received, query an operation state of the start-stop service contract 403 from a start-stop management contract 401; and when the running state of the start-stop service contract 403 is stop, rejecting the service request.
Optionally, the start-stop control contract 402 is further configured to invoke the start-stop service contract 403 to execute the service request when the running state of the start-stop service contract 403 is running.
Optionally, the start-stop control contract 402 is specifically configured to forward the service request to the start-stop service contract 403;
the start-stop service contract 403 is specifically configured to execute the service request.
Optionally, the blockchain system further includes a contract transformation tool 404,
the contract conversion tool 404 is configured to convert the intelligent contract into a unique start-stop-capable service contract 403 invoked by the start-stop control contract 402.
Optionally, the blockchain system further comprises a start-stop management tool 405,
the start-stop management tool 405 is configured to receive the start-stop management instruction, and transmit the start-stop management instruction to the start-stop management contract 401.
Optionally, the start-stop management contract 401 is specifically configured to compare a user signature in the start-stop management instruction with a preset contract management policy; and when the user signature meets the preset contract management policy, executing the start-stop operation indicated by the start-stop management instruction on the start-stop service contract 403, and finishing the control of the running state of the start-stop service contract 403.
The embodiment of the invention provides a block chain system, wherein a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the block chain system, the start-stop service contract is a peer contract of an intelligent contract, and when a start-stop management instruction is received by the start-stop management contract, the operation state of the start-stop service contract is controlled by the start-stop management contract based on the start-stop management instruction; when a service request aiming at a start-stop service contract is received through a start-stop control contract, inquiring the running state of the start-stop service contract from a start-stop management contract through the start-stop control contract; and when the running state of the start-stop service contract is not stopped, rejecting the service request through the start-stop control contract.
Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the contract management method described above. The computer-readable storage medium may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile memory (non-volatile) such as a Read-Only memory (ROM), a flash memory (flash memory), a Hard Disk (HDD) or a Solid-State Drive (SSD); or may be a respective device, such as a mobile phone, computer, tablet device, personal digital assistant, etc., that includes one or any combination of the above-mentioned memories.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable signal processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable signal processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable signal processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable signal processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In summary, the embodiments of the present invention have the following beneficial effects:
the start-stop management of the start-stop business contract equivalent to the intelligent contract is realized through the start-stop management contract and the start-stop control contract, and the flexibility of contract management is improved, so that when the conditions such as contract safety maintenance are met, the contract is controlled to stop, and the safety of contract safety maintenance is ensured.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims (13)

1. A contract management method is applied to a blockchain system, wherein a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the blockchain system, and the start-stop service contract is a peer-to-peer contract of an intelligent contract, and the method comprises the following steps:
when a start-stop management instruction is received through the start-stop management contract, controlling the running state of the start-stop service contract through the start-stop management contract based on the start-stop management instruction;
when a service request aiming at the start-stop service contract is received through the start-stop control contract, the running state of the start-stop service contract is inquired from the start-stop management contract through the start-stop control contract;
and when the running state of the start-stop service contract is stop, rejecting the service request through the start-stop control contract.
2. The method of claim 1, wherein after querying the operational status of the start-stop capable service contract via the start-stop management contract, the method further comprises:
and when the running state of the start-stop service contract is running, calling the start-stop service contract to execute the service request through the start-stop control contract.
3. The method of claim 2, wherein invoking the startable service contract by the start-stop control contract to execute the service request comprises:
forwarding the service request to the start-stop service contract through the start-stop control contract;
and executing the service request through the start-stop service contract.
4. The method of claim 1, wherein the blockchain system further comprises a contract switching tool, and wherein when a start-stop management instruction is received by the start-stop management contract, before controlling an operating state of the start-stop service contract based on the start-stop management instruction by the start-stop management contract, the method further comprises:
and converting the intelligent contract into a unique start-stop service contract which supports the start-stop service contract called by the start-stop control contract through the contract conversion tool.
5. The method of claim 1, wherein the blockchain system further comprises a start-stop management tool, and wherein when a start-stop management instruction is received by the start-stop management contract, before controlling the operating state of the start-stop service contract based on the start-stop management instruction by the start-stop management contract, the method further comprises:
and receiving the start-stop management instruction through the start-stop management tool, and transmitting the start-stop management instruction to the start-stop management contract.
6. The method of claim 1, wherein the controlling, by the start-stop management contract and based on the start-stop management instruction, the operating state of the start-stop service contract comprises:
comparing a user signature in the start-stop management instruction with a preset contract management strategy through the start-stop management contract;
and when the user signature meets the preset contract management strategy, executing start-stop operation indicated by the start-stop management instruction on the start-stop service contract through the start-stop management contract to complete control of the running state of the start-stop service contract.
7. A blockchain system is characterized in that a start-stop management contract, a start-stop control contract and a start-stop service contract are deployed on the blockchain system, the start-stop service contract is a peer-to-peer contract of an intelligent contract,
the start-stop management contract is used for controlling the running state of the start-stop service contract based on the start-stop management instruction when the start-stop management instruction is received;
the start-stop control contract is used for inquiring the running state of the start-stop service contract from the start-stop management contract when receiving a service request aiming at the start-stop service contract; and when the running state of the start-stop service contract is stop, rejecting the service request.
8. The block chain system of claim 7,
the start-stop control contract is also used for calling the start-stop service contract to execute the service request when the running state of the start-stop service contract is running.
9. The block chain system of claim 8,
the start-stop control contract is specifically used for forwarding the service request to the start-stop service contract;
the start-stop service contract is specifically used for executing the service request.
10. The blockchain system of claim 7, further comprising a contract transformation tool,
and the contract conversion tool is used for converting the intelligent contract into a unique start-stop service contract which supports the start-stop service contract called by the start-stop control contract.
11. The blockchain system of claim 7, further comprising a start stop management tool,
and the start-stop management tool is used for receiving the start-stop management instruction and transmitting the start-stop management instruction to the start-stop management contract.
12. The block chain system of claim 7,
the start-stop management contract is specifically used for comparing a user signature in the start-stop management instruction with a preset contract management strategy; and when the user signature meets the preset contract management strategy, executing start-stop operation indicated by the start-stop management instruction on the start-stop service contract to complete control on the running state of the start-stop service contract.
13. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the contract management method of any of claims 1-6.
CN201910959845.6A 2019-10-10 2019-10-10 Contract management method, block chain system and storage medium Active CN110874741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910959845.6A CN110874741B (en) 2019-10-10 2019-10-10 Contract management method, block chain system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910959845.6A CN110874741B (en) 2019-10-10 2019-10-10 Contract management method, block chain system and storage medium

Publications (2)

Publication Number Publication Date
CN110874741A true CN110874741A (en) 2020-03-10
CN110874741B CN110874741B (en) 2021-03-30

Family

ID=69717794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910959845.6A Active CN110874741B (en) 2019-10-10 2019-10-10 Contract management method, block chain system and storage medium

Country Status (1)

Country Link
CN (1) CN110874741B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381648A (en) * 2020-11-11 2021-02-19 杭州甘道智能科技有限公司 Module intelligent start-stop control method based on block chain
CN113360883A (en) * 2021-06-10 2021-09-07 网易(杭州)网络有限公司 Intelligent contract processing method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804209A (en) * 2017-05-05 2018-11-13 中思博安科技(北京)有限公司 The dispatching method and device of intelligent contract
CN109522729A (en) * 2018-11-02 2019-03-26 中链科技有限公司 Intelligent contract Status Change method and device
CN110096338A (en) * 2019-05-10 2019-08-06 百度在线网络技术(北京)有限公司 Intelligent contract executes method, apparatus, equipment and medium
CN110138592A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of management method and system of intelligence contract

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804209A (en) * 2017-05-05 2018-11-13 中思博安科技(北京)有限公司 The dispatching method and device of intelligent contract
CN109522729A (en) * 2018-11-02 2019-03-26 中链科技有限公司 Intelligent contract Status Change method and device
CN110138592A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of management method and system of intelligence contract
CN110096338A (en) * 2019-05-10 2019-08-06 百度在线网络技术(北京)有限公司 Intelligent contract executes method, apparatus, equipment and medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381648A (en) * 2020-11-11 2021-02-19 杭州甘道智能科技有限公司 Module intelligent start-stop control method based on block chain
CN112381648B (en) * 2020-11-11 2024-04-05 杭州甘道智能科技有限公司 Block chain-based module intelligent start-stop control method
CN113360883A (en) * 2021-06-10 2021-09-07 网易(杭州)网络有限公司 Intelligent contract processing method and device, computer equipment and storage medium
CN113360883B (en) * 2021-06-10 2023-07-11 网易(杭州)网络有限公司 Intelligent contract processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110874741B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US20240048376A1 (en) Methods and systems implemented in a network architecture with nodes capable of performing message-based transactions
CN110580414B (en) Private data query method and device based on block chain account
CN111543031B (en) Method and control system for controlling and/or monitoring a device
CN110933163B (en) Block chain contract deployment method, device, equipment and storage medium
JP6556706B2 (en) Systems and methods for encryption key management, collaboration, and distribution
CN109670801B (en) Digital encryption money transfer method for block chain
US11240246B2 (en) Secure confirmation exchange for offline industrial machine
CN110874741B (en) Contract management method, block chain system and storage medium
Zhang et al. Exploring the redaction mechanisms of mutable blockchains: A comprehensive survey
CN109995737B (en) Decentralized digital certificate management method and device, node and system
CN111798233A (en) Linking of tokens
US20220123924A1 (en) Method for providing a state channel
CN109388923B (en) Program execution method and device
CN115865537B (en) Privacy computing method based on centralized system management, electronic equipment and storage medium
CN114679473B (en) Financial account management system and method based on distributed digital identity
CN115941171A (en) Network key exchange negotiation method, device and network equipment
WO2013111532A1 (en) Administration system, administration method, and program
CN107547251B (en) Equipment management method, device and system
CN112199694A (en) Standardized bill processing method and device, electronic device and storage medium
JP2008131057A (en) Device and method for generating encryption protocol, and program
WO2024007855A1 (en) Data processing method and device based on blockchain, and readable storage medium
WO2023117920A1 (en) Chemical product passport for recyclate content data and/or bio-based content data
CN112906069A (en) Trusted computing method for block chain registration management process
CN115222396A (en) 2/3 multi-sign method for managing block chain intelligent contract authority
CN111125242A (en) Transformation across organizational processes for performing via blockchain

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100176 601, 6th floor, building 2, No. 18, Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing

Patentee after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 100176 601, 6th floor, building 2, No. 18, Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing

Patentee before: BEIJING HAIYI TONGZHAN INFORMATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder