CN113326250A - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN113326250A
CN113326250A CN202110591278.0A CN202110591278A CN113326250A CN 113326250 A CN113326250 A CN 113326250A CN 202110591278 A CN202110591278 A CN 202110591278A CN 113326250 A CN113326250 A CN 113326250A
Authority
CN
China
Prior art keywords
chain
user
anchor node
branched chain
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.)
Granted
Application number
CN202110591278.0A
Other languages
Chinese (zh)
Other versions
CN113326250B (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

Images

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

Abstract

The method includes that based on a block chain comprising a backbone chain and branch chains under anchor nodes, a high-level node generates a key pair of each anchor node, a public key in the key pair is issued to the anchor nodes, a private key in the key pair is kept, each anchor node acquires information uploaded by a child node of each anchor node, the information uploaded by the child node of each anchor node is encrypted by the public key of each anchor node, encrypted information is obtained and written into the branch block chain, and under the condition that the anchor nodes serve as nodes of enterprises and the child nodes serve as users, the privacy of user information of different enterprises can be protected respectively, and the user information is prevented from being leaked to other enterprises in the same block chain. The inquiry authorities of different anchor nodes are distributed, managed and supervised, and the data is reasonably utilized while privacy is protected.

Description

Data processing method and system
Technical Field
The present application relates to the field of information security technologies, and in particular, to a data processing method and system.
Background
At this stage, enterprises generally protect client information by using a block chain technique.
However, blockchains expose data to all nodes when generating a unique decentralized book to the centralized authority. The method is characterized by comprising two stages: a synchronization phase and a consensus phase. 1. And (3) a synchronization stage: 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 transaction pool of the other nodes, so that the transaction pool information of each node is kept completely the same. 2. A consensus stage: when the 'transactions' in the transaction pool are packaged and enter the executor to be executed, the transactions are executed according to the intelligent contract, after the execution is finished, a new block is generated by combining the hash of the last block, and the block is synchronized into the chain storage of each node, namely the generation of the block chain. In the two stages, information copy exists, so that when some privacy protection data are not expected to be inquired by a strange node, the construction mode of the original block chain can cause the leakage of privacy information, and further the data safety is influenced.
Disclosure of Invention
The application provides the following technical scheme:
a data processing method, based on a blockchain, the blockchain including a backbone chain, the backbone chain including at least one higher-level node and a plurality of anchor nodes, the higher-level node having a higher query authority than the anchor nodes, the blockchain further including: a branched chain under each anchor node, wherein the branched 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, and the method comprises the following steps:
The advanced node generates a key pair of each anchor node, issues a public key in the key pair to the anchor nodes, and keeps a private key in the key pair;
each anchor node respectively acquires the information uploaded by the child node, encrypts the information uploaded by the child node by using the public key of the anchor node to obtain encrypted information, and writes the encrypted information into the 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 superior 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 inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
Optionally, the method further includes:
under the condition that a first user in a first branched chain requests a second user in a second branched chain to perform cross-chain operation, if the first branched chain does not have a sub account of the second user, the first branched chain creates the sub 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, wherein 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 execute cross-chain operation based on the sub account of the second user.
Optionally, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 transfer operation;
the first branch chain and the second branch chain execute cross-chain operation based on the sub account of the second user, and the cross-chain operation comprises the following steps:
when the first branch chain receives a transfer application of the first user, the first branch chain sends the money of the first user to a sub account of the second user;
the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs;
the anchor node to which the second branched chain belongs judges whether the transfer of the first user is accepted or not;
if the first branch chain is accepted, the anchor node to which the second branch chain belongs records transfer information of the first user, and transfer agreement information is sent to the anchor node to which the first branch chain belongs;
the anchor node to which the first branched chain belongs judges whether the transfer agreement information is received;
If yes, the first branched chain executes transfer operation;
and the second branch chain changes the money balance of the second user, and writes the transfer information corresponding to the money balance of the second user into a corresponding block in the second branch chain.
Optionally, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 cross-chain transaction;
the first branch chain and the second branch chain execute cross-chain operation based on the sub account of the second user, and the cross-chain operation comprises the following steps:
the first user sends a transaction application to the second branched chain;
under the condition that the second branch chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging list corresponding to the transaction application into a cross-chain transaction request pool for public notice;
under the condition that the second user agrees to the transaction application, the second branched chain informs the first branched chain of transaction information;
if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are informed to cancel transaction application;
The first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain;
and if the second branch chain receives the first notification message, performing cross-chain transfer operation.
Optionally, if the second branch chain receives the first notification message, after performing a cross-chain transfer operation, the method further includes:
the second branched chain sends a second notification message that the cross-chain transfer operation is completed to the first branched chain;
if the first branched chain receives the second notification message, a transaction completion message is sent 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 branch chain performs transfer rollback when receiving the transfer failure message.
Optionally, the key information further includes: an address, a password, a public key, a starting block sequence number, and an ending block sequence number of the second anchor node.
A data processing system comprising: a blockchain, the blockchain including a backbone chain, the backbone chain including at least one higher level node and a plurality of anchor nodes, the higher level node having a higher query authority than the anchor nodes, the blockchain further including: a branched chain under each anchor node, wherein the branched 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 used for generating a key pair of each anchor node, issuing a public key in the key pair to the anchor nodes, and keeping a private key in the key pair;
each anchor node is respectively used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node of the anchor node by using 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 the event that the first anchor node requests to query the second anchor node for information, the superordinate node is further configured to:
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 is determined to have the inquiry authority and the second anchor node agrees to carry out inquiry, 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 of the plurality of anchor nodes.
Optionally, the first branching chain is used for:
under the condition that a first user in a first branched chain requests a second user in a second branched chain to perform cross-chain operation, if the first branched chain does not have a sub account of the second user, the first branched chain creates the sub 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, wherein 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 cross-chain operation based on the sub account of the second user.
Optionally, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 transfer operation;
the first branched chain and the second branched chain are specifically used for:
when the first branch chain receives a transfer application of the first user, the first branch chain sends the money of the first user to a sub account of the second user;
the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs;
the anchor node to which the second branched chain belongs judges whether the transfer of the first user is accepted or not;
if the first branch chain is accepted, the anchor node to which the second branch chain belongs records transfer information of the first user, and transfer agreement information is sent to the anchor node to which the first branch chain belongs;
the anchor node to which the first branched chain belongs judges whether the transfer agreement information is received;
if yes, the first branched chain executes transfer operation;
And the second branch chain changes the money balance of the second user, and writes the transfer information corresponding to the money balance of the second user into a corresponding block in the second branch chain.
Optionally, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 cross-chain transaction;
the first branch chain and the second branch chain are specifically used for:
under the condition that the second branch chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging list corresponding to the transaction application into a cross-chain transaction request pool for public notice;
under the condition that the second user agrees to the transaction application, the second branched chain informs the first branched chain of transaction information;
if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are informed to cancel transaction application;
the first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain;
And if the second branch chain receives the first notification message, performing cross-chain transfer operation.
Optionally, the second branched chain is further used for:
sending a second notification message that the cross-chain transfer operation is completed to the first branched chain;
the first branching chain is further configured to:
if the second notification message is received, sending a transaction completion message to the second branched chain;
or if the second notification message is not received, transferring rollback is carried out, and a transfer failure message is sent to the second branched chain;
the second branching chain is also used for:
and when the transfer failure message is received, performing transfer rollback.
Optionally, the key information further includes: an address, a password, a public key, a starting block sequence number, and an ending block sequence number of the second anchor node.
Compared with the prior art, the beneficial effect of this application is:
in the method, based on a block chain comprising a backbone chain and branch chains under anchor nodes included in the backbone chain, a superior node generates a key pair of each anchor node, a public key in the key pair is issued to the anchor nodes, a private key in the key pair is kept, each anchor node acquires information uploaded by a child node of the anchor node, the information uploaded by the child node of the anchor node is encrypted by the public key of the anchor node to obtain encrypted information, the encrypted information is written into the branch block chain, privacy protection of the information in the branch chains of the anchor nodes is achieved, and the information is prevented from being leaked to other anchor nodes in the same block chain. Therefore, under the condition that the anchor node is used as a node of an enterprise and the child nodes are used as users, different enterprises can protect the privacy of respective user information respectively, and the user information is prevented from being leaked to other enterprises in the same block chain.
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 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, thereby realizing the distribution management and supervision of the inquiry authority of different anchor nodes and reasonably utilizing the data while protecting the privacy.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a block chain architecture diagram provided in the present application;
fig. 2 is a schematic flowchart of a data processing method provided in embodiment 1 of the present application;
fig. 3 is a schematic flowchart of a data processing method provided in embodiment 2 of the present application;
Fig. 4 is a schematic flowchart of a data processing method provided in embodiment 3 of the present application;
fig. 5 is a schematic flowchart of a data processing method provided in embodiment 4 of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The data processing method provided by the present application is based on a blockchain, and a blockchain architecture can refer to fig. 1, as shown in fig. 1, where the blockchain includes a backbone chain, the backbone chain includes at least one higher-level node (HR) and a plurality of anchor nodes (denoted as a1, a2, A3, a4, and the like, respectively), a query right of the higher-level node is higher than a query right of the anchor nodes, and the blockchain further includes: and the branched chain under each 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 high-level nodes is allowed in one backbone chain. In the process of establishing the backbone chain node, the high-level node and the rest anchor nodes are approximately the same and participate in the consensus process of the block chain together. Unlike the anchor node, the senior node, as a supervisor in the blockchain, can query all the information of other nodes, so the senior node possesses the private keys of other anchor nodes. When a new node is added into the backbone chain, if the added node is an anchor node, a pair of keys is generated for the added node by a high-level node, and other needed high-level nodes are informed; if the superior node is added, the anchor node key table is sent by the rest superior nodes according to the authority of the superior node. The rest of the node joining steps are the same as the federation chain.
The anchor node key table maintained by the high-level node comprises a plurality of pieces of information, and each piece of information at least comprises a private key of the anchor node. Of course, each piece of information may also include: the address of the anchor node, the cipher, 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 rekeying).
The main functions of the anchor node in the backbone chain are the following: first, the branching information is recorded. At intervals, a certain node in the branched chain can pack and send the updated blocks in the current branched chain to the anchor node, and the anchor node encrypts the blocks by using the public key of the anchor node and then places the encrypted blocks and the address identifier of the node into the transaction pool of the branched chain. It should be noted that "transaction" in the anchor node transaction pool is only used as storage, and after the transaction pool is synchronized, the transaction is executed by the executor of the nodes listed in common identification, and since these pieces of information are encrypted, the executor only needs to execute the storage function, and then records these pieces of encrypted information into the block. Second, as a bridge for cross-chain transactions. When two different branched chains carry out cross-chain transaction, the anchor nodes of the two chains are used as bridges for transmitting information of the two chains to carry out information transmission and verification. And thirdly, participating in consensus of block chains.
It should be noted that fig. 1 is a schematic diagram of an architecture of a blockchain, which is not intended to limit the architecture of the blockchain.
Referring to fig. 2, a flow chart of a data processing method provided in embodiment 1 of the present application is schematically illustrated, and as shown in fig. 2, the method may include, but is not limited to, the following steps:
Step S11, the senior node generates a key pair for each anchor node, issues a public key in the key pair to the anchor node, and stores a private key in the key pair.
After the anchor node receives the public key, the information uploaded by the subnode in the branched chain can be encrypted by using the public key. Accordingly, the private key of the key pair may decrypt information encrypted with the public key.
And step S12, each anchor node respectively acquires the information uploaded by the child node thereof, encrypts the information uploaded by the child node thereof by using the public key thereof to obtain encrypted information, and writes the encrypted information into the branch block chain thereof.
Step S13, when a first anchor node requests to query information of a second anchor node, the superordinate node sends 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 perform the query, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
In this embodiment, the senior node may allocate query authority to each anchor node, and the senior node may determine whether a certain anchor node has the query authority or not, in a case where the query authority of the anchor node is allocated by the senior node.
In this embodiment, the key information may further include: an address, a password, a public key, a starting block sequence number, and an ending block sequence number of the second anchor node.
The key information includes: under the condition of the address, the password, the public key, the private key, the initial block serial number and the termination 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 a block chain comprising a backbone chain and branch chains under anchor nodes included in the backbone chain, a superior node generates a key pair of each anchor node, a public key in the key pair is issued to the anchor nodes, a private key in the key pair is kept, each anchor node acquires information uploaded by a child node of the anchor node, the information uploaded by the child node of the anchor node is encrypted by the public key of the anchor node to obtain encrypted information, the encrypted information is written into the branch block chain, privacy protection of the information in the branch chains of the anchor nodes is achieved, and the information is prevented from being leaked to other anchor nodes in the same block chain. Therefore, under the condition that the anchor node is used as a node of an enterprise and the child nodes are used as users, different enterprises can protect the privacy of respective user information respectively, and the user information is prevented from being leaked to other enterprises in the same block chain.
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 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, thereby realizing the distribution management and supervision of the inquiry authority of different anchor nodes and reasonably utilizing the data while protecting the privacy.
As another alternative embodiment of the present application, referring to fig. 3, a flowchart of an embodiment 2 of a data processing method provided by the present application is provided, where this embodiment is mainly an extension of the data processing method based on a block chain described in the foregoing embodiment 1, and as shown in fig. 3, the method may include, but is not limited to, the following steps:
step S21, the senior node generates a key pair for each anchor node, issues a public key in the key pair to the anchor node, and stores a private key in the key pair.
And step S22, each anchor node respectively acquires the information uploaded by the child node thereof, encrypts the information uploaded by the child node thereof by using the public key thereof to obtain encrypted information, and writes the encrypted information into the branch block chain thereof.
Step S23, when a first anchor node requests to query information of a second anchor node, and the superordinate node determines that the first anchor node has a query right, and when the second anchor node agrees to perform the query, the superordinate node sends key information of the second anchor node to the first anchor node, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
The detailed procedures of steps S21-S23 can be found in the related descriptions of steps S11-S13 in embodiment 1, and are not repeated 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 the first branch chain does not have a sub-account of the second user, the first branch chain creates a sub-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 the plurality of anchor nodes.
In this embodiment, the process of creating the sub-account of the second user by the first branch chain under the condition of obtaining the permission of the anchor node to which the second branch chain belongs and the second user may include:
s2401, initiating a permission request for obtaining a sub-account of a second user by a first branch chain;
s2402, when the anchor node to which the second branched chain belongs and the second user obtain the permission request, judging whether the creation of the sub account of the second user is allowed, and if so, sending part of necessary information of the second user to the first branched chain.
S2403, the first branched chain creates a sub account of the second user in the first branched chain according to part of necessary information of the second user.
S2404, the first branched chain sends the sub-account information of the second user in the first branched chain to the second branched chain through the anchor node to which the first branched chain belongs.
The sub-account information may include, but is not limited to: the address, password, and holding currency of the second user in the first branch chain.
S2405, the second branched chain records the sub-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 verification information to the first branched chain;
S2406, verifying the first branched chain based on the verification information;
if the verification is wrong, returning to the step S2401;
and if the verification is correct, ending the creation.
It should be noted that although the second user successfully creates the sub-account in the first branch chain, the second user does not have the right to access the first branch chain, and therefore, the information of the first branch chain is not leaked to the second branch chain.
And step S25, the first branched chain and the second branched chain execute cross-chain operation based on the account division of the second user.
In this embodiment, the first branch chain and the second branch chain execute the cross-chain operation based on the sub-account of the second user, so that when the user performs the cross-chain operation, the two branch chains do not need to be synchronized in real time but are asynchronously performed, and 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 by the present application is provided, where this embodiment mainly relates to a refinement scheme of the data processing method based on a block chain described in the foregoing embodiment 2, as shown in fig. 4, the method may include, but is not limited to, the following steps:
step S31, the senior node generates a key pair for each anchor node, issues a public key in the key pair to the anchor node, and stores a private key in the key pair.
And step S32, each anchor node respectively acquires the information uploaded by the child node thereof, encrypts the information uploaded by the child node thereof by using the public key thereof to obtain encrypted information, and writes the encrypted information into the branch block chain thereof.
Step S33, when a first anchor node requests to query information of a second anchor node, and the superordinate node determines that the first anchor node has a query right, and when the second anchor node agrees to perform the query, the superordinate node sends key information of the second anchor node to the first anchor node, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
The detailed procedures of steps S31-S33 can be referred to the related descriptions of steps S21-S23 in embodiment 2, and are not described herein again.
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 the first branch chain does not have a sub account of the second user, the first branch chain creates a sub 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 the plurality of anchor nodes.
The process of creating the sub-account of the second user when the first branch chain obtains the permission of the second user and the anchor node to which the second branch chain belongs may refer to the related description of step S24 in embodiment 2, and details are not described here.
And step S35, when the first branch chain receives the transfer application of the first user, the first branch chain sends the money of the first user to the sub account of the second user.
And step S36, the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs.
And step S37, judging whether the transfer of the first user is accepted or not by the anchor node to which the second branched chain belongs.
If yes, go to step S39.
And step S38, recording the transfer information of the first user by the anchor node to which the second branched chain belongs, and sending transfer agreement information to the anchor node to which the first branched chain belongs.
And step S39, judging whether the transfer agreement information is received by the anchor node to which the first branched chain belongs.
If yes, go to step S310.
And step S310, the first branched chain executes transfer operation.
Step S311, the second branch chain changes the money balance of the second user, and the transfer information corresponding to the money balance of the second user is written into the corresponding block in the second branch chain.
Steps S35-S311 are a specific implementation of step S25 in example 2.
In this embodiment, the first branch chain and the second branch chain execute cross-chain transfer based on the sub account of the second user, and it can be ensured that when the user performs cross-chain transfer, the two branch chains do not need to be synchronized in real time but are asynchronously performed, and 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 by the present application is provided, where this embodiment mainly relates to a refinement scheme of the data processing method based on a block chain described in the foregoing embodiment 2, as shown in fig. 5, the method may include, but is not limited to, the following steps:
step S41, the senior node generates a key pair for each anchor node, issues a public key in the key pair to the anchor node, and stores a private key in the key pair.
And step S42, each anchor node respectively acquires the information uploaded by the child node thereof, encrypts the information uploaded by the child node thereof by using the public key thereof to obtain encrypted information, and writes the encrypted information into the branch block chain thereof.
Step S43, when a first anchor node requests to query information of a second anchor node, and the superordinate node determines that the first anchor node has a query right, and when the second anchor node agrees to perform the query, the superordinate node sends key information of the second anchor node to the first anchor node, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
The detailed procedures of steps S41-S43 can be referred to the related descriptions of steps S21-S23 in embodiment 2, and are not described herein again.
Step S44, when a first user in the first branch chain requests a second user in a second branch chain to perform a cross-link transaction, if the first branch chain does not have a sub-account of the second user, the first branch chain creates a sub-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 the plurality of anchor nodes.
The process of creating the sub-account of the second user when the first branch chain obtains the permission of the second user and the anchor node to which the second branch chain belongs may refer to the related description of step S24 in embodiment 2, and details are not described here.
And step S45, under the condition that the second branch chain receives the transaction application initiated by the first user, if the transaction application is agreed, placing the hanging list corresponding to the transaction application into a cross-chain transaction request pool for showing.
The drop sheet can be understood as: exchange the information of other types of money with the self money.
Step S46, when the second user agrees to the transaction application, the second branched chain informs the first branched chain of the transaction information.
The transaction information may include: information of the source account, information of the recipient account, the type and amount of money of the transaction.
On the basis that the drop list corresponding to the transaction application is placed in a cross-chain transaction request pool for public notice, a second user can obtain the drop list of the transaction application, and under the condition that the second user agrees the transaction application, the second branched chain informs the first branched chain of transaction information.
Step S47, if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are notified to revoke the transaction application.
And step S48, the first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain.
And step S49, if the second branch chain receives the first notification message, performing cross-chain transfer operation.
Steps S45-S49 are a specific implementation of step S25 in example 2.
In this embodiment, if the second branch chain 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, sending a transaction completion message to the second branched chain;
s412, 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;
the transfer rollback may be understood as: the operations previously associated with the transfer are withdrawn.
And S413, when the second branch chain receives the transfer failure message, transferring and rolling back.
And the first branched chain and the second branched chain respectively send notification messages or transfer failure messages, transfer rollback is performed when the notification messages are not received, and transfer rollback is performed when the transfer failure messages are received, so that the transfer reliability is ensured.
In this embodiment, the first branch chain and the second branch chain execute the cross-chain transaction based on the sub-account of the second user, so that when the user performs the cross-chain transaction, the two branch chains do not need to be synchronized in real time but are asynchronously performed, and nodes between the two chains do not interfere with each other.
The data processing system provided by the present application will be described next, and the data processing system described below and the data processing method described above may be referred to correspondingly.
The data processing system includes: a blockchain, the blockchain including a backbone chain, the backbone chain including at least one higher level node and a plurality of anchor nodes, the higher level node having a higher query authority than the anchor nodes, the blockchain further including: a branched chain under each anchor node, wherein the branched 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 used for generating a key pair of each anchor node, issuing a public key in the key pair to the anchor nodes, and keeping a private key in the key pair;
each anchor node is respectively used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node of the anchor node by using 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 the event that the first anchor node requests to query the second anchor node for information, the superordinate node is further configured to:
under the condition that the first anchor node is determined to have the inquiry authority and the second anchor node agrees to inquire, sending 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, wherein the key information at least comprises a private key;
the first anchor node and the second anchor node are any two of the plurality of anchor nodes;
in this embodiment, the first branched chain may be used for:
under the condition that a first user in a first branched chain requests a second user in a second branched chain to perform cross-chain operation, if the first branched chain does not have a sub account of the second user, the first branched chain creates the sub 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, wherein 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 cross-chain operation based on the sub account of the second user.
In this embodiment, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 transfer operation;
accordingly, the first branched chain and the second branched chain may be used for:
when the first branch chain receives a transfer application of the first user, the first branch chain sends the money of the first user to a sub account of the second user;
the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs;
the anchor node to which the second branched chain belongs judges whether the transfer of the first user is accepted or not;
if the first branch chain is accepted, the anchor node to which the second branch chain belongs records transfer information of the first user, and transfer agreement information is sent to the anchor node to which the first branch chain belongs;
the anchor node to which the first branched chain belongs judges whether the transfer agreement information is received;
If yes, the first branched chain executes transfer operation;
and the second branch chain changes the money balance of the second user, and writes the transfer information corresponding to the money balance of the second user into a corresponding block in the second branch chain.
In this embodiment, the requesting, by a first user in the first branch chain, a chain-crossing operation from a 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 cross-chain transaction;
accordingly, the first and second branching chains may be used specifically for:
under the condition that the second branch chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging list corresponding to the transaction application into a cross-chain transaction request pool for public notice;
under the condition that the second user agrees to the transaction application, the second branched chain informs the first branched chain of transaction information;
if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are informed to cancel transaction application;
the first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain;
And if the second branch chain receives the first notification message, performing cross-chain transfer operation.
The second branching chain may also be used to:
sending a second notification message that the cross-chain transfer operation is completed to the first branched chain;
the first branching chain may also be used to:
if the second notification message is received, sending a transaction completion message to the second branched chain;
or if the second notification message is not received, transferring rollback is carried out, and a transfer failure message is sent to the second branched chain;
the second branching chain may also be used to:
and when the transfer failure message is received, performing transfer rollback.
The key information may further include: an address, a password, a public key, a starting block sequence number, and an ending block sequence number of the second anchor node.
It should be noted that each embodiment is mainly described as a difference from the other embodiments, and the same and similar parts between the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented 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., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The data processing method and system provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data processing method, wherein the blockchain includes a backbone chain, the backbone chain includes at least one higher-level node and a plurality of anchor nodes, the higher-level node has a higher query authority than the anchor nodes, and the blockchain further includes: a branched chain under each anchor node, wherein the branched 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, and the method comprises the following steps:
the advanced node generates a key pair of each anchor node, issues a public key in the key pair to the anchor nodes, and keeps a private key in the key pair;
Each anchor node respectively acquires the information uploaded by the child node, encrypts the information uploaded by the child node by using the public key of the anchor node to obtain encrypted information, and writes the encrypted information into the 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 superior 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 inquiry authority and the second anchor node agrees to inquire, so that the first anchor node decrypts 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 of the plurality of anchor nodes.
2. The method of claim 1, further comprising:
under the condition that a first user in a first branched chain requests a second user in a second branched chain to perform cross-chain operation, if the first branched chain does not have a sub account of the second user, the first branched chain creates the sub 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, wherein 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 execute cross-chain operation based on the sub account of the second user.
3. The method of claim 2, wherein requesting, by a first user in the first branch chain, a cross-chain operation from a second user in the second branch chain comprises:
a first user in the first branched chain requests a second user in the second branched chain to perform transfer operation;
the first branch chain and the second branch chain execute cross-chain operation based on the sub account of the second user, and the cross-chain operation comprises the following steps:
when the first branch chain receives a transfer application of the first user, the first branch chain sends the money of the first user to a sub account of the second user;
the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs;
the anchor node to which the second branched chain belongs judges whether the transfer of the first user is accepted or not;
if the first branch chain is accepted, the anchor node to which the second branch chain belongs records transfer information of the first user, and transfer agreement information is sent to the anchor node to which the first branch chain belongs;
the anchor node to which the first branched chain belongs judges whether the transfer agreement information is received;
If yes, the first branched chain executes transfer operation;
and the second branch chain changes the money balance of the second user, and writes the transfer information corresponding to the money balance of the second user into a corresponding block in the second branch chain.
4. The method of claim 2, wherein requesting, by a first user in the first branch chain, a cross-chain operation from a second user in the second branch chain comprises:
a first user in the first branched chain requests a second user in the second branched chain to perform cross-chain transaction;
the first branch chain and the second branch chain execute cross-chain operation based on the sub account of the second user, and the cross-chain operation comprises the following steps:
the first user sends a transaction application to the second branched chain;
under the condition that the second branch chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging list corresponding to the transaction application into a cross-chain transaction request pool for public notice;
under the condition that the second user agrees to the transaction application, the second branched chain informs the first branched chain of transaction information;
if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are informed to cancel transaction application;
The first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain;
and if the second branch chain receives the first notification message, performing cross-chain transfer operation.
5. The method of claim 4, wherein the second branch chain, after performing the cross-chain transfer operation if receiving the first notification message, further comprises:
the second branched chain sends a second notification message that the cross-chain transfer operation is completed to the first branched chain;
if the first branched chain receives the second notification message, a transaction completion message is sent 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 branch chain performs transfer rollback when receiving the transfer failure message.
6. The method according to any one of claims 1-5, wherein the key information further comprises: an address, a password, a public key, a starting block sequence number, and an ending block sequence number of the second anchor node.
7. A data processing system, comprising: a blockchain, the blockchain including a backbone chain, the backbone chain including at least one higher level node and a plurality of anchor nodes, the higher level node having a higher query authority than the anchor nodes, the blockchain further including: a branched chain under each anchor node, wherein the branched 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 used for generating a key pair of each anchor node, issuing a public key in the key pair to the anchor nodes, and keeping a private key in the key pair;
each anchor node is respectively used for acquiring information uploaded by a child node of the anchor node, encrypting the information uploaded by the child node of the anchor node by using 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 the event that the first anchor node requests to query the second anchor node for information, the superordinate node is further configured to:
under the condition that the first anchor node is determined to have the inquiry authority and the second anchor node agrees to inquire, sending 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, wherein the key information at least comprises a private key;
The first anchor node and the second anchor node are any two of the plurality of anchor nodes.
8. The method of claim 7, wherein the first branching chain is configured to:
under the condition that a first user in a first branched chain requests a second user in a second branched chain to perform cross-chain operation, if the first branched chain does not have a sub account of the second user, the first branched chain creates the sub 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, wherein 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 cross-chain operation based on the sub account of the second user.
9. The system of claim 8, wherein a first user in the first branch chain requests a second user in the second branch chain to perform a cross-chain operation, comprising:
a first user in the first branched chain requests a second user in the second branched chain to perform transfer operation;
the first branched chain and the second branched chain are specifically used for:
When the first branch chain receives a transfer application of the first user, the first branch chain sends the money of the first user to a sub account of the second user;
the anchor node to which the first branched chain belongs sends the transfer information of the first user to the anchor node to which the second branched chain belongs;
the anchor node to which the second branched chain belongs judges whether the transfer of the first user is accepted or not;
if the first branch chain is accepted, the anchor node to which the second branch chain belongs records transfer information of the first user, and transfer agreement information is sent to the anchor node to which the first branch chain belongs;
the anchor node to which the first branched chain belongs judges whether the transfer agreement information is received;
if yes, the first branched chain executes transfer operation;
and the second branch chain changes the money balance of the second user, and writes the transfer information corresponding to the money balance of the second user into a corresponding block in the second branch chain.
10. The system of claim 8, wherein a first user in the first branch chain requests a second user in the second branch chain to perform a cross-chain operation, comprising:
a first user in the first branched chain requests a second user in the second branched chain to perform cross-chain transaction;
The first branch chain and the second branch chain are specifically used for:
under the condition that the second branch chain receives a transaction application initiated by a first user, if the transaction application is agreed, placing a hanging list corresponding to the transaction application into a cross-chain transaction request pool for public notice;
under the condition that the second user agrees to the transaction application, the second branched chain informs the first branched chain of transaction information;
if the first branch chain receives the transaction information, the second branch chain is locked and other branch chains are informed to cancel transaction application;
the first branched chain carries out cross-chain transfer operation, and sends a first notification message that the cross-chain transfer operation is completed to the second branched chain;
and if the second branch 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 true CN113326250A (en) 2021-08-31
CN113326250B 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 (2)

* 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
US20200204345A1 (en) * 2018-12-21 2020-06-25 International Business Machines Corporation Blockchain trust anchor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200204345A1 (en) * 2018-12-21 2020-06-25 International Business Machines Corporation Blockchain trust anchor
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
周艺华;李洪明;: "基于区块链的数据管理方案", 信息安全研究, no. 01 *

Also Published As

Publication number Publication date
CN113326250B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
US20230070963A1 (en) Blockchain-implemented method for control and distribution of digital content
CN109462588B (en) Decentralized data transaction method and system based on block chain
CN110933020B (en) Cryptographic logic exports submissions from execution blockchain
CN106991334B (en) Data access method, system and device
TW202018619A (en) Blockchain-based private transactions and usage method and apparatus therefor
CN109902071A (en) Business diary storage method, system, device and equipment
CN109614813B (en) Privacy transaction method and device based on block chain and application method and device thereof
CN113742782A (en) Block chain access authority control method based on privacy protection and block chain system
CN111192146B (en) Correction method and device for block chain data
CN110289968A (en) Private key restores, cooperates with creation, endorsement method and device, the storage medium of address
CN111241593A (en) Data synchronization method and device for block chain nodes
CN112468297B (en) Key backup method and device based on block chain
CN114338242B (en) Cross-domain single sign-on access method and system based on block chain technology
CN114528601B (en) Access method and device based on block chain data, processor and electronic equipment
CN112149077B (en) Supply chain billing method, system and computer equipment based on block chain technology
CN111106930A (en) Block chain network construction method and device and block chain network system
CN112069550A (en) Electronic contract deposit certificate system based on intelligent contract mode
CN111586010B (en) Key distribution method and device
CN113765675B (en) Transaction data processing method, device, equipment and medium
CN114780982A (en) Flow business circulation method, device and system
CN110852887B (en) Method and device for acquiring transaction processing state in decentralized application cluster
CN115705601A (en) Data processing method and device, computer equipment and storage medium
CN110113166B (en) Method, device and storage medium for revoking ring signature certificate on block chain
CN113326250B (en) Data processing method and system
CN113051341A (en) User data storage system and method based on multiple block chains

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