Nothing Special   »   [go: up one dir, main page]

CN113220453A - Method and device for initiating transaction in blockchain system - Google Patents

Method and device for initiating transaction in blockchain system Download PDF

Info

Publication number
CN113220453A
CN113220453A CN202110513384.7A CN202110513384A CN113220453A CN 113220453 A CN113220453 A CN 113220453A CN 202110513384 A CN202110513384 A CN 202110513384A CN 113220453 A CN113220453 A CN 113220453A
Authority
CN
China
Prior art keywords
target
transaction
user
blockchain
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110513384.7A
Other languages
Chinese (zh)
Other versions
CN113220453B (en
Inventor
徐培元
顾俊
陈美清
马超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
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 Alipay Hangzhou Information Technology Co Ltd, Ant Blockchain Technology Shanghai Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110513384.7A priority Critical patent/CN113220453B/en
Publication of CN113220453A publication Critical patent/CN113220453A/en
Application granted granted Critical
Publication of CN113220453B publication Critical patent/CN113220453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present specification provides a method and apparatus for initiating a transaction in a blockchain system, where the blockchain system includes a plurality of blockchains, an intermediate device, and a management platform; according to the method, the intermediary device receives a transaction request from a device of a user for initiating a target transaction; the intermediate device instructs the management platform to determine a target block chain of the plurality of block chains for executing the target transaction, and the management platform returns first information of the target block chain to the intermediate device; and the intermediate equipment initiates the target transaction to the target block chain according to the first information. Therefore, on the premise of improving the service throughput of the block chains through the block chains, the block chains in the block chain system are abstracted into one chain, the complexity of the bottom multi-chain is shielded for a user, and the user does not need to pay attention to a specific block chain corresponding to the service in the process of using the block chain service.

Description

Method and device for initiating transaction in blockchain system
Technical Field
One or more embodiments of the present disclosure relate to the field of blockchain technologies, and in particular, to a method and an apparatus for initiating a transaction in a blockchain system.
Background
Block chains are increasingly used in various fields due to their traceable, tamper-free nature. However, as the number of users increases, the service call volume increases, and the processing performance limit of a single physical block chain becomes more and more obvious. Therefore, the processing capacity of the blockchain system can be improved by deploying a plurality of physical blockchains. However, the introduction of multiple physical blockchains increases the complexity of users using blockchain services.
Disclosure of Invention
To solve one of the above technical problems, one or more embodiments of the present disclosure provide a method and apparatus for initiating a transaction in a blockchain system.
According to a first aspect, there is provided a method of initiating a transaction in a blockchain system, the blockchain system comprising a plurality of blockchains, an intermediary device and a management platform; the method comprises the following steps:
the intermediary device receiving a transaction request from a device of a user to initiate a target transaction;
the intermediate device instructs the management platform to determine a target block chain of the plurality of block chains for executing the target transaction, and the management platform returns first information of the target block chain to the intermediate device;
and the intermediate equipment initiates the target transaction to the target block chain according to the first information.
Optionally, the target transaction is a transaction for processing a target intelligent contract;
wherein the intermediate device instructs the management platform to determine a target blockchain of the plurality of blockchains to execute the target transaction, including:
and the intermediate equipment acquires second information of the target intelligent contract and instructs the management platform to determine a block chain corresponding to the target intelligent contract as the target block chain based on the second information.
Optionally, the initiating, by the intermediate device, the target transaction to the target blockchain according to the first information includes:
the intermediate device determines whether the user corresponds to the target blockchain, and sends the target transaction to the target blockchain according to the first information in a case where the user is determined to correspond to the target blockchain.
Optionally, the determining, by the intermediary device, whether the user corresponds to the target blockchain includes:
the intermediate equipment instructs the management platform to inquire the block chain corresponding to the user;
the management platform inquires the block chain corresponding to the user and returns third information of the block chain corresponding to the user to the intermediate equipment;
the intermediary device determines whether the user corresponds to the target blockchain based on the third information and the first information.
Optionally, the method further includes:
the intermediate device checks whether the user has a target authority to send the target transaction to the target block chain or not when determining that the user does not correspond to the target block chain, and sends the target transaction to the target block chain according to the first information when the user has the target authority.
Optionally, the target transaction is a transaction for deploying an intelligent contract;
wherein the intermediate device instructs the management platform to determine a target blockchain of the plurality of blockchains to execute the target transaction, including:
and the intermediate equipment acquires the information of the user and indicates the management platform to determine the block chain corresponding to the user as the target block chain based on the information of the user.
Optionally, the method further includes:
after the target transaction is successfully executed, the intermediate device instructs the management platform to associate the intelligent contract with the target blockchain.
According to a second aspect, there is provided a method of initiating a transaction in a blockchain system, the method being applied to an intermediary device, comprising:
receiving a transaction request from a device of a user; the transaction request is used for initiating a target transaction for processing a target intelligent contract;
determining a target blockchain of the plurality of blockchains to execute the target transaction;
determining whether the user corresponds to the target blockchain;
in an instance in which it is determined that the user corresponds to the target blockchain, initiating the target transaction to the target blockchain.
Optionally, the method further includes:
in an instance in which it is determined that the user does not correspond to the target blockchain, verifying whether the user has permission to send the target transaction to the target blockchain.
According to a third aspect, there is provided an apparatus for initiating a transaction in a blockchain system, the apparatus being deployed at an intermediary device, comprising:
a receiving module for receiving a transaction request from a device of a user; the transaction request is used for initiating a target transaction for processing a target intelligent contract;
a first determination module to determine a target blockchain of the plurality of blockchains to perform the target transaction;
a second determining module to determine whether the user corresponds to the target blockchain;
an initiating module to initiate the target transaction to the target blockchain if it is determined that the user corresponds to the target blockchain.
Optionally, the method further includes:
a checking module, configured to check whether the user has an authority to send the target transaction to the target blockchain, in a case that it is determined that the user does not correspond to the target blockchain.
According to a fourth aspect, there is provided a computer readable storage medium, storing a computer program which, when executed by a processor, implements the method of any of the first aspects above.
According to a fifth aspect, there is provided a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the first aspects when executing the program.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects:
in the method and apparatus for initiating a transaction in a blockchain system provided in an embodiment of the present specification, a transaction request for initiating a target transaction is received from a device of a user through an intermediate device, a management platform is instructed to determine a target blockchain for executing the target transaction among a plurality of blockchains, the management platform returns first information of the target blockchain to the intermediate device, and the intermediate device initiates the target transaction to the target blockchain according to the first information. Therefore, on the premise of improving the service throughput of the block chains through the block chains, the block chains in the block chain system are abstracted into one chain, the complexity of the bottom multi-chain is shielded for a user, and the user does not need to pay attention to a specific block chain corresponding to the service in the process of using the block chain service.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block chain system scenario diagram shown in accordance with an exemplary embodiment of the present description;
FIG. 2 is an interactive flow diagram illustrating a method of initiating a transaction in a blockchain system in accordance with an exemplary embodiment of the present specification;
FIG. 3 is an interactive flow diagram illustrating another method of initiating a transaction in a blockchain system in accordance with an exemplary embodiment of the present specification;
FIG. 4 is an interactive flow diagram illustrating another method of initiating a transaction in a blockchain system in accordance with an exemplary embodiment of the present specification;
FIG. 5 is a block diagram illustrating an apparatus for initiating a transaction in a blockchain system according to an exemplary embodiment of the present specification;
FIG. 6 is a block diagram illustrating a computing device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which like numerals refer to the same or similar elements throughout the different views unless otherwise specified. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a block chain system scene diagram according to an exemplary embodiment.
In the scenario illustrated in fig. 1, the blockchain system may include a plurality of blockchains, an intermediary, and a management platform. The intermediate device may be a device with a routing function, such as a gateway, and the management platform may be a device with computing and processing capabilities, a platform, a server, or a device cluster. The user's device may communicate with an intermediate device that may communicate with the management platform and each blockchain, respectively.
In particular, the user's device may send a transaction request to the intermediary device, the transaction request being used to initiate the target transaction. The target transaction may be a normal non-contract transaction, a transaction that deploys a smart contract, or a transaction that processes a target smart contract. The processing target intelligent contract may be an upgrading target intelligent contract, a freezing or unfreezing target intelligent contract, a destroying target intelligent contract, a calling target intelligent contract, and the like.
The intermediate device responds to the transaction request and sends indication information to the management platform to indicate the management platform to determine a target block chain for executing the target transaction in the plurality of block chains. After determining the target block chain, the management platform acquires first information of the target block chain and returns the first information to the intermediate device. The first information of the target block chain may be information such as an address of the target block chain or an identification of the target block chain. After receiving the first information, the intermediate device may initiate a target transaction to the target blockchain according to the first information. The nodes of the target blockchain process the target intelligent contract by executing the target transaction.
The embodiments provided in the present specification will be described in detail with reference to specific examples.
As shown in fig. 2, fig. 2 is an interactive flow diagram illustrating a method of initiating a transaction in a blockchain system in accordance with an exemplary embodiment. The block chain system comprises a plurality of block chains, intermediate equipment and a management platform, and the method comprises the following steps:
in step 201, the intermediary device receives a transaction request from a device of a user to initiate a target transaction.
In this embodiment, the intermediary device may receive a transaction request from the user's device for initiating the target transaction. The device of the user may be a terminal device held by the user, and as will be understood by those skilled in the art, the terminal device may be a mobile terminal device such as a smart phone, a smart wearable device, a tablet computer, a notebook computer, a desktop computer, an electronic payment device, and the like. The target transaction may be a common non-contract transaction, a transaction for deploying an intelligent contract, or a transaction for processing an intelligent contract. It is to be understood that the present embodiment is not limited to a particular type of targeted transaction.
In step 203, the intermediate device sends indication information to the management platform based on the transaction request to instruct the management platform to determine a target block chain of the plurality of block chains to execute the target transaction.
In step 205, the management platform determines a target block chain for executing the target transaction under the indication of the indication information.
In this embodiment, the transaction request may carry information for initiating the target transaction, and specifically may include related information related to a target block chain for executing the target transaction. For example, the related information may be information of the user, or may also be information of a target intelligent contract to be processed, and the like. The intermediate device may obtain the relevant information from the transaction request and send indication information to the management platform based on the relevant information to instruct the management platform to determine a target blockchain of the plurality of blockchains to execute the target transaction.
For example, in one implementation, the target transaction is a normal, non-contract transaction, or a transaction that deploys smart contracts. The intermediate device may obtain information of the user from the transaction request and send indication information to the management platform to instruct the management platform to determine a target block chain for performing the target transaction based on the information of the user. The management platform may search the block chain associated with the user information from the pre-stored data as the target block chain under the instruction of the instruction information.
In another implementation, the target transaction is a transaction that processes a smart contract. The intermediate device may obtain information of a target intelligent contract to be processed from the transaction request and send indication information to the management platform to instruct the management platform to determine a target block chain for executing the target transaction based on the information of the target intelligent contract. The management platform can search the block chain associated with the information of the target intelligent contract from the pre-stored data under the indication of the indication information to serve as the target block chain.
In step 207, the management platform returns the first information of the target blockchain.
In this embodiment, after determining the target block chain, the management platform returns the first information of the target block chain to the intermediate device. The first information of the target block chain may be identification information of the target block chain, or address information of the target block chain, and it can be understood that the specific type of the first information is not limited in this embodiment.
In step 209, the intermediary initiates a target transaction to the target blockchain according to the first information.
In this embodiment, the intermediate device may initiate a target transaction to the target blockchain according to the first information of the target blockchain. Specifically, in an implementation manner, a private key of the device of the user may be managed by the intermediate device, and in this scenario, a transaction request sent by the device of the user to the intermediate device may carry information used for generating a target transaction, and the like. The intermediate device may generate a target transaction based on the transaction request, perform a signature using a private key of the device of the user, and initiate the target transaction to the target block chain according to first information after receiving the first information of the target block chain.
In another implementation manner, the private key of the device of the user is managed by the device itself, and in this scenario, the device of the user may generate and sign the target transaction in advance, and then send a transaction request carrying the signed target transaction to the intermediate device. After receiving the first information of the target blockchain, the intermediate device may directly forward the target transaction in the transaction request to the target blockchain according to the first information.
In the method for initiating a transaction in a blockchain system provided in the above embodiments of the present specification, a transaction request for initiating a target transaction is received from a device of a user through an intermediate device, a management platform is instructed to determine a target blockchain for executing the target transaction in a plurality of blockchains, the management platform returns first information of the target blockchain to the intermediate device, and the intermediate device initiates the target transaction to the target blockchain according to the first information. Therefore, on the premise of improving the service throughput of the block chains through the block chains, the block chains in the block chain system are abstracted into one chain, the complexity of the bottom multi-chain is shielded for a user, and the user does not need to pay attention to a specific block chain corresponding to the service in the process of using the block chain service.
As shown in FIG. 3, FIG. 3 illustrates an interactive flow diagram of a method for initiating a transaction in another blockchain system according to an exemplary embodiment describing the process of initiating a transaction to deploy a smart contract, which may include the steps of:
in step 301, an intermediary device receives a transaction request from a device of a user to initiate a target transaction to deploy a smart contract.
In step 303, the intermediary device obtains the user's information from the transaction request.
In step 305, the intermediate device sends indication information to the management platform based on the information of the user to instruct the management platform to determine a target block chain for executing the target transaction in the plurality of block chains according to the information of the user.
In this embodiment, the intermediate device may receive a transaction request from a device of a user, where the transaction request is used to initiate a target transaction for deploying the smart contract, and the transaction request may carry information of the user. The information of the user may include, but is not limited to, an identification of the user, a characteristic of the user, an attribute of the user, an area to which the user belongs, and the like. The intermediate device may obtain information of the user from the transaction request, and send instruction information to the management platform based on the information of the user to instruct the management platform to determine a target block chain for executing a target transaction among the plurality of block chains according to the information of the user.
In step 307, under the instruction of the instruction information, the management platform determines the block chain corresponding to the user as the target block chain according to the information of the user.
In this embodiment, each user may be previously assigned to a different block chain according to the feature, attribute, belonging area, or the like of each user, and the association relationship between the information of each user and each corresponding block chain may be stored in the database of the management platform. After receiving the indication information sent by the intermediate device, the management platform may search, under the indication of the indication information, a block chain having an association relationship with the user from the database according to the information of the user, and use the block chain corresponding to the determined user as a target block chain.
For example, each user may be assigned to a different block chain according to the user belonging area, specifically, a user belonging to area a is assigned to block chain 1, a user belonging to area B is assigned to block chain 2, and a user belonging to area C is assigned to block chain 3. Then, the following relationships are stored in the database of the management platform: the association relationship between the belonging area a and the block chain 1, the association relationship between the belonging area B and the block chain 2, and the association relationship between the belonging area C and the block chain 3.
And the intermediate equipment responds to the received transaction request, acquires the information of which the area to which the user belongs is A from the transaction request and sends indication information to the management platform. Under the indication of the indication information, the management platform searches the block chain 1 having an association relationship with the area A from the database based on the information that the area A to which the user belongs, thereby determining that the block chain corresponding to the user is the block chain 1, and taking the block chain 1 as a target block chain.
In step 309, the management platform returns the first information of the target blockchain.
In step 311, the intermediary initiates a target transaction to the target blockchain according to the first information.
In step 313, after the target transaction is successfully executed, the intermediary instructs the management platform to associate the deployed smart contract with the target blockchain.
In this embodiment, the blockchain node of the target blockchain receives and executes the target transaction initiated by the intermediate device, and when it is determined that the target transaction is successfully executed, returns a receipt of the target transaction to the intermediate device. The intermediate device, in response to the receipt, instructs the management platform to associate the deployed intelligent contract with the target blockchain. In particular, the management platform may store an identification of the deployed intelligent contract and an identification of the target blockchain in association in a database.
It should be noted that, for the same steps as in the embodiment of fig. 2, details are not repeated in the embodiment of fig. 3, and related contents may refer to the embodiment of fig. 2.
In the method for initiating a transaction in a blockchain system provided by the above embodiment of the present specification, in a process of initiating a transaction for deploying an intelligent contract, an intermediate device receives, from a device of a user, a transaction request for initiating a target transaction for deploying the intelligent contract, acquires information of the user from the transaction request, and sends, based on the information of the user, indication information to a management platform to indicate the management platform to determine, according to the information of the user, a blockchain corresponding to the user as a target blockchain, and returns first information of the target blockchain. And the intermediate equipment initiates a target transaction to the target block chain according to the first information. After the target transaction is successfully executed, the intermediate device instructs the management platform to associate the deployed intelligent contract with the target blockchain. In this embodiment, the intermediate device may obtain the information of the user and instruct the management platform to determine the blockchain corresponding to the user as the target blockchain for executing the target transaction according to the information of the user, so that the user does not need to pay attention to a specific blockchain corresponding to a service in the process of using the blockchain service, thereby improving the service efficiency and the service quality of the blockchain system.
It should be noted that, in some cases of deploying intelligent contracts, if other related intelligent contracts are also involved in the deployed intelligent contracts, the intelligent contracts to be deployed may also be deployed on the block chain of the related intelligent contracts. The blockchain of the associated smart contract is not necessarily the blockchain to which the information of the user corresponds. The management platform may provide an interface through which a user may view an address of a blockchain associated with the intelligent contract and deploy the intelligent contract to be deployed onto the blockchain associated with the intelligent contract.
FIG. 4, as shown in FIG. 4, illustrates a flow diagram of a method for initiating a transaction in another blockchain system according to an exemplary embodiment detailing the process of initiating a transaction for processing a target smart contract, which may include the steps of:
in step 401, the intermediary receives a transaction request from a device of a user to initiate a target transaction to process a target smart contract.
In step 403, the intermediary obtains second information of the target smart contract from the transaction request.
In step 405, the intermediary device sends indication information to the management platform based on the second information to instruct the management platform to determine a target blockchain for performing the target transaction among the plurality of blockchains according to the second information.
In this embodiment, the processing target intelligent contract may be an upgrading target intelligent contract, a freezing or unfreezing target intelligent contract, a destroying target intelligent contract, a calling target intelligent contract, or the like. The second information of the target intelligent contract may be carried in the transaction request sent by the device of the user to the intermediate device, and the second information may be identification information of the target intelligent contract, and the like.
In this embodiment, the intermediate device may obtain second information of the target intelligent contract from the transaction request, and send indication information to the management platform based on the second information to instruct the management platform to determine, according to the second information, a target block chain of the plurality of block chains for executing the target transaction.
It should be noted that, if other associated intelligent contracts are also involved in the target intelligent contract to be called, the user may search, in advance, addresses of the associated intelligent contracts, contract parameters of the associated intelligent contracts, and the like through an interface provided by the management platform. And recording the address of the associated intelligent contract and the contract parameters of the associated intelligent contract in the target intelligent contract (which can be recorded when the target intelligent contract is deployed, or recorded when the target intelligent contract is upgraded, etc.), so that the associated intelligent contract is used when the target intelligent contract is called.
In step 407, under the instruction of the instruction information, the management platform determines, according to the second information, a block chain corresponding to the target intelligent contract as a target block chain.
In this embodiment, the block chain corresponding to the target intelligent contract is a block chain for deploying the target intelligent contract, and after the target intelligent contract is deployed, the target intelligent contract is associated with the block chain for deploying the target intelligent contract, and the association relationship is stored in the database, so that the management platform can find the block chain corresponding to the target intelligent contract from the database according to the second information, and use the block chain as the target block chain.
In step 409, the management platform returns the first information of the target blockchain.
In step 411, the intermediary determines whether a preset condition is satisfied.
In step 413, the intermediate device initiates a target transaction to the target blockchain according to the first information if it is determined that the preset condition is satisfied.
In this embodiment, each user may be previously assigned to a different block chain according to the feature, attribute, belonging area, or the like of each user, and the association relationship between the information of each user and each corresponding block chain may be stored in the database of the management platform.
Specifically, after receiving a transaction request sent by a device of a user, the intermediate device may obtain information of the user from the transaction request, and instruct the management platform to query the blockchain corresponding to the user based on the information of the user. And the management platform inquires the block chain corresponding to the user from the database based on the information of the user and returns the third information of the block chain corresponding to the user to the intermediate equipment. The third information may be identification information of a block chain corresponding to the user, or address information of the block chain corresponding to the user, and it can be understood that the specific type of the third information is not limited in this embodiment.
The intermediary may determine whether the user corresponds to the target blockchain based on the third information and the first information. Specifically, if the first information and the third information are the same, it is described that the user corresponds to the target block chain. And if the first information is different from the third information, the user does not correspond to the target block chain. And in the case that the user is determined to correspond to the target block chain, determining that a preset condition is met, and initiating a target transaction to the target block chain according to the first information.
In the event that it is determined that the user does not correspond to the target blockchain, it may be further verified whether the user has a target permission to send the target transaction to the target blockchain. Generally, a user has the default authority to send transactions to the user's corresponding blockchain, while for other blockchains, the user may have the pre-empted authority to send transactions to the specified blockchain. After the authority is opened, the account on the designated block chain is established in a transaction form through the gateway, or the account on the designated block chain can be established directly through an interface provided by the management platform.
In particular, it may be verified by looking at the authority table whether the user has a target authority to send a target transaction to the target blockchain. And under the condition that the user is determined to have the target authority, the preset condition can be determined to be met, and the target transaction is sent to the target block chain according to the first information. And under the condition that the user is determined not to have the target authority, refusing to execute the operation of sending the target transaction to the target block chain according to the first information, and simultaneously returning a notification message of refusing to send the target transaction to the equipment of the user. The user can firstly open the target authority and then send the transaction request to the intermediate equipment again.
It should be noted that, for the same steps as in the embodiment of fig. 2 and fig. 3, description is not repeated in the embodiment of fig. 4, and related contents may refer to the embodiment of fig. 2 and fig. 3.
In the method for initiating a transaction in a blockchain system provided by the above embodiments of the present specification, in the process of initiating a transaction for processing a target intelligent contract, the intermediate device receives, from the device of the user, a transaction request for initiating a target transaction for processing a target intelligent contract, acquires second information of the target intelligent contract from the transaction request, and sends, based on the second information, indication information to the management platform to instruct the management platform to determine, according to the second information, a target blockchain for executing the target transaction in the plurality of blockchains. And under the indication of the indication information, the management platform determines the block chain corresponding to the target intelligent contract as the target block chain according to the second information, and returns the first information of the target block chain. And the intermediate equipment determines whether a preset condition is met, and initiates a target transaction to the target block chain according to the first information under the condition that the preset condition is met. In this embodiment, the intermediate device may obtain the second information of the target intelligent contract, and instruct the management platform to determine, according to the second information, the block chain corresponding to the user as the target block chain for executing the target transaction, so that complexity of the user in using the multi-chain service is reduced, a specific block chain corresponding to the service does not need to be concerned, and service efficiency and service quality of the block chain system are improved.
It should be noted that although in the above embodiments, the operations of the methods of the embodiments of the present specification have been described in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Corresponding to the embodiments of the method for initiating a transaction in a blockchain system, embodiments of an apparatus for initiating a transaction in a blockchain system are also provided.
As shown in fig. 5, fig. 5 is a block diagram of an apparatus for initiating a transaction in a blockchain system according to an exemplary embodiment of the present disclosure, where the apparatus is deployed in an intermediary device, and the apparatus may include: a receiving module 501, a first determining module 502, a second determining module 503 and an initiating module 504.
The receiving module 501 is configured to receive a transaction request from a device of a user, where the transaction request is used to initiate a target transaction for processing a target smart contract.
A first determining module 502 is configured to determine a target blockchain of the plurality of blockchains to execute the target transaction.
A second determining module 503, configured to determine whether the user corresponds to the target blockchain.
An initiating module 504, configured to initiate a target transaction to the target blockchain in a case that it is determined that the user corresponds to the target blockchain.
In some embodiments, the apparatus may further comprise: a verification module (not shown).
The verification module is used for verifying whether the user has the right to send the target transaction to the target block chain or not in the case that the user is determined not to correspond to the target block chain.
It should be understood that the above-mentioned apparatus may be preset in the intermediate device, and may also be loaded into the intermediate device by downloading or the like. Corresponding modules in the above-mentioned apparatus can cooperate with modules in the intermediate device to implement a transaction scheme in the blockchain system.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of one or more embodiments of the present specification. One of ordinary skill in the art can understand and implement it without inventive effort.
One or more embodiments of the present specification also provide a computer-readable storage medium storing a computer program, where the computer program can be used to execute the method for initiating a transaction in the blockchain system provided in any one of the embodiments of fig. 2 to 4.
Corresponding to the method for initiating a transaction in a blockchain system described above, one or more embodiments of the present specification also set forth a schematic block diagram of a computing device according to an exemplary embodiment of the present specification, shown in fig. 6. Referring to fig. 6, at the hardware level, the computing device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form a device for initiating the transaction in the blockchain system on a logic level. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
It will be further appreciated by those of ordinary skill in the art that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The software modules may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments, objects, technical solutions and advantages of the present application are described in further detail, it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present application, and are not intended to limit the scope of the present application, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present application should be included in the scope of the present application.

Claims (13)

1. A method of initiating a transaction in a blockchain system, the blockchain system comprising a plurality of blockchains, an intermediary device and a management platform; the method comprises the following steps:
the intermediary device receiving a transaction request from a device of a user to initiate a target transaction;
the intermediate device instructs the management platform to determine a target block chain of the plurality of block chains for executing the target transaction, and the management platform returns first information of the target block chain to the intermediate device;
and the intermediate equipment initiates the target transaction to the target block chain according to the first information.
2. The method of claim 1, wherein the target transaction is a transaction that processes a target smart contract;
wherein the intermediate device instructs the management platform to determine a target blockchain of the plurality of blockchains to execute the target transaction, including:
and the intermediate equipment acquires second information of the target intelligent contract and instructs the management platform to determine a block chain corresponding to the target intelligent contract as the target block chain based on the second information.
3. The method of claim 2, wherein the intermediate device initiating the target transaction to the target blockchain in accordance with the first information comprises:
the intermediate device determines whether the user corresponds to the target blockchain, and sends the target transaction to the target blockchain according to the first information in a case where the user is determined to correspond to the target blockchain.
4. The method of claim 3, wherein the intermediary device determining whether the user corresponds to the target blockchain comprises:
the intermediate equipment instructs the management platform to inquire the block chain corresponding to the user;
the management platform inquires the block chain corresponding to the user and returns third information of the block chain corresponding to the user to the intermediate equipment;
the intermediary device determines whether the user corresponds to the target blockchain based on the third information and the first information.
5. The method of claim 3, further comprising:
the intermediate device checks whether the user has a target authority to send the target transaction to the target block chain or not when determining that the user does not correspond to the target block chain, and sends the target transaction to the target block chain according to the first information when the user has the target authority.
6. The method of claim 1, wherein the target transaction is a transaction to deploy a smart contract;
wherein the intermediate device instructs the management platform to determine a target blockchain of the plurality of blockchains to execute the target transaction, including:
and the intermediate equipment acquires the information of the user and indicates the management platform to determine the block chain corresponding to the user as the target block chain based on the information of the user.
7. The method of claim 6, further comprising:
after the target transaction is successfully executed, the intermediate device instructs the management platform to associate the intelligent contract with the target blockchain.
8. A method for initiating a transaction in a blockchain system, the method applied to an intermediary device, comprising:
receiving a transaction request from a device of a user; the transaction request is used for initiating a target transaction for processing a target intelligent contract;
determining a target blockchain of the plurality of blockchains to execute the target transaction;
determining whether the user corresponds to the target blockchain;
in an instance in which it is determined that the user corresponds to the target blockchain, initiating the target transaction to the target blockchain.
9. The method of claim 8, further comprising:
in an instance in which it is determined that the user does not correspond to the target blockchain, verifying whether the user has permission to send the target transaction to the target blockchain.
10. An apparatus for initiating a transaction in a blockchain system, the apparatus disposed at an intermediary device, comprising:
a receiving module for receiving a transaction request from a device of a user; the transaction request is used for initiating a target transaction for processing a target intelligent contract;
a first determination module to determine a target blockchain of the plurality of blockchains to perform the target transaction;
a second determining module to determine whether the user corresponds to the target blockchain;
an initiating module to initiate the target transaction to the target blockchain if it is determined that the user corresponds to the target blockchain.
11. The apparatus of claim 10, further comprising:
a checking module, configured to check whether the user has an authority to send the target transaction to the target blockchain, in a case that it is determined that the user does not correspond to the target blockchain.
12. A computer-readable storage medium, having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any one of claims 1-9.
13. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, implements the method of any of claims 1-9.
CN202110513384.7A 2021-05-11 2021-05-11 Method and device for initiating transaction in blockchain system Active CN113220453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110513384.7A CN113220453B (en) 2021-05-11 2021-05-11 Method and device for initiating transaction in blockchain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110513384.7A CN113220453B (en) 2021-05-11 2021-05-11 Method and device for initiating transaction in blockchain system

Publications (2)

Publication Number Publication Date
CN113220453A true CN113220453A (en) 2021-08-06
CN113220453B CN113220453B (en) 2024-05-31

Family

ID=77095032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110513384.7A Active CN113220453B (en) 2021-05-11 2021-05-11 Method and device for initiating transaction in blockchain system

Country Status (1)

Country Link
CN (1) CN113220453B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023132346A1 (en) * 2022-01-05 2023-07-13 横河電機株式会社 Transaction recording system, transaction recording method, relay device, and update program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020902A (en) * 2018-12-27 2019-07-16 阿里巴巴集团控股有限公司 Card method and access method, device, electronic equipment are deposited across chain
CN110135844A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Credit record, querying method and device and electronic equipment based on block chain
WO2020073859A1 (en) * 2018-10-12 2020-04-16 阿里巴巴集团控股有限公司 Blockchain node service deployment method, apparatus and system, and computing device and medium
CN111275555A (en) * 2020-02-24 2020-06-12 中国工商银行股份有限公司 Block chain transaction processing method, transaction node and block chain system
CN112200571A (en) * 2020-10-09 2021-01-08 支付宝(杭州)信息技术有限公司 Resource distribution method and device based on block chain and electronic equipment
CN112435030A (en) * 2021-01-27 2021-03-02 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
WO2021082664A1 (en) * 2019-10-30 2021-05-06 支付宝(杭州)信息技术有限公司 Blockchain privacy data query method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020073859A1 (en) * 2018-10-12 2020-04-16 阿里巴巴集团控股有限公司 Blockchain node service deployment method, apparatus and system, and computing device and medium
CN110020902A (en) * 2018-12-27 2019-07-16 阿里巴巴集团控股有限公司 Card method and access method, device, electronic equipment are deposited across chain
CN110135844A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Credit record, querying method and device and electronic equipment based on block chain
WO2021082664A1 (en) * 2019-10-30 2021-05-06 支付宝(杭州)信息技术有限公司 Blockchain privacy data query method and apparatus
CN111275555A (en) * 2020-02-24 2020-06-12 中国工商银行股份有限公司 Block chain transaction processing method, transaction node and block chain system
CN112200571A (en) * 2020-10-09 2021-01-08 支付宝(杭州)信息技术有限公司 Resource distribution method and device based on block chain and electronic equipment
CN112435030A (en) * 2021-01-27 2021-03-02 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘雄文;: "多区块链交易分发和事件处理的系统方案", 计算机科学, no. 2, 15 November 2018 (2018-11-15) *
石润华;石泽;: "基于区块链技术的物联网密钥管理方案", 信息网络安全, no. 08, 10 August 2020 (2020-08-10) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023132346A1 (en) * 2022-01-05 2023-07-13 横河電機株式会社 Transaction recording system, transaction recording method, relay device, and update program
JP2023100076A (en) * 2022-01-05 2023-07-18 横河電機株式会社 Transaction recording system, transaction recording method, relay device, and update program
JP7444180B2 (en) 2022-01-05 2024-03-06 横河電機株式会社 Transaction recording system, transaction recording method and relay device

Also Published As

Publication number Publication date
CN113220453B (en) 2024-05-31

Similar Documents

Publication Publication Date Title
CN110096857B (en) Authority management method, device, equipment and medium for block chain system
CN110647559B (en) Data processing method, related node and system
CN110008665B (en) Authority control method and device for blockchain
CN113205416A (en) Service processing method and system based on block chain prediction machine
CN113067859B (en) Communication method and device based on cloud mobile phone
CN113407954A (en) Data management method and device based on block chain
CN110704177A (en) Computing task processing method and device, computer equipment and storage medium
CN111460504A (en) Service processing method, device, node equipment and storage medium
CN113259479A (en) Data processing method and equipment
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN114281263A (en) Storage resource processing method, system and equipment of container cluster management system
US20230007873A1 (en) Management Method and Apparatus for System Configuration Independent of Smart Contract for Blockchain
CN113220640A (en) Arbitration method and device based on block chain
CN113220453B (en) Method and device for initiating transaction in blockchain system
CN112580112B (en) Intelligent contract implementation method and device based on full-chain consensus and local deployment
CN114238065B (en) Test processing method, device, equipment and readable storage medium
CN105468941A (en) Right control method and device
CN113485758A (en) Micro-service issuing method and device, electronic equipment and storage medium
CN110111188A (en) Business handling method and apparatus
CN115511622A (en) Intelligent contract upgrading method, device, equipment and storage medium
CN111988473B (en) Voice communication call control method and device based on intelligent contract
KR102193157B1 (en) Apparatus and method for providing container service
CN113504872A (en) Method, system, equipment and medium for mounting virtual disk on cloud physical machine
CN114428723A (en) Test system, system test method, related device and storage medium
CN112306527A (en) Server upgrading method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240923

Address after: Room 803, floor 8, No. 618 Wai Road, Huangpu District, Shanghai 200010

Patentee after: Ant blockchain Technology (Shanghai) Co.,Ltd.

Country or region after: China

Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province

Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Country or region before: China

Patentee before: Ant blockchain Technology (Shanghai) Co.,Ltd.