CN112001800A - Method and device for processing service in block chain system - Google Patents

Method and device for processing service in block chain system Download PDF

Info

Publication number
CN112001800A
CN112001800A CN202011173787.3A CN202011173787A CN112001800A CN 112001800 A CN112001800 A CN 112001800A CN 202011173787 A CN202011173787 A CN 202011173787A CN 112001800 A CN112001800 A CN 112001800A
Authority
CN
China
Prior art keywords
blockchain
account
transaction
blockchains
corresponds
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
CN202011173787.3A
Other languages
Chinese (zh)
Other versions
CN112001800B (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202011173787.3A priority Critical patent/CN112001800B/en
Publication of CN112001800A publication Critical patent/CN112001800A/en
Application granted granted Critical
Publication of CN112001800B publication Critical patent/CN112001800B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

An embodiment of the present specification provides a method and an apparatus for performing service processing in a blockchain system, where the blockchain system includes N mutually independent blockchains, and the method includes: receiving a service processing request, wherein the service processing request is associated with a first account; determining that the first account corresponds to a first blockchain of the N blockchains; and sending a first transaction to the first blockchain so as to respond to the service processing request to perform service processing.

Description

Method and device for processing service in block chain system
Technical Field
The embodiment of the present specification relates to the technical field of blockchain, and more particularly, to a method and an apparatus for performing service processing in a blockchain system.
Background
The block chain technology is also called as distributed book technology, is decentralized distributed database technology and is characterized by decentralized, transparent disclosure, no tampering and trusty. Each transaction of the blockchain is broadcast to the blockchain nodes of the whole network, and each whole node has full and consistent data. In a federation chain, a user terminal typically uses a blockchain to perform service processing, such as processing for certificate storage and transfer, through a blockchain platform. However, in a single chain scenario, long runs accumulate large amounts of stored data, and accounts are becoming larger and larger, so that the processing power of the single chain is reduced. In addition, during periods of more concurrent transactions (e.g., twenty-one periods), the access pressure of a single chain increases, so that the processing of the single chain cannot meet the traffic demand.
Disclosure of Invention
The embodiments of the present disclosure are directed to provide a more efficient method for performing service processing in a blockchain system, so as to solve the deficiencies in the prior art.
To achieve the above object, one aspect of the present specification provides a method for performing service processing in a blockchain system, where the blockchain system includes N independent blockchains, the method including:
receiving a service processing request, wherein the service processing request is associated with a first account;
determining that the first account corresponds to a first blockchain of the N blockchains;
and sending a first transaction to the first blockchain so as to respond to the service processing request to perform service processing.
In one embodiment, determining that the first account corresponds to the first blockchain of the N blockchains includes determining that the first account corresponds to the first blockchain of the N blockchains based on a predetermined rule.
In one embodiment, the method further includes, after determining that a first account corresponds to a first blockchain of the N blockchains, recording a correspondence of the first account to the first blockchain.
In one embodiment, determining that a first account corresponds to a first blockchain of the N blockchains includes determining that the first account corresponds to the first blockchain based on a pre-recorded correspondence of the first account to the first blockchain.
In one embodiment, the method is executed by a blockchain platform, and the blockchain platform is connected to the N blockchains, respectively, where the receiving the service processing request includes receiving the first transaction, and a sending account of the first transaction is the first account.
In one embodiment, the first transaction includes a second account, wherein sending the first transaction to the first blockchain includes sending the first transaction to the first blockchain if it is determined that the second account corresponds to the first blockchain.
In one embodiment, a first contract is invoked in the first transaction, which also includes a second account to deploy the first contract.
In one embodiment, the first transaction is used to create a second account, and the method further includes, after determining that the first account corresponds to a first blockchain of the N blockchains, recording a correspondence of the second account to the first blockchain.
In one embodiment, sending the first transaction to the first blockchain for transaction processing includes sending the first transaction to the first blockchain for credentialing transaction processing.
In one embodiment, the business process request includes a second contract, and the determining that the first account corresponds to a first blockchain of the N blockchains includes determining that the first account corresponds to M blockchains of the N blockchains based on a first predetermined rule, and determining that the second contract corresponds to a first blockchain of the M blockchains based on a second predetermined rule.
In one embodiment, the method further includes, after determining that the second contract corresponds to a first blockchain of the M blockchains based on a second predetermined rule, recording a first corresponding relationship of the first account with the M blockchains and a second corresponding relationship of the second contract with the first blockchain, wherein the second corresponding relationship is associated with the first corresponding relationship.
Another aspect of the present specification provides an apparatus for performing service processing in a blockchain system, where the blockchain system includes N independent blockchains, the apparatus including:
a receiving unit configured to receive a service processing request, the service processing request being associated with a first account;
a determining unit configured to determine that the first account corresponds to a first blockchain of the N blockchains;
and the first sending unit is configured to send a first transaction to the first blockchain so as to respond to the service processing request for service processing.
In one embodiment, the determining unit is further configured to determine that the first account corresponds to a first blockchain of the N blockchains based on a predetermined rule.
In one embodiment, the apparatus further includes a first recording unit configured to record a correspondence relationship between a first account and a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
In one embodiment, the determining unit is further configured to determine that the first account corresponds to the first blockchain based on a pre-recorded correspondence between the first account and the first blockchain.
In an embodiment, the apparatus is disposed on a blockchain platform, and the blockchain platform is connected to the N blockchains, respectively, where the receiving unit is further configured to receive the first transaction, and a sending account of the first transaction is the first account.
In one embodiment, the first transaction includes a second account, and the first sending unit is further configured to send the first transaction to the first blockchain if it is determined that the second account corresponds to the first blockchain.
In one embodiment, a first contract is invoked in the first transaction, which also includes a second account to deploy the first contract.
In one embodiment, the first transaction is used to create a second account, and the apparatus further includes a second recording unit configured to record a correspondence relationship between the second account and a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
In one embodiment, the first sending unit is further configured to send the first transaction to the first blockchain for performing a credentialing business process.
Another aspect of the present specification provides a computer readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform any one of the above methods.
Another aspect of the present specification provides a computing device comprising a memory having stored therein executable code, and a processor that, when executing the executable code, implements any of the methods described above.
In the scheme for processing the service in the blockchain system according to the embodiment of the present specification, the transaction is allocated to the plurality of blockchains for processing based on the account associated with the transaction, so that the blockchain system can be provided with a capacity and a processing capacity which are expanded in parallel by the plurality of blockchains.
Drawings
The embodiments of the present specification may be made more clear by describing the embodiments with reference to the attached drawings:
FIG. 1 illustrates a schematic diagram of a blockchain system in accordance with embodiments of the present disclosure;
FIG. 2 is a flow diagram illustrating a method for performing traffic processing in a blockchain system according to an embodiment of the present disclosure;
FIG. 3 shows a process diagram for processing transaction 1 in a blockchain system;
FIG. 4 shows a process diagram for processing transaction 2 in a blockchain system;
FIG. 5 shows a content diagram of transaction 1 (Tx 1);
fig. 6 illustrates an apparatus 600 for performing traffic processing in a blockchain system according to an embodiment of the present disclosure.
Detailed Description
The embodiments of the present specification will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic diagram of a blockchain system according to an embodiment of the present disclosure. As shown in fig. 1, the blockchain system includes a blockchain platform 11, i.e., a blockchain platform server, and a plurality of user terminals (schematically shown as user terminals 12, 13, and 14). The user terminal is connected to the blockchain platform 11, and operates the blockchain through the blockchain platform 11. The blockchain platform 11 is connected to a plurality of independent blockchains, which are schematically illustrated in fig. 1 as blockchain 1, blockchain 2 and blockchain 3. The blockchain 1, the blockchain 2 and the blockchain 3 can be called as parallel chains of a blockchain system, and operate independently of each other, so as to process user requests respectively and store transaction data respectively, thereby improving the processing capacity and data storage capacity of the system.
The blockchain system including the blockchain 1 to the blockchain 3 is, for example, a system for storing certificates, the user a may send a request to the blockchain platform 11 through, for example, the user terminal 12, to send a transaction to the blockchain system, after receiving the request, the blockchain platform 11 may send a corresponding transaction to one of the blockchain 1 to the blockchain 3 according to a sending account of the request, to store the transaction into the corresponding blockchain, and return an identifier of the transaction to the user terminal 12, where the identifier of the transaction may be a hash value of the transaction. Subsequently, when user a wishes to query for the transaction, user a may provide an identification of the transaction to blockchain platform 11 for querying for the transaction. The transactions are respectively distributed to the blockchain 1, the blockchain 2 and the blockchain 3 according to the associated accounts of the transactions for processing, so that the effect of load balancing is achieved.
It is to be understood that the blockchain system shown in fig. 1 is merely exemplary, and the blockchain system according to embodiments of the present disclosure is not limited thereto. For example, each user terminal may assign transactions to and connect with a blockchain through a local client, thereby eliminating the need for assignment through blockchain platform 11. The above-described processing will be described in detail below.
Fig. 2 is a flowchart illustrating a method for performing service processing in a blockchain system including N independent blockchains according to an embodiment of the present disclosure, where the method includes:
step S202, receiving a service processing request, wherein the service processing request is associated with an account A;
step S204, determining that the account A corresponds to the block chain 1;
step S206, sending a transaction to the blockchain 1 to perform service processing in response to the service processing request.
In one embodiment, the method of FIG. 2 is performed by the blockchain platform 11 of FIG. 1.
First, in step S202, a service processing request is received, the service processing request being associated with account a.
The blockchain system may be used to handle a single service or may be used to handle multiple services. For example, the blockchain system may be used to process a credentialing service. For example, user a may use his account a to send a request to the blockchain platform 11 through the user terminal 12 to certify data 1 into the blockchain system.
In one embodiment, the account a may be the only account that user a registered with blockchain platform 11. That is, the account a is managed by the blockchain platform 11 and is not an account in a blockchain. For example, account A has an account name of "Alice".
In another embodiment, the account a may also be a blockchain account applied by the user a, so that the service processing request may be in the form of a transaction (e.g., transaction 1). That is, the user terminal 12 generates transaction 1 and sends transaction 1 to the blockchain platform 11. In another embodiment, the account a may also be a receiving account for transaction 1.
In step S204, it is determined that account a corresponds to blockchain 1.
In one embodiment, when account a first sends a business process request to blockchain platform 11, blockchain platform 11 may determine that account a corresponds to blockchain 1 according to a predetermined rule. For example, blockchain platform 11 may assign account a to one blockchain based on the city of residence of user a to which account a corresponds, e.g., if user a lives in beijing, account a is assigned to blockchain 1. In another embodiment, the blockchain platform 11 may perform a hash operation on the account a, for example, the hash operation is a random operation, and the operation result is any one of the values 1, 2, and 3, so that the transaction 1 may be assigned to a blockchain according to the result of the hash operation. After determining that account a corresponds to blockchain 1, blockchain platform 11 may record the correspondence of account a to blockchain 1. For example, the blockchain platform 11 may record the correspondence between the user account and the blockchain through table 1 below, where the account name of the account a is, for example, Alice.
TABLE 1
Account Block chain
Alice Block chain 1
Bob Block chain 2
Mary Block chain 3
In another embodiment, when the account a does not send a service processing request to the blockchain platform 11 for the first time, the blockchain platform 11 may determine that the account a corresponds to the blockchain 1 based on the correspondence relationship between the account a and the blockchain 1 recorded in advance in the table 1.
It will be appreciated that when account a is an account address in a blockchain system, the correspondence of account a to blockchain may be similarly recorded, except that account addresses of individual accounts are recorded in a column of accounts.
In step S206, a transaction is sent to the blockchain 1 to perform a service process in response to the service process request.
In one embodiment, as described above, user a sends transaction 1 to blockchain platform 11 through user terminal 12, where the sending account of transaction 1 is account a, and account a is the account address of the blockchain system. Fig. 3 shows a process diagram for processing transaction 1 in a blockchain system. As shown in fig. 3, the user terminal generates transaction 1 for performing business processing at step S301, and transmits transaction 1 to the blockchain platform 11 at step S302. Thus, the blockchain platform 11 may directly send the transaction 1 to any node in the blockchain 1 at step S303, so that each node in the blockchain 1 performs the transaction 1 at step S304. The nodes in blockchain 1, after receiving transaction 1, broadcast transaction 1 into blockchain 1. The nodes in the blockchain 1 perform transaction 1 after making consensus on transaction 1, thereby performing traffic processing. Meanwhile, each whole node in the blockchain 1 stores transaction 1 after performing transaction 1. In addition, when each whole node in the blockchain 1 executes transaction 1, if transaction 1 is the first transaction sent by account a, the account information of account a may be recorded in blockchain 1.
In another embodiment, as described above, account a is a registered account in blockchain platform 11, user a does not send the transaction request in the form of a transaction, and blockchain platform 11 generates, for example, transaction 2 in response to the transaction request after receiving the request. Fig. 4 shows a process diagram for processing transaction 2 in a blockchain system. As shown in fig. 4, the user terminal 12 sends a service processing request to the blockchain platform 11 in step S401. After receiving the service processing request, the blockchain platform 11 generates transaction 2 based on the service processing request in step S402, and sends the transaction 2 to any node in the blockchain 1 in step S403, so that each node in the blockchain 1 executes transaction 2 in step S404, thereby performing service processing corresponding to the service processing request. Unlike transaction 1, the send account for transaction 2 is an account owned by blockchain platform 11. That is, in this case, all transactions are sent through the account of blockchain platform 11.
After locally storing transaction 1 (or transaction 2) as described above, the node in blockchain 1 may calculate a hash value for transaction 1 (or transaction 2) and store the hash value in association with the storage location of transaction 1 (or transaction 2), so that transaction 1 (or transaction 2) may be found based on the hash value for transaction 1 (or transaction 2).
By the method, the blockchain platform 11 locally maintains the corresponding relationship between the user account and the blockchain platform, and stores all transactions of the same user into one blockchain, so that the data sent by the user can be conveniently associated. For example, the contracts deployed by the user are all deployed in the same blockchain, so that the user can conveniently invoke the contracts deployed by the user.
In the method shown in FIG. 3, in one embodiment, transaction 1 may be a transaction that deploys a contract, or may be a transaction that invokes a contract. It will be appreciated that the transaction sent by account a for deploying a contract is also assigned to blockchain 1, that is, the contract is deployed to blockchain 1. While contracts deployed by accounts other than account a may be assigned to blockchain 1, possibly into other blockchains, in which case if a contract invoked in a transaction sent by account a is deployed into other blockchains, the transaction will not be able to execute.
Specifically, for example, a contract 1 is invoked in the transaction 1, the contract 1 is, for example, a contract for certifying data, and the transaction 1 includes the data 1 to be certified and a deployment account (for example, account C) of the contract 1. Fig. 5 shows a content diagram of transaction 1 (Tx 1). As shown in FIG. 5, the sending account for transaction 1 (see "From" field in FIG. 5) is Account A, where "0 x507a …" is the account address of Account A. The receive account field of transaction 1 (i.e., the "To" field in fig. 5) is the address of contract 1 and the deploy account of contract 1 (account C) called in transaction 1, the data field of transaction 1 represents the call To the STORE function in contract 1, and the data field includes data 1 To be passed into the STORE function. In addition, the user terminal 12 also generates a digital signature for transaction 1 for account a and sends the digital signature to the blockchain platform 11 along with transaction 1.
Blockchain platform 11, upon receiving transaction 1, first determines that account a corresponds to blockchain 1, and then blockchain platform 11 determines whether account C corresponds to blockchain 1 based on the existing mapping table of accounts to blockchains. If account C corresponds to blockchain 1, it means that contract 1 is deployed in blockchain 1, and thus transaction 1 is sent to blockchain 1, and if account C does not correspond to blockchain 1, it means that contract 1 is not deployed in blockchain 1, and this transaction 1 cannot be executed, and thus blockchain platform 11 returns an error to user terminal 12.
In another embodiment, transaction 1 may be a transaction that creates an account, or may be a transaction that invokes an account (e.g., a transfer transaction). For example, user terminal 12 may send a transaction to create an account to blockchain platform 11 through account a, thereby creating a sub-account for account a (e.g., account a 1). Blockchain platform 11, upon receiving the transaction, determines that account a1 also corresponds to blockchain 1 based on the account a's correspondence to blockchain 1, thereby recording the account a1 correspondence to blockchain 1 and sending the transaction into blockchain 1 to create account a1 in blockchain 1. User terminal 12 may also send a transaction to transfer to sub-account A1 through account A, which may proceed normally because account A and account A1 are both created in blockchain 1. Whereas if the user terminal 12 sends a transfer transaction to another user account through account a, the transaction may be executed normally if the user account is created in blockchain 1, and the transaction may not be executed if the user account is created in another blockchain.
Specifically, the user terminal 12 sends, for example, transaction 3 directly to the blockchain platform 11, where the transaction 3 is, for example, a transfer transaction, and the transaction 3 includes an account D for receiving a transfer. In this case, blockchain platform 11 first determines that account a corresponds to blockchain 1 after receiving transaction 3, and then blockchain platform 11 determines whether account D corresponds to blockchain 1 based on the existing mapping table of accounts to blockchains. If account D is determined to correspond to blockchain 1, transaction 3 is sent to blockchain 1, and if account D is determined not to correspond to blockchain 1, an error is returned to user terminal 12.
In the method shown in fig. 4, the user terminal 12 sends a service processing request to the blockchain platform 11 through a registered account (e.g., account Alice) in the blockchain platform 11, where the request includes, for example, a call for contract 1, and the request includes a blockchain platform account (e.g., account Mary) from which the request to deploy contract 1 is issued. In this case, after determining that the account Alice corresponds to the blockchain 1, the blockchain platform 11 determines whether the account Mary corresponds to the blockchain 1 based on the correspondence between the account and the blockchain recorded in advance. If the account Mary corresponds to blockchain 1, then blockchain platform 11 generates transaction 2, which transaction 2 includes a call to contract 1, and sends transaction 2 to blockchain 1. If the account Mary corresponds to blockchain 2, then blockchain platform 11 generates another form of transaction 2, which invokes a cross-chain messaging contract in transaction 2 and sends transaction 2 to blockchain 1, after the node in blockchain 1 executes transaction 2, causes contract 1 to be invoked in blockchain 2 and returns the invocation result to blockchain 1.
In one embodiment, the method illustrated in FIG. 2 may be performed by a user terminal. In this case, the user terminal 12 can directly connect to the respective blockchains 1 to 3 without connecting to the respective blockchains through the blockchain platform 11. After receiving the instruction of the user a to perform the service processing, the client in the user terminal 12, which logs in with the account a, determines that the account a corresponds to the blockchain 1 similarly as above, generates the transaction 1, and transmits the transaction 1 to the blockchain 1. The user terminals 12, 13 and 14 can communicate with each other so that the mapping relationship table of the account and the block chain stored in each user terminal is consistent. Wherein the user terminals 12, 13 and 14 can communicate directly through the underlying layers. Alternatively, the user terminals 12, 13 and 14 may communicate with each other via the blockchain platform, thereby serving the purpose of unifying the mapping tables, in which case the processing performed by the blockchain platform will be reduced and most of the processing is put into the user terminals.
The embodiments of allocating transactions to one blockchain by accounts based on transaction associations are described above with reference to fig. 2, and the embodiments of the specification are not limited thereto. In another embodiment of the present description, in addition to allocating transactions via an account associated with the transaction, the transaction may be allocated a second time based on a contract in the transaction. Referring to fig. 2, assuming that the business process request is for invoking contract 1 or for deploying contract 1, in step S204, it may be determined that account a corresponds to M of the N blockchains based on a first predetermined rule, and then it may be determined that contract 1 corresponds to blockchain 1 of the M blockchains based on a second predetermined rule, so that transaction 1 may be sent to blockchain in step S206. The second predetermined rule is, for example, to hash contract 1 to determine that contract 1 corresponds to blockchain 1, and so on. After this allocation is made, the correspondence between accounts, blockchains, and contracts may be recorded as shown in table 2 below.
TABLE 2
Figure 556896DEST_PATH_IMAGE002
As shown in table 2, assuming "Alice" as account a, table 2 shows that account a corresponds to blockchain 1 and blockchain 2, and blockchain 1 in turn corresponds to contracts such as contract 1, contract 2, etc. When blockchain platform 11 sends a transaction to a blockchain that invokes contract 1 sent by account a, it may be determined based on table 2 that the transaction corresponds to blockchain 1 and thus may be sent to blockchain 1.
Fig. 6 illustrates an apparatus 600 for performing traffic processing in a blockchain system according to an embodiment of the present disclosure, where the blockchain system includes N independent blockchains, and the apparatus 600 includes:
a receiving unit 61 configured to receive a service processing request, the service processing request being associated with a first account;
a determining unit 62 configured to determine that the first account corresponds to a first blockchain of the N blockchains;
a first sending unit 63, configured to send a first transaction to the first blockchain, so as to perform service processing in response to the service processing request.
In one embodiment, the determining unit 62 is further configured to determine that the first account corresponds to a first blockchain of the N blockchains based on a predetermined rule.
In an embodiment, the apparatus 600 further includes a first recording unit 64 configured to record a correspondence relationship between a first account and a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
In one embodiment, the determining unit 62 is further configured to determine that the first account corresponds to the first blockchain based on a pre-recorded correspondence between the first account and the first blockchain.
In one embodiment, the apparatus 600 is deployed on a blockchain platform, and the blockchain platform is connected to the N blockchains, respectively, wherein the receiving unit 61 is further configured to receive the first transaction, and a sending account of the first transaction is the first account.
In one embodiment, the first transaction includes a second account, wherein the first sending unit 63 is further configured to send the first transaction to the first blockchain if it is determined that the second account corresponds to the first blockchain.
In one embodiment, a first contract is invoked in the first transaction, which also includes a second account to deploy the first contract.
In one embodiment, the first transaction is used to create a second account, and the apparatus 600 further includes a second recording unit 65 configured to record the correspondence relationship between the second account and the first blockchain after determining that the first account corresponds to the first blockchain of the N blockchains
In one embodiment, the first sending unit 63 is further configured to send the first transaction to the first blockchain for performing a credentialing business process.
Another aspect of the present specification provides a computer readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform any one of the above methods.
Another aspect of the present specification provides a computing device comprising a memory having stored therein executable code, and a processor that, when executing the executable code, implements any of the methods described above.
In the scheme for processing the service in the blockchain system according to the embodiment of the present specification, the transaction is allocated to the plurality of blockchains for processing based on the account associated with the transaction, so that the blockchain system can be provided with a capacity and a processing capacity which are expanded in parallel by the plurality of blockchains.
It is to be understood that the terms "first," "second," and the like, herein are used for descriptive purposes only and not for purposes of limitation, to distinguish between similar concepts.
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 are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (22)

1. A method for performing service processing in a blockchain system, the blockchain system including N independent blockchains, the method comprising:
receiving a service processing request, wherein the service processing request is associated with a first account;
determining that the first account corresponds to a first blockchain of the N blockchains;
and sending a first transaction to the first blockchain so as to respond to the service processing request to perform service processing.
2. The method of claim 1, wherein determining that the first account corresponds to the first blockchain of the N blockchains comprises determining that the first account corresponds to the first blockchain of the N blockchains based on a predetermined rule.
3. The method of claim 2, further comprising, after determining that a first account corresponds to a first blockchain of the N blockchains, recording a correspondence of the first account to the first blockchain.
4. The method of claim 3, wherein determining that a first account corresponds to a first blockchain of the N blockchains comprises determining that the first account corresponds to the first blockchain based on a pre-recorded correspondence of the first account to the first blockchain.
5. The method of claim 1, wherein the method is performed by a blockchain platform, the blockchain platform being connected to the N blockchains, respectively, and wherein the receiving the transaction processing request comprises receiving the first transaction, a sending account of the first transaction being the first account.
6. The method of claim 5, wherein the first transaction comprises a second account, wherein sending a first transaction to the first blockchain comprises sending a first transaction to the first blockchain if it is determined that the second account corresponds to the first blockchain.
7. The method of claim 6, wherein the first transaction invokes a first contract, the first transaction further comprising deploying a second account for the first contract.
8. The method of claim 5, wherein the first transaction is used to create a second account, the method further comprising, after determining that the first account corresponds to a first blockchain of the N blockchains, recording a correspondence of the second account to the first blockchain.
9. The method of claim 1, wherein sending the first transaction to the first blockchain for transaction processing comprises sending the first transaction to the first blockchain for credentialing transaction processing.
10. The method of claim 1, wherein the business process request comprises a second contract, and the determining that the first account corresponds to a first blockchain of the N blockchains comprises determining that the first account corresponds to M blockchains of the N blockchains based on a first predetermined rule, and determining that the second contract corresponds to a first blockchain of the M blockchains based on a second predetermined rule.
11. The method of claim 10, further comprising, after determining that the second contract corresponds to a first blockchain of the M blockchains based on a second predetermined rule, recording a first correspondence of the first account with the M blockchains and a second correspondence of the second contract with the first blockchain, wherein the second correspondence is associated with the first correspondence.
12. An apparatus for performing traffic processing in a blockchain system, the blockchain system comprising N independent blockchains, the apparatus comprising:
a receiving unit configured to receive a service processing request, the service processing request being associated with a first account;
a determining unit configured to determine that the first account corresponds to a first blockchain of the N blockchains;
and the first sending unit is configured to send a first transaction to the first blockchain so as to respond to the service processing request for service processing.
13. The apparatus of claim 12, wherein the determining unit is further configured to determine that the first account corresponds to a first blockchain of the N blockchains based on a predetermined rule.
14. The apparatus according to claim 13, further comprising a first recording unit configured to record a correspondence relationship between a first account and a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
15. The apparatus according to claim 14, wherein the determining unit is further configured to determine that the first account corresponds to the first blockchain based on a pre-recorded correspondence of the first account to the first blockchain.
16. The apparatus according to claim 12, wherein the apparatus is deployed on a blockchain platform, and the blockchain platform is connected to the N blockchains, respectively, wherein the receiving unit is further configured to receive the first transaction, and a sending account of the first transaction is the first account.
17. The apparatus of claim 16, wherein the first transaction comprises a second account, wherein the first transmitting unit is further configured to transmit a first transaction to the first blockchain if it is determined that the second account corresponds to the first blockchain.
18. The apparatus of claim 17, wherein a first contract is invoked in the first transaction, the first transaction further comprising deploying a second account of the first contract.
19. The apparatus of claim 16, wherein the first transaction is used to create a second account, the apparatus further comprising a second recording unit configured to record a correspondence of the second account with a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
20. The apparatus of claim 12, wherein the first sending unit is further configured to send the first transaction to the first blockchain for credentialing business processing.
21. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-11.
22. 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-11.
CN202011173787.3A 2020-10-28 2020-10-28 Method and device for processing business in block chain system Active CN112001800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011173787.3A CN112001800B (en) 2020-10-28 2020-10-28 Method and device for processing business in block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011173787.3A CN112001800B (en) 2020-10-28 2020-10-28 Method and device for processing business in block chain system

Publications (2)

Publication Number Publication Date
CN112001800A true CN112001800A (en) 2020-11-27
CN112001800B CN112001800B (en) 2024-04-16

Family

ID=73475785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011173787.3A Active CN112001800B (en) 2020-10-28 2020-10-28 Method and device for processing business in block chain system

Country Status (1)

Country Link
CN (1) CN112001800B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801796A (en) * 2021-03-11 2021-05-14 三一智造(深圳)有限公司 Service processing method of block chain network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108540536A (en) * 2018-03-16 2018-09-14 深圳前海微众银行股份有限公司 Network magnanimity method for processing business, equipment and storage medium based on block chain
CN108681963A (en) * 2018-03-29 2018-10-19 深圳市网心科技有限公司 Multi-tiling chain integral traffic control method, system, electronic device and storage medium
CN109617861A (en) * 2018-11-20 2019-04-12 北京小米移动软件有限公司 A kind of business account management method and system based on block chain
CN110517145A (en) * 2019-08-29 2019-11-29 深圳市网心科技有限公司 Data trade method and relevant device based on multi-tiling interchain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108540536A (en) * 2018-03-16 2018-09-14 深圳前海微众银行股份有限公司 Network magnanimity method for processing business, equipment and storage medium based on block chain
CN108681963A (en) * 2018-03-29 2018-10-19 深圳市网心科技有限公司 Multi-tiling chain integral traffic control method, system, electronic device and storage medium
CN109617861A (en) * 2018-11-20 2019-04-12 北京小米移动软件有限公司 A kind of business account management method and system based on block chain
CN110517145A (en) * 2019-08-29 2019-11-29 深圳市网心科技有限公司 Data trade method and relevant device based on multi-tiling interchain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112801796A (en) * 2021-03-11 2021-05-14 三一智造(深圳)有限公司 Service processing method of block chain network

Also Published As

Publication number Publication date
CN112001800B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN110443704B (en) Method and device for sending resources in cross-link mode
CN110311790B (en) Method and device for sending authenticable message in cross-link mode
CN110430162B (en) Method and device for sending authenticable message in cross-link mode
CN111240763B (en) Configuration updating method, device, equipment and storage medium
CN110430235B (en) Method, apparatus, storage medium and computing device for cross-chain transmission of authenticatable messages
CN111857892A (en) Method and device for processing service through block chain
CN109819023B (en) Distributed transaction processing method and related product
CN112866421B (en) Intelligent contract operation method and device based on distributed cache and NSQ
WO2023040502A1 (en) User service registration
CN111966731A (en) Method and device for querying data in block chain system
CN108880896B (en) Program gray level publishing method and device based on mainframe
CN115002228B (en) Service cascade calling method and device, electronic equipment and storage medium
CN114884962B (en) Load balancing method and device and electronic equipment
CN111861481A (en) Block chain account checking method and system
CN103023935A (en) M2M (machine-to-machine) platform cloud system and method for processing M2M service
CN113194143B (en) Block chain account creating method and device and electronic equipment
CN113542435B (en) User service using method and device
CN112001796A (en) Method and device for processing service in block chain system
CN112001800A (en) Method and device for processing service in block chain system
CN110417742B (en) Method, device and storage medium for cross-link sending, transferring and receiving authenticable message
CN113205424B (en) Method and apparatus for deploying and invoking contracts in blockchain
CN111953931A (en) Data sharing method and device and storage medium
CN108920277B (en) Service execution system, method and device and service isolation system
CN117149445B (en) Cross-cluster load balancing method and device, equipment and storage medium
CN114331447B (en) Cross-link message submitting method and device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40041116

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant