CN113326250B - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN113326250B
CN113326250B CN202110591278.0A CN202110591278A CN113326250B CN 113326250 B CN113326250 B CN 113326250B CN 202110591278 A CN202110591278 A CN 202110591278A CN 113326250 B CN113326250 B CN 113326250B
Authority
CN
China
Prior art keywords
chain
branch
user
anchor node
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110591278.0A
Other languages
Chinese (zh)
Other versions
CN113326250A (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.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
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 University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN202110591278.0A priority Critical patent/CN113326250B/en
Publication of CN113326250A publication Critical patent/CN113326250A/en
Application granted granted Critical
Publication of CN113326250B publication Critical patent/CN113326250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/602Providing cryptographic facilities or services
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Landscapes

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

Abstract

The method is based on a block chain comprising a main chain and branch chains under anchor nodes included in the main chain, an advanced node generates a key pair of each anchor node, a public key of the key pair is issued to the anchor node, a private key of the key pair is stored, each anchor node respectively acquires information uploaded by its child node, the information uploaded by the child node is encrypted by using the public key to obtain encrypted information, the encrypted information is written into the branch block chain, the realization that under the condition that the anchor node is used as a node of an enterprise, and the child node is used as a user, the protection of privacy of respective user information by different enterprises can be realized, and the leakage of the user information to other enterprises in the same block chain is prevented. The method and the system realize distribution management and supervision of the query authorities of different anchor nodes, and achieve reasonable utilization of data while protecting privacy.

Description

Data processing method and system
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to a data processing method and system.
Background
At present, enterprises generally use blockchain technology to protect client information.
However, blockchains disclose data to all nodes when generating a distributed ledger for a unique decentralization mechanism. The specific implementation is two phases: a synchronization phase and a consensus phase. 1. Synchronization phase: when each transaction enters the transaction pool of a certain node, other nodes need to synchronize the transaction, namely, the transaction information is added into the own transaction pool, so that the transaction pool information of each node is kept identical. 2. Consensus phase: when the 'transactions' in the transaction pool are packed and enter an executor to be executed, the transactions are executed according to an intelligent contract, a new block is generated by combining the hash of the last block after the execution is finished, and the block is synchronized into chain storage of each node, namely, generation of a block chain. In the two stages, there is a copy of the information, so when some privacy protection data is not wanted to be queried by strange nodes, the construction mode of the original blockchain can cause disclosure of the privacy information, and further the data security is affected.
Disclosure of Invention
The application provides the following technical scheme:
a data processing method, based on a blockchain, the blockchain including a backbone chain including at least one advanced node and a plurality of anchor nodes, the advanced node having a higher query authority than the anchor nodes, the blockchain further comprising: a branch chain under each anchor node, the branch chain including at least one child node of the anchor node, the query authority of the anchor node being higher than the query authority of the child node, the method comprising:
The advanced node generates a key pair of each anchor node, issues a public key of the key pair to the anchor node, and keeps a private key of the key pair;
each anchor node respectively acquires information uploaded by a child node of the anchor node, encrypts the information uploaded by the child node by using a public key of the anchor node to obtain encrypted information, and writes the encrypted information into a branch block chain of the anchor node;
under the condition that a first anchor node requests to inquire information of a second anchor node, the advanced node sends key information of the second anchor node to the first anchor node under the condition that the first anchor node is confirmed to have inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts the encrypted information of the second anchor node by utilizing the key information, and the key information at least comprises a private key;
the first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
Optionally, the method further comprises:
when a first user in a first branched chain requests a second user in a second branched chain to perform a cross-chain operation, if a branched account of the second user does not exist in the first branched chain, the first branched chain creates a branched account of the second user under the condition that an anchor node to which the second branched chain belongs and permission of the second user are obtained, and the first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes;
The first branch and the second branch perform a cross-chain operation based on the account of the second user.
Optionally, the first user in the first branch chain requests the second user in the second branch chain to perform a cross-chain operation, including:
a first user in the first branched chain requests a second user in the second branched chain to carry out transfer operation;
the first branch and the second branch perform a cross-chain operation based on the account of the second user, comprising:
the first branch chain sends money of the first user to a branch account of the second user when receiving a transfer application of the first user;
the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs;
the anchor node to which the second branched chain belongs judges whether to accept the transfer of the first user;
if the first branch chain belongs to the anchor node, the second branch chain belongs to the anchor node, and the second branch chain belongs to the anchor node;
the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not;
If so, the first branch chain executes transfer operation;
and the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into a corresponding block in the second branched chain.
Optionally, the first user in the first branch chain requests the second user in the second branch chain to perform a cross-chain operation, including:
a first user in the first branched chain requests a second user in the second branched chain to perform a cross-chain transaction;
the first branch and the second branch perform a cross-chain operation based on the account of the second user, comprising:
the first user sends a transaction application to the second branched chain;
under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure;
under the condition that the second user agrees to the transaction application, the second branched chain informs the transaction information to the first branched chain;
if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application;
The first branch chain performs a cross-chain transfer operation and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain;
and if the second branched chain receives the first notification message, performing cross-chain transfer operation.
Optionally, after the second branch receives the first notification message and performs the cross-chain transfer operation, the method further includes:
the second branch sends a second notification message that the cross-chain transfer operation is completed to the first branch;
if the first branched chain receives the second notification message, the first branched chain sends a transaction completion message to the second branched chain;
if the first branched chain does not receive the second notification message, transferring and rolling back, and sending a transfer failure message to the second branched chain;
and the second branched chain rolls back the transfer when receiving the transfer failure message.
Optionally, the key information further includes: the address, password, public key, starting block sequence number, and ending block sequence number of the second anchor node.
A data processing system, comprising: a blockchain, the blockchain including a backbone chain including at least one advanced node and a plurality of anchor nodes, the advanced node having a higher query authority than the anchor nodes, the blockchain further comprising: a branch chain under each anchor node, wherein the branch chain comprises at least one child node of the anchor node, and the query authority of the anchor node is higher than that of the child node;
The advanced node is configured to generate a key pair of each anchor node, send a public key of the key pair to the anchor node, and store a private key of the key pair;
each anchor node is used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node by utilizing a public key of the anchor node to obtain encrypted information, and writing the encrypted information into a branch block chain of the anchor node;
in case the first anchor node requests to query the information of the second anchor node, the advanced node is further adapted to:
the advanced node sends key information of the second anchor node to the first anchor node under the condition that the first anchor node is determined to have query authority and the second anchor node agrees to query, so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, and the key information at least comprises a private key;
the first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
Optionally, a first branched chain for:
when a first user in a first branched chain requests a second user in a second branched chain to perform a cross-chain operation, if a branched account of the second user does not exist in the first branched chain, the first branched chain creates a branched account of the second user under the condition that an anchor node to which the second branched chain belongs and permission of the second user are obtained, and the first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes;
The first branch chain and the second branch chain are used for executing a cross-chain operation based on the account of the second user.
Optionally, the first user in the first branch chain requests the second user in the second branch chain to perform a cross-chain operation, including:
a first user in the first branched chain requests a second user in the second branched chain to carry out transfer operation;
the first branched chain and the second branched chain are specifically used for:
the first branch chain sends money of the first user to a branch account of the second user when receiving a transfer application of the first user;
the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs;
the anchor node to which the second branched chain belongs judges whether to accept the transfer of the first user;
if the first branch chain belongs to the anchor node, the second branch chain belongs to the anchor node, and the second branch chain belongs to the anchor node;
the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not;
if so, the first branch chain executes transfer operation;
And the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into a corresponding block in the second branched chain.
Optionally, the first user in the first branch chain requests the second user in the second branch chain to perform a cross-chain operation, including:
a first user in the first branched chain requests a second user in the second branched chain to perform a cross-chain transaction;
the first branched chain and the second branched chain are specifically used for:
under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure;
under the condition that the second user agrees to the transaction application, the second branched chain informs the transaction information to the first branched chain;
if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application;
the first branch chain performs a cross-chain transfer operation and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain;
And if the second branched chain receives the first notification message, performing cross-chain transfer operation.
Optionally, the second branch is further configured to:
sending a second notification message to the first branch that a cross-chain transfer operation has been completed;
the first branched chain is further used for:
if the second notification message is received, a transaction completion message is sent to the second branched chain;
or if the second notification message is not received, transferring and rolling back, and sending a transfer failure message to the second branched chain;
the second branch is further configured to:
and when the transfer failure message is received, performing transfer rollback.
Optionally, the key information further includes: the address, password, public key, starting block sequence number, and ending block sequence number of the second anchor node.
Compared with the prior art, the beneficial effects of this application are:
in the method, based on the blockchain comprising a main chain and branch chains under anchor nodes included in the main chain, advanced nodes generate key pairs of each anchor node, send public keys of the key pairs to the anchor nodes, keep private keys of the key pairs, each anchor node respectively acquires information uploaded by its child nodes, encrypts the information uploaded by its child nodes by utilizing the public keys to obtain encrypted information, writes the encrypted information into the branch blockchain, and realizes that different anchor nodes respectively protect privacy of information in respective branch chains to prevent information from being leaked to other anchor nodes in the same blockchain. Therefore, under the condition that the anchor node is used as the node of the enterprise and the child node is used as the user, different enterprises can protect the privacy of the respective user information respectively, and the user information is prevented from being revealed to other enterprises in the same blockchain.
And under the condition that the first anchor node requests to inquire the information of the second anchor node, the advanced node judges whether the first anchor node has the inquiry authority, if so, the advanced node sends the key information of the second anchor node to the first anchor node so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, so that the inquiry authority of different anchor nodes is distributed, managed and supervised, and the reasonable utilization of data is realized while the privacy is protected.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a block chain architecture diagram provided herein;
fig. 2 is a flow chart of a data processing method provided in embodiment 1 of the present application;
fig. 3 is a flow chart of a data processing method provided in embodiment 2 of the present application;
Fig. 4 is a flow chart of a data processing method provided in embodiment 3 of the present application;
fig. 5 is a flow chart of a data processing method provided in embodiment 4 of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
The data processing method provided by the application is based on a blockchain, and the architecture of the blockchain can be seen in fig. 1, as shown in fig. 1, the blockchain comprises a backbone chain, the backbone chain comprises at least one advanced node (HR) and a plurality of anchor nodes (respectively denoted as A1, A2, A3, A4 and the like), the query authority of the advanced node is higher than that of the anchor nodes, and the blockchain further comprises: and each branch chain under the anchor node comprises at least one child node of the anchor node, and the query authority of the anchor node is higher than that of the child node.
Wherein the existence of multiple advanced nodes is allowed in one backbone. In the establishment process of the backbone chain node, the advanced node and the rest anchor nodes are basically the same and participate in the consensus process of the blockchain together. Unlike the anchor node, the advanced node acts as a supervisor in the blockchain and can query all information of other nodes, so the advanced node has the private keys of other anchor nodes. When a new node is added in the backbone chain, if the added node is an anchor node, a pair of secret keys are generated for the new node by a high-level node, and other needed high-level nodes are informed; if a higher level node is added, the anchor node key table is sent by the rest higher level nodes according to the authority of the higher level node. The rest of the node joining steps are the same as the federation chain.
The anchor node key table maintained by the advanced node contains a plurality of pieces of information, and each piece of information at least contains the private key of the anchor node. Of course, each piece of information may also include: the address of the anchor node, the password, the private key, the public key, the starting block sequence number (the highest block sequence number when the pair of keys was generated) and the ending block sequence number (the highest block sequence number before the key exchange).
The main functions of the anchor nodes in the backbone chain are the following: first, information of branching chains is recorded. At intervals, one node in the branch chain can package and send the updated blocks in the current branch chain to the anchor node, and the anchor node encrypts the blocks by using the public key and then puts the encrypted blocks and the address identifier of the node into a transaction pool of the branch chain together. It should be noted that the "transaction" in the anchor node transaction pool is only used as a storage, and after the transaction pool is completed synchronously, the transaction is executed by the executor of the node selected by the consensus, and because the information is encrypted, the executor only needs to execute the storage function and record the encrypted information into the block. Second, as a bridge to cross-chain transactions. When two different branch chains perform cross-chain transaction, the anchor nodes of the two chains serve as bridges for information transmission of the two chains, and information transmission and verification are performed. Third, participate in the consensus of the blockchain.
It should be noted that fig. 1 is a schematic block chain architecture, and is not meant to be limiting.
Referring to fig. 2, a flow chart of a data processing method provided in embodiment 1 of the present application is shown in fig. 2, and the method may include, but is not limited to, the following steps:
And S11, the advanced node generates a key pair of each anchor node, transmits a public key of the key pair to the anchor node, and stores a private key of the key pair.
After the public key is received by the anchor node, the public key can be used for encrypting the information uploaded by the sub-node in the branched chain. Accordingly, the private key of the key pair may decrypt information encrypted with the public key.
And step S12, each anchor node respectively acquires information uploaded by the child nodes, encrypts the information uploaded by the child nodes by utilizing the public keys to obtain encrypted information, and writes the encrypted information into the branch block chain.
Step S13, under the condition that a first anchor node requests to inquire information of a second anchor node, the advanced node sends key information of the second anchor node to the first anchor node under the condition that the first anchor node is confirmed to have inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, and the key information at least comprises a private key.
The first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
In this embodiment, the advanced node may allocate a query right to each anchor node, and in the case that the query right of an anchor node is allocated by the advanced node, the advanced node may determine whether a certain anchor node has the query right.
In this embodiment, the key information may further include: the address, password, public key, starting block sequence number, and ending block sequence number of the second anchor node.
The key information includes: under the conditions of the address, the password, the public key, the private key, the initial block serial number and the terminal block serial number of the second anchor node, the first anchor node decrypts the encrypted information of the second anchor node by using the key information, so that the decryption efficiency and accuracy can be ensured.
In the method, based on the blockchain comprising a main chain and branch chains under anchor nodes included in the main chain, advanced nodes generate key pairs of each anchor node, send public keys of the key pairs to the anchor nodes, keep private keys of the key pairs, each anchor node respectively acquires information uploaded by its child nodes, encrypts the information uploaded by its child nodes by utilizing the public keys to obtain encrypted information, writes the encrypted information into the branch blockchain, and realizes that different anchor nodes respectively protect privacy of information in respective branch chains to prevent information from being leaked to other anchor nodes in the same blockchain. Therefore, under the condition that the anchor node is used as the node of the enterprise and the child node is used as the user, different enterprises can protect the privacy of the respective user information respectively, and the user information is prevented from being revealed to other enterprises in the same blockchain.
And under the condition that the first anchor node requests to inquire the information of the second anchor node, the advanced node judges whether the first anchor node has the inquiry authority, if so, the advanced node sends the key information of the second anchor node to the first anchor node so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, so that the inquiry authority of different anchor nodes is distributed, managed and supervised, and the reasonable utilization of data is realized while the privacy is protected.
As another alternative embodiment of the present application, referring to fig. 3, a flowchart of an embodiment 2 of a data processing method provided in the present application is mainly an extension of the blockchain-based data processing method described in the foregoing embodiment 1, and as shown in fig. 3, the method may include, but is not limited to, the following steps:
and S21, the advanced node generates a key pair of each anchor node, issues a public key of the key pair to the anchor node, and keeps a private key of the key pair.
Step S22, each anchor node respectively acquires information uploaded by its child node, encrypts the information uploaded by its child node by using its public key to obtain encrypted information, and writes the encrypted information into its branch blockchain.
Step S23, under the condition that the first anchor node requests to inquire the information of the second anchor node, the advanced node sends the key information of the second anchor node to the first anchor node under the condition that the first anchor node has inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts the encrypted information of the second anchor node by utilizing the key information, and the key information at least comprises a private key.
The first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
The detailed procedure of steps S21-S23 can be referred to in the related description of steps S11-S13 in embodiment 1, and will not be described herein.
Step S24, when a first user in a first branch chain requests a second user in a second branch chain to perform a cross-link operation, if there is no account of the second user in the first branch chain, the first branch chain creates the account of the second user when obtaining an anchor node to which the second branch chain belongs and permission of the second user.
The first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes.
In this embodiment, the process of creating the sub-account of the second user when the first sub-branch obtains the permission of the second user and the anchor node to which the second sub-branch belongs may include:
s2401, a first branch chain initiates a permission request for creating a sub-account of a second user;
s2402, when the anchor node to which the second branch chain belongs and the second user acquire the permission request, judging whether to allow creation of the branch account of the second user, and if so, transmitting part of necessary information of the second user to the first branch chain.
S2403, the first branch chain creates a sub-account of the second user in the first branch chain according to part of the necessary information of the second user.
S2404, the first branch chain sends the account information of the second user in the first branch chain to the second branch chain through the anchor node to which the first branch chain belongs.
The account information may include, but is not limited to: the address, password and holding currency of the second user in the first branch.
S2405, the second branched chain records the account information of the second user from the first branched chain in the personal information of the second user in the second branched chain, and sends the verification information to the first branched chain;
S2406, the first branch chain verifies based on the verification information;
if the verification is wrong, returning to the step S2401;
if the verification is correct, the creation is ended.
Although the second user successfully creates the branch account in the first branch, the second user does not have access to the first branch, and therefore, the information of the first branch is not revealed to the second branch.
Step S25, the first branch chain and the second branch chain execute a cross-chain operation based on the account of the second user.
In this embodiment, the first branch chain and the second branch chain execute the cross-link operation based on the account of the second user, so that when the user performs the cross-link operation, the two branch chains do not need to be synchronized in real time, but are performed asynchronously, and the nodes between the two chains do not interfere with each other.
As another alternative embodiment of the present application, referring to fig. 4, a flowchart of an embodiment 3 of a data processing method provided in the present application is mainly a refinement of the blockchain-based data processing method described in the foregoing embodiment 2, and as shown in fig. 4, the method may include, but is not limited to, the following steps:
step S31, the advanced node generates a key pair of each anchor node, issues a public key of the key pair to the anchor node, and keeps a private key of the key pair.
And step S32, each anchor node respectively acquires information uploaded by the child nodes, encrypts the information uploaded by the child nodes by using the public keys to obtain encrypted information, and writes the encrypted information into the branch block chain.
Step S33, when the first anchor node requests to query the information of the second anchor node, the advanced node sends the key information of the second anchor node to the first anchor node when determining that the first anchor node has the query authority and the second anchor node agrees to query, so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, where the key information at least includes a private key.
The first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
The detailed procedure of steps S31-S33 can be referred to in the related description of steps S21-S23 in embodiment 2, and will not be described herein.
Step S34, when a first user in the first branch chain requests a second user in the second branch chain to perform a transfer operation, if there is no account for the second user in the first branch chain, the first branch chain creates the account for the second user when obtaining the anchor node to which the second branch chain belongs and permission of the second user.
The first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes.
The process of creating the sub-account of the second user when the first sub-branch obtains the permission of the second user and the anchor node to which the second sub-branch belongs may refer to the description of step S24 in embodiment 2, which is not repeated here.
And step S35, when the first branch chain receives the transfer application of the first user, the first branch chain sends the currency of the first user to the account of the second user.
And step S36, the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs.
And step S37, judging whether the anchor node of the second branched chain receives the transfer of the first user or not.
If so, step S39 is performed.
Step S38, the anchor node to which the second branch chain belongs records the transfer information of the first user, and sends transfer approval information to the anchor node to which the first branch chain belongs.
Step S39, the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not.
If yes, step S310 is executed.
Step S310, the first branch chain executes transfer operation.
Step S311, the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into the corresponding block in the second branched chain.
Steps S35-S311 are a specific embodiment of step S25 in example 2.
In this embodiment, the first branch chain and the second branch chain are based on the account division of the second user, and the cross-chain transfer is performed, so that when the user performs the cross-chain transfer, the two branch chains do not need to be synchronized in real time, but are performed asynchronously, and the nodes between the two chains do not interfere with each other.
As another alternative embodiment of the present application, referring to fig. 5, a flowchart of an embodiment 4 of a data processing method provided in the present application is mainly a refinement of the blockchain-based data processing method described in the foregoing embodiment 2, and as shown in fig. 5, the method may include, but is not limited to, the following steps:
step S41, the advanced node generates a key pair of each anchor node, issues a public key of the key pair to the anchor node, and keeps a private key of the key pair.
Step S42, each anchor node respectively acquires information uploaded by its child node, encrypts the information uploaded by its child node by using its public key to obtain encrypted information, and writes the encrypted information into its branch blockchain.
Step S43, under the condition that the first anchor node requests to inquire the information of the second anchor node, the advanced node sends the key information of the second anchor node to the first anchor node under the condition that the first anchor node has inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts the encrypted information of the second anchor node by utilizing the key information, and the key information at least comprises a private key.
The first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
The detailed procedure of steps S41-S43 can be referred to in the related description of steps S21-S23 in embodiment 2, and will not be described herein.
Step S44, when a first user in the first branch chain requests a second user in the second branch chain to perform a cross-link transaction, if there is no account of the second user in the first branch chain, the first branch chain creates the account of the second user when obtaining the anchor node to which the second branch chain belongs and the permission of the second user.
The first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes.
The process of creating the sub-account of the second user when the first sub-branch obtains the permission of the second user and the anchor node to which the second sub-branch belongs may refer to the description of step S24 in embodiment 2, which is not repeated here.
Step S45, under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure.
A coupon can be understood as: and exchanging the self currency for other types of currency.
Step S46, in the case that the second user agrees to the transaction application, the second branch informs the transaction information to the first branch.
The transaction information may include: information of a source account, information of a receiving account, and types and amounts of money for transactions.
On the basis that the hanging form corresponding to the transaction application is put into a cross-chain transaction request pool for disclosure, a second user can acquire the hanging form of the transaction application, and under the condition that the second user agrees to the transaction application, the second branch chain informs the transaction information to the first branch chain.
Step S47, if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application.
Step S48, the first branch chain performs a cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain.
Step S49, if the second branch chain receives the first notification message, performing a cross-chain transfer operation.
Steps S45-S49 are a specific embodiment of step S25 in example 2.
In this embodiment, if the second branch receives the first notification message, after performing the cross-chain transfer operation, the following steps may be further performed:
s410, the second branched chain sends a second notification message that the cross-chain transfer operation is completed to the first branched chain;
s411, if the first branched chain receives the second notification message, a transaction completion message is sent to the second branched chain;
s412, if the first branched chain does not receive the second notification message, performing transfer rollback, and sending a transfer failure message to the second branched chain;
transfer rollback can be understood as: the operation previously associated with the transfer is withdrawn.
S413, when the second branched chain receives the transfer failure message, the transfer rollback is carried out.
The first branch chain and the second branch chain respectively send notification messages or transfer failure messages, transfer rollback is carried out when the notification messages are not received, and transfer rollback is carried out when the transfer failure messages are received, so that the reliability of transfer is ensured.
In this embodiment, the first branch chain and the second branch chain execute the cross-link transaction based on the account of the second user, so that when the user performs the cross-link transaction, the two branch chains do not need to be synchronized in real time, but are performed asynchronously, and the nodes between the two chains do not interfere with each other.
The data processing system provided in the present application will be described next, and the data processing system described hereinafter and the data processing method described above may be referred to in correspondence with each other.
The data processing system includes: a blockchain, the blockchain including a backbone chain including at least one advanced node and a plurality of anchor nodes, the advanced node having a higher query authority than the anchor nodes, the blockchain further comprising: a branch chain under each anchor node, wherein the branch chain comprises at least one child node of the anchor node, and the query authority of the anchor node is higher than that of the child node;
The advanced node is configured to generate a key pair of each anchor node, send a public key of the key pair to the anchor node, and store a private key of the key pair;
each anchor node is used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node by utilizing a public key of the anchor node to obtain encrypted information, and writing the encrypted information into a branch block chain of the anchor node;
in case the first anchor node requests to query the information of the second anchor node, the advanced node is further adapted to:
under the condition that the first anchor node is determined to have query authority and the second anchor node agrees to query, sending key information of the second anchor node to the first anchor node so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, wherein the key information at least comprises a private key;
the first anchor node and the second anchor node are any two anchor nodes in a plurality of anchor nodes;
in this embodiment, the first branched chain may be used to:
when a first user in a first branched chain requests a second user in a second branched chain to perform a cross-chain operation, if a branched account of the second user does not exist in the first branched chain, the first branched chain creates a branched account of the second user under the condition that an anchor node to which the second branched chain belongs and permission of the second user are obtained, and the first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes;
The first branch chain and the second branch chain are used for executing a cross-chain operation based on the account of the second user.
In this embodiment, the requesting, by the first user in the first branch chain, to perform the cross-link operation to the second user in the second branch chain includes:
a first user in the first branched chain requests a second user in the second branched chain to carry out transfer operation;
accordingly, the first branched chain and the second branched chain may be specifically used for:
the first branch chain sends money of the first user to a branch account of the second user when receiving a transfer application of the first user;
the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs;
the anchor node to which the second branched chain belongs judges whether to accept the transfer of the first user;
if the first branch chain belongs to the anchor node, the second branch chain belongs to the anchor node, and the second branch chain belongs to the anchor node;
the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not;
If so, the first branch chain executes transfer operation;
and the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into a corresponding block in the second branched chain.
In this embodiment, the requesting, by the first user in the first branch chain, to perform the cross-link operation to the second user in the second branch chain includes:
a first user in the first branched chain requests a second user in the second branched chain to perform a cross-chain transaction;
accordingly, the first branch and the second branch may be specifically used for:
under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure;
under the condition that the second user agrees to the transaction application, the second branched chain informs the transaction information to the first branched chain;
if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application;
the first branch chain performs a cross-chain transfer operation and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain;
And if the second branched chain receives the first notification message, performing cross-chain transfer operation.
The second branch may also be used to:
sending a second notification message to the first branch that a cross-chain transfer operation has been completed;
the first branched chain may also be used to:
if the second notification message is received, a transaction completion message is sent to the second branched chain;
or if the second notification message is not received, transferring and rolling back, and sending a transfer failure message to the second branched chain;
the second branch may also be used to:
and when the transfer failure message is received, performing transfer rollback.
The key information may further include: the address, password, public key, starting block sequence number, and ending block sequence number of the second anchor node.
It should be noted that, in each embodiment, the differences from the other embodiments are emphasized, and the same similar parts between the embodiments are referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
The foregoing has described in detail a data processing method and system provided herein, and specific examples have been presented herein to illustrate the principles and embodiments of the present application, the above examples being provided only to assist in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A data processing method, characterized in that based on a blockchain, the blockchain includes a backbone chain, the backbone chain includes at least one advanced node and a plurality of anchor nodes, the advanced node has a higher query authority than the anchor nodes, the blockchain further includes: a branch chain under each anchor node, the branch chain including at least one child node of the anchor node, the query authority of the anchor node being higher than the query authority of the child node, the method comprising:
the advanced node generates a key pair of each anchor node, issues a public key of the key pair to the anchor node, and keeps a private key of the key pair;
Each anchor node respectively acquires information uploaded by a child node of the anchor node, encrypts the information uploaded by the child node by using a public key of the anchor node to obtain encrypted information, and writes the encrypted information into a branch block chain of the anchor node;
under the condition that a first anchor node requests to inquire information of a second anchor node, the advanced node sends key information of the second anchor node to the first anchor node under the condition that the first anchor node is confirmed to have inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts the encrypted information of the second anchor node by utilizing the key information, and the key information at least comprises a private key;
the first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
2. The method according to claim 1, wherein the method further comprises:
when a first user in a first branched chain requests a second user in a second branched chain to perform a cross-chain operation, if a branched account of the second user does not exist in the first branched chain, the first branched chain creates a branched account of the second user under the condition that an anchor node to which the second branched chain belongs and permission of the second user are obtained, and the first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes;
The first branch and the second branch perform a cross-chain operation based on the account of the second user.
3. The method of claim 2, wherein the first user of the first branch requesting a cross-chain operation from the second user of the second branch comprises:
a first user in the first branched chain requests a second user in the second branched chain to carry out transfer operation;
the first branch and the second branch perform a cross-chain operation based on the account of the second user, comprising:
the first branch chain sends money of the first user to a branch account of the second user when receiving a transfer application of the first user;
the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs;
the anchor node to which the second branched chain belongs judges whether to accept the transfer of the first user;
if the first branch chain belongs to the anchor node, the second branch chain belongs to the anchor node, and the second branch chain belongs to the anchor node;
the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not;
If so, the first branch chain executes transfer operation;
and the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into a corresponding block in the second branched chain.
4. The method of claim 2, wherein the first user of the first branch requesting a cross-chain operation from the second user of the second branch comprises:
a first user in the first branched chain requests a second user in the second branched chain to perform a cross-chain transaction;
the first branch and the second branch perform a cross-chain operation based on the account of the second user, comprising:
the first user sends a transaction application to the second branched chain;
under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure;
under the condition that the second user agrees to the transaction application, the second branched chain informs the transaction information to the first branched chain;
if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application;
The first branch chain performs a cross-chain transfer operation and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain;
and if the second branched chain receives the first notification message, performing cross-chain transfer operation.
5. The method of claim 4, wherein the second branch, upon receiving the first notification message, further comprises, after performing a cross-chain transfer operation:
the second branch sends a second notification message that the cross-chain transfer operation is completed to the first branch;
if the first branched chain receives the second notification message, the first branched chain sends a transaction completion message to the second branched chain;
if the first branched chain does not receive the second notification message, transferring and rolling back, and sending a transfer failure message to the second branched chain;
and the second branched chain rolls back the transfer when receiving the transfer failure message.
6. The method according to any one of claims 1-5, wherein the key information further comprises: the address, password, public key, starting block sequence number, and ending block sequence number of the second anchor node.
7. A data processing system, comprising: a blockchain, the blockchain including a backbone chain including at least one advanced node and a plurality of anchor nodes, the advanced node having a higher query authority than the anchor nodes, the blockchain further comprising: a branch chain under each anchor node, wherein the branch chain comprises at least one child node of the anchor node, and the query authority of the anchor node is higher than that of the child node;
the advanced node is configured to generate a key pair of each anchor node, send a public key of the key pair to the anchor node, and store a private key of the key pair;
each anchor node is used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node by utilizing a public key of the anchor node to obtain encrypted information, and writing the encrypted information into a branch block chain of the anchor node;
in case the first anchor node requests to query the information of the second anchor node, the advanced node is further adapted to:
under the condition that the first anchor node is determined to have query authority and the second anchor node agrees to query, sending key information of the second anchor node to the first anchor node so that the first anchor node decrypts the encrypted information of the second anchor node by using the key information, wherein the key information at least comprises a private key;
The first anchor node and the second anchor node are any two anchor nodes of a plurality of anchor nodes.
8. The system of claim 7, wherein the first branch is configured to:
when a first user in a first branched chain requests a second user in a second branched chain to perform a cross-chain operation, if a branched account of the second user does not exist in the first branched chain, the first branched chain creates a branched account of the second user under the condition that an anchor node to which the second branched chain belongs and permission of the second user are obtained, and the first branched chain and the second branched chain are any two branched chains in the branched chains under a plurality of anchor nodes;
the first branch chain and the second branch chain are used for executing a cross-chain operation based on the account of the second user.
9. The system of claim 8, wherein the first user of the first branch requesting a cross-chain operation from the second user of the second branch comprises:
a first user in the first branched chain requests a second user in the second branched chain to carry out transfer operation;
the first branched chain and the second branched chain are specifically used for:
The first branch chain sends money of the first user to a branch account of the second user when receiving a transfer application of the first user;
the anchor node to which the first branch chain belongs sends the transfer information of the first user to the anchor node to which the second branch chain belongs;
the anchor node to which the second branched chain belongs judges whether to accept the transfer of the first user;
if the first branch chain belongs to the anchor node, the second branch chain belongs to the anchor node, and the second branch chain belongs to the anchor node;
the anchor node to which the first branch chain belongs judges whether the transfer approval information is received or not;
if so, the first branch chain executes transfer operation;
and the second branched chain changes the currency balance of the second user, and the transfer information corresponding to the currency balance of the second user is written into a corresponding block in the second branched chain.
10. The system of claim 8, wherein the first user of the first branch requesting a cross-chain operation from the second user of the second branch comprises:
a first user in the first branched chain requests a second user in the second branched chain to perform a cross-chain transaction;
The first branched chain and the second branched chain are specifically used for:
under the condition that the second branched chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging note corresponding to the transaction application into a cross-chain transaction request pool for disclosure;
under the condition that the second user agrees to the transaction application, the second branched chain informs the transaction information to the first branched chain;
if the first branch chain receives the transaction information, locking the second branch chain and notifying other branch chains to cancel the transaction application;
the first branch chain performs a cross-chain transfer operation and sends a first notification message that the cross-chain transfer operation is completed to the second branch chain;
and if the second branched chain receives the first notification message, performing cross-chain transfer operation.
CN202110591278.0A 2021-05-28 2021-05-28 Data processing method and system Active CN113326250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110591278.0A CN113326250B (en) 2021-05-28 2021-05-28 Data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110591278.0A CN113326250B (en) 2021-05-28 2021-05-28 Data processing method and system

Publications (2)

Publication Number Publication Date
CN113326250A CN113326250A (en) 2021-08-31
CN113326250B true CN113326250B (en) 2024-02-09

Family

ID=77421948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110591278.0A Active CN113326250B (en) 2021-05-28 2021-05-28 Data processing method and system

Country Status (1)

Country Link
CN (1) CN113326250B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008228A (en) * 2020-03-09 2020-04-14 支付宝(杭州)信息技术有限公司 Method and device for inquiring account privacy information in block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11018852B2 (en) * 2018-12-21 2021-05-25 International Business Machines Corporation Blockchain trust anchor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008228A (en) * 2020-03-09 2020-04-14 支付宝(杭州)信息技术有限公司 Method and device for inquiring account privacy information in block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周艺华 ; 李洪明 ; .基于区块链的数据管理方案.信息安全研究.2020,(01),全文. *

Also Published As

Publication number Publication date
CN113326250A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN106991334B (en) Data access method, system and device
CN111160913B (en) Block chain account balance deposit certificate and recovery method and device
CN110009349B (en) Method and device for generating and verifying linkable ring signature in block chain
CN109902071A (en) Business diary storage method, system, device and equipment
CN109313753A (en) For providing the system and method for data-privacy in privately owned distributed account book
CN110990855A (en) Block chain information recording and inquiring method, device and system
CN103716155A (en) Method and operation terminal for automatically maintaining POS terminal
TW202018567A (en) Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN111192146B (en) Correction method and device for block chain data
CN112804360B (en) Method and apparatus for providing cross-chain private data
CN114528601B (en) Access method and device based on block chain data, processor and electronic equipment
CN111669434A (en) Method, system, device and equipment for establishing communication group
CN113326250B (en) Data processing method and system
CN102859529A (en) Licence issuing system, client terminal, server, and licence issuing method
CN111582866B (en) Payment information management method and system based on block chain technology
CN112446701B (en) Identity authentication method, equipment and storage device based on blockchain
CN113051341A (en) User data storage system and method based on multiple block chains
US20190251532A1 (en) Systems and methods for providing distributed licensing and subscription management
CN109816525A (en) A kind of data processing method and its device, medium, terminal
CN114462091A (en) Block chain crowdsourcing platform design and implementation method for guaranteeing transaction fairness and data privacy
CN111080274B (en) Payment method and system based on Corda database
CN114297721A (en) Information processing method, information processing apparatus, block chain platform, and storage medium
CN112966045A (en) Data synchronization method and system
CN113849851A (en) Proxy method, device and computer readable storage medium
CN111784338A (en) Information processing method, device, system and storage medium

Legal Events

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