CN112001800B - Method and device for processing business in block chain system - Google Patents

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

Info

Publication number
CN112001800B
CN112001800B CN202011173787.3A CN202011173787A CN112001800B CN 112001800 B CN112001800 B CN 112001800B CN 202011173787 A CN202011173787 A CN 202011173787A CN 112001800 B CN112001800 B CN 112001800B
Authority
CN
China
Prior art keywords
blockchain
account
transaction
blockchains
contract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011173787.3A
Other languages
Chinese (zh)
Other versions
CN112001800A (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

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

The embodiment of the specification provides a method and a device for processing business in a blockchain system, wherein the blockchain system comprises N mutually independent blockchains, and the method comprises the following steps: 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 to respond to the service processing request for service processing.

Description

Method and device for processing business in block chain system
Technical Field
The embodiment of the specification relates to the technical field of blockchains, and more particularly, to a method and a device for performing business processing in a blockchain system.
Background
Blockchain technology, also known as distributed ledger technology, is a decentralized distributed database technology that is characterized by decentralization, openness, transparency, non-tampering, and trustworthiness. Each transaction of the blockchain is broadcast to blockchain nodes of the whole network, and each whole node has a whole amount of consistent data. In the alliance chain, typically, a user terminal uses a blockchain to perform service processing, such as deposit, transfer, etc., through a blockchain platform. However, in a single-chain scenario, long runs accumulate large amounts of stored data, and account sizes are getting larger and larger, such that the processing power of the single chain is reduced. In addition, during periods of concurrent transactions more (e.g., twenty-one periods), the access pressure of the single chain increases such that the processing of the single chain fails to meet the business needs.
Disclosure of Invention
Embodiments of the present disclosure are directed to a more efficient method for traffic handling in a blockchain system, which addresses 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, the blockchain system including N blockchains independent from each other, 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 to respond to the service processing request for service processing.
In one embodiment, determining that the first account corresponds to a 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 performed by a blockchain platform, the blockchain platform being respectively connected to the N blockchains, wherein 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 therein, wherein sending the first transaction to the first blockchain includes sending the first transaction to the first blockchain in the event that the second account is determined to correspond to the first blockchain.
In one embodiment, a first contract is invoked in the first transaction, which further includes a second account deploying the first contract.
In one embodiment, the first transaction is used to create a second account, and the method further comprises, 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 business processing includes sending the first transaction to the first blockchain for forensic business processing.
In one embodiment, the business processing 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 correspondence of the first account to the M blockchains, and a second correspondence of the second contract to the first blockchain, wherein the second correspondence is associated with the first correspondence.
Another aspect of the present specification provides an apparatus for performing service processing in a blockchain system including N blockchains independent from each other, 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.
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 of the first account to the first blockchain.
In one embodiment, the device is disposed on a blockchain platform, where the blockchain platform is connected to the N blockchains respectively, and 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 therein, wherein the first sending unit is further configured to send the first transaction to the first blockchain in case 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 further includes a second account deploying 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 forensic service processing.
Another aspect of the present description provides a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform any of the methods described above.
Another aspect of the present description provides a computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, performs any of the methods described above.
In the scheme for performing business processing in the blockchain system according to the embodiment of the specification, the transaction is distributed to a plurality of blockchains for processing based on the account related to the transaction, so that the parallel expansion capacity and processing capacity can be provided for the blockchain system through the plurality of blockchains, compared with a single blockchain, the read-write pressure is reduced, the processing efficiency of the blockchain system is improved, and particularly the flow sudden increase period can be rapidly expanded and the pressure is parallel dispersed.
Drawings
The embodiments of the present specification may be further clarified by describing the embodiments of the present specification with reference to the accompanying drawings:
FIG. 1 illustrates a schematic diagram of a blockchain system in accordance with embodiments of the present description;
FIG. 2 illustrates a flow chart of a method of traffic handling in a blockchain system in accordance with embodiments of the present description;
FIG. 3 shows a schematic diagram of a process for processing transaction 1 in a blockchain system;
FIG. 4 illustrates a schematic diagram of a process for processing transaction 2 in a blockchain system;
FIG. 5 shows a content schematic of transaction 1 (Tx 1);
fig. 6 illustrates an apparatus 600 for traffic handling in a blockchain system in accordance with embodiments of the present description.
Detailed Description
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 in accordance with embodiments of the present description. As shown in fig. 1, the blockchain system includes a blockchain platform 11, and a plurality of user terminals (user terminals 12, 13, and 14 are schematically shown in the figure), that is, a blockchain platform server. The user terminal is connected to the blockchain platform 11 and operates the blockchain through the blockchain platform 11. The blockchain platform 11 is coupled to a plurality of independent blockchains, the blockchain 1, blockchain 2, and blockchain 3 being schematically illustrated in fig. 1. Blockchain 1, blockchain 2, and blockchain 3 may be referred to as parallel chains of a blockchain system that operate independently of each other to process user requests and store transaction data, respectively, thereby increasing the processing power and data storage capacity of the system.
The blockchain system including blockchains 1 to 3 is, for example, a system for certification, 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, and after the blockchain platform 11 receives the request, the blockchain platform may send a corresponding transaction to one of the blockchains 1 to 3 according to a sending account of the request, so as to store the transaction in 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 the transaction, user A may provide the blockchain platform 11 with an identification of the transaction to make a query for the transaction. The transaction is respectively distributed to the blockchain 1, the blockchain 2 and the blockchain 3 for processing according to the associated account of the transaction, so that the effect of balancing the load is achieved.
It is to be understood that the blockchain system shown in fig. 1 is merely illustrative and that blockchain systems in accordance with embodiments of the present description are not limited thereto. For example, each user terminal may distribute transactions to and connect with a blockchain through a local client, thereby eliminating the need for distribution through the blockchain platform 11. The above-described processing will be described in detail below.
Fig. 2 shows a flowchart of a method for performing service processing in a blockchain system including N independent blockchains, according to an embodiment of the present disclosure, the method includes:
step S202, a service processing request is received, wherein the service processing request is associated with an account A;
step S204, determining that account A corresponds to blockchain 1;
step S206, a transaction is sent to the blockchain 1 to respond to the service processing request for service processing.
In one embodiment, the method illustrated in FIG. 2 is performed by the blockchain platform 11 of FIG. 1.
First, in step S202, a business process request is received, the business process 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 forensic traffic. For example, user A may use his account A to send a request to the blockchain platform 11 to document data 1 into the blockchain system through the user terminal 12.
In one embodiment, the account a may be the only account that user a registers with the 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, the account name of account a is "Alice".
In another embodiment, the account A may also be a blockchain account that user A applies for, so that the business process request may be in the form of a transaction (e.g., transaction 1). That is, the user terminal 12 generates the transaction 1 and transmits the 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 predetermined rules. For example, blockchain platform 11 may assign account a to one blockchain based on the residential city of user a for account a, e.g., if user a resides in beijing, account a is assigned to blockchain 1. In another embodiment, the blockchain platform 11 may hash the account a, for example, with a random operation, and with a result of any one of 1, 2, and 3, so that transaction 1 may be assigned to a blockchain based on 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 the following table 1, where the account name of the account a is Alice, for example.
TABLE 1
Account account Block chain
Alice Blockchain 1
Bob Blockchain 2
Mary Blockchain 3
In another embodiment, when the account a does not first send the service processing request to the blockchain platform 11, the blockchain platform 11 may determine that the account a corresponds to the blockchain 1 based on the previously recorded correspondence between the account a and the blockchain 1 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 the account addresses of the individual accounts are recorded in an account column.
At step S206, a transaction is sent to blockchain 1 for business processing in response to the business processing request.
In one embodiment, as described above, user A sends transaction 1 to blockchain platform 11 via user terminal 12, wherein the sending account for transaction 1 is account A, which is the account address of the blockchain system. Fig. 3 shows a schematic diagram of a process for processing transaction 1 in a blockchain system. As shown in fig. 3, the user terminal generates a transaction 1 for performing business processing at step S301 and transmits the transaction 1 to the blockchain platform 11 at step S302. Thus, the blockchain platform 11 may send the transaction 1 directly to any node in blockchain 1 at step S303, thereby causing each node in blockchain 1 to perform transaction 1 at step S304. The nodes in blockchain 1 broadcast transaction 1 into blockchain 1 after receiving transaction 1. The nodes in blockchain 1 perform transaction 1 after consensus for transaction 1, thereby doing business processing. Meanwhile, each full node in blockchain 1 stores transaction 1 after executing transaction 1. In addition, each full node in blockchain 1 may record account information for account a in blockchain 1 when executing transaction 1 if transaction 1 is the first transaction sent by account a.
In another embodiment, as described above, the account a is a registered account in the blockchain platform 11, the user a does not send the above-described business process request in the form of a transaction, and the blockchain platform 11 generates, for example, the transaction 2 in response to the business process request after receiving the request. Fig. 4 shows a schematic diagram of a process for processing transaction 2 in a blockchain system. As shown in fig. 4, the user terminal 12 transmits a service processing request to the blockchain platform 11 in step S401. After receiving the service processing request, the blockchain platform 11 generates a transaction 2 based on the service processing request in step S402, and transmits the transaction 2 to any node in the blockchain 1 in step S403, so that each node in the blockchain 1 performs the transaction 2 in step S404, thereby performing the service processing corresponding to the service processing request. Unlike transaction 1, the sending account of transaction 2 is the account owned by blockchain platform 11. That is, in this case, all transactions are sent through the accounts of the blockchain platform 11.
After locally storing transaction 1 (or transaction 2) as described above, the nodes 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 for 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 maintains the corresponding relation between the user account and the blockchain platform locally, 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 user-deployed contracts are all deployed into the same blockchain, facilitating the user to invoke the self-deployed contracts.
In the method shown in fig. 3, in one embodiment, the transaction 1 may be a transaction deploying a contract, or may be a transaction invoking a contract. It will be appreciated that the transaction sent by account a for deploying the contract is also assigned to blockchain 1, that is, the contract is deployed to blockchain 1. While contracts deployed by other accounts than account a may be assigned to blockchain 1 and possibly to other blockchains, in which case if contracts invoked in transactions sent by account a are deployed to other blockchains, the transaction will not be executable.
Specifically, for example, contract 1 is called in the transaction 1, contract 1 is, for example, a contract for proving data, and the transaction 1 includes data 1 to be certified and a deployment account (for example, account C) of the contract 1. Fig. 5 shows a content schematic of transaction 1 (Tx 1). As shown in fig. 5, the transmission account of this transaction 1 (see "From" field in fig. 5) is account a, where "0x507a …" 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 deployment account of contract 1 (account C) that was called in transaction 1, the data field of transaction 1 represents a call To the STORE function in contract 1, and the data field includes data 1 for the incoming STORE function. In addition, the user terminal 12 also generates a digital signature of transaction 1 by account a and sends the digital signature to the blockchain platform 11 along with transaction 1.
The blockchain platform 11, upon receiving transaction 1, first determines that account a corresponds to blockchain 1, after which the 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 indicates that contract 1 is deployed in blockchain 1, thus sending transaction 1 to blockchain 1, and if account C does not correspond to blockchain 1, it indicates that contract 1 is not deployed in blockchain 1, this transaction 1 cannot be executed, thus blockchain platform 11 returns an error to user terminal 12.
In another embodiment, the 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 blockchain platform 11 to create an account through account a, thereby creating a sub-account of account a (e.g., account A1). After receiving the transaction, the blockchain platform 11 determines that the account A1 also corresponds to the blockchain 1 based on the correspondence of the account a to the blockchain 1, thereby recording the correspondence of the account A1 to the blockchain 1, and sends the transaction to the blockchain 1 to create the account A1 in the blockchain 1. The user terminal 12 may also send a transaction for transferring to the sub-account A1 through the account a, and the transfer transaction may be normally performed since both the account a and the account A1 are created in the blockchain 1. If the user terminal 12 sends a transfer transaction to the other user account through account a, the transaction may be normally performed if the user account is created in blockchain 1, but the transaction cannot be performed if the user account is created in the other blockchain.
Specifically, the user terminal 12 sends, for example, a 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 the transfer. In this case, the blockchain platform 11, after receiving the transaction 3, first determines that the account a corresponds to the blockchain 1, and then the blockchain platform 11 determines whether the account D corresponds to the blockchain 1 based on the existing account-to-blockchain mapping table. 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 to contract 1, and the request includes a blockchain platform account (e.g., account Mary) that issues a request to deploy contract 1. In this case, the blockchain platform 11 determines whether the account Mary corresponds to the blockchain 1 based on the pre-recorded correspondence of the account to the blockchain after determining that the account Alice corresponds to the blockchain 1. If account Mary corresponds to blockchain 1, blockchain platform 11 generates transaction 2, including a call to contract 1 in transaction 2, and sends the transaction 2 to blockchain 1. If account Mary corresponds to blockchain 2, blockchain platform 11 generates another form of transaction 2 in which a cross-chain messaging contract is invoked and sends transaction 2 to blockchain 1, after the nodes in blockchain 1 execute the transaction 2, causes contract 1 to be invoked in blockchain 2 and returns the invocation result to blockchain 1.
In one embodiment, the method shown in FIG. 2 may be performed by a user terminal. In this case, the user terminal 12 may be directly connected to the blockchains 1 to 3, respectively, without being connected to the respective blockchains through the blockchain platform 11. The client in the user terminal 12, which logs in with the account a, generates the transaction 1 after receiving the instruction of the user a to perform the business processing, after determining that the account a corresponds to the blockchain 1 similarly as above, and transmits the transaction 1 to the blockchain 1. The user terminals 12, 13 and 14 may communicate with each other such that the account stored by each user terminal is consistent with the blockchain mapping table. Wherein the user terminals 12, 13 and 14 may communicate directly through the bottom layer. 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 table, in which case the blockchain platform will perform less processing and most of the processing is put on the user terminal.
An embodiment of assigning transactions to one blockchain based on transaction-associated accounts is described above with reference to fig. 2, to which embodiments of the present description are not limited. In another embodiment of the present description, in addition to assigning transactions through accounts associated with the transactions, the transactions may be assigned a second time based on contracts in the transactions. Referring to fig. 2, assuming that the service processing request is for invoking contract 1 or for deploying contract 1, it may be determined that account a corresponds to M blockchains of the N blockchains based on a first predetermined rule at step S204, 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 transmitted to the blockchain at step S206. The second predetermined rule is, for example, hashing 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
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 corresponds to contracts such as contract 1, contract 2, and so on. When blockchain platform 11 sends a transaction to a blockchain that invokes contract 1 to be sent by account a, it may be determined based on table 2 that the transaction corresponds to blockchain 1, so that the transaction may be sent to blockchain 1.
Fig. 6 illustrates an apparatus 600 for traffic processing in a blockchain system including N independent blockchains, according to embodiments of the present disclosure, 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 to perform a service process in response to the service process 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 one embodiment, the apparatus 600 further includes a first recording unit 64 configured to record, after determining that a first account corresponds to a first blockchain of the N blockchains, a correspondence between the first account and 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 of the first account to the first blockchain.
In one embodiment, the apparatus 600 is disposed on a blockchain platform, where the blockchain platform is respectively connected to the N blockchains, and the receiving unit 61 is further configured to receive the first transaction, where a sending account of the first transaction is the first account.
In one embodiment, the first transaction includes a second account therein, wherein the first sending unit 63 is further configured to send the first transaction to the first blockchain in case 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 further includes a second account deploying 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 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 63 is further configured to send the first transaction to the first blockchain for forensic service processing.
Another aspect of the present description provides a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform any of the methods described above.
Another aspect of the present description provides a computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, performs any of the methods described above.
In the scheme for performing business processing in the blockchain system according to the embodiment of the specification, the transaction is distributed to a plurality of blockchains for processing based on the account related to the transaction, so that the parallel expansion capacity and processing capacity can be provided for the blockchain system through the plurality of blockchains, compared with a single blockchain, the read-write pressure is reduced, the processing efficiency of the blockchain system is improved, and particularly the flow sudden increase period can be rapidly expanded and the pressure is parallel dispersed.
It should be understood that the description of "first," "second," etc. herein is merely for simplicity of description and does not have other limiting effect on the similar concepts.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can 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 are also possible or may be advantageous.
Those of ordinary skill would further appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate 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 solution. Those of ordinary skill in the art may implement the described functionality using different approaches for each particular application, but such implementation is not to be considered as beyond the scope of the present application. The software modules may be disposed 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 foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (17)

1. A method of traffic processing in a blockchain system, the blockchain system including N independent blockchains therein, 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;
transmitting a first transaction to the first blockchain to perform service processing in response to the service processing request;
wherein the business processing request includes a contract address of 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.
2. The method of claim 1, 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.
3. The method of claim 1, wherein the method is performed by a blockchain platform that is respectively connected to the N blockchains, wherein the receiving a business processing request includes receiving the first transaction, a sending account of the first transaction being the first account.
4. The method of claim 3, wherein the first transaction includes a second account therein, wherein sending the first transaction to the first blockchain includes sending the first transaction to the first blockchain in the event that the second account is determined to correspond to the first blockchain.
5. The method of claim 4, wherein a first contract is invoked in the first transaction, the first transaction further comprising deploying a second account of the first contract.
6. The method of claim 3, 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.
7. The method of claim 1, wherein sending the first transaction to the first blockchain for business processing comprises sending the first transaction to the first blockchain for forensic business processing.
8. The method of claim 1, 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 to the M blockchains, and a second correspondence of the second contract to the first blockchain, wherein the second correspondence is associated with the first correspondence.
9. An apparatus for traffic processing in a blockchain system, the blockchain system including N independent blockchains therein, 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;
a first transmitting unit configured to transmit a first transaction to the first blockchain to perform a service process in response to the service process request;
wherein the business processing request includes a contract address of a second contract, the determining unit is configured to determine that the first account corresponds to M blockchains of the N blockchains based on a first predetermined rule, and determine that the second contract corresponds to a first blockchain of the M blockchains based on a second predetermined rule.
10. The apparatus of claim 9, further comprising a first recording unit configured to record a correspondence of a first account with a first blockchain of the N blockchains after determining that the first account corresponds to the first blockchain.
11. The apparatus of claim 9, wherein the apparatus is disposed on a blockchain platform that is respectively connected to the N blockchains, wherein the receiving unit is further configured to receive the first transaction, and a sending account of the first transaction is the first account.
12. The apparatus of claim 11, wherein the first transaction includes a second account therein, wherein the first sending unit is further configured to send the first transaction to the first blockchain in the event that the second account is determined to correspond to the first blockchain.
13. The apparatus of claim 12, wherein a first contract is invoked in the first transaction, the first transaction further comprising a second account deploying the first contract.
14. The apparatus of claim 11, 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.
15. The apparatus of claim 9, wherein the first sending unit is further configured to send the first transaction to the first blockchain for forensic service processing.
16. 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 of claims 1-8.
17. A computing device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method of any of claims 1-8.
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 CN112001800A (en) 2020-11-27
CN112001800B true 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)

Families Citing this family (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

Also Published As

Publication number Publication date
CN112001800A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
US11336465B2 (en) Sending cross-chain authenticatable messages
CN102047226B (en) Distributed service framework
US11356282B2 (en) Sending cross-chain authenticatable messages
US7991835B2 (en) Distributed client services based on execution of service attributes and data attributes by multiple nodes in resource groups
CN110166409A (en) Equipment cut-in method, related platform and computer storage medium
CN111091429A (en) Electronic bill identification distribution method and device and electronic bill generation system
US20100138540A1 (en) Method of managing organization of a computer system, computer system, and program for managing organization
CN104011701A (en) Content delivery network
CN111711526B (en) Method and system for consensus of block chain nodes
CN112866421B (en) Intelligent contract operation method and device based on distributed cache and NSQ
CN113067897B (en) Cross-chain interaction method and device
CN111124589A (en) Service discovery system, method, device and equipment
US20110153826A1 (en) Fault tolerant and scalable load distribution of resources
CN110321225B (en) Load balancing method, metadata server and computer readable storage medium
CN112001800B (en) Method and device for processing business in block chain system
CN113205424B (en) Method and apparatus for deploying and invoking contracts in blockchain
CN113518126A (en) Cross fault-tolerant method for alliance chain
CN117149445B (en) Cross-cluster load balancing method and device, equipment and storage medium
CN116804949B (en) Block chain-based data processing method, device, equipment and readable storage medium
CN112468603B (en) Domain name query system and method based on block chain
CN116055493B (en) Cross-architecture data acquisition method, gateway node and cross-architecture platform
CN117057799B (en) Asset data processing method, device, equipment and storage medium
CN112001801A (en) Method and apparatus for resource transfer in a blockchain system
CN116974764A (en) Block chain-based data processing method, device, equipment and readable storage medium
CN115936413A (en) Service request method, system, storage medium and terminal equipment

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