Digital asset consumption method based on master-slave block chain
By adopting the master-slave blockchain architecture and quantum security network in the public chain system, the storage pressure and resource waste problems of public chain systems when storing low-value data are solved, and efficient temporary storage of low-value data and security of small-value frequent transactions are achieved.
Patent Information
- Application Number
- CN202311800189.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
Public chain systems have storage pressure and waste of resources when storing low-value or low-importance data, which is difficult to effectively solve the temporary storage and small-value frequent transaction needs of low-value data.
Adopting an architecture based on master-slave blockchain, the main chain is responsible for the storage and verification of funds, and the slave chain is responsible for business processing. The slave chain derived from side chain technology reduces the business processing pressure of the main chain, and combines quantum security networks and quantum CA to ensure the security of cross-chain transactions.
It effectively alleviates the pressure of business processing on the main chain, improves the efficiency of temporary storage of low-value data and small-value frequent transactions, and at the same time, through the combination of quantum security networks and quantum CA, the security in the consumption process of digital assets is enhanced.
Smart Images

Figure CN120218925A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital asset security, and particularly to a digital asset consumption method based on a master-slave blockchain. Background Art
[0002] The public chain system in the blockchain has excellent features such as public transparency, distributed security, and difficulty in tampering with historical data. However, over time, the amount of historical data stored on the public chain system has been increasing, greatly increasing the storage pressure on the public chain system. Therefore, the public chain system is not suitable for storing low-value or low-importance data, but is suitable for storing high-value data (such as transaction data of major fund transfers) and business with high requirements for trust and security but small space occupancy such as contract contracts.
[0003] At present, many businesses require the security of the blockchain, but the business data has low value and only requires a blockchain for short-term existence or frequent small transactions. It is obviously inappropriate to use the above-mentioned public chain system, which is a great waste of resources.
[0004] Then how to use the blockchain to solve the temporary storage of low-value data and meet small and frequent transactions is a technical problem that needs to be solved in the blockchain system. Summary of the Invention
[0005] Object of the Invention: To solve the related technical problems proposed in the background art, the present invention provides a digital asset consumption method based on a master-slave blockchain, in which the slave chain is derived from the master chain using side chain technology. The master chain is responsible for the storage and verification of funds, and the slave chain is responsible for business processing. The master-slave chain architecture is flexibly matched, greatly alleviating the business processing pressure of the master chain; moreover, its combination of a quantum security network and a quantum CA can make cross-chain transactions resistant to quantum attacks, further ensuring the security during the digital asset consumption process.
[0006] Technical Solution: A digital asset consumption method based on a master-slave blockchain according to the present invention. In this consumption method, a total of one master chain and one slave chain are involved, and the method includes the following steps:
[0007] (1) Nodes in both the master chain and the slave chain use their respective node identifiers to register their node identities on the quantum CA. After the registration is completed, the quantum CA issues a quantum-secure private identity to each node; at the same time, the user uses their public identity Pub-ID to register their identity on the quantum CA. After the registration is completed, the quantum CA issues a quantum-secure private identity Pri-ID to the user.
[0008] (2) The user stores their assets in digital form in the user digital asset account set by the master chain node, and this master chain node is denoted as the master node MasterNode.
[0009] (3) The user initiates a consumption request req, sends the consumption request req to the master node MasterNode for authentication; after successful authentication, the quantum CA verifies the identities of the user and the master node MasterNode;
[0010] (4) After successful verification, the master node MasterNode receives the user's consumption request req, generates a consumption serial number and a temporary account a based on the consumption request req, transfers digital assets not less than the consumption amount amount in the user's digital asset account to the temporary account a for freezing, where the frozen digital asset amount is AMOUNT;
[0011] (5) In response to the master chain generating a consumption serial number and a temporary account a monitored by the slave node, the quantum CA verifies the identity of the slave node, which is denoted as the slave node SlaveNode; after successful verification, the master node MasterNode sends the consumption request req to the slave node SlaveNode, and the slave node SlaveNode generates virtual currency consistent with the frozen digital asset amount AMOUNT in the temporary account a of the master chain after receiving it, and then the slave node SlaveNode performs a consumption operation according to the user's consumption request req;
[0012] (6) After the slave node SlaveNode completes the consumption operation, it maps the user's virtual currency balance to the temporary account a of the master chain, and the balance of the temporary account a of the master chain is updated to AMOUNT - amount; meanwhile, the slave node SlaveNode destroys the user's virtual currency;
[0013] (7) In response to the master node MasterNode monitoring the destruction operation of the slave node SlaveNode, the master node MasterNode returns the balance AMOUNT - amount in the temporary account a to the user's digital asset account.
[0014] Further, step (6) may alternatively be:
[0015] After the slave node SlaveNode completes the consumption operation, the slave node SlaveNode notifies the user of the result of the completed consumption operation, and the user then initiates an application to map the virtual currency balance to the temporary account a. After the slave node SlaveNode receives the user's application, it maps the virtual currency balance to the temporary account a, and the balance of the temporary account a of the master chain is updated to AMOUNT - amount; meanwhile, the slave node SlaveNode destroys the user's virtual currency.
[0016] Further, the consumption request req includes the user's public identity Pub-ID, the identity of the consumption object, the consumption time, and the consumption amount amount.
[0017] Further, the specific process of sending the consumption request req to the master node MasterNode for authentication is as follows:
[0018] A: The user obtains a set of n-bit random numbers s1 locally. The n-bit random numbers s1 are used to generate an nth-degree irreducible polynomial p(x), and then the n-bit string formed by the coefficients of each term except the highest-degree term in the irreducible polynomial is denoted as str1;
[0019] B: A shared key s2, u, and v are shared between the user and the master node MasterNode, and are respectively used as the input random number and encryption of the hash function;
[0020] C: The user selects the nth-degree irreducible polynomial p(x) and the shared key s2 as the input random number to obtain a hash function based on a linear feedback shift register Then use this hash function to calculate the hash value of the consumption request req, denoted as Subsequently, encrypt the hash value and the string str1 with the shared keys u and v respectively. The encryption uses the exclusive OR operation to obtain and
[0021] D: Then, the user sends the consumption request req, and to the master node MasterNode; after receiving it, the master node MasterNode uses the shared keys u and v to decrypt and respectively to obtain and the string str1. The master node MasterNode successively uses each bit of the string str1 as the coefficient of each term except the highest-degree term in the corresponding polynomial to generate an nth-degree irreducible polynomial p′(x) with the highest-degree coefficient of 1 in the GF(2) field. Then select the irreducible polynomial p′(x) and the shared key string s2 as the input random number to generate a hash function based on a linear feedback shift register Use the hash function to calculate the hash value of the received consumption request req, denoted as If the hash value calculated by the master node MasterNode is the same as the decrypted hash value, the authentication is passed and the next step is carried out; otherwise, the authentication fails and the consumption process needs to be stopped.
[0022] Further, the specific process of the quantum CA for authenticating the identities of the user and the master node MasterNode is as follows:
[0023] 1) The user obtains a set of n-bit random numbers w locally. The n-bit random numbers w are used to generate an nth-degree irreducible polynomial q(x), and the n-bit string formed by the coefficients of each term except the highest-degree term in the irreducible polynomial is denoted as str2;
[0024] 2) The user and the quantum CA share keys x, y, and z, which are used as the input random numbers and encryption for the hash function respectively;
[0025] 3) The user selects the nth-degree irreducible polynomial q(x) and the shared key x as the input random number to obtain a hash function h based on a linear feedback shift register q,x , and then uses this hash function to calculate the hash value of the user's private identity Pri-ID, denoted as h q,x (Pri-ID); Subsequently, encrypt this hash value with the shared key y to obtain a one-time identity The user sends the one-time identity OTID and the string str2 encrypted with the shared key z to the quantum CA, that is, is sent to the quantum CA;
[0026] 4) The quantum CA uses the shared key z to decrypt to obtain the string str2, and then uses each bit of the string str2 as the coefficient of each term except the highest-degree term in the polynomial to generate an nth-degree irreducible polynomial q′(x) with the highest-degree coefficient of 1 in the GF(2) field. Then, select this irreducible polynomial q′(x) and the shared key string x as the input random number to generate a hash function h′ q,x , and use the hash function h′ q,x to calculate the hash value of the user's private identity Pri-ID′ stored locally by the quantum CA, denoted as h′ q,x (Pri-ID′), and then encrypt the hash value with the shared key y to obtain a one-time identity The quantum CA compares whether the received OTID and the calculated OTID′ are the same. If they are the same, the user's identity is confirmed and the next step is carried out; otherwise, the consumption process is stopped;
[0027] 5) The master node MasterNode performs identity confirmation in the same way as the above user. If they are the same, the identity of the master node MasterNode is confirmed; otherwise, the consumption process is stopped.
[0028] Furthermore, the specific process for the master node MasterNode to receive the user's consumption request req and generate a consumption serial number and a temporary account a based on this consumption request req is as follows:
[0029] The MasterNode obtains the user's digital asset account and the digital assets in the digital asset account stored on the MasterNode according to the user's public identity in the consumption request req, and then compares the stored digital assets with the consumption amount in the consumption request req. Only when the digital assets stored by the user are not less than the consumption amount, the MasterNode generates a consumption sequence number and temporary account a to continue the consumption process.
[0030] Furthermore, the specific process of the slave node SlaveNode performing the consumption operation according to the user's consumption request req is:
[0031] The slave node SlaveNode extracts virtual currency of amount from the virtual currency of AMOUNT, and updates the balance of the virtual currency to AMOUNT-amount.
[0032] The present invention also includes a digital asset consumption method based on a master-slave blockchain, in which a master chain and N slave chains participate, and each slave chain consumes digital assets using the digital asset consumption method based on a master-slave blockchain as described in any of the above claims.
[0033] Beneficial effects of the present invention: In the present invention, the slave chain is derived from the main chain using the side chain technology. The main chain is responsible for the storage and verification of funds, and the slave chain is responsible for business processing. The master-slave chain architecture is flexibly matched, which greatly alleviates the business processing pressure of the main chain; and its use of the quantum security network and quantum CA combination can make cross-chain transactions resistant to quantum attacks, further ensuring the security of digital asset consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of the digital asset consumption method based on the master-slave blockchain of the present invention. DETAILED DESCRIPTION
[0035] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0036] Example 1
[0037] The present invention proposes a digital asset consumption method based on a master-slave blockchain, wherein the master-slave blockchain in the consumption method includes a master chain and a slave chain. The slave chain is derived from the master chain using the side chain technology. The master chain is responsible for the storage and verification of funds, and the slave chain is responsible for business processing. The funds here can be digital assets on the chain including digital currency.
[0038] The user initiates a consumption request to the master-slave blockchain and consumes on the master-slave blockchain. The specific digital asset consumption method process includes the following steps:
[0039] (1) Nodes in both the main chain and the sub-chain use their respective node identifiers to register their node identities on the quantum CA. After the registration is completed, the quantum CA issues quantum-secure private identities to each node as the identity certificates for each node during the consumption process. At the same time, the user uses their public identity Pub-ID to register their identity on the quantum CA. After the registration is completed, the quantum CA issues a quantum-secure private identity Pri-ID to the user as the identity certificate for the user during the consumption process, where the public identity Pub-ID can be the name and ID number. Both the main chain and the sub-chain include multiple nodes, and each node has its own node identifier in the chain, which can be used as the public identity of the node.
[0040] In this embodiment, taking the user's consumption as an example, the consumption method of the main-sub blockchain is described. Here, the main-chain node used to store the user's digital assets is denoted as the master node MasterNode, and the corresponding node identifier is Pub-Master. The sub-chain node corresponding to the master node MasterNode is denoted as SlaveNode, and the corresponding node identifier is Pub-Slave. The private identity issued by the quantum CA to the master node MasterNode is the master node private identity Pri-Master, and the private identity issued to the sub-node SlaveNode is the sub-node private identity Pri-Slave.
[0041] At this point, the user, the master node MasterNode, and the sub-node SlaveNode each store their own public identity and private identity. The quantum CA stores the public identities and private identities of these three parties.
[0042] (2) The user stores their assets in digital form in the user digital asset account set by the main-chain node, and this main-chain node is the master node MasterNode;
[0043] (3) The user initiates a consumption request req. The consumption request req includes at least the user's public identity Pub-ID, the identity of the consumption object, the consumption time, and the consumption amount amount. For example, the consumption request req can be "User A transfers digital assets with an amount of amount to User B (consumption object identity)". Then, the consumption request req is sent to the master node MasterNode for authentication, and the specific process is as follows:
[0044] A: The user obtains a set of n-bit random numbers s1 from the local. The n-bit random numbers s1 are used to generate an n-degree irreducible polynomial p(x), and then the n-bit string formed by the coefficients of each term except the highest term in the irreducible polynomial is denoted as str1;
[0045] B: The user shares the secret keys s2, u, and v with the master node MasterNode, which are used as the input random numbers and for encryption in the hash function respectively.
[0046] C: The user selects an nth-degree irreducible polynomial p(x) and the shared secret key s2 as the input random number to obtain a hash function based on a linear feedback shift register. Then, use this hash function to calculate the hash value of the consumption request req, denoted as Subsequently, encrypt this hash value and the string str1 with the shared secret keys u and v respectively. The encryption uses the XOR operation to obtain and
[0047] D: Then, the user sends the consumption request req, and to the master node MasterNode; if other nodes in the main chain need to reach a consensus with this master node, then broadcast the consumption request req, and to synchronize to other nodes. Of course, the corresponding shared secret keys also need to be broadcast. After receiving, the master node MasterNode uses the shared secret keys u and v to decrypt and respectively to obtain and the string str1. The master node MasterNode uses each bit of the string str1 to correspond to the coefficients of each term except the highest term in the polynomial in turn to generate an nth-degree irreducible polynomial p′(x) with the highest-order coefficient of 1 in the GF(2) field. Then, select this irreducible polynomial p′(x) and the shared secret key string s2 as the input random number to generate a hash function based on a linear feedback shift register. Use the hash function to calculate the hash value of the received consumption request req, denoted as If the hash value calculated by the master node MasterNode is the same as the decrypted hash value, it means that the consumption request req has not been tampered with, is complete, the authentication passes, and proceed to the next step; otherwise, the consumption request has been tampered with, the authentication fails, and the consumption process needs to be stopped.
[0048] After the authentication passes, the quantum CA verifies the identities of the user and the master node MasterNode. The specific process is as follows:
[0049] 1) The user obtains a group of n-bit random numbers w locally. The n-bit random numbers w are used to generate an nth-degree irreducible polynomial q(x), and then the n-bit string composed of the coefficients of each term except the highest term in the irreducible polynomial is denoted as str2.
[0050] 2) The secret keys x, y, and z are shared between the user and the quantum CA, and are used as the input random numbers and for encryption in the hash function respectively.
[0051] 3) The user selects an n - degree irreducible polynomial q(x) and the shared key x as the input random number to obtain a hash function h based on a linear feedback shift register. q,x , and then uses this hash function to calculate the hash value of the user's private identity Pri - ID, denoted as h q,x (Pri - ID); Subsequently, the hash value is encrypted with the shared key y to obtain a one - time identity. The user sends the one - time identity OTID and the string str2 encrypted with the shared key z to the quantum CA, that is, is sent to the quantum CA.
[0052] 4) The quantum CA uses the shared key z to decrypt to obtain the string str2, and then uses each bit of the string str2 as the coefficient of each term except the highest - order term in the polynomial to generate an n - degree irreducible polynomial q′(x) with the highest - order coefficient of 1 in the GF(2) field. Then, the irreducible polynomial q′(x) and the shared key string x as the input random number are selected to generate a hash function h′ q,x , and the hash function h′ q,x is used to calculate the hash value of the user's private identity Pri - ID′ stored locally by the quantum CA, denoted as h′ q,x (Pri - ID′), and then the hash value is encrypted with the shared key y to obtain a one - time identity. The quantum CA compares whether the received OTID and the calculated OTID′ are the same. If they are the same, the user's identity is confirmed, and the user is a legitimate user, and the next step is carried out; otherwise, the consumption process is stopped.
[0053] 5) The master node MasterNode performs identity legality confirmation in the same way as the above user. If they are the same, the identity of the master node MasterNode is confirmed, and the master node MasterNode is a legitimate main - chain node and can carry out the next consumption service; otherwise, the consumption process is stopped.
[0054] (4) After the confirmation is passed, the master node MasterNode receives the user's consumption request req, generates a consumption serial number and a temporary account a based on this consumption request req, and transfers the digital assets in the user's digital asset account that are not less than the consumption amount amount in the consumption request req to the temporary account a for freezing, where the frozen digital asset amount is AMOUNT.
[0055] Among them, the specific process for the master node MasterNode to receive the user's consumption request req and generate a consumption serial number and a temporary account a based on the consumption request req is as follows: The master node MasterNode obtains the user's digital asset account stored on the master node MasterNode and the digital assets in the digital asset account according to the public identity of the user in the consumption request req. Then, it compares the stored digital assets with the consumption amount amount in the consumption request req. Only when the digital assets stored by the user are not less than the consumption amount amount, the master node MasterNode generates a consumption serial number and a temporary account a to continue the consumption process; the amount of digital assets frozen in the temporary account a is AMOUNT, where AMOUNT ≥ amount;
[0056] (5) In response to the master chain generating a consumption serial number and a temporary account a heard from the chain node, the quantum CA performs identity confirmation on the chain node. The identity confirmation method is the same as that for the above-mentioned user identity confirmation, so it will not be repeated here. This chain node is the slave node SlaveNode; after the confirmation passes, the master node MasterNode sends the consumption request req to the slave node SlaveNode. After receiving it, the slave node SlaveNode generates virtual currency consistent with the amount of digital assets AMOUNT frozen in the master chain temporary account a. Then, the slave node SlaveNode performs a consumption operation according to the user's consumption request req. Performing a consumption operation means that the slave node SlaveNode extracts virtual currency with an amount of amount from the virtual currency with an amount of AMOUNT to meet the consumption request req, and updates the balance of the virtual currency to AMOUNT - amount.
[0057] Since the slave chain to which the slave node SlaveNode belongs is derived from the master chain through the side chain technology, it can be considered that the information transmission between the master chain and the slave chain in the same network environment is secure. Therefore, the slave node SlaveNode can directly receive the consumption request req from the master node MasterNode without repeating the authentication of the integrity of the consumption request req. When generating virtual currency, the slave node SlaveNode can also generate the master-slave chain mapping status table for this consumption process, as shown in Table 1:
[0058] Number Main Chain Consumption Serial Number ID User Public Identity Mapping Status Mapping Amount Sub Chain Consumption Serial Number ID 1 TxID Pub-ID Ok / No / w AMOUNT TxID2
[0059] Table 1 Master-slave chain mapping status table
[0060] After the consumption operation of the slave node SlaveNode is completed, map the user's virtual currency balance to the temporary account a on the main chain, and update the balance of the temporary account a on the main chain to AMOUNT - amount; at the same time, the slave node SlaveNode destroys the user's virtual currency.
[0061] Of course, step (6) can also be: after the consumption operation of the slave node SlaveNode is completed, the slave node SlaveNode notifies the user of the result of the completed consumption operation, and the user then initiates an application to map the virtual currency balance to the temporary account a. After receiving the user's application, the slave node SlaveNode maps the virtual currency balance to the temporary account a, and updates the balance of the temporary account a on the main chain to AMOUNT - amount; at the same time, the slave node SlaveNode destroys the user's virtual currency. The advantage of doing this is that the user can decide whether to make another consumption based on the virtual currency balance. Another consumption can continue to use the virtual currency generated this time instead of generating it separately.
[0062] (7) In response to the master node MasterNode monitoring the destruction operation of the slave node SlaveNode, indicating that the slave node SlaveNode has completed this consumption process, the master node MasterNode returns the balance AMOUNT - amount in the temporary account a to the user's digital asset account.
[0063] In the present invention, the slave chain is derived from the main chain using side chain technology. The main chain is responsible for the storage and verification of funds, and the slave chain is responsible for business processing. The master - slave chain architecture is flexibly configured, greatly alleviating the business processing pressure on the main chain; moreover, its adoption of the combination of quantum - secure network and quantum CA can make cross - chain transactions resistant to quantum attacks, further ensuring the security during the digital asset consumption process.
[0064] Embodiment 2
[0065] In the digital asset consumption method when the master - slave blockchain only includes one main chain and one slave chain, when the user simultaneously initiates multiple consumption requests req1, req2,..., reqn, correspondingly, multiple slave nodes are also involved on the slave chain, denoted as the first slave node SlaveNode1, the second slave node SlaveNode2,..., the nth slave node SlaveNoden.
[0066] The difference between Embodiment 2 and Embodiment 1 is:
[0067] In step (5), the first slave node SlaveNode1, the second slave node SlaveNode2,..., the nth slave node SlaveNoden respectively generate virtual currencies v1, v2,..., vn, where v1 + v2+... + vn = AMOUNT.
[0068] In step (7), in response to each destruction operation of a slave node monitored by the master node MasterNode, the balance in the temporary account a is updated accordingly.
[0069] Embodiment 3
[0070] The present invention further includes a digital asset consumption method based on a master-slave blockchain. In the consumption method, a total of one main chain and N slave chains are involved. Each slave chain performs digital asset consumption using the same digital asset consumption method as in Embodiment 1, that is, each slave chain processes one digital asset consumption service.
Claims
1. A digital asset consumption method based on a master-slave blockchain, characterized in that, In the described consumption method, there is one main chain and one sub-chain participating. The method includes the following steps: (1) Nodes in both the main chain and the sub-chain use their respective node identifiers to register their node identities on the quantum CA. After the registration is completed, the quantum CA issues quantum-secure privacy identities to each node. At the same time, the user uses their public identity Pub-ID to register their identity on the quantum CA. After the registration is completed, the quantum CA issues a quantum-secure privacy identity Pri-ID to the user; (2) The user stores their assets in digital form in the user digital asset account set up by the main chain node, and this main chain node is denoted as the master node MasterNode; (3) The user initiates a consumption request req, sends the consumption request req to the master node MasterNode and conducts authentication. After the authentication passes, the quantum CA confirms the identities of the user and the master node MasterNode; (4) After the confirmation passes, the master node MasterNode receives the user's consumption request req, generates a consumption serial number and a temporary account a based on this consumption request req, and transfers digital assets not less than the consumption amount amount in the user digital asset account into the temporary account a for freezing, where the amount of frozen digital assets is AMOUNT; (5) In response to the sub-chain node monitoring that the main chain has generated a consumption serial number and a temporary account a, the quantum CA confirms the identity of the sub-chain node, and this sub-chain node is denoted as the slave node SlaveNode. After the confirmation passes, the master node MasterNode sends the consumption request req to the slave node SlaveNode. After receiving it, the slave node SlaveNode generates virtual currency consistent with the amount of frozen digital assets AMOUNT in the main chain temporary account a, and then the slave node SlaveNode performs a consumption operation according to the user's consumption request req; (6) After the slave node SlaveNode completes the consumption operation, it maps the user's virtual currency balance to the temporary account a of the main chain, and the balance of the temporary account a of the main chain is updated to AMOUNT - amount. At the same time, the slave node SlaveNode destroys the user's virtual currency; (7) In response to the master node MasterNode monitoring the destruction operation of the slave node SlaveNode, the master node MasterNode returns the balance AMOUNT - amount in the temporary account a to the user's digital asset account; 2. The digital asset consumption method based on the master-slave blockchain according to claim 1, wherein The step (6) can also be: After the slave node SlaveNode completes the consumption operation, the slave node SlaveNode notifies the user of the result of the completed consumption operation. Then the user initiates an application to map the virtual currency balance to the temporary account a. After receiving the user's application, the slave node SlaveNode maps the virtual currency balance to the temporary account a, and the balance of the temporary account a of the main chain is updated to AMOUNT - amount. At the same time, the slave node SlaveNode destroys the user's virtual currency.
3. A digital asset consumption method based on a master-slave blockchain according to claim 1, characterized in that, The consumption request req includes the user's public identity Pub-ID, the identity of the consumption object, the consumption time, and the consumption amount amount.
4. A digital asset consumption method based on a master-slave blockchain according to claim 1, characterized in that, The specific process of sending the consumption request req to the master node MasterNode for authentication is as follows: A: The user obtains a set of n-bit random numbers s1 locally. The n-bit random numbers s1 are used to generate an irreducible polynomial p(x) of degree n. Then, the n-bit string formed by the coefficients of each term except the highest term in the irreducible polynomial is denoted as str1. B: A secret key s2, u, and v are shared between the user and the master node MasterNode, and are used as the input random numbers and encryption for the hash function respectively. C: The user selects an n - th degree irreducible polynomial p(x) and a shared key s2 as the input random number to obtain a hash function based on a linear feedback shift register Then, use this hash function to calculate the hash value of the consumption request req, denoted as Subsequently, encrypt this hash value and the string str1 with the shared keys u and v respectively. The encryption uses the exclusive - or operation to obtain and v⊕str1; D: Then, the user sends the consumption request req, and v⊕str1 to the master node MasterNode; after receiving them, the master node MasterNode uses the shared keys u and v to decrypt and v⊕str1 respectively to obtain and the string str1. The master node MasterNode successively uses each bit of the string str1 as the coefficient of each term except the highest term in the polynomial to generate an nth-order irreducible polynomial p′(x) with the highest-order coefficient of 1 in the GF(2) field. Then, it selects the irreducible polynomial p′(x) and the shared key string s2 as the input random number to generate a hash function based on a linear feedback shift register Use the hash function to calculate the hash value of the received consumption request req, denoted as If the hash value calculated by the master node MasterNode is the same as the decrypted hash value then the authentication passes and the next step is carried out; otherwise, the authentication fails and the consumption process needs to be stopped.
5. A digital asset consumption method based on a master-slave blockchain according to claim 1, characterized in that, The specific process of the quantum CA for authenticating the user and the master node MasterNode is as follows: 1) The user obtains a set of n-bit random numbers w locally. The n-bit random numbers w are used to generate an irreducible polynomial q(x) of degree n. Then, the n-bit string formed by the coefficients of each term except the highest term in the irreducible polynomial is denoted as str2. 2) A secret key x, y, and z are shared between the user and the quantum CA, and are used as the input random numbers and encryption for the hash function respectively. 3) The user selects an n - degree irreducible polynomial q(x) and the shared key x as the input random number to obtain the hash function h based on the linear feedback shift register q,x , and then uses this hash function to calculate the hash value of the user's private identity Pri - ID, denoted as h q,x (Pri - ID); Subsequently, encrypt this hash value with the shared key y to obtain the one - time identity OTID = y ⊕ h q,x (Pri - ID). The user sends the one - time identity OTID and the string str2 encrypted with the shared key z to the quantum CA, that is, sends (OTID, z ⊕ str2) to the quantum CA; 4) The quantum CA decrypts z⊕str2 using the shared key z to obtain the string str2. Then, each bit of the string str2 is used to correspond to the coefficients of each term except the highest term in the polynomial, generating an nth-degree irreducible polynomial q′(x) with the highest-order coefficient of 1 over the GF(2) field. Next, the irreducible polynomial q′(x) and the shared key string x used as the input random number are selected to generate a hash function h′ based on a linear feedback shift register. q,x , and uses the hash function h′ q,x to calculate the hash value of the user's private identity Pri-ID′ stored locally in the quantum CA, denoted as h′ q,x (Pri-ID ′ ). Then, the hash value is encrypted using the shared key y to obtain the one-time identity OTID′ = y⊕h′ q,x (Pri-ID ′ ). The quantum CA compares whether the received OTID is the same as the calculated OTID′. If they are the same, the user's identity is confirmed and the next step is carried out; otherwise, the consumption process is stopped. 5) The master node MasterNode performs identity verification in the same way as the above user. If they are the same, the identity verification of the master node MasterNode passes; otherwise, the consumption process stops.
6. A digital asset consumption method based on a master-slave blockchain according to claim 1, characterized in that The specific process of the master node MasterNode receiving the user's consumption request req and generating a consumption serial number and a temporary account a based on the consumption request req is as follows: The master node MasterNode obtains the user's digital asset account stored on the master node MasterNode and the digital assets in the digital asset account according to the user's public identity in the consumption request req. Then, it compares the stored digital assets with the consumption amount amount in the consumption request req. Only when the digital assets stored by the user are not less than the consumption amount amount, the master node MasterNode generates a consumption serial number and a temporary account a to continue the consumption process.
7. A digital asset consumption method based on a master-slave blockchain according to claim 1, characterized in that, The specific process of the slave node SlaveNode performing a consumption operation according to the user's consumption request req is as follows: The slave node SlaveNode extracts virtual currency with an amount of amount from the virtual currency with an amount of AMOUNT, and updates the balance of the virtual currency to AMOUNT - amount.
8. A digital asset consumption method based on a master-slave blockchain, characterized in that, In the consumption method, there is a main chain and N slave chains participating. Each slave chain uses the digital asset consumption method based on the master-slave blockchain described in any one of claims 1-7 for digital asset consumption.