CN110602133A - Intelligent contract processing method, block chain management device and storage medium - Google Patents

Intelligent contract processing method, block chain management device and storage medium Download PDF

Info

Publication number
CN110602133A
CN110602133A CN201910908305.5A CN201910908305A CN110602133A CN 110602133 A CN110602133 A CN 110602133A CN 201910908305 A CN201910908305 A CN 201910908305A CN 110602133 A CN110602133 A CN 110602133A
Authority
CN
China
Prior art keywords
intelligent contract
trial
target
block chain
node
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
CN201910908305.5A
Other languages
Chinese (zh)
Other versions
CN110602133B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910908305.5A priority Critical patent/CN110602133B/en
Publication of CN110602133A publication Critical patent/CN110602133A/en
Application granted granted Critical
Publication of CN110602133B publication Critical patent/CN110602133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

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

Abstract

The embodiment of the invention discloses an intelligent contract processing method, block chain management equipment and a storage medium. The intelligent contract processing method comprises the following steps: the block chain management equipment acquires a target intelligent contract processing request triggered by a target user; when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request; the block chain management device sends a target intelligent contract trial instruction to a first node, the first node is one trial node of a plurality of trial nodes with trial block chains running in a block chain system, and the first node is used for processing the target intelligent contract processing request by using the trial block chains according to the target intelligent contract trial instruction. In this way, the user can request the blockchain management device to create an intelligent contract, deploy the intelligent contract, call the intelligent contract and view the created intelligent contract in the blockchain system by sending the target intelligent contract processing request, and the processing mode of the intelligent contract is richer.

Description

Intelligent contract processing method, block chain management device and storage medium
Technical Field
The invention relates to the technical field of information security, in particular to an intelligent contract processing method, a block chain management device and a storage medium.
Background
Smart contracts, as a computer protocol for propagating, verifying or executing contracts in an informational manner, can allow trusted transactions to be conducted without a third party and that are not traceable and at the same time are irreversible. However, in the related art, a management platform of the intelligent contract usually provides some universal contract templates, and a user can only modify the intelligent contract based on the universal templates, and the intelligent contract is processed in a single way.
Disclosure of Invention
The embodiment of the invention provides an intelligent contract processing method, a block chain management device and a storage medium.
In one aspect, an embodiment of the present invention provides an intelligent contract processing method, including:
the block chain management equipment acquires a target intelligent contract processing request triggered by a target user;
when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request;
the block chain management equipment sends the target intelligent contract trial instruction to a first node, the first node is one trial node in a plurality of trial nodes of a trial block chain running in a block chain system, and the first node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the generating, by the blockchain management device, a target intelligent contract trial instruction according to the target intelligent contract processing request includes:
when the request type of the target intelligent contract processing request is a calling contract type, the block chain management equipment acquires the trigger frequency of the target user for triggering the intelligent contract processing request of the calling contract type;
when the trigger frequency is less than or equal to a preset frequency, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the generating, by the blockchain management device, a target intelligent contract trial instruction according to the target intelligent contract processing request includes:
when the request type of the target intelligent contract processing request is a contract creation type, the block chain management equipment acquires the accumulated triggering times of triggering the intelligent contract processing request of the contract creation type by the target user;
when the accumulated triggering times are less than or equal to preset times, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the establishing a secure channel between the blockchain management device and the first node, and the sending the target intelligent contract trial instruction to the first node by the blockchain management device includes:
and the block chain management equipment sends the target intelligent contract trial instruction to the first node through the secure channel.
In some embodiments, the intelligent contract processing method comprises:
the block chain management equipment acquires login information of a target user and judges whether the user type of the target user is a trial type or not according to the login information;
and when the user type of the target user is a trial type, the block chain management equipment sends out an intelligent contract trial prompt.
In some embodiments, the intelligent contract processing method further comprises:
the block chain management device stores a first intelligent contract processing request with a request type triggered by the target user as a contract creation type, wherein the first intelligent contract processing request is used for requesting to create a first intelligent contract;
when the user type of the target user is changed into a formal user and the target user has a private block chain, the block chain management device generates a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sends the private intelligent contract creation instruction to a third node, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction.
In some embodiments, the generating, by the blockchain management device, private intelligent contract creation instructions according to the saved first intelligent contract processing request includes:
the block chain management equipment acquires a first state of a first intelligent contract from a trial node;
the block chain management device generates a private intelligent contract creating instruction according to the first state and the first intelligent contract processing request, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creating instruction and controlling the first intelligent contract to enter the first state.
In a second aspect, an embodiment of the present application further provides a block chain management device, including:
the request acquisition module is used for acquiring a target intelligent contract processing request triggered by a target user;
the instruction generating module is used for generating a target intelligent contract trial instruction according to the target intelligent contract processing request when the user type of the target user is a trial user;
and the instruction sending module is used for sending the trial instruction of the target intelligent contract to a first node, the first node is one trial node in a plurality of trial nodes with trial blockchains running in a blockchain system, and the first node is used for processing the target intelligent contract processing request by utilizing the trial blockchain according to the trial instruction of the target intelligent contract.
In some embodiments, the instruction generation module is specifically configured to:
when the request type of the target intelligent contract processing request is a calling contract type, acquiring the triggering frequency of the intelligent contract processing request of the calling contract type triggered by the target user;
and when the trigger frequency is less than or equal to a preset frequency, generating a target intelligent contract trial instruction according to the target intelligent contract processing request, wherein the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the instruction generation module is specifically configured to:
when the request type of the target intelligent contract processing request is a contract creation type, acquiring the accumulated triggering times of the target user triggering the intelligent contract processing request of the contract creation type;
and when the accumulated triggering times are less than or equal to the preset times, generating a target intelligent contract trial instruction according to the target intelligent contract processing request, wherein the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, a secure channel is established between the block chain management device and the first node, and the instruction sending module is specifically configured to:
and sending the target intelligent contract trial instruction to the first node through the secure channel.
In some embodiments, the blockchain management apparatus further comprises:
the login information acquisition module is used for acquiring login information of a target user and judging whether the user type of the target user is a trial type or not according to the login information;
and the prompting module is used for sending out an intelligent contract trial prompt when the user type of the target user is a trial type.
In some embodiments, the blockchain management apparatus further comprises:
the storage module is used for storing a first intelligent contract processing request with the request type triggered by the target user as a contract creation type, wherein the first intelligent contract processing request is used for requesting to create a first intelligent contract;
and the migration module is used for generating a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sending the private intelligent contract creation instruction to a third node when the user type of the target user is changed into a formal user and the target user has a private block chain, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction.
In some embodiments, the migration module is specifically configured to:
obtaining a first state of a first intelligent contract from a trial node;
and generating a private intelligent contract creating instruction according to the first state and the first intelligent contract processing request, wherein the third node is used for creating the first intelligent contract in the private blockchain according to the intelligent contract creating instruction and controlling the first intelligent contract to enter the first state.
In a third aspect, the present application further provides a server, including a processor, a memory, and one or more programs, stored in the memory and configured to be executed by the processor, the program including instructions for performing the steps in the intelligent contract processing method according to any of the above embodiments.
In a fourth aspect, an embodiment of the present application further provides a computer storage medium, where one or more first instructions are stored, and the one or more first instructions are adapted to be loaded by a processor and execute the intelligent contract processing method according to any of the foregoing embodiments.
In the technical scheme of the embodiment of the application, the block chain management equipment acquires a target intelligent contract processing request triggered by a target user; when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request; and the block chain management equipment sends the target intelligent contract trial instruction to a trial node in the block chain system, wherein the trial node runs a trial block chain, and the trial node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction. In this way, the user can request the blockchain management device to create an intelligent contract, deploy the intelligent contract, call the intelligent contract and view the created intelligent contract on the blockchain system by sending the target intelligent contract processing request, and the processing mode of the intelligent contract is richer.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a network architecture diagram of a network system according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a structure of a block in a block chain system according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a block chain management device according to an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram illustrating an intelligent contract processing method according to an embodiment of the present application;
fig. 5 is another network architecture diagram of a network system according to an embodiment of the present application;
fig. 6 is a block diagram of a blockchain management apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Referring to fig. 1, fig. 1 is a network architecture diagram of a network system according to an embodiment of the present application, where the network system 1000 includes a blockchain system 100 and a blockchain management apparatus 200.
The blockchain system 100 refers to a system for data sharing between nodes, and the blockchain system may include a plurality of nodes 101, and the plurality of nodes 101 may refer to respective clients in the blockchain system. Each node 101 may receive input information and maintain shared data within the blockchain system based on the received input information while operating normally. In order to ensure the information intercommunication in the blockchain system, information connection can exist between each node in the blockchain system, and the nodes can transmit information through the information connection. For example, when an arbitrary node in the blockchain system receives input information, other nodes in the blockchain system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain system are consistent.
The blockchain management device 200 may communicate with any one of the nodes 101 in the blockchain system.
Each node in the blockchain system has a corresponding node identifier, and each node in the blockchain system can store node identifiers of other nodes in the blockchain system, so that the generated block can be broadcast to other nodes in the blockchain system according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Each node in the blockchain system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 2, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
The block chain system in the embodiment of the application comprises at least four trial nodes, wherein the trial nodes are public nodes, and trial users can access the public nodes.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
Referring to fig. 3, fig. 3 is a schematic hardware structure diagram of a block chain management apparatus 200 according to an embodiment of the present disclosure. The blockchain management device 200 includes a processor 201, a memory 202, a communication interface 203, and one or more programs stored in the memory 202 and configured to be executed by the processor 201, the programs including instructions to perform the steps of the intelligent contract processing method of any of the following embodiments. Memory 202 includes Random Access Memory (RAM), and disk storage. The communication interface 203 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The blockchain management apparatus 200 may communicate with each node 101 in the blockchain system 100 through a communication interface 203.
The application provides an intelligent contract processing method. Referring to fig. 4, fig. 4 is a schematic flowchart of an intelligent contract processing method according to an embodiment of the present application. The intelligent contract processing method comprises the following steps:
401. the block chain management equipment acquires a target intelligent contract processing request triggered by a target user;
specifically, the blockchain management device may obtain login information of the target user when the target user logs in, and determine whether the user type of the target user is a trial type according to the login information; and when the user type of the target user is a trial type, the block chain management equipment sends out an intelligent contract trial prompt. For example, the blockchain management device may control display of a smart contract trial prompt on a front-end page of the blockchain management device for enabling experience with the smart contract service. Therefore, the user can learn to experience the intelligent contract service through the block chain management equipment according to the trial prompt of the intelligent contract.
The target user can trigger the target intelligent contract processing request by operating the front-end page of the block chain management equipment at the terminal. The blockchain management device may then obtain the target intelligent contract processing request.
The intelligent contract processing request comprises a user identification of a target user, request content and configuration parameters corresponding to the request content. The request content may specifically include, but is not limited to, any one of request to create a smart contract, deploy a smart contract, invoke a smart contract, and view a smart contract.
402. When the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request;
the block chain management device can judge whether the user type of the target user is a trial user according to the user identification in the target intelligent contract processing request. And when the target user is a trial user, generating a target intelligent contract trial instruction according to the target intelligent contract processing request. The target intelligent contract generation instructions are for instructing the trial node to process the target intelligent contract processing request.
403. The block chain management equipment sends a target intelligent contract trial instruction to a first node, wherein the first node is one trial node in a plurality of trial nodes with trial block chains running in a block chain system;
it will be appreciated that the blockchain management device may send the target intelligent contract trial instruction to any one of the trial nodes. For example, the target intelligent contract processing request is to create an intelligent contract on the trial blockchain, and after the first node creates the intelligent contract on the trial blockchain, the rest of the trial nodes may also simultaneously create the intelligent contract. That is, one of the trial nodes processes the target intelligent contract processing request, and the remaining trial nodes may simultaneously process the target intelligent contract processing request.
Specifically, the blockchain system may determine the first node according to the load of each trial node, so that the load of each node may be balanced.
In an optional embodiment, a secure channel is established between the blockchain management device and the blockchain system, and the blockchain management device sends the target intelligent contract trial instruction to the trial node through the secure channel.
Specifically, key negotiation is performed in advance between the blockchain management device and each node of the blockchain system, and a data encryption mode and a corresponding decryption mode are agreed. The block chain management equipment can encrypt the target intelligent contract trial instruction by using an agreed data encryption mode, send the encrypted target intelligent contract trial instruction to a trial node in the block chain system, and decrypt the received target intelligent contract trial instruction by using an agreed decryption mode by using the trial node to obtain the decrypted target intelligent contract trial instruction. Thus, although the trial service is provided for the trial user, the user can experience a safe data transmission mode, and the trial experience is better.
404. The first node processes the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction.
For example, when the target intelligent contract processing request is to create an intelligent contract, the first node creates a new intelligent contract in the trial blockchain according to the target intelligent contract trial instruction, and each trial node creates a new intelligent contract in the trial blockchain according to the target intelligent contract trial instruction. When the target intelligent contract processing request is to invoke an intelligent contract, the first node invokes a corresponding intelligent contract in the trial blockchain according to the intelligent contract identifier in the first intelligent trial contract instruction, and each trial node invokes a corresponding intelligent contract in the trial blockchain according to the intelligent contract identifier in the first intelligent trial contract instruction. When the target intelligent contract processing request is to check the intelligent contracts, the first node checks the corresponding intelligent contracts in the trial blockchain according to the intelligent contract identifications in the first intelligent trial contract instruction, and each trial node checks the corresponding intelligent contracts in the trial blockchain according to the intelligent contract identifications in the first intelligent trial contract instruction.
When the user type of the target user is not the trial user, the block chain management device acquires a private block chain identifier contained in the target intelligent contract processing request, the private block chain identifier is obtained according to user selection operation, the user can select a private block chain on a front end page of the block chain management device, and the block chain management device acquires the block chain identifier of the private block chain selected by the user. And the block chain management equipment generates an intelligent contract processing instruction according to the target intelligent contract processing request, and sends the intelligent contract processing instruction to a private node where a private block chain corresponding to the private block chain identifier is located, wherein the private node is used for processing the target intelligent contract processing request by utilizing the private block chain.
According to the intelligent contract processing method, the block chain management equipment acquires a target intelligent contract processing request triggered by a target user; when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request; and the block chain management equipment sends the target intelligent contract trial instruction to a trial node in the block chain system, wherein the trial node runs a trial block chain, and the trial node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction. In this way, the user can request the blockchain management device to create an intelligent contract, deploy the intelligent contract, call the intelligent contract and view the created intelligent contract on the blockchain system by sending the target intelligent contract processing request, and the processing mode of the intelligent contract is richer.
In an optional embodiment, when the request type of the target intelligent contract processing request is a calling contract type, the blockchain management device acquires the trigger frequency of the target user for triggering the intelligent contract processing request for calling the contract type; when the trigger frequency is less than or equal to the preset frequency, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction. When the trigger frequency is greater than the preset frequency, the block chain management device cannot process the target intelligent contract processing request and cannot generate a target intelligent contract trial instruction.
The block chain management device can trigger the triggering times of the intelligent contract processing request for calling the contract type by the target user in the preset time length, judge whether the triggering times are smaller than or equal to the product of the preset time length and the preset frequency, judge that the triggering frequency is smaller than or equal to the preset frequency if the triggering times are smaller than or equal to the product of the preset time length and the preset frequency, and judge that the triggering frequency is larger than the preset frequency if the triggering times are not larger than the preset frequency.
Thus, the number of times the trial user invokes the smart contract can be limited. Because a plurality of trial users need to experience the intelligent contract service through limited trial nodes, the times of calling the intelligent contract by each trial user are limited, and the load of each trial node can be reduced, so that the trial experience of each trial user is better, and the user experience of calling the intelligent contract by each user at each time is improved although the times of calling the intelligent contract by each trial user is reduced.
In an optional embodiment, when the request type of the target intelligent contract processing request is a create contract type, the blockchain management device acquires the accumulated triggering times of the target user triggering the intelligent contract processing request of the create contract type; when the accumulated triggering times are less than or equal to preset times, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction. And when the triggering frequency is greater than the accumulated triggering times, the block chain management equipment cannot process the target intelligent contract processing request and cannot generate a target intelligent contract trial instruction.
Thus, there is a limit to the number of smart contracts that can be created by each trial user. Therefore, the situation that one user creates too many intelligent contracts and occupies too much resources of trial nodes to influence the user experience of other user bodies can be avoided.
In an optional embodiment, the blockchain management device obtains the created duration of each intelligent contract created in the trial blockchain; the block chain management equipment sends a freezing instruction to a second node, wherein the freezing instruction is used for indicating the second node to freeze an intelligent contract with the created duration exceeding the preset duration, and the second node is one trial node in the plurality of trial nodes. This also reduces the load on the trial nodes.
Based on the above embodiments, in some embodiments, the blockchain management device may further save the request type triggered by the target user as a first intelligent contract processing request for creating a contract type, where the first intelligent contract processing request is used for requesting to create a first intelligent contract; when the user type of the target user is changed into a formal user and the target user has a private block chain, the block chain management device generates a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sends the private intelligent contract creation instruction to a third node, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction. Therefore, during the trial period, the data left by the trial node can be synchronized to the private node, so that the user data can be protected better, and the user experience is better.
Specifically, the blockchain management device may store the first intelligent contract processing request in a preset database, where the preset database may be a local database of the blockchain management device, or may be another database accessible by the blockchain management device.
Further, as in the example shown in fig. 5, the blockchain system includes a plurality of private nodes 101'. When the fact that the user type of the target user is changed into a formal user is detected, and the target user has a private block chain, the block chain management device obtains a first state of a first intelligent contract from a trial node through a safety channel between a block chain system and the trial node, generates a private intelligent contract creation instruction according to the first state and a first intelligent contract processing request, and sends the private intelligent contract creation instruction to a third node, wherein the third node is any one of a plurality of private nodes operating with the private block chain. The third node is used for creating the first intelligent contract according to the first private intelligent contract creating instruction and controlling the first intelligent contract to enter the first state. Therefore, the intelligent contract created by the user in the trial blockchain can be migrated to the private blockchain, and the state of the intelligent contract can also be migrated synchronously. Therefore, after the target user becomes a formal user, the block chain management device can also create the same intelligent contract in the private block chain according to the intelligent contract created by the target user during the trial period, and the states of the intelligent contracts are also the same, so that the trial stage and the payment stage can be better connected, and the user experience is better.
Referring to fig. 6, an embodiment of the present invention further provides a block chain management apparatus 600, including:
a request obtaining module 601, configured to obtain a target intelligent contract processing request triggered by a target user;
an instruction generating module 602, configured to generate a target intelligent contract trial instruction according to the target intelligent contract processing request when the user type of the target user is a trial user;
the instruction sending module 603 is configured to send the target intelligent contract trial instruction to a first node, where the first node is one trial node in a plurality of trial nodes in a blockchain system in which a trial blockchain runs, and the first node is configured to process the target intelligent contract processing request by using the trial blockchain according to the target intelligent contract trial instruction.
According to the block chain management device, the block chain management device acquires a target intelligent contract processing request triggered by a target user; when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request; and the block chain management equipment sends the target intelligent contract trial instruction to a trial node in the block chain system, wherein the trial node runs a trial block chain, and the trial node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction. In this way, the user can request the blockchain management device to create an intelligent contract, deploy the intelligent contract, call the intelligent contract and view the created intelligent contract on the blockchain system by sending the target intelligent contract processing request, and the processing mode of the intelligent contract is richer.
In some embodiments, the instruction generation module is specifically configured to:
when the request type of the target intelligent contract processing request is a calling contract type, acquiring the triggering frequency of the intelligent contract processing request of the calling contract type triggered by the target user;
and when the trigger frequency is less than or equal to a preset frequency, generating a target intelligent contract trial instruction according to the target intelligent contract processing request, wherein the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the instruction generation module is specifically configured to:
when the request type of the target intelligent contract processing request is a contract creation type, acquiring the accumulated triggering times of the target user triggering the intelligent contract processing request of the contract creation type;
and when the accumulated triggering times are less than or equal to the preset times, generating a target intelligent contract trial instruction according to the target intelligent contract processing request, wherein the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, a secure channel is established between the block chain management device and the first node, and the instruction sending module is specifically configured to:
and sending the target intelligent contract trial instruction to the first node through the secure channel.
In some embodiments, the blockchain management apparatus further comprises:
the login information acquisition module is used for acquiring login information of a target user and judging whether the user type of the target user is a trial type or not according to the login information;
and the prompting module is used for sending out an intelligent contract trial prompt when the user type of the target user is a trial type.
In some embodiments, the blockchain management apparatus further comprises:
the storage module is used for storing a first intelligent contract processing request with the request type triggered by the target user as a contract creation type, wherein the first intelligent contract processing request is used for requesting to create a first intelligent contract;
and the migration module is used for generating a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sending the private intelligent contract creation instruction to a third node when the user type of the target user is changed into a formal user and the target user has a private block chain, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction.
In some embodiments, the migration module is specifically configured to:
obtaining a first state of a first intelligent contract from a trial node;
and generating a private intelligent contract creating instruction according to the first state and the first intelligent contract processing request, wherein the third node is used for creating the first intelligent contract in the private blockchain according to the intelligent contract creating instruction and controlling the first intelligent contract to enter the first state.
It should be noted that the supplementary description and the technical effects of the intelligent contract processing method in the embodiment of the present application are also applicable to the block chain management device in the embodiment of the present application, and are not described herein again to avoid redundancy.
The embodiment of the invention also provides a computer storage medium (Memory), which is a Memory device in the client and used for storing programs and data. It is understood that the computer storage medium herein may include both a built-in storage medium in the client and, of course, an extended storage medium supported by the client. The computer storage media provides storage space that stores the operating system of the client. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space for loading and execution by the processor. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
In one embodiment, one or more first instructions stored in a computer storage medium may be loaded and executed by a processor to implement the corresponding steps performed by the blockchain management device in the data processing embodiments described above; in particular implementations, one or more first instructions in a computer storage medium are loaded by a processor and perform the steps of:
the block chain management equipment acquires a target intelligent contract processing request triggered by a target user;
when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request;
the block chain management equipment sends the target intelligent contract trial instruction to a first node, the first node is one trial node in a plurality of trial nodes of a trial block chain running in a block chain system, and the first node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the generating, by the blockchain management device, a target intelligent contract trial instruction according to the target intelligent contract processing request includes:
when the request type of the target intelligent contract processing request is a calling contract type, the block chain management equipment acquires the trigger frequency of the target user for triggering the intelligent contract processing request of the calling contract type;
when the trigger frequency is less than or equal to a preset frequency, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the generating, by the blockchain management device, a target intelligent contract trial instruction according to the target intelligent contract processing request includes:
when the request type of the target intelligent contract processing request is a contract creation type, the block chain management equipment acquires the accumulated triggering times of triggering the intelligent contract processing request of the contract creation type by the target user;
when the accumulated triggering times are less than or equal to preset times, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction.
In some embodiments, the establishing a secure channel between the blockchain management device and the first node, and the sending the target intelligent contract trial instruction to the first node by the blockchain management device includes:
and the block chain management equipment sends the target intelligent contract trial instruction to the first node through the secure channel.
In certain embodiments, one or more first instructions in a computer storage medium are loaded by a processor and perform the steps of:
the block chain management equipment acquires login information of a target user and judges whether the user type of the target user is a trial type or not according to the login information;
and when the user type of the target user is a trial type, the block chain management equipment sends out an intelligent contract trial prompt.
In certain embodiments, one or more first instructions in a computer storage medium are loaded by a processor and perform the steps of:
the block chain management device stores a first intelligent contract processing request with a request type triggered by the target user as a contract creation type, wherein the first intelligent contract processing request is used for requesting to create a first intelligent contract;
when the user type of the target user is changed into a formal user and the target user has a private block chain, the block chain management device generates a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sends the private intelligent contract creation instruction to a third node, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction.
In some embodiments, the generating, by the blockchain management device, private intelligent contract creation instructions according to the saved first intelligent contract processing request includes:
the block chain management equipment acquires a first state of a first intelligent contract from a trial node;
the block chain management device generates a private intelligent contract creating instruction according to the first state and the first intelligent contract processing request, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creating instruction and controlling the first intelligent contract to enter the first state.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., compact disk), or a semiconductor medium (e.g., solid state disk), among others. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical division, and the actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the indirect coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage media may include, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is understood that all products controlled or configured to execute the intelligent contract processing method described in the present application, such as the intelligent contract processing method, the blockchain management device and the storage medium, belong to the category of the related products described in the present application.

Claims (10)

1. An intelligent contract processing method, comprising:
the block chain management equipment acquires a target intelligent contract processing request triggered by a target user;
when the user type of the target user is a trial user, the block chain management equipment generates a target intelligent contract trial instruction according to the target intelligent contract processing request;
the block chain management equipment sends the target intelligent contract trial instruction to a first node, the first node is one trial node in a plurality of trial nodes of a trial block chain running in a block chain system, and the first node is used for processing the target intelligent contract processing request by utilizing the trial block chain according to the target intelligent contract trial instruction.
2. The intelligent contract processing method of claim 1 wherein the block chain management device generating a target intelligent contract trial instruction in accordance with the target intelligent contract processing request comprises:
when the request type of the target intelligent contract processing request is a calling contract type, the block chain management equipment acquires the trigger frequency of the target user for triggering the intelligent contract processing request of the calling contract type;
when the trigger frequency is less than or equal to a preset frequency, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for calling an intelligent contract corresponding to the target intelligent contract processing request from the trial block chain according to the target intelligent contract trial instruction.
3. The intelligent contract processing method of claim 1 or 2, wherein the block chain management device generating a target intelligent contract trial instruction according to the target intelligent contract processing request comprises:
when the request type of the target intelligent contract processing request is a contract creation type, the block chain management equipment acquires the accumulated triggering times of triggering the intelligent contract processing request of the contract creation type by the target user;
when the accumulated triggering times are less than or equal to preset times, the block chain management device generates a target intelligent contract trial instruction according to the target intelligent contract processing request, and the first node is used for creating a target intelligent contract in the trial block chain according to the target intelligent contract trial instruction.
4. The intelligent contract processing method according to claim 1, wherein a secure channel is established between the blockchain management device and the first node, and the blockchain management device sending the target intelligent contract trial instruction to the first node comprises:
and the block chain management equipment sends the target intelligent contract trial instruction to the first node through the secure channel.
5. The intelligent contract processing method according to claim 1, wherein the intelligent contract processing method includes:
the block chain management equipment acquires login information of a target user and judges whether the user type of the target user is a trial type or not according to the login information;
and when the user type of the target user is a trial type, the block chain management equipment sends out an intelligent contract trial prompt.
6. The intelligent contract processing method according to claim 1, further comprising:
the block chain management device stores a first intelligent contract processing request with a request type triggered by the target user as a contract creation type, wherein the first intelligent contract processing request is used for requesting to create a first intelligent contract;
when the user type of the target user is changed into a formal user and the target user has a private block chain, the block chain management device generates a private intelligent contract creation instruction according to the stored first intelligent contract processing request and sends the private intelligent contract creation instruction to a third node, wherein the third node is one of a plurality of private nodes corresponding to the private block chain, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creation instruction.
7. The intelligent contract processing method according to claim 6, wherein the generating private intelligent contract creation instructions by the blockchain management device according to the saved first intelligent contract processing request comprises:
the block chain management equipment acquires a first state of a first intelligent contract from a trial node;
the block chain management device generates a private intelligent contract creating instruction according to the first state and the first intelligent contract processing request, and the third node is used for creating the first intelligent contract in the private block chain according to the intelligent contract creating instruction and controlling the first intelligent contract to enter the first state.
8. A blockchain management apparatus, comprising:
the request acquisition module is used for acquiring a target intelligent contract processing request triggered by a target user;
the instruction generating module is used for generating a target intelligent contract trial instruction according to the target intelligent contract processing request when the user type of the target user is a trial user;
and the instruction sending module is used for sending the trial instruction of the target intelligent contract to a first node, the first node is one trial node in a plurality of trial nodes with trial blockchains running in a blockchain system, and the first node is used for processing the target intelligent contract processing request by utilizing the trial blockchain according to the trial instruction of the target intelligent contract.
9. A blockchain management device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the intelligent contract processing method of any of claims 1-7.
10. A computer storage medium having one or more first instructions stored thereon, the one or more first instructions adapted to be loaded by a processor and to perform the intelligent contract processing method of any of claims 1-7.
CN201910908305.5A 2019-09-20 2019-09-20 Intelligent contract processing method, block chain management device and storage medium Active CN110602133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910908305.5A CN110602133B (en) 2019-09-20 2019-09-20 Intelligent contract processing method, block chain management device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910908305.5A CN110602133B (en) 2019-09-20 2019-09-20 Intelligent contract processing method, block chain management device and storage medium

Publications (2)

Publication Number Publication Date
CN110602133A true CN110602133A (en) 2019-12-20
CN110602133B CN110602133B (en) 2021-04-09

Family

ID=68863030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910908305.5A Active CN110602133B (en) 2019-09-20 2019-09-20 Intelligent contract processing method, block chain management device and storage medium

Country Status (1)

Country Link
CN (1) CN110602133B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111160911A (en) * 2019-12-31 2020-05-15 杭州趣链科技有限公司 Intelligent contract calling frequency control method facing block chain
CN114422535A (en) * 2022-01-18 2022-04-29 网易(杭州)网络有限公司 Method and device for deploying contracts in block chain, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018158936A1 (en) * 2017-03-03 2018-09-07 日本電気株式会社 Block chain management device, block chain management method and program
CN109034814A (en) * 2018-09-14 2018-12-18 百度在线网络技术(北京)有限公司 Intelligent contract treating method and apparatus based on ether mill virtual machine
US20190122183A1 (en) * 2017-10-23 2019-04-25 Calendar Tree, Inc. d/b/a WhenHub Blockchain scheduling
US20190172023A1 (en) * 2018-06-02 2019-06-06 Ross Brandborg Blockchain Probation
CN110032599A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN110032568A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN110032865A (en) * 2019-03-28 2019-07-19 腾讯科技(深圳)有限公司 A kind of right management method, device and storage medium
CN110221956A (en) * 2018-03-02 2019-09-10 富士通株式会社 Method and apparatus for generating the test case of block chain intelligence contract

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018158936A1 (en) * 2017-03-03 2018-09-07 日本電気株式会社 Block chain management device, block chain management method and program
US20190122183A1 (en) * 2017-10-23 2019-04-25 Calendar Tree, Inc. d/b/a WhenHub Blockchain scheduling
CN110221956A (en) * 2018-03-02 2019-09-10 富士通株式会社 Method and apparatus for generating the test case of block chain intelligence contract
US20190172023A1 (en) * 2018-06-02 2019-06-06 Ross Brandborg Blockchain Probation
CN109034814A (en) * 2018-09-14 2018-12-18 百度在线网络技术(北京)有限公司 Intelligent contract treating method and apparatus based on ether mill virtual machine
CN110032599A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN110032568A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN110032865A (en) * 2019-03-28 2019-07-19 腾讯科技(深圳)有限公司 A kind of right management method, device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111160911A (en) * 2019-12-31 2020-05-15 杭州趣链科技有限公司 Intelligent contract calling frequency control method facing block chain
CN111160911B (en) * 2019-12-31 2023-10-24 杭州趣链科技有限公司 Intelligent contract calling frequency control method for block chain
CN114422535A (en) * 2022-01-18 2022-04-29 网易(杭州)网络有限公司 Method and device for deploying contracts in block chain, computer equipment and storage medium
CN114422535B (en) * 2022-01-18 2024-04-09 网易(杭州)网络有限公司 Method, apparatus, computer device and storage medium for distributing contracts in blockchain

Also Published As

Publication number Publication date
CN110602133B (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN111131416B (en) Service providing method and device, storage medium and electronic device
CN112187831B (en) Equipment network access method and device, storage medium and electronic equipment
CN109474916B (en) Equipment authentication method, device and machine readable medium
TW201706900A (en) Method and device for authentication using dynamic passwords
CN108243176B (en) Data transmission method and device
CN110708164B (en) Control method and device for Internet of things equipment, storage medium and electronic device
CN105491073B (en) Data downloading method, device and system
CN113411187B (en) Identity authentication method and system, storage medium and processor
WO2017206524A1 (en) Electronic device control method, terminal and control system
CN112989426A (en) Authorization authentication method and device, and resource access token acquisition method
CN109729000B (en) Instant messaging method and device
US11943372B2 (en) Use right information processing device, use right information processing system, and use right information processing method, based on smart contract
CN110602133B (en) Intelligent contract processing method, block chain management device and storage medium
CN112507325A (en) Method, device, equipment and storage medium for managing equipment access authority
CN110647583B (en) Block chain construction method, device, terminal and medium
CN112862487A (en) Digital certificate authentication method, equipment and storage medium
CN113472722A (en) Data transmission method, storage medium, electronic device and automatic ticket selling and checking system
CN111405016A (en) User information acquisition method and related equipment
CN112235276B (en) Master-slave equipment interaction method, device, system, electronic equipment and computer medium
CN110166460B (en) Service account registration method and device, storage medium and electronic device
CN111181905A (en) File encryption method and device
CN113452513B (en) Key distribution method, device and system
CN108809927A (en) Identity identifying method and device
CN114221822A (en) Network distribution method, gateway device and computer readable storage medium
CN117121435A (en) Connection elastic multi-factor authentication

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