CN117527319A - Business handling method, device and equipment based on block chain - Google Patents

Business handling method, device and equipment based on block chain Download PDF

Info

Publication number
CN117527319A
CN117527319A CN202311396850.3A CN202311396850A CN117527319A CN 117527319 A CN117527319 A CN 117527319A CN 202311396850 A CN202311396850 A CN 202311396850A CN 117527319 A CN117527319 A CN 117527319A
Authority
CN
China
Prior art keywords
business
contract
blockchain
intelligent contract
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311396850.3A
Other languages
Chinese (zh)
Inventor
姚宇彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai 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 Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202311396850.3A priority Critical patent/CN117527319A/en
Publication of CN117527319A publication Critical patent/CN117527319A/en
Pending legal-status Critical Current

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/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • 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 Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification discloses a business handling method, a device and equipment based on a blockchain. The scheme may include: after acquiring a request of a first user to use a business intelligence contract at a blockchain network to transact business, the under-chain system can send a first blockchain transaction for calling a scheduling management control intelligence contract at the blockchain network to the blockchain network.

Description

Business handling method, device and equipment based on block chain
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method, an apparatus, and a device for handling services based on blockchains.
Background
With the development of economy and the advancement of technology, various business institutions gradually begin to utilize the efficient and stable data certification capability of blockchain and the technical characteristics that are difficult to tamper with to provide business services. Currently, business organizations may deploy related business intelligence contracts in blockchain networks, enabling business participants to transact business by invoking the business intelligence contracts. However, in the service operation process, authority management and control are often required to reduce the possibility of occurrence of risk events and ensure rights and interests of enterprises and users. Therefore, how to conveniently manage and control the authority in the process of handling the service by using the intelligent contracts deployed in the blockchain network becomes a technical problem to be solved urgently.
Disclosure of Invention
The business handling method, the device and the equipment based on the blockchain provided by the embodiment of the specification can conveniently conduct authority management and control in the business handling process by utilizing the intelligent contracts deployed in the blockchain network.
In order to solve the above technical problems, the embodiments of the present specification are implemented as follows:
the business handling method based on the blockchain provided by the embodiment of the specification is applied to an under-chain system and comprises the following steps:
acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
and receiving a contract execution result of the business intelligent contract fed back by the blockchain network to obtain a business handling result of the first user.
The business handling method based on the blockchain provided by the embodiment of the specification is applied to the blockchain node at the blockchain network and comprises the following steps:
acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
triggering the dispatch management intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
and sending a contract execution result of the business intelligent contract to the under-link system.
The embodiment of the present disclosure provides a service handling device based on a blockchain, which is applied to an under-chain system, and includes:
the first acquisition module is used for acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
A first sending module, configured to send, in response to the service handling request, a first blockchain transaction for invoking a scheduling management and control intelligence contract at the blockchain network to the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
and the receiving module is used for receiving the contract execution result of the business intelligent contract fed back by the blockchain network to obtain the business handling result of the first user.
The embodiment of the present disclosure provides a device for handling services based on blockchain, which is applied to a blockchain node at a blockchain network, and includes:
the acquisition module is used for acquiring a first blockchain transaction sent by the under-chain system and used for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
the contract executing module is used for triggering the scheduling management and control intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
And the sending module is used for sending the contract execution result of the business intelligent contract to the under-link system.
The embodiment of the present disclosure provides a service handling device based on a blockchain, where the device is a device at an under-chain system, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
And receiving a contract execution result of the business intelligent contract fed back by the blockchain network to obtain a business handling result of the first user.
The embodiment of the present disclosure provides a device for handling services based on a blockchain, where the device is a device at a blockchain network, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
triggering the dispatch management intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
And sending a contract execution result of the business intelligent contract to the under-link system.
At least one embodiment provided in this specification enables the following benefits:
after acquiring a request of a first user to use a service intelligent contract at a blockchain network to transact a service, the under-chain system can send a first blockchain transaction for calling a scheduling management intelligent contract at the blockchain network to the blockchain network, and the scheduling management intelligent contract can call the service intelligent contract after determining that the first user has the calling authority for the service intelligent contract so as to obtain and feed back a contract execution result of the service intelligent contract to the under-chain device as a service transacting result of the first user. The authority verification is carried out on each user needing to call the business intelligent contracts by utilizing the scheduling management intelligent contracts, and after the user is confirmed to have the calling authority of the business intelligent contracts, the business intelligent contracts are executed to transact business for the user, so that the authority management and control can be conveniently carried out in the process of transacting business by utilizing the business intelligent contracts in the blockchain network, and the security of transacting business by utilizing the business intelligent contracts is facilitated to be improved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic flow chart of a business handling method based on block chain according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another block chain based business transaction method according to an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of a lane flow corresponding to the blockchain-based business transaction methods of FIGS. 1 and 2 provided in the embodiments of the present disclosure;
FIG. 4 is a schematic diagram of a block chain based business transaction device corresponding to FIG. 1 according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a block chain based business transaction device corresponding to FIG. 2 according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a block chain based business transaction device corresponding to FIG. 1, provided in accordance with an embodiment of the present disclosure;
Fig. 7 is a schematic structural diagram of a block chain-based service handling device corresponding to fig. 2 according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of one or more embodiments of the present specification more clear, the technical solutions of one or more embodiments of the present specification will be clearly and completely described below in connection with specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without undue burden, are intended to be within the scope of one or more embodiments herein.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
In the prior art, when user calling authority management and control is required for a business intelligence contract, it is generally required to write a dedicated calling condition checking rule for each business intelligence contract, deploy a developed contract code for executing the calling condition checking rule into the business intelligence contract or other intelligent contracts, and execute the calling condition checking rule by running the contract code to audit and manage and control the contract execution result generated by the business intelligence contract. Because of the rights management scheme, contract codes for implementing rights management need to be developed for each business intelligent contract separately, so that the rights management scheme is poor in universality, convenience and high in cost. In addition, the authority management and control scheme cannot prohibit the user without contract calling authority from calling the business intelligent contract, so that the management and control hysteresis is provided, potential safety hazards exist, and resources are easily wasted.
In order to solve the drawbacks in the prior art, a block chain-based service handling method provided for the embodiments of the present disclosure will be specifically described with reference to the accompanying drawings:
fig. 1 is a schematic flow chart of a business handling method based on a blockchain according to an embodiment of the present disclosure. From a program perspective, the execution subject of the flow may be an under-chain system, or an application program installed at the under-chain system. As shown in fig. 1, the process may include the steps of:
step 102: acquiring a business handling request of a first user; the service transacting request is for requesting a service transacting using a service intelligence contract at the blockchain network.
In this embodiment of the present disclosure, a Block chain (Block chain) may be understood as a data chain formed by sequentially storing a plurality of blocks, where a Block header of each Block includes a timestamp of the Block, a hash value of previous Block information, and a hash value of the Block information, so as to implement mutual authentication between blocks, and form a non-tamperable Block chain. Each block is understood to be a block of data (a unit of stored data). The block chain is used as a decentralization database and is a series of data blocks which are generated by mutually correlating a cryptography method, and each data block contains information of one network transaction and is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The chain formed by connecting blocks end to end is the block chain. If the data in the block needs to be modified, the contents of all blocks after the block need to be modified, and the data backed up by all nodes in the blockchain network are modified. Therefore, the blockchain is characterized by being difficult to tamper with and delete, and has reliability as a method for maintaining the integrity of the content after the data has been saved to the blockchain.
In this embodiment of the present disclosure, the smart contract may be an encrypted piece of contract code stored in the blockchain system, where the contract code specifies the call condition of the smart contract and the service processing logic, that is, specifies the call condition for starting the smart contract, and how to process the received service processing request after the smart contract is started. The smart contract may be recorded in the block in the form of an address and a hash value of the smart contract. When a certain node needs to call the intelligent contract, the node can acquire the specific content of the intelligent contract through the address of the intelligent contract.
In the embodiment of the present specification, the business intelligence contract may be an intelligence contract for handling a specified business, which is deployed in the blockchain network in advance according to the business requirements of the business organization. The business intelligence contract can be used for various kinds of transacted appointed business, and the appointed business is generally consistent with the business requirement of a business organization. For example, when the business requirement of the business organization is specifically a flow management requirement of the judicial organization for judicial cases, the business intelligent contract may be an intelligent contract for managing and recording the progress flow of each judicial case. Alternatively, the business intelligence contract may be an intelligent contract for publishing and trading data assets when the business needs of the business entity are specifically the trading needs of the data asset trading entity for the data assets. Alternatively, when the business needs of the business entity are specifically the management needs of the business entity for the contract, the business intelligence contract may be an intelligence contract for signing, managing the contract. The kind of business for which the business intelligence contract is specifically used in the present specification is not particularly limited.
In this embodiment of the present disclosure, the executing entity of the method in fig. 1 may be an under-chain system capable of communicating with a blockchain network in which the service intelligent contract is deployed, so that a first user who needs to invoke the service intelligent contract to transact a service may use the under-chain system to invoke the service intelligent contract by sending a service transacting request to the under-chain system. In practical applications, a software development kit (Software Development Kit, abbreviated as SDK) may be deployed at the under-chain system to utilize the SDK to interact with the blockchain network, which will not be described in detail.
In practical applications, the system under the chain is generally provided with a user interface for the first user to operate, so that the first user can trigger the user interface through operation to generate the service transacting request. The execution subject of the method in fig. 1 may be a client to which the user interface belongs, or may be a server corresponding to the client to which the user interface belongs, which is not limited in detail. In practical application, the blockchain network with the business intelligent contracts can be a public chain which can be used and maintained by anyone; alternatively, it may be a federation chain that allows only authorized nodes to join the network and view information according to rights. The first user may be an enterprise or an individual, and is not particularly limited in this regard.
Step 104: responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; and the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract.
In the embodiment of the specification, the blockchain network can be deployed with a business intelligent contract for transacting business, and can also be deployed with a scheduling management intelligent contract for performing calling authority management on each business intelligent contract. In particular, the schedule managing smart contract typically calls the business smart contract only after determining that the first user has a call authority for the business smart contract; if the first user is determined not to have the calling authority for the business intelligent contract, the business intelligent contract is not called, so that each calling process of the business intelligent contract can be monitored, and the business intelligent contract is prevented from being maliciously called by an lawbreaker.
In the present embodiment, a blockchain transaction (transaction) generally refers to a piece of instructions and data that is sent to a blockchain system that will alter the data and state on the chain. In practical applications, the system under the chain often needs to call the scheduling management and control intelligent contract by initiating a first blockchain transaction, so as to realize the call of the business intelligent contract. In the following embodiments, the information carried by the first blockchain transaction will be specifically explained, which is not described herein.
Step 106: and receiving a contract execution result of the business intelligent contract fed back by the blockchain network to obtain a business handling result of the first user.
In this embodiment of the present disclosure, after the scheduling management and control intelligence closes about the service intelligence contract, the service intelligence contract may also feed back the contract execution result generated by itself to the scheduling management and control intelligence contract according to a preset setting, so that the scheduling management and control intelligence contract may send the contract execution result of the service intelligence contract to the under-link device, and the under-link device may store or display the contract execution result of the service intelligence contract as the service handling result of the first user, so that the first user is convenient to learn the personal service handling result, and is convenient and fast.
In the method in fig. 1, the first user uses the under-link system to transact the service, and after the under-link system needs to determine that the first user has the invocation authority of the service intelligent contract by using the scheduling management intelligent contract, the service intelligent contract is invoked to transact the service for the user by using the scheduling management intelligent contract, so that the security of transacting the service by using the service intelligent contract is improved. And because the calling authorities of a plurality of business intelligent contracts can be controlled by utilizing a single scheduling control intelligent contract, contract codes for implementing authority control do not need to be independently developed for each business intelligent contract, so that the method has good universality, good convenience and low cost. Also, by performing rights qualification prior to invoking a business intelligence contract, it is also advantageous to avoid the hysteresis of rights management based on contract execution results, as well as to reduce unnecessary resources consumed by invocation of business intelligence contracts.
Based on the method in fig. 1, the examples of the present specification also provide some specific embodiments of the method, as described below.
In the embodiment of the present disclosure, to improve security of intelligent contract invocation, the first user may also be enabled to register an under-link account at the under-link system, so that when the first user needs to invoke a service intelligent contract, the under-link system may be utilized to perform the under-link authentication on the first user in addition to performing the on-link authentication by using the scheduling management intelligent contract.
Based thereon, a first public key of the first user may be stored at the under-chain system. The first public key may be a public key of an under-chain account binding of the first user at the under-chain system.
Correspondingly, step 102: the obtaining the service handling request of the first user may specifically include:
and acquiring a business handling request carrying a first digital signature generated by using a first private key of the first user.
Step 104: in response to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network may specifically include:
and if the first public key passes the first digital signature verification, sending the first blockchain transaction to the blockchain network. If the first digital signature verification is not passed using the first public key, prohibiting sending the first blockchain transaction to the blockchain network.
For ease of understanding, an implementation of the first user to obtain the first private key is presented herein.
Specifically, step 102: before acquiring the service handling request of the first user, the method may further include:
and acquiring a user registration request of the first user. And responding to the user registration request, and generating a first under-link account of the first user and a public and private key pair corresponding to the first under-link account. And storing the public key of the public-private key pair corresponding to the account under the first chain to obtain the first public key. Sending a private key of a public-private key pair corresponding to the first under-link account to user equipment of the first user; the user equipment is used for storing a private key in a public-private key pair corresponding to the first link account to obtain the first private key.
In the embodiment of the present disclosure, the user registration request of the first user generally needs to carry identification information indicating the first user. For example, when the first user is a biometric individual, the user registration request may carry a communication contact (e.g., phone number, mailbox), biometric information, or other trusted identity information of the first user. And when the first user is an enterprise, the user registration request may carry an enterprise unique identifier (for example, an enterprise name, an enterprise business license, an enterprise ID, etc.), which is not particularly limited.
The under-link system may generate a first under-link account and public-private key pair that the first user needs to use when operating the under-link system in response to the user registration request. The under-chain system can automatically save the first public key of the first under-chain account and the public-private key pair, and send the first under-chain account and the first private key of the public-private key pair to the first user, so that the first user can subsequently prove that the personal identity is credible at the under-chain system by utilizing the first under-chain account and the digital signature generated by using the first private key so as to request to transact business by utilizing the under-chain system.
Based on this, the service handling request of the first user may carry the first under-link account of the first user, information indicating that the service handling of the service intelligent contract needs to be invoked, and a first digital signature generated for the information by using the first private key. If the under-chain system uses the first public key corresponding to the first under-chain account to verify the first digital signature, the under-chain system can indicate that the service handling request is indeed a request sent by a more trusted first user, so that the scheduling management and control intelligent contract can be called in response to the service handling request, and further the service intelligent contract is called to handle the service. Otherwise, the system under the chain will not call the scheduling management and control intelligent contract, and further will not call the business intelligent contract.
Therefore, through the off-link authentication process, the method is also beneficial to reducing the resources consumed by the calling of unnecessary business intelligent contracts and improving the security of intelligent contract calling. Therefore, it can be known that, in the embodiment of the present specification, through the control of the link up and link down double-layer rights, the identity verification is more strict, and meanwhile, the number of times of invalid or malicious link interaction can be effectively reduced, which is beneficial to ensuring the operation efficiency of the blockchain network.
For ease of understanding, the implementation principle of on-chain rights management using a schedule management intelligent contract is presented herein.
In the embodiment of the specification, the scheduling management and control intelligent contract can pre-establish the association relationship between the contract unique identifier of the business intelligent contract and the target blockchain account with the calling authority of the business intelligent contract. The blockchain network can store a correspondence between the target blockchain account and a second public key; the under-chain system may store a first blockchain account of the first user and a second private key corresponding to the first blockchain account.
Correspondingly, step 104: in response to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network may specifically include:
Responding to the business handling request, and sending the first blockchain transaction generated by utilizing the first blockchain account and the second private key to the blockchain network; the first blockchain transaction is used for triggering the scheduling management intelligent contract to execute a first method and calling a second method of the business intelligent contract to obtain a contract executing result.
The scheduling management and control intelligent contract is specifically used for: and after determining that the first blockchain account belongs to the target blockchain account based on the association relation, and verifying a second digital signature generated by using the second private key carried in the first blockchain transaction by using the second public key corresponding to the first blockchain account, and calling a second method of the business intelligent contract to obtain a contract execution result.
In the embodiment of the present disclosure, the scheduling management and control smart contract has the capability of identifying whether the blockchain account obtains the invoking authority of the service smart contract, and the blockchain network generally stores the second public key corresponding to the target blockchain account with the invoking authority of the service smart contract, so that when the blockchain account invokes the scheduling management and control smart contract to trigger the service smart contract to run, the second public key and the digital signature technology can be utilized to identify whether the blockchain account obtains the invoking authority of the service smart contract. If so, the scheduling management control intelligent contract can trigger the operation of the business intelligent contract to transact business for the user, and if not, the scheduling management control intelligent contract can not trigger the operation of the business intelligent contract, so that the business can not transact business for the user.
Based on this, before a first user transacts business using a business intelligence contract, it is typically necessary to register a first blockchain account of the first user at the blockchain network, store a public key corresponding to the first blockchain account at the blockchain network, and keep a second private key corresponding to the first blockchain account by the first user or by an under-chain system. Thus, a first blockchain transaction invoking the schedule management intelligent contract is generated using the first blockchain account, and a second digital signature generated using the second private key is carried in the first blockchain transaction.
In practical application, a plurality of methods with different functions are generally deployed at the scheduling management intelligent contract and the business intelligent contract, so that a user can complete the functions required to be realized by calling the designated method at each intelligent contract according to actual requirements. Specifically, the scheduling management intelligent contract may be provided with a first method for calling the business intelligent contract, and the business intelligent contract may be provided with a second method for transacting the specified business, so that when the first user needs to transact the specified business, a first blockchain transaction for triggering the scheduling management intelligent contract to execute the first method and calling the second method of the business intelligent contract is required to be generated, so as to meet the requirement of the first user for transacting the specified business.
In practical application, when the second private key corresponding to the first blockchain account of the first user is kept by the under-chain system, and the first user is not handed to the first user to keep the second private key, the first user can be ensured not to avoid the under-chain system and use the first blockchain account and the second private key to call the business intelligent contract directly, so that the first user can be effectively ensured to trigger the business intelligent contract to handle the executing process of the business by calling the dispatching management intelligent contract, and further, the user is ensured to call the business intelligent contract through the on-chain authentication process of the dispatching management intelligent contract, and the safety and the controllability of the using process of the business intelligent contract are improved.
For ease of understanding, examples of the specific content contained in the first blockchain transaction, as well as the specific generation principles of the first blockchain transaction, are presented herein.
Specifically, step 102: the obtaining the service handling request of the first user may include:
and acquiring a contract unique identifier of the first user carrying the business intelligent contract, a method unique identifier of the second method, input parameter information of the second method and a business handling request of the method unique identifier of the first method.
Correspondingly, step 104: the sending, in response to the service transaction request, the first blockchain transaction generated using the first blockchain account and the second private key to the blockchain network may specifically include:
and taking the first blockchain account as a sender address, taking the contract address of the scheduling management intelligent contract as a receiver address, and generating the first blockchain transaction carrying the contract unique identifier of the business intelligent contract, the method unique identifier of the second method, the input parameter information of the second method, the method unique identifier of the first method and the second digital signature.
The first blockchain transaction is sent to the blockchain network.
In the embodiment of the specification, the unique identifier of the method of the first method of scheduling management and control intelligent contracts required to be invoked by the first user is carried in the business handling request and the first blockchain transaction, so that the under-chain system and the scheduling management and control intelligent contracts know that the first user needs to invoke the business intelligent contracts through triggering the scheduling management and control intelligent contracts.
Because the contract unique identifiers of different business intelligence contracts are usually different, and a single scheduling management and control intelligence contract can be used for managing the calling rights of a plurality of business intelligence contracts, the contract unique identifiers of the business intelligence contracts which are specifically required to be called by the first user can be carried in business handling requests and first blockchain transactions, so that an under-chain system and the scheduling management and control intelligence contract can know the business intelligence contracts which are specifically required to be called by the first user.
In addition, the business handling request and the first blockchain transaction can also carry the unique identification and the input parameter information of the method of the second method in the business intelligent contract which is specifically called by the first user, so that the scheduling management intelligent contract can clearly determine the type of the method at the business intelligent contract which is specifically called, and the input parameter information is sent to the business intelligent contract, so that the business intelligent contract can acquire the input data required by operating the second method to generate the contract execution result.
In practical applications, the second digital signature carried in the first blockchain transaction may be obtained by digitally signing at least a portion of the data carried in the first blockchain transaction by using the second private key of the first user, or may be obtained by digitally signing other data, which is not limited specifically.
For ease of understanding, the implementation principles of deploying business intelligence contracts in a blockchain network are presented herein.
Specifically, step 102: before acquiring the service handling request of the first user, the method may further include:
and acquiring a contract deployment request of a second user for the business intelligent contract. The contract deployment request carries the contract code of the business intelligent contract.
And responding to the contract deployment request, judging whether the second user is a trusted user or not, and obtaining a judging result.
If the judging result shows that the second user is a trusted user, sending a second blockchain transaction for calling the scheduling management and control intelligent contract to the blockchain network; the scheduling management and control intelligent contract is used for responding to the second blockchain transaction, establishing an association relation between a contract unique identification of the business intelligent contract and a target blockchain account with the calling authority of the business intelligent contract, and determining whether the first user has the calling authority for the business intelligent contract based on the association relation.
And sending a third blockchain transaction for deploying the business intelligence contract to the blockchain network.
And if the judging result shows that the second user does not belong to the trusted user, prohibiting deployment of the service intelligent contract to the blockchain network.
In this embodiment of the present disclosure, the second user may be a user who has developed a completed business intelligence contract and needs to deploy the business intelligence contract into the blockchain network. To avoid the illicit molecule deploying malicious business intelligence contracts into the blockchain network, the second user needs to rely on the off-chain system to complete the deployment of the business intelligence contracts.
Specifically, the second user may operate a user interface of the under-chain system to cause the under-chain system to obtain a contract deployment request of the second user. The under-link system performs preliminary under-link authentication on the second user, if the second user is determined to be a trusted user, the under-link system can indicate that the service intelligent contract to be deployed by the second user is less likely to be about a malicious intelligent contract, so that the service intelligent contract can be deployed. Otherwise, the deployment of the business intelligence contract to the blockchain network will be denied.
In practical application, since the scheduling management control intelligent contract needs to manage and control the calling authority of the business intelligent contract, when the business intelligent contract is deployed, the scheduling management control intelligent contract needs to establish an association relationship between a target blockchain account with the calling authority of the business intelligent contract and the business intelligent contract, so as to identify whether a blockchain account subsequently calling the business intelligent contract has the contract calling authority or not based on the association relationship. Based on this, the under-chain system needs to send a second blockchain transaction to the blockchain network that causes the schedule-governing intelligence contract to establish the association.
In addition, the under-chain system also needs to perform under-chain detection on the contract code of the business intelligence contract that the second user needs to deploy, so as to avoid deploying the contract code that is at risk or not compliant with the specification to the blockchain network.
Based on this, before the sending the third blockchain transaction for deploying the business intelligence contract to the blockchain network, the method may further include:
detecting contract codes of the business intelligent contracts to obtain detection results; the detection process includes at least one of contract specification detection, contract logic detection, and contract security detection.
Correspondingly, sending a third blockchain transaction for deploying the business intelligence contract to the blockchain network may specifically include:
and if the detection result meets the preset requirement, sending the third blockchain transaction carrying the contract code to the blockchain network.
In this embodiment of the present disclosure, after receiving the contract code of the business intelligence contract uploaded by the second user, the under-link system may detect the contract code of the business intelligence contract by adopting a static code analysis manner or a dynamic code analysis manner, and if the detection result indicates that the business intelligence contract meets the specification, the logic is not abnormal, and/or the security meets the standard, the under-link system may employ the existing intelligent contract deployment method to deploy the contract code of the business intelligence contract to the blockchain network. Otherwise, the contract code of the business intelligence contract is refused to be deployed to the blockchain network until the contract code of the business intelligence contract uploaded by the second user again meets the preset requirement, so that the safety of the business intelligence contract deployed at the blockchain network is improved. Wherein static code analysis may refer to identifying defects prior to running a program. Dynamic code analysis may refer to identifying defects after running a program, which is not described in detail.
In practical application, in order to uniformly manage deployment and invocation of the business intelligent contract by using the under-chain system, a second on-chain account can be applied for the under-chain system, a fourth private key corresponding to the second on-chain account is managed by the under-chain system, and a fourth public key corresponding to the second on-chain account is stored in the blockchain network. Based on this, the sender address of the third blockchain transaction for deploying the business intelligence contract may be the second blockchain account of the under-chain system, and the third blockchain transaction may also carry the contract code of the business intelligence contract, and the digital signature generated using the fourth private key, so that after the blockchain node in the blockchain network verifies the digital signature using the fourth public key, the contract code of the business intelligence contract is deployed in the blockchain network.
The blockchain network can be a alliance chain network, at this time, the account on the second chain of the system under the chain can be a blockchain account of an administrator of the alliance chain, and the blockchain account of the administrator of the alliance chain can be generally provided with intelligent contract deployment authority, which is beneficial to guaranteeing the controllability of intelligent contracts deployed in the alliance chain network. Of course, the second on-chain account of the under-chain system can also be a blockchain account of only a common participant instead of a blockchain account of an administrator of the alliance chain, so that the flexibility is better; of course, the blockchain network may also be a public chain, which is not particularly limited.
In the embodiment of the present specification, since a business organization having business requirements may not be able to develop a contract code for a business intelligence contract for transacting a specified business by itself, it is necessary to rely on other users to assist in developing and deploying the business intelligence contract. Therefore, the deployment requirement information of the business intelligence contracts of the business institutions can be managed by the system under the chain, so that the complete deployment process of the business intelligence contracts can be managed.
Based on this, before the acquiring the contract deployment request of the second user for the business intelligence contract, the method may further include:
acquiring a contract deployment instruction of a third user aiming at the business intelligent contract; the contract deployment instruction is used for indicating a business intelligent contract developer and a target user with the calling authority of the business intelligent contract; and the under-chain system stores a third public key corresponding to a second under-chain account of the business intelligent contract developer.
Correspondingly, the acquiring the contract deployment request of the second user for the business intelligence contract may specifically include:
and acquiring a contract deployment request carrying a third digital signature generated by using a third private key corresponding to a third under-chain account of the second user.
Correspondingly, the determining whether the second user is a trusted user may specifically include:
it is determined whether the third digital signature can be verified with the third public key.
Correspondingly, if the first judgment result indicates that the second user is a trusted user, sending a second blockchain transaction for calling the scheduling management and control intelligent contract to the blockchain network may specifically include:
and if the third public key is used for verifying the third digital signature, taking a second blockchain account of the under-chain system as a sender address, taking a contract address of the scheduling management and control intelligent contract as a receiver address, and generating the second blockchain transaction carrying a contract unique identifier of the business intelligent contract, a target blockchain account of the target user and a method unique identifier of a third method for establishing the association relationship at the scheduling management and control intelligent contract.
And sending the second blockchain transaction to the blockchain network.
In this embodiment of the present disclosure, the third user may register an under-link account at the under-link system to view, at a user interface of the under-link system, user identification information of each user capable of providing the intelligent contract development service (corresponding to the under-link account of the user at the under-link system), so that the third user may select at least one user identification information as a business intelligent contract developer and provide introduction information of a business intelligent contract to be deployed, and in addition, the third user may instruct a target user having a calling authority of the business intelligent contract to be deployed, thereby generating a contract deployment instruction carrying the above information.
Subsequently, the under-chain system may also notify the business intelligence contract developer, or otherwise, by the third user, so that the business intelligence contract developer can develop a business intelligence contract that meets the business needs of the third user.
In practice, it should be noted that since business intelligence contract developers also typically need to register an under-link account at the under-link system, after the contract code development work is completed, the business intelligence contract developer can initiate a contract deployment request to the under-link system using its own under-link account and the bound private key.
If the third digital signature carried in the contract deployment request of the second user is verified by using the public key of the business intelligent contract developer, the off-link system can indicate that the second user initiating the contract deployment request belongs to the business intelligent contract developer appointed by the third user, so that the second user can be determined to be a trusted user. And further capable of deploying a business intelligence contract to the blockchain network in response to the contract deployment request.
In the embodiment of the specification, when the third user indicates the target user with the invoking authority of the business intelligence contract, the third user can directly provide the target blockchain account of the target user, or can also provide other information reflecting the identity of the target user, so that the under-chain system can determine the target blockchain account of the target user according to the information. In addition, the target user having the invocation authority of the business intelligence contract may be indicated by the under-link system or the second user, which is not particularly limited.
In practical applications, the third user may include, but is not limited to: an enterprise, institution or individual having business needs; the second user may include, but is not limited to: independent software developer ISV. When the business intelligence contract required to be deployed by the third user is only used internally, the target blockchain account of the target user with the invoking authority of the business intelligence contract can also be the blockchain account of the third user, or the blockchain account of the second user can not contain other blockchain accounts. Of course, if the service intelligent contract is available for external use, the target blockchain account of the target user having the invocation authority of the service intelligent contract may be a blockchain account of a user in the white list or a user other than the black list provided by the third user, which is not specifically limited. I.e. the first user and the second user may be the same user or different users. And, the first user and the third user may be the same user or different users, which will not be described in detail.
In practical application, when the second user is an independent software developer, the information of the independent software developer can be reported by the third user at the under-chain system in advance, so that the under-chain system registers an under-chain account for the independent software developer, and the third user can only see the identification information of the independent software developer reported by the third user, so that the third user can only enable the independent software developer reported by the third user to develop a business intelligent contract for the third user. Therefore, the potential risk existing in the business intelligent contract development process can be reduced based on the cooperation relationship established privately between the third user and the independent software developer.
In practical applications, there may be a need to cancel the invocation authority of a part of users for the business intelligence contract, based on which the method in fig. 1 may further include:
and acquiring a cancellation request for the calling authority of the appointed user to the business intelligent contract.
In response to the cancellation request, sending a fourth blockchain transaction to the blockchain network for invoking the schedule-governing intelligent contract; the scheduling management intelligent contract is used for responding to the fourth blockchain transaction and canceling the association relationship between the preset contract unique identification of the business intelligent contract and the blockchain account of the appointed user.
In the embodiment of the present disclosure, a fourth method for canceling the association between the contract unique identifier of the established service intelligent contract and the blockchain account of the designated user may be further provided in the scheduling management intelligent contract, based on which a fourth blockchain transaction may be generated in which the second blockchain account of the under-chain system is used as the sender address, the contract address of the scheduling management intelligent contract is used as the receiver address, and the method unique identifier of the fourth method, the contract unique identifier of the service intelligent contract, the blockchain account of the designated user, and the digital signature generated using the private key corresponding to the second blockchain account are carried.
After the digital signature is verified by the public key corresponding to the second blockchain account, the scheduling management and control intelligent contract can cancel the calling authority of the blockchain account of the appointed user on the business intelligent contract by generating information for canceling the association relationship between the contract unique identifier of the business intelligent contract and the blockchain account of the appointed user.
In the embodiment of the present disclosure, the first user or the service organization further has a requirement for performing statistical analysis on the service handling situation, based on which the method in fig. 1 may further include:
and acquiring a display request aiming at the statistical result of the business handling situation.
And responding to the display request, and carrying out data statistics on historical business handling results generated by the business intelligent contract to obtain business handling situation statistical results.
Displaying the statistical result of the business handling situation; or,
and sending the service handling situation statistical result to data display equipment.
In this embodiment of the present disclosure, the initiator of the display request may be the first user, the service organization, or another organization with reference authority for counting the service handling situation, which is not limited specifically. Because the under-chain system receives and stores the business handling results generated after the business intelligent contracts are called each time, statistics can be performed based on the business execution results corresponding to the business intelligent contracts in the under-chain system to generate and display business handling situation statistical results. In practical application, statistics can be performed according to preset dimensions such as a service transacter, a service transacting time, a transacted service type, a service transacted result type, and the like according to practical requirements, which are not described in detail.
In the present embodiment, because blockchain transactions stored in a blockchain network are typically poorly readable, they are inefficient when there is a need to query the on-chain contract execution results stored at the blockchain network. Based on the method, in the blockchain transaction for recording the on-chain contract execution result, the log data with the key value pair format with better readability can be carried to simply record the on-chain contract execution result, so that the subsequent extraction efficiency of the on-chain contract execution result is improved.
Based on this, the schedule-governing smart contract may also be used to: storing a fifth blockchain transaction to the blockchain network for recording a result of the contract execution; the fifth blockchain transaction may carry log data in a key value pair format for recording the contract execution result. Correspondingly, the method in fig. 1 may further include:
a query request for business transaction results for the first user at the blockchain network is obtained.
And responding to the query request, and acquiring the log data carried in the fifth blockchain transaction from the blockchain network based on the hash value of the fifth blockchain transaction fed back in advance by the blockchain network to obtain a query result.
In the embodiment of the present disclosure, a receipt (receive) may be added to the blockchain transaction, where zero or several log entries may be included, and because these log entries may represent the result generated after the event in the smart contract is triggered, log data in a key-value pair format for recording the execution result of the contract may be carried in the fifth blockchain transaction.
The log data in the key value pair format specifically may include, but is not limited to: key value pairs representing contract unique identifiers of business intelligence contracts invoked by users, key value pairs representing method unique identifiers of methods at business intelligence contracts invoked by users, key value pairs representing input parameter information of methods at business intelligence contracts invoked, key value pairs representing whether business intelligence contracts invoked are successfully executed, key value pairs representing causes of execution failures of business intelligence contracts invoked, key value pairs representing contract execution results generated after business intelligence contracts invoked are successfully executed, and the like. Of course, a key pair indicating the identity of the caller of the business intelligence contract may be included, and a key pair indicating the execution time of the business intelligence contract is not particularly limited.
In practice, the fifth blockchain transaction may be the same transaction as the first blockchain transaction. Specifically, the scheduling management and control intelligent contract can add the log data which is in a key value pair format and is used for recording the contract execution result into the first blockchain transaction without restarting a transaction to independently record the contract execution result, so that resources are saved, the scheme operation efficiency can be improved, and meanwhile, the whole contract calling process can be reflected by using a single transaction.
Of course, the fifth blockchain transaction may also be a different transaction than the first blockchain transaction. Specifically, after the link-down system receives the contract execution result fed back by the blockchain network, the first blockchain account of the first user may be utilized again to invoke the scheduling management and control intelligent contract to request to store the contract execution result. At this time, the scheduling management intelligent contract can store the contract execution result in a log form in a newly generated blockchain transaction, so that the flexibility is good.
However, in both the above two implementations, the initiator of the fifth blockchain transaction may be the first blockchain account of the first user, and the receiver may be the contract address of the scheduling management intelligent contract, which is not described in detail.
Based on the same thought as the scheme shown in fig. 1, another business handling method based on block chain is also provided in the embodiments of the present specification. Fig. 2 is a flow chart of another business handling method based on blockchain according to the embodiment of the present disclosure. The execution subject of the process may be a blockchain node at a blockchain network, or an application hosted at a blockchain node. As shown in fig. 2, the process may include:
step 202: acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network.
Step 204: triggering the dispatch management intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; and the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management intelligent contract determines that the first user has the calling authority for the business intelligent contract.
Step 206: and sending a contract execution result of the business intelligent contract to the under-link system.
In this embodiment of the present disclosure, the method in fig. 2 has consistency with the under-chain system, the blockchain network, the scheduling management and control intelligent contract, the business intelligent contract, the first blockchain transaction, the first user, the calling authority and the contract execution result mentioned in the method in fig. 1, which are not described in detail.
In the method in fig. 2, after the scheduling control intelligent contract is utilized to determine that the first user has the calling authority of the business intelligent contract, the scheduling control intelligent contract is utilized to call the business intelligent contract to transact business for the user, so that the security of transacting business by utilizing the business intelligent contract is improved. And because the calling authorities of a plurality of business intelligent contracts can be controlled by utilizing a single scheduling control intelligent contract, contract codes for implementing authority control do not need to be independently developed for each business intelligent contract, so that the method has good universality, good convenience and low cost. Also, by performing rights qualification prior to invoking a business intelligence contract, it is also advantageous to avoid the hysteresis of rights management based on contract execution results, as well as to reduce unnecessary resources consumed by invocation of business intelligence contracts.
The method in fig. 2, the scheduling management intelligent contract may pre-establish an association between a contract unique identifier of the business intelligent contract and a target blockchain account having a call authority of the business intelligent contract; the blockchain network may have stored therein a correspondence between the target blockchain account and a second public key.
The under-chain system can store a first blockchain account of the first user and a second private key corresponding to the first blockchain account; the first blockchain transaction may be generated by using the first blockchain account and the second private key, and the second method of the business intelligent contract is called by triggering the scheduling management intelligent contract to execute the first method, so as to obtain a transaction of the contract execution result.
Based on this, step 204: based on the first blockchain transaction, triggering the dispatch management intelligent contract to execute to obtain a business handling result of the first user, which specifically may include:
based on the first blockchain transaction, triggering the scheduling management intelligent contract to judge whether the first blockchain account belongs to the target blockchain account by utilizing the association relationship and the corresponding relationship, and verifying a second digital signature generated by using the second private key and carried in the first blockchain transaction by utilizing the second public key corresponding to the first blockchain account to obtain a judging result.
And if the judging result indicates that the first blockchain account belongs to the target blockchain account and the second digital signature can be verified by using the second public key corresponding to the first blockchain account, executing the first method, and calling a second method of the business intelligent contract to obtain the contract executing result.
In the embodiment of the present specification, step 202: before the first blockchain transaction sent by the under-chain system for invoking the scheduling management and control intelligent contract at the blockchain network, the method may further include:
acquiring a second blockchain transaction sent by the under-chain system and used for calling the scheduling management and control intelligent contract; the second blockchain transaction is generated by the second blockchain account of the under-chain system after receiving a contract deployment request of a business intelligent contract developer for the business intelligent contract, and establishes a transaction of an association relationship between a contract unique identifier of the business intelligent contract and a target blockchain account with calling authority of the business intelligent contract by triggering a third method at the scheduling management intelligent contract.
Triggering the scheduling management intelligent contract to execute the third method based on the second blockchain transaction, and establishing the association relation; the association is used for determining whether the first user has a calling authority for the business intelligence contract.
And acquiring a third blockchain transaction sent by the under-chain system for deploying the business intelligence contract.
Deploying the business intelligence contract at the blockchain network based on a contract code of the business intelligence contract carried by the third blockchain transaction.
In the embodiment of the present disclosure, the method illustrated in fig. 2 may further include:
acquiring a fourth blockchain transaction sent by the under-chain system and used for calling the scheduling management and control intelligent contract; the fourth blockchain transaction is a transaction generated by the under-chain system using a second blockchain account of the under-chain system after receiving a cancellation request for a specified user's invocation authority for the business intelligence contract.
And triggering the scheduling management intelligent contract to cancel the association relationship between the preset contract unique identification of the business intelligent contract and the blockchain account of the appointed user based on the fourth blockchain transaction.
In the embodiment of the present disclosure, step 204: based on the first blockchain transaction, triggering the dispatch management intelligent contract to execute, and after obtaining the business handling result of the first user, further comprising:
storing a fifth blockchain transaction to the blockchain network for recording the contract execution result by using a scheduling management intelligent contract; the fifth blockchain transaction carries log data in a key value pair format, wherein the log data is used for recording the contract execution result.
And sending the hash value of the fifth blockchain transaction to the under-chain system.
And acquiring an on-chain business handling result query request generated by the under-chain system based on the hash value of the fifth blockchain transaction.
And responding to the on-chain business handling result query request, and sending the log data carried in the fifth blockchain transaction to the under-chain system.
In the embodiment of the present disclosure, the method in fig. 2 and the above embodiment of the method in fig. 1 have correspondence, but the execution bodies of the two have differences, which is not described in detail.
Fig. 3 is a schematic flow chart of a lane corresponding to the blockchain-based service handling method in fig. 1 and 2 according to the embodiment of the present disclosure. As shown in fig. 3, the blockchain-based business transaction may involve an execution body such as an under-chain system and a blockchain network.
In the service intelligent contract deployment stage, the chain system can acquire a contract deployment instruction of the third user for the service intelligent contract, and acquire a contract deployment request of the second user for the service intelligent contract. If the system under the chain determines that the second user is the business intelligent contract developer according to the business intelligent contract developer indicated by the contract deployment instruction, the system under the chain can determine that the second user is a trusted user, so that a second blockchain transaction for calling the scheduling management intelligent contract is sent to the blockchain network. In response to the second blockchain transaction, a dispatch-controlled smart contract at the blockchain network may establish an association between a contract unique identification of the business smart contract and a target blockchain account having invocation rights for the business smart contract. And the under-chain system may also send a third blockchain transaction for deploying the business intelligence contract to the blockchain network, which, in response to the third blockchain transaction, may enable deployment of the deployment business intelligence contract.
In a service intelligent contract calling stage, the under-chain system can acquire a service handling request carrying a first digital signature generated by using a first private key corresponding to an under-chain account of a first user, and if the first digital signature is verified by using a first public key corresponding to the under-chain account of the first user, a first blockchain transaction for calling a dispatching management intelligent contract at a blockchain network can be sent to the blockchain network; the first blockchain transaction carries a second digital signature generated by using a second private key corresponding to a first blockchain account of the first user. After determining that the first blockchain account belongs to the target blockchain account based on the association relation, and verifying the second digital signature by using a second public key corresponding to the first blockchain account, the scheduling management intelligent contract at the blockchain network can call the business intelligent contract and feed back a contract execution result of the business intelligent contract to the under-chain system, so that the under-chain system can display the contract execution result of the business intelligent contract or send the contract execution result of the business intelligent contract to the equipment of the first user, thereby facilitating the first user to know the business handling result of the first user. And the scheduling management intelligent contract also stores a fifth blockchain transaction carrying log data of contract execution results of the business intelligent contract in a key value pair format to the blockchain network, so that the contract execution results are stored.
In the service handling situation checking stage, the under-chain system can acquire a display request aiming at a service handling situation statistical result, and perform data statistics aiming at a historical service handling result generated by a service intelligent contract at the under-chain system so as to acquire and display the service handling situation statistical result. In addition, the under-chain system may acquire a query request for a business transaction result of the first user at the blockchain network, and then may send an acquisition request for log data carried in a fifth blockchain transaction to the blockchain network based on a hash value of the fifth blockchain transaction fed back in advance by the blockchain network. The blockchain network may query and feed back log data carried in the fifth blockchain transaction to the under-chain system so that the under-chain system may obtain and display the log data carried in the fifth blockchain transaction.
Based on the same thought, the embodiment of the specification also provides a device corresponding to the method. Fig. 4 is a schematic structural diagram of a block chain-based service handling apparatus corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus may be applied to an under-chain system, and the apparatus may include:
A first obtaining module 402, configured to obtain a service handling request of a first user; the service transacting request is for requesting a service transacting using a service intelligence contract at the blockchain network.
A first sending module 404, configured to send, in response to the service handling request, a first blockchain transaction for invoking a schedule management and control intelligence contract at the blockchain network to the blockchain network; and the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract.
And a receiving module 406, configured to receive a contract execution result of the service intelligent contract fed back by the blockchain network, and obtain a service handling result of the first user.
The present description example also provides some specific embodiments of the device based on the device of fig. 4, which is described below.
Optionally, the apparatus in fig. 4 may further include:
and the second acquisition module is used for acquiring the user registration request of the first user.
And the generation module is used for responding to the user registration request and generating a first under-link account of the first user and a public and private key pair corresponding to the first under-link account.
And the storage module is used for storing the public key in the public-private key pair corresponding to the first under-chain account to obtain the first public key of the first user.
The second sending module is used for sending the private key in the public-private key pair corresponding to the first link account to the user equipment of the first user; the user equipment is used for storing the private key in the public-private key pair corresponding to the first under-link account to obtain the first private key of the first user.
The first obtaining module 402 may specifically be configured to: and acquiring a business handling request carrying a first digital signature generated by using a first private key of the first user.
The first sending module 404 may specifically be configured to: and if the first public key passes the first digital signature verification, sending the first blockchain transaction to the blockchain network.
Optionally, the scheduling management and control intelligent contract may pre-establish an association relationship between a contract unique identifier of the business intelligent contract and a target blockchain account having a calling authority of the business intelligent contract; the blockchain network can store a correspondence between the target blockchain account and a second public key; the under-chain system may store a first blockchain account of the first user and a second private key corresponding to the first blockchain account.
Based on this, the first sending module 404 may specifically be configured to: responding to the business handling request, and sending the first blockchain transaction generated by utilizing the first blockchain account and the second private key to the blockchain network; the first blockchain transaction is used for triggering the scheduling management intelligent contract to execute a first method and calling a second method of the business intelligent contract to obtain a contract executing result.
The scheduling management intelligent contract can be specifically used for: and after determining that the first blockchain account belongs to the target blockchain account based on the association relation, and verifying a second digital signature generated by using the second private key carried in the first blockchain transaction by using the second public key corresponding to the first blockchain account, and calling a second method of the business intelligent contract to obtain a contract execution result.
Optionally, the first obtaining module 402 may specifically be configured to:
and acquiring a contract unique identifier of the first user carrying the business intelligent contract, a method unique identifier of the second method, input parameter information of the second method and a business handling request of the method unique identifier of the first method.
The first sending module 404 may specifically be configured to:
and taking the first blockchain account as a sender address, taking the contract address of the scheduling management intelligent contract as a receiver address, and generating the first blockchain transaction carrying the contract unique identifier of the business intelligent contract, the method unique identifier of the second method, the input parameter information of the second method, the method unique identifier of the first method and the second digital signature. And sending the first blockchain transaction to the blockchain network.
Optionally, if the schedule controlling smart contract may also be used to: storing a fifth blockchain transaction to the blockchain network for recording a result of the contract execution; the fifth blockchain transaction carries log data in a key value pair format for recording the contract execution result, and the apparatus in fig. 4 may further include:
and the third acquisition module is used for acquiring a query request aiming at the business handling result of the first user at the blockchain network.
And the fourth acquisition module is used for responding to the query request, acquiring the log data carried in the fifth blockchain transaction from the blockchain network based on the hash value of the fifth blockchain transaction fed back in advance by the blockchain network, and obtaining a query result.
Optionally, the apparatus in fig. 4 may further include:
a fifth obtaining module, configured to obtain a contract deployment instruction of a third user for the business intelligence contract; the contract deployment instruction is used for indicating a business intelligent contract developer and a target user with the calling authority of the business intelligent contract; and the under-chain system stores a third public key corresponding to a second under-chain account of the business intelligent contract developer.
And a sixth acquisition module, configured to acquire a contract deployment request carrying a third digital signature generated by using a third private key corresponding to a third under-link account of the second user.
And the judging module is used for judging whether the third public key can pass the verification aiming at the third digital signature.
A third sending module, configured to send a second blockchain transaction for invoking the schedule-managed intelligent contract to the blockchain network if the third public key is used to verify for the third digital signature; the scheduling management and control intelligent contract is used for responding to the second blockchain transaction, establishing an association relation between a contract unique identification of the business intelligent contract and a target blockchain account with the calling authority of the business intelligent contract, and determining whether the first user has the calling authority for the business intelligent contract based on the association relation.
And the fourth sending module is used for sending the third blockchain transaction for deploying the business intelligence contract to the blockchain network.
Optionally, the third user may include: an enterprise, institution or individual having business needs; the second user may include: independent software developers.
Optionally, the contract deployment request may carry a contract code of the business intelligence contract, and correspondingly, the apparatus in fig. 4 may further include:
the detection module is used for detecting and processing contract codes of the business intelligent contracts to obtain detection results; the detection process includes at least one of contract specification detection, contract logic detection, and contract security detection.
And the fourth sending module is specifically configured to send the third blockchain transaction carrying the contract code to the blockchain network if the detection result meets a preset requirement.
Optionally, the apparatus in fig. 4 may further include:
and a seventh acquisition module, configured to acquire a cancellation request for the call authority of the specified user for the service intelligent contract.
A fifth sending module for sending a fourth blockchain transaction for invoking the schedule management intelligent contract to the blockchain network in response to the cancellation request; the scheduling management intelligent contract is used for canceling the association relationship between the preset contract unique identification of the business intelligent contract and the blockchain account of the appointed user in response to the fourth blockchain transaction.
Optionally, the apparatus in fig. 4 may further include:
and the eighth acquisition module is used for acquiring the display request aiming at the statistical result of the business handling situation.
And the statistics module is used for responding to the display request, carrying out data statistics on the historical business handling results generated by the business intelligent contract, and obtaining business handling situation statistics results.
The display module is used for displaying the business handling situation statistical result; or,
and the sixth sending module is used for sending the service handling situation statistical result to the data display equipment.
Based on the same thought, the embodiment of the specification also provides a device corresponding to the method. Fig. 5 is a schematic structural diagram of a block chain-based service handling apparatus corresponding to fig. 2 according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus may be applied to a blockchain node at a blockchain network, the apparatus may include:
an obtaining module 502, configured to obtain a first blockchain transaction sent by an under-chain system and used for calling a scheduling management and control intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network.
A contract execution module 504, configured to trigger the scheduling management and control intelligent contract to execute based on the first blockchain transaction, so as to obtain a service handling result of the first user; and the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management intelligent contract determines that the first user has the calling authority for the business intelligent contract.
And a sending module 506, configured to send a contract execution result of the service intelligent contract to the under-link system.
Optionally, the scheduling management and control intelligent contract may pre-establish an association relationship between a contract unique identifier of the business intelligent contract and a target blockchain account having a calling authority of the business intelligent contract; the blockchain network can store a correspondence between the target blockchain account and a second public key;
the under-chain system can store a first blockchain account of the first user and a second private key corresponding to the first blockchain account; the first blockchain transaction is generated by using the first blockchain account and the second private key, and the second method of the business intelligent contract is called by triggering the scheduling management intelligent contract to execute the first method so as to obtain the transaction of the contract execution result.
Based on this, the contract execution module 504 may specifically be configured to:
based on the first blockchain transaction, triggering the scheduling management intelligent contract to judge whether the first blockchain account belongs to the target blockchain account by utilizing the association relationship and the corresponding relationship, and verifying a second digital signature generated by using the second private key and carried in the first blockchain transaction by utilizing the second public key corresponding to the first blockchain account to obtain a judging result.
And if the judging result indicates that the first blockchain account belongs to the target blockchain account and the second digital signature can be verified by using the second public key corresponding to the first blockchain account, executing the first method, and calling a second method of the business intelligent contract to obtain the contract executing result.
Optionally, the apparatus in fig. 5 may further include:
the second transaction acquisition module is used for acquiring a second blockchain transaction which is sent by the under-chain system and used for calling the scheduling management intelligent contract; the second blockchain transaction is generated by the second blockchain account of the under-chain system after receiving a contract deployment request of a business intelligent contract developer for the business intelligent contract, and establishes a transaction of an association relationship between a contract unique identifier of the business intelligent contract and a target blockchain account with calling authority of the business intelligent contract by triggering a third method at the scheduling management intelligent contract.
The association relation establishing module is used for triggering the scheduling management intelligent contract to execute the third method based on the second blockchain transaction to establish the association relation; the association is used for determining whether the first user has a calling authority for the business intelligence contract.
And the third transaction acquisition module is used for acquiring a third blockchain transaction which is sent by the under-chain system and used for deploying the business intelligent contract.
And the contract deployment module is used for deploying the business intelligent contract at the blockchain network based on the contract code of the business intelligent contract carried by the third blockchain transaction.
A fourth transaction acquisition module, configured to acquire a fourth blockchain transaction sent by the under-chain system and used for calling the scheduling management and control intelligent contract; the fourth blockchain transaction is a transaction generated by the under-chain system using a second blockchain account of the under-chain system after receiving a cancellation request for a specified user's invocation authority for the business intelligence contract.
And the association relation canceling module is used for triggering the scheduling management intelligent contract to cancel the association relation between the preset contract unique identifier of the business intelligent contract and the blockchain account of the appointed user based on the fourth blockchain transaction.
A storage module for storing a fifth blockchain transaction to the blockchain network for recording a result of execution of the contract using the schedule-controlled smart contract; the fifth blockchain transaction carries log data in a key value pair format, wherein the log data is used for recording the contract execution result.
And the hash value sending module is used for sending the hash value of the fifth blockchain transaction to the under-chain system.
And the query request acquisition module is used for acquiring an on-chain business handling result query request generated by the under-chain system based on the hash value of the fifth blockchain transaction.
And the log data sending module is used for responding to the on-chain business handling result query request and sending the log data carried in the fifth blockchain transaction to the under-chain system.
Based on the same thought, the embodiment of the specification also provides equipment corresponding to the method.
Fig. 6 is a schematic structural diagram of a block chain-based service handling device corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 6, the device 600 may be a device at an under-chain system, and the device 600 may include:
at least one processor 610; and a memory 630 communicatively coupled to the at least one processor; wherein,
The memory 630 stores instructions 620 executable by the at least one processor 610 to enable the at least one processor 610 to:
acquiring a business handling request of a first user; the service transacting request is for requesting a service transacting using a service intelligence contract at the blockchain network.
Responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; and the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract.
And receiving contract execution results of the business intelligent contracts fed back by the block chain network to obtain business handling results of the first user.
Based on the same thought, the embodiment of the specification also provides equipment corresponding to the method.
Fig. 7 is a schematic structural diagram of a block chain-based service handling device corresponding to fig. 1 according to an embodiment of the present disclosure. As shown in fig. 7, device 700 may be a device at a blockchain network, and device 700 may include:
At least one processor 710; and a memory 730 communicatively coupled to the at least one processor; wherein,
the memory 730 stores instructions 720 executable by the at least one processor 710, the instructions being executable by the at least one processor 710 to enable the at least one processor 710 to:
acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network.
Triggering the dispatching management and control intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of a first user; and the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management intelligent contract determines that the first user has the calling authority for the business intelligent contract.
And sending a contract execution result of the business intelligent contract to the under-link system.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus shown in fig. 6 and 7, the description is relatively simple, as it is substantially similar to the method embodiment, with reference to the partial description of the method embodiment being made for relevant reasons.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (FieldProgrammable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (AdvancedBoolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (JavaHardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data 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 data 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 data 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 one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (25)

1. A business handling method based on a blockchain, which is applied to a chain system and comprises the following steps:
acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
and receiving a contract execution result of the business intelligent contract fed back by the blockchain network to obtain a business handling result of the first user.
2. The method of claim 1, the first public key of the first user being stored at the under-chain system;
the obtaining the service handling request of the first user specifically includes:
acquiring a business handling request carrying a first digital signature generated by using a first private key of the first user;
the method for sending the first blockchain transaction for calling the scheduling management intelligent contract at the blockchain network to the blockchain network in response to the business handling request specifically comprises the following steps:
and if the first public key passes the first digital signature verification, sending the first blockchain transaction to the blockchain network.
3. The method of claim 2, further comprising, prior to the obtaining the service transaction request of the first user:
acquiring a user registration request of the first user;
responding to the user registration request, and generating a first under-link account of the first user and a public-private key pair corresponding to the first under-link account;
storing a public key in a public-private key pair corresponding to the account under the first chain to obtain the first public key;
sending a private key of a public-private key pair corresponding to the first under-link account to user equipment of the first user; the user equipment is used for storing a private key in a public-private key pair corresponding to the first link account to obtain the first private key.
4. The method of claim 1, wherein the scheduling management intelligent contract pre-establishes an association between a contract unique identification of the business intelligent contract and a target blockchain account having call rights for the business intelligent contract;
storing a corresponding relation between the target blockchain account and a second public key at the blockchain network; the under-chain system stores a first blockchain account of the first user and a second private key corresponding to the first blockchain account;
the method for sending the first blockchain transaction for calling the scheduling management intelligent contract at the blockchain network to the blockchain network in response to the business handling request specifically comprises the following steps:
responding to the business handling request, and sending the first blockchain transaction generated by utilizing the first blockchain account and the second private key to the blockchain network; the first blockchain transaction is used for calling a second method of the business intelligent contract by triggering the scheduling management intelligent contract to execute a first method so as to obtain a contract execution result;
the scheduling management and control intelligent contract is specifically used for: and after determining that the first blockchain account belongs to the target blockchain account based on the association relation, and verifying a second digital signature generated by using the second private key carried in the first blockchain transaction by using the second public key corresponding to the first blockchain account, and calling a second method of the business intelligent contract to obtain a contract execution result.
5. The method as claimed in claim 4, wherein the obtaining the service handling request of the first user specifically includes:
acquiring a contract unique identifier of the first user carrying the business intelligent contract, a method unique identifier of the second method, input parameter information of the second method and a business handling request of the method unique identifier of the first method;
the sending, in response to the service transaction request, the first blockchain transaction generated using the first blockchain account and the second private key to the blockchain network specifically includes:
generating the first blockchain transaction carrying the contract unique identifier of the business intelligent contract, the method unique identifier of the second method, the input parameter information of the second method, the method unique identifier of the first method and the second digital signature by taking the first blockchain account as a sender address and the contract address of the scheduling management intelligent contract as a receiver address;
the first blockchain transaction is sent to the blockchain network.
6. The method of claim 1, further comprising, prior to obtaining the service transaction request of the first user:
Acquiring a contract deployment request of a second user for the business intelligent contract;
responding to the contract deployment request, judging whether the second user is a trusted user or not, and obtaining a judging result;
if the judging result shows that the second user is a trusted user, sending a second blockchain transaction for calling the scheduling management and control intelligent contract to the blockchain network; the scheduling management and control intelligent contract is used for responding to the second blockchain transaction, establishing an association relation between a contract unique identifier of the business intelligent contract and a target blockchain account with the calling authority of the business intelligent contract, and determining whether the first user has the calling authority for the business intelligent contract or not based on the association relation;
and sending a third blockchain transaction for deploying the business intelligence contract to the blockchain network.
7. The method of claim 6, further comprising, prior to obtaining a contract deployment request for the business intelligence contract by the second user:
acquiring a contract deployment instruction of a third user aiming at the business intelligent contract; the contract deployment instruction is used for indicating a business intelligent contract developer and a target user with the calling authority of the business intelligent contract; the under-chain system stores a third public key corresponding to a second under-chain account of the business intelligent contract developer;
The obtaining the contract deployment request of the second user for the business intelligent contract specifically includes:
acquiring a contract deployment request carrying a third digital signature generated by using a third private key corresponding to a third under-chain account of the second user;
the judging whether the second user is a trusted user specifically includes:
judging whether the third digital signature can be verified by using the third public key;
if the first judgment result indicates that the second user is a trusted user, sending a second blockchain transaction for calling the scheduling management and control intelligent contract to the blockchain network, wherein the method specifically comprises the following steps of:
if the third public key is used for verifying the third digital signature, a second blockchain account of the under-chain system is used as a sender address, a contract address of the scheduling management and control intelligent contract is used as a receiver address, and the second blockchain transaction carrying a contract unique identifier of the business intelligent contract, a target blockchain account of the target user and a method unique identifier of a third method for establishing the association relationship at the scheduling management and control intelligent contract is generated;
And sending the second blockchain transaction to the blockchain network.
8. The method of claim 7, the third user comprising: an enterprise, institution or individual having business needs; the second user includes: independent software developers.
9. The method of claim 6, wherein the contract deployment request carries a contract code of the business intelligence contract;
before the sending the third blockchain transaction for deploying the business intelligence contract to the blockchain network, the method further includes:
detecting contract codes of the business intelligent contracts to obtain detection results; the detection process includes at least one of contract specification detection, contract logic detection, and contract security detection;
the sending a third blockchain transaction for deploying the business intelligence contract to the blockchain network specifically includes:
and if the detection result meets the preset requirement, sending the third blockchain transaction carrying the contract code to the blockchain network.
10. The method of claim 6, further comprising:
acquiring a cancellation request aiming at the calling authority of a specified user on the business intelligent contract;
In response to the cancellation request, sending a fourth blockchain transaction to the blockchain network for invoking the schedule-governing intelligent contract; the scheduling management intelligent contract is used for responding to the fourth blockchain transaction and canceling the association relationship between the preset contract unique identification of the business intelligent contract and the blockchain account of the appointed user.
11. The method of claim 1, further comprising:
acquiring a display request aiming at a statistical result of service handling conditions;
responding to the display request, and carrying out data statistics on historical business handling results generated by the business intelligent contract to obtain business handling situation statistical results;
displaying the statistical result of the business handling situation; or,
and sending the service handling situation statistical result to data display equipment.
12. The method of claim 1, the schedule-governing smart contract further to: storing a fifth blockchain transaction to the blockchain network for recording a result of the contract execution; the fifth blockchain transaction carries log data in a key value pair format, wherein the log data is used for recording the contract execution result; the method further comprises the steps of:
Acquiring a query request for a business handling result of the first user at the blockchain network;
and responding to the query request, and acquiring the log data carried in the fifth blockchain transaction from the blockchain network based on the hash value of the fifth blockchain transaction fed back in advance by the blockchain network to obtain a query result.
13. A blockchain-based business handling method, applied to blockchain nodes at a blockchain network, comprising:
acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
triggering the dispatch management intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
And sending a contract execution result of the business intelligent contract to the under-link system.
14. The method of claim 13, wherein the schedule-governing intelligent contract pre-establishes an association between a contract unique identification of the business intelligent contract and a target blockchain account having call rights for the business intelligent contract; storing a corresponding relation between the target blockchain account and a second public key at the blockchain network;
the under-chain system stores a first blockchain account of the first user and a second private key corresponding to the first blockchain account; the first blockchain transaction is generated by using the first blockchain account and the second private key, and the second method of the business intelligent contract is called by triggering the scheduling management intelligent contract to execute a first method so as to obtain the transaction of the contract execution result;
triggering the dispatch management and control intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user, wherein the business handling result comprises the following specific steps:
based on the first blockchain transaction, triggering the scheduling management intelligent contract to judge whether the first blockchain account belongs to the target blockchain account by utilizing the association relationship and the corresponding relationship, and verifying a second digital signature generated by using the second private key and carried in the first blockchain transaction by utilizing the second public key corresponding to the first blockchain account to obtain a judging result;
And if the judging result indicates that the first blockchain account belongs to the target blockchain account and the second digital signature can be verified by using the second public key corresponding to the first blockchain account, executing the first method, and calling a second method of the business intelligent contract to obtain the contract executing result.
15. The method of claim 13 or 14, prior to the obtaining the first blockchain transaction sent by the under-chain system to invoke the schedule-governing intelligence contract at the blockchain network, further comprising:
acquiring a second blockchain transaction sent by the under-chain system and used for calling the scheduling management and control intelligent contract; the second blockchain transaction is generated by the second blockchain account of the under-chain system after receiving a contract deployment request of a business intelligent contract developer for the business intelligent contract, and establishes a transaction of an association relationship between a contract unique identifier of the business intelligent contract and a target blockchain account with calling authority of the business intelligent contract by triggering a third method at the dispatch management intelligent contract;
Triggering the scheduling management intelligent contract to execute the third method based on the second blockchain transaction, and establishing the association relation; the association relationship is used for determining whether the first user has calling authority for the business intelligent contract;
acquiring a third blockchain transaction sent by the under-chain system for deploying the business intelligent contract;
deploying the business intelligence contract at the blockchain network based on a contract code of the business intelligence contract carried by the third blockchain transaction.
16. The method of claim 15, further comprising:
acquiring a fourth blockchain transaction sent by the under-chain system and used for calling the scheduling management and control intelligent contract; the fourth blockchain transaction is generated by the under-chain system by utilizing a second blockchain account of the under-chain system after receiving a cancellation request of the calling authority of a specified user for the business intelligent contract;
and triggering the scheduling management intelligent contract to cancel the association relationship between the preset contract unique identification of the business intelligent contract and the blockchain account of the appointed user based on the fourth blockchain transaction.
17. The method of claim 13, wherein the triggering the execution of the schedule-controlled smart contract based on the first blockchain transaction, after obtaining the business transaction result of the first user, further comprises:
storing a fifth blockchain transaction to the blockchain network for recording a result of execution of the contract using the schedule-managed intelligent contract; the fifth blockchain transaction carries log data in a key value pair format, wherein the log data is used for recording the contract execution result;
transmitting a hash value of the fifth blockchain transaction to the under-chain system;
acquiring an on-chain business handling result query request generated by the under-chain system based on the hash value of the fifth blockchain transaction;
and responding to the on-chain business handling result query request, and sending the log data carried in the fifth blockchain transaction to the under-chain system.
18. A blockchain-based business transaction device, applied to a chain-based system, comprising:
the first acquisition module is used for acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
a first sending module, configured to send, in response to the service handling request, a first blockchain transaction for invoking a scheduling management and control intelligence contract at the blockchain network to the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
And the receiving module is used for receiving the contract execution result of the business intelligent contract fed back by the blockchain network to obtain the business handling result of the first user.
19. The apparatus of claim 18, the apparatus further comprising:
the second acquisition module is used for acquiring a user registration request of the first user;
the generation module is used for responding to the user registration request and generating a first under-link account of the first user and a public and private key pair corresponding to the first under-link account;
the storage module is used for storing the public key in the public-private key pair corresponding to the first under-chain account to obtain a first public key of the first user;
the second sending module is used for sending the private key in the public-private key pair corresponding to the first link account to the user equipment of the first user; the user equipment is used for storing a private key in a public-private key pair corresponding to the first under-link account to obtain a first private key of the first user;
the first obtaining module is specifically configured to: acquiring a business handling request carrying a first digital signature generated by using a first private key of the first user;
the first sending module is specifically configured to: and if the first public key passes the first digital signature verification, sending the first blockchain transaction to the blockchain network.
20. The apparatus of claim 18, wherein the schedule-governing intelligent contract pre-establishes an association between a contract unique identification of the business intelligent contract and a target blockchain account having call rights for the business intelligent contract; storing a corresponding relation between the target blockchain account and a second public key at the blockchain network; the under-chain system stores a first blockchain account of the first user and a second private key corresponding to the first blockchain account;
the first sending module is specifically configured to: responding to the business handling request, and sending the first blockchain transaction generated by utilizing the first blockchain account and the second private key to the blockchain network; the first blockchain transaction is used for calling a second method of the business intelligent contract by triggering the scheduling management intelligent contract to execute a first method so as to obtain a contract execution result;
the scheduling management and control intelligent contract is specifically used for: after determining that the first blockchain account belongs to the target blockchain account based on the association relation, and verifying a second digital signature generated by using the second private key carried in the first blockchain transaction by using the second public key corresponding to the first blockchain account, and calling a second method of the business intelligent contract to obtain a contract execution result;
If the schedule management intelligent contract is also used for: storing a fifth blockchain transaction to the blockchain network for recording a result of the contract execution; the fifth blockchain transaction carries log data in a key value pair format for recording the contract execution result, and the device further comprises:
a third obtaining module, configured to obtain a query request for a business transaction result of the first user at the blockchain network;
and the fourth acquisition module is used for responding to the query request, acquiring the log data carried in the fifth blockchain transaction from the blockchain network based on the hash value of the fifth blockchain transaction fed back in advance by the blockchain network, and obtaining a query result.
21. The apparatus of claim 18, further comprising:
a fifth obtaining module, configured to obtain a contract deployment instruction of a third user for the business intelligence contract; the contract deployment instruction is used for indicating a business intelligent contract developer and a target user with the calling authority of the business intelligent contract; the under-chain system stores a third public key corresponding to a second under-chain account of the business intelligent contract developer;
A sixth obtaining module, configured to obtain a contract deployment request carrying a third digital signature generated by using a third private key corresponding to a third under-link account of the second user;
the judging module is used for judging whether the third public key can pass the verification aiming at the third digital signature;
a third sending module, configured to send a second blockchain transaction for invoking the schedule-managed intelligent contract to the blockchain network if the third public key is used to verify for the third digital signature; the scheduling management and control intelligent contract is used for responding to the second blockchain transaction, establishing an association relation between a contract unique identifier of the business intelligent contract and a target blockchain account with the calling authority of the business intelligent contract, and determining whether the first user has the calling authority for the business intelligent contract or not based on the association relation;
and the fourth sending module is used for sending a third blockchain transaction for deploying the business intelligent contract to the blockchain network.
22. A blockchain-based business handling device for a blockchain node at a blockchain network, comprising:
The acquisition module is used for acquiring a first blockchain transaction sent by the under-chain system and used for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
the contract executing module is used for triggering the scheduling management and control intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
and the sending module is used for sending the contract execution result of the business intelligent contract to the under-link system.
23. The apparatus of claim 22, wherein the schedule-governing intelligent contract pre-establishes an association between a contract unique identification of the business intelligent contract and a target blockchain account having call rights for the business intelligent contract; storing a corresponding relation between the target blockchain account and a second public key at the blockchain network;
The under-chain system stores a first blockchain account of the first user and a second private key corresponding to the first blockchain account; the first blockchain transaction is generated by using the first blockchain account and the second private key, and the second method of the business intelligent contract is called by triggering the scheduling management intelligent contract to execute a first method so as to obtain the transaction of the contract execution result;
the contract execution module is specifically configured to:
based on the first blockchain transaction, triggering the scheduling management intelligent contract to judge whether the first blockchain account belongs to the target blockchain account by utilizing the association relationship and the corresponding relationship, and verifying a second digital signature generated by using the second private key and carried in the first blockchain transaction by utilizing the second public key corresponding to the first blockchain account to obtain a judging result;
and if the judging result indicates that the first blockchain account belongs to the target blockchain account and the second digital signature can be verified by using the second public key corresponding to the first blockchain account, executing the first method, and calling a second method of the business intelligent contract to obtain the contract executing result.
24. A blockchain-based business transaction device, the device being a device at a system below a chain, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a business handling request of a first user; the business handling request is used for requesting to use a business intelligent contract at the blockchain network to handle business;
responsive to the business transaction request, sending a first blockchain transaction to the blockchain network for invoking a schedule-managed intelligent contract at the blockchain network; the scheduling management intelligent contract is used for responding to the first blockchain transaction, and calling the business intelligent contract after determining that the first user has the calling authority for the business intelligent contract so as to obtain a contract execution result of the business intelligent contract;
and receiving a contract execution result of the business intelligent contract fed back by the blockchain network to obtain a business handling result of the first user.
25. A blockchain-based business handling device, the device being a device at a blockchain network, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a first blockchain transaction sent by a system under a chain for calling a scheduling management intelligent contract at the blockchain network; the first blockchain transaction is generated by the under-chain system in response to a business transaction request by a first user to transact business using a business intelligence contract at the blockchain network;
triggering the dispatch management intelligent contract to execute based on the first blockchain transaction to obtain a business handling result of the first user; the business handling result is a contract execution result of the business intelligent contract, which is obtained by calling the business intelligent contract after the scheduling management control intelligent closes to determine that the first user has the calling authority for the business intelligent contract;
And sending a contract execution result of the business intelligent contract to the under-link system.
CN202311396850.3A 2023-10-25 2023-10-25 Business handling method, device and equipment based on block chain Pending CN117527319A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311396850.3A CN117527319A (en) 2023-10-25 2023-10-25 Business handling method, device and equipment based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311396850.3A CN117527319A (en) 2023-10-25 2023-10-25 Business handling method, device and equipment based on block chain

Publications (1)

Publication Number Publication Date
CN117527319A true CN117527319A (en) 2024-02-06

Family

ID=89754029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311396850.3A Pending CN117527319A (en) 2023-10-25 2023-10-25 Business handling method, device and equipment based on block chain

Country Status (1)

Country Link
CN (1) CN117527319A (en)

Similar Documents

Publication Publication Date Title
TWI736705B (en) Business processing method and device
CN110336797B (en) Enterprise authentication and authentication tracing method, device and equipment based on block chain
US11386191B2 (en) Trusted hardware-based identity management methods, apparatuses, and devices
WO2019149021A1 (en) Data processing method and apparatus for claims settlement service, and electronic device and server
CN113255005B (en) Block chain-based data asset circulation method, device and equipment
CN111767578B (en) Data inspection method, device and equipment
EP3964995B1 (en) Data processing methods, apparatuses, and devices
CN114884674B (en) User data circulation method, device and equipment based on block chain
EP3961456B1 (en) Data authorization information acquisition methods, apparatuses, and devices
CN111899008B (en) Resource transfer method, device, equipment and system
CN115130075A (en) Digital signature method and device, electronic equipment and storage medium
CN114266680A (en) Block chain-based electronic contract signing method, device and system
US20220158818A1 (en) Blockchain based service reservation and delegation
CN112434347B (en) Rental business processing method, device, equipment and system
CN117527319A (en) Business handling method, device and equipment based on block chain
CN115567218A (en) Data processing method and device of security certificate based on block chain and server
CN115018499A (en) Block chain-based digital certificate issuing method, device and system
CN113507432A (en) Alliance link authority management method and device
CN113282671A (en) Claims settlement method and device based on block chain and electronic equipment
CN114726537B (en) Data processing method and device
CN113673844B (en) Information feedback method, device and equipment
CN113761496B (en) Identity verification method and device based on blockchain and electronic equipment
CN116186655A (en) Identity verification method and equipment based on derivative verifiable statement
CN115935427A (en) Service request processing method, device and equipment
CN116962061A (en) User identity verification method, device and equipment based on 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