NL2032902B1 - User data management method, device, terminal apparatus and medium - Google Patents

User data management method, device, terminal apparatus and medium Download PDF

Info

Publication number
NL2032902B1
NL2032902B1 NL2032902A NL2032902A NL2032902B1 NL 2032902 B1 NL2032902 B1 NL 2032902B1 NL 2032902 A NL2032902 A NL 2032902A NL 2032902 A NL2032902 A NL 2032902A NL 2032902 B1 NL2032902 B1 NL 2032902B1
Authority
NL
Netherlands
Prior art keywords
zero
knowledge proof
user data
block
nth
Prior art date
Application number
NL2032902A
Other languages
Dutch (nl)
Inventor
Cao Feng
Ren Yanduo
Lin Xuefei
Original Assignee
Shenzhen Blockchain Financial Services Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Blockchain Financial Services Co Ltd filed Critical Shenzhen Blockchain Financial Services Co Ltd
Priority to NL2032902A priority Critical patent/NL2032902B1/en
Application granted granted Critical
Publication of NL2032902B1 publication Critical patent/NL2032902B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • H04L9/3221Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a user data management method, a user data management device, a terminal apparatus and a medium. The method includes: when receiving a storage proof instruction, receiVing a temporary zero-knowledge proof of N1h block sent by an application terminal, denoted as N1h temporary zero-knowledge proof, N being not less than 2, obtaining (N-l)th 10 zero-knowledge proof corresponding to (N-l)th block from the blockchain, combining the (N-l)th zero-knowledge proof and the N1h temporary zero-knowledge proof to obtain N1h zero-knowledge proof corresponding to the N1h block, and storing the N1h zero-knowledge proof in the blockchain, to verify and query user data of the N1h block based on the N1h zero-knowledge proof. 15 28

Description

USER DATA MANAGEMENT METHOD, DEVICE, TERMINAL
APPARATUS AND MEDIUM
TECHNICAL FIELD
[0001] The present disclosure relates to the field of data processing, and in particular, to a user data management method, a user data management device, a terminal apparatus and a medium.
BACKGROUND
[0002] The Metaverse is a completely virtual or incomplete virtual multiplayer social world, which is not only a presentation of a simple social entertainment and a game server, but also a presentation of a financial platform and a real physical space. As the Metaverse develops continuously, applications in various Metaverse scenarios emerge in endlessly, and users’ personal data is increasing. These data are mainly generated and transmitted based on the blockchain system. Based on the transparency and openness of the blockchain system, how to safely and effectively store and protect user data, especially private data and sensitive data, is an important research topic in Metaverse technology.
[0003] Zero-knowledge proof is an effective solution in the field of data privacy protection. zero-knowledge succinct non-interactive argument of knowledge (zk-snark) is an important branch of zero-knowledge proof. In the existing blockchain system, the transaction of the block in the blockchain system is verified by zk-snarks, and then the succinct non-interactive argument of knowledge (snark) of the transaction is created, thereby proving the accuracy of the block transaction history without showing all transactions, which can effectively compress the size of a single block to the size of a single snark (about 1kB).
[0004] This approach reduces the amount of data in the blockchain, but as more snark proofs are generated, the amount of data will also increase. How to safely and effectively protect user data, and support the rapid verification of data reliability to support massive application interaction, is an important bottleneck hindering the development of Metaverse technology.
SUMMARY
[0005] The main objective of the present disclosure is to provide a user data management method applied to a Metaverse, a user data management device, a terminal apparatus and a medium, which aims to solve the problem that due to the increase of snark proofs in the block, the amount of data is too large, and how to safely and effectively protect user data, and support the rapid verification of data reliability to support massive application interaction.
[0006] In order to achieve the above objective, the present disclosure is to provide a user 1 data management method, including following operations:
[0007] when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N block sent by an application terminal, denoted as N temporary zero-knowledge proof, N being not less than 2;
[0008] obtaining (N-1)% zero-knowledge proof corresponding to (N-I) block from the blockchain;
[0009] combining the (N-1)® zero-knowledge proof and the N? temporary zero-knowledge proof to obtain N zero-knowledge proof corresponding to the N® block; and
[0010] storing the N* zero-knowledge proof in the blockchain, to verify and query user data of the Ni! block based on the N zero-knowledge proof.
[0011] In an embodiment, before the operation of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of N block sent by the application terminal, the user data management method further includes:
[0012] when receiving a first temporary zero-knowledge proof of a first block sent by the application terminal, storing the first temporary zero-knowledge proof in the blockchain as a first zero-knowledge proof, to verify and query user data of the first block based on the first zero-knowledge proof.
[0013] In an embodiment, before the operation of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of N® block sent by the application terminal, denoted as N™ temporary zero-knowledge proof, the user data management method further includes:
[0014] receiving user data corresponding to the N™ block sent by the application terminal, and
[0015] storing the user data corresponding to the N* block in an inter planetary file system (IPFS), and sending storage address information to the application terminal, for the application terminal to generate a common reference string (CRS) based on the storage address information, and generate a temporary zero-knowledge proof of the N block based on the
CRS.
[0016] In an embodiment, the user data management method further includes:
[0017] when receiving a query instruction for querying the user data corresponding to the
N® block, generating a transaction evidence according to the query instruction, a serialized transaction data and a zk-snarks protocol,
[0018] verifying the transaction evidence based on the N® zero-knowledge proof corresponding to the N™ block and a preset evidence verification condition to obtain a 2 verification result; and
[0019] querying the corresponding user data from the IPFS according to the verification result, and returning the corresponding user data to the user terminal for a user to view.
[0020] In an embodiment, before the operation of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of N® block sent by the application terminal, denoted as N temporary zero-knowledge proof, the user data management method further includes:
[0021] verifying whether the transaction data corresponding to the N temporary zero-knowledge proof exists;
[0022] if the transaction data corresponding to the N!! temporary zero-knowledge proof exists, verifying whether a transaction content corresponding to the N™ temporary zero-knowledge proof is correct; and
[0023] if the transaction content corresponding to the N™ temporary zero-knowledge proof is correct, obtaining the (N-1)? zero-knowledge proof corresponding to the (N-1)* block from the blockchain.
[0024] In an embodiment, the user data management method is applied to an application terminal, including following operations:
[0025] sending a temporary zero-knowledge proof of N™ block to a server, denoted as N™ temporary zero-knowledge proof, for the server to obtain (N-1)" zero-knowledge proof corresponding to (N-1)" block from the blockchain, wherein N is not less than 2;
[0026] combining the (N-I) zero-knowledge proof and the N® temporary zero-knowledge proof to obtain N zero-knowledge proof corresponding to the N' block; and
[0027] storing the N' zero-knowledge proof in the blockchain, to verify and query user data of the N™ block based on the N zero-knowledge proof.
[0028] In an embodiment, before the operation of sending the temporary zero-knowledge proof of N™ block to the server, the user data management method further includes:
[0029] sending the user data corresponding to the N' block to the server, for the server to store the user data corresponding to the N block in an inter planetary file system (IPFS);
[0030] receiving storage address information sent by the server; and
[0031] generating a common reference string (CRS) based on the storage address information, and generating a temporary zero-knowledge proof of the N block based on the
CRS.
[0032] Besides, in order to achieve the above objective, the present disclosure further provides a user data management device, including: 3
[0033] a receiving module, for when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N block sent by an application terminal, denoted as N# temporary zero-knowledge proof, N being not less than 2;
[0034] an acquisition module for obtaining (N-1)" zero-knowledge proof corresponding to (N-1)" block from the blockchain;
[0035] a combination module for combining the (N-1)! zero-knowledge proof and the Nt temporary zero-knowledge proof to obtain N" zero-knowledge proof corresponding to the N™ block; and
[0036] a storage module for storing the N* zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N'! zero-knowledge proof.
[0037] Besides, in order to achieve the above objective, the present disclosure further provides a terminal device, including a memory, a processor, a user data management program stored in the memory and executable on the processor, and when the user data management program 1s executed by the processor, the operations of the user data management method described above are implemented.
[0038] Besides, in order to achieve the above objective, the present disclosure further provides a computer-readable storage medium, a user data management program is stored in the computer-readable storage medium, and when the user data management program is executed by a processor, the operations of the user data management method described above are implemented.
[0039] The present disclosure provides a user data management method, a user data management device, a terminal apparatus and a storage medium. The user data management method includes: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N® block sent by an application terminal, denoted as N temporary zero-knowledge proof, N being not less than 2; obtaining (N-1)" zero-knowledge proof corresponding to (N-1)% block from the blockchain; combining the (N-I)? zero-knowledge proof and the N'™ temporary zero-knowledge proof to obtain N# zero-knowledge proof corresponding to the N"! block; and storing the N! zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N™ zero-knowledge proof. Thus, the file of the N™ zero-knowledge proof corresponding to the Në block occupies less space, which solves the problem of excessive data volume due to the increase of zero-knowledge proofs stored in the block, and to safely and effectively protect user data. The N™ zero-knowledge proof includes the first zero-knowledge proof to the (N-1)*! zero-knowledge proof, and only one
N'® zero-knowledge proof is needed to query the past proofs, such that the method of querying 4 past proofs is optimized to achieve the effect of supporting rapid verification of data reliability and supporting massive application interactions.
BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG. 1 is a schematic diagram of functional modules of a terminal device to which a 5 user data management device belongs.
[0041] FIG. 2 is a schematic flowchart of a user data management method according to an embodiment of the present disclosure.
[0042] FIG. 3 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure.
[0043] FIG. 4 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure.
[0044] FIG. 5 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure.
[0045] FIG. 6 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure.
[0046] FIG. 7 is a schematic flowchart of an application terminal of the user data management method according to an embodiment of the present disclosure.
[0047] FIG. 8 is an interactive schematic diagram of multi-terminal interaction of the user data management method according to an embodiment of the present disclosure.
[0048] The realization of the objective, functional characteristics, and advantages of the present disclosure are further described with reference to the accompanying drawings.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] It should be understood that the specific embodiments described herein are only used to explain the present disclosure, but not to limit the present disclosure.
[0050] The main solutions of the embodiments of the present disclosure are: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N® block sent by an application terminal, denoted as N™ temporary zero-knowledge proof, N being not less than 2; obtaining (N-1)® zero-knowledge proof corresponding to (N-1) block from the blockchain; combining the (N-1)" zero-knowledge proof and the N'? temporary zero-knowledge proof to obtain N" zero-knowledge proof corresponding to the N block; and storing the N™ zero-knowledge proof in the blockchain, to verify and query user data of the N™ block based on the N'® zero-knowledge proof. Thus, the file of the N™ zero-knowledge proof corresponding to the N™ block occupies less space, which solves the problem of excessive data volume due to the increase of zero-knowledge proofs stored in the block, to safely and effectively protect user 5 data, and supports rapid verification of data reliability to support massive application interaction.
[0051] Technical terms of the embodiments of the present disclosure are as follows.
[0052] Zero-knowledge succinct non-interactive argument of knowledge (zk-SNARK) is hereinafter referred to as zero-knowledge proof, which is a novel form of zero-knowledge cryptography, and refers to a proof construct whereby, without revealing confidential information, people can prove that they possess certain information, that they satisfy some preset conditions, without any interaction between the prover and the verifier.
[0053] Inter planetary file system (IPFS) is a peer-to-peer distributed file system.
[0054] The embodiments of the present disclosure consider that as more and more snark proofs are generated in blockchain, the amount of data will also be larger and larger, and recursive thinking should be combined with. The method includes: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N® block sent by an application terminal, denoted as N% temporary zero-knowledge proof, N being not less than 2; obtaining (N-1)" zero-knowledge proof corresponding to (N-1) block from the blockchain; combining the (N-I)! zero-knowledge proof and the N™ temporary zero-knowledge proof to obtain N* zero-knowledge proof corresponding to the N block; and storing the N© zero-knowledge proof in the blockchain, to verify and query user data of the N™ block based on the N" zero-knowledge proof, which solves the problem of excessive data volume due to the increase of zero-knowledge proofs in the blockchain, and optimizes the user experience.
[0055] As shown in FIG. 1, FIG. 1 is a schematic diagram of functional modules of a terminal device to which a user data management device belongs. The device can be a device independent of the terminal device, which can receive the temporary zero-knowledge proof of the N block send by the application terminal, can obtain (N-I) zero-knowledge proof corresponding to (N-1)" block from the blockchain, can combine the (N-1)® zero-knowledge proof and the N temporary zero-knowledge proof to obtain N" zero-knowledge proof corresponding to the N® block; and can store the N zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N* zero-knowledge proof, which can be carried on the terminal device in the form of hardware or software. The terminal device may be an intelligent mobile terminal with a data processing function, such as a mobile phone or a tablet computer, or a fixed terminal device or a server with a data processing function.
[0056] In this embodiment, the terminal device to which the apparatus belongs at least includes an output module 110, a processor 120, a memory 130 and a communication module 140. 6
[0057] The memory 130 stores an operating system and a user data management program.
The user data management device may store information such as user data, zero-knowledge proofs, and verification query conditions in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a Bluetooth module, or the like, which can communicate with an external device or a server through the communication module 140.
[0058] When the user data management program stored in the memory 130 is executed by the program, the following operations are implemented:
[0059] when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N block sent by an application terminal, denoted as N* temporary zero-knowledge proof, N being not less than 2;
[0060] obtaining (N-1) zero-knowledge proof corresponding to (N-I)? block from the blockchain;
[0061] combining the (N-1)" zero-knowledge proof and the N* temporary zero-knowledge proof to obtain N* zero-knowledge proof corresponding to the N# block; and
[0062] storing the N™ zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N zero-knowledge proof.
[0063] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor:
[0064] when receiving a first temporary zero-knowledge proof of a first block sent by the application terminal, storing the first temporary zero-knowledge proof in the blockchain as a first zero-knowledge proof, to verify and query user data of the first block based on the first zero-knowledge proof.
[0065] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor:
[0066] receiving user data corresponding to the N# block sent by the application terminal, and
[0067] storing the user data corresponding to the N* block in an inter planetary file system (IPFS), and sending storage address information to the application terminal, for the application terminal to generate a common reference string (CRS) based on the storage address information, and generate a temporary zero-knowledge proof of the N block based on the
CRS.
[0068] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor: 7
[0069] when receiving a query instruction for querying the user data corresponding to the
N™ block, generating a transaction evidence according to the query instruction, a serialized transaction data and a zk-snarks protocol,
[0070] verifying the transaction evidence based on the N" zero-knowledge proof corresponding to the N block and a preset evidence verification condition to obtain a verification result; and
[0071] querying the corresponding user data from the IPFS according to the verification result, and returning the corresponding user data to the user terminal for a user to view.
[0072] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor:
[0073] verifying whether the transaction data corresponding to the N™ temporary zero-knowledge proof exists;
[0074] if the transaction data corresponding to the N temporary zero-knowledge proof exists, verifying whether a transaction content corresponding to the N® temporary zero-knowledge proof is correct; and
[0075] If the transaction content corresponding to the N temporary zero-knowledge proof is correct, obtaining the (N-1)2 zero-knowledge proof corresponding to the (N-I)! block from the blockchain.
[0076] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor:
[0077] sending a temporary zero-knowledge proof of N block to a server, denoted as N™ temporary zero-knowledge proof, N being not less than 2.
[0078] Further, the user data management program stored in the memory 130 also implements the following operations before being executed by the processor:
[0079] sending the user data corresponding to the N block to the server, for the server to store the user data corresponding to the N™ block in an inter planetary file system (IPFS);
[0080] receiving storage address information sent by the server; and
[0081] generating a common reference string (CRS) based on the storage address information, and generating a temporary zero-knowledge proof of the N'? block based on the
CRS.
[0082] The present disclosure provides a user data management method, a user data management device, a terminal apparatus and a medium. The user data management method includes: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N® block sent by an application terminal, denoted as N™ temporary zero-knowledge 8 proof, N being not less than 2; obtaining (N-1)" zero-knowledge proof corresponding to (N-1)? block from the blockchain; combining the (N-1)" zero-knowledge proof and the N™ temporary zero-knowledge proof to obtain N* zero-knowledge proof corresponding to the N block; and storing the N'™ zero-knowledge proof in the blockchain, to verify and query user data of the N™ block based on the N™ zero-knowledge proof, which optimizes the method of storing zero-knowledge proofs in the blockchain, solves the problem of excessive data volume caused by the increase of zero-knowledge proofs in the blockchain, to safely and effectively protect user data, and supports rapid verification of data reliability to support massive application interactions.
[0083] Based on the above-mentioned terminal device architecture but not limited to the above-mentioned architecture, an embodiment of the user data management method of the present disclosure 1s proposed.
[0084] As shown in FIG. 2, FIG. 2 is a schematic flowchart of a user data management method according to an embodiment of the present disclosure. In this embodiment, the user data management method is applied to the server, which is connected to IPFS, an application terminal and a blockchain. IPFS is configured to store the user data sent by the application terminal, and generate the corresponding storage address based on the storage location of the user data. The application terminal is configured to obtain user data generated by the user, and upload the user data to the server. The blockchain is configured to store the zero-knowledge proof generated according to the user data, and respond to the query verification request issued by the application terminal according to the stored zero-knowledge proof. The server is configured to receive the user data sent by the application terminal, send the user data to IPFS for storage, and receive the storage address returned by IPFS based on the storage location of the user data.
[0085] As shown in FIG. 2, the user data management method includes:
[0086] Operation S1001, when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N' block sent by an application terminal, denoted as N temporary zero-knowledge proof, N being not less than 2.
[0087] After generating the N® temporary zero-knowledge proof file based on the N® address information returned by the server, the application terminal sends a storage proof instruction to the server. After receiving the instruction, the server receives the N™ temporary zero-knowledge proof file, denoted as the N" temporary zero-knowledge proof, and N is not less than 2.
[0088] Operation S1002, obtaining (N-1) zero-knowledge proof corresponding to (N-I)! 9 block from the blockchain.
[0089] Blockchain is configured to store zero-knowledge proof documents. Before the server generates the temporary zero-knowledge proof corresponding to the N block, the (N-I)! zero-knowledge proof corresponding to the (N-1) block is stored in the blockchain, the server sends an acquisition request to the blockchain, and receives the (N-1)™ zero-knowledge proof corresponding to the (N-1)® block sent by the blockchain.
[0090] Operation S1003, combining the (N-1)" zero-knowledge proof and the N!! temporary zero-knowledge proof to obtain N' zero-knowledge proof corresponding to the N* block.
[0091] The historical zero-knowledge proof files are stored in the blockchain, namely the
Ist, 2nd... (N-I)! zero-knowledge proof files. Each zero-knowledge proof corresponds to the
Ist, 2nd... (N-I) blocks one-to-one. The proof file for each block corresponds to the Ist, 2nd... (N-1) user data in IPFS one-to-one.
[0092] The (N-1)® zero-knowledge proof file obtained from the blockchain is combined with the N® zero-knowledge proof file received from the application terminal to obtain the N™ zero-knowledge proof corresponding to the N'™ block.
[0093] As an embodiment of the solution in the present disclosure, the N™ zero-knowledge proof file can be obtained by superimposing the (N-1) zero-knowledge proof file with the N® zero-knowledge proof file. Since the size allocation of the file cluster is constant, for example, the size of a file content is 4000 bytes, but the actual size can only be allocated 4096 bytes when the file is generated. Therefore, the extra 96 bytes have no content, but actually take up space. When a large number of proof files are stored in the blockchain, the waste of blockchain resources is greatly increased. Therefore, in this solution, the proof file is recursively superimposed to generate the N™ zero-knowledge file, the space occupied by the N# zero-knowledge file is smaller than that of the historical zero-knowledge proof file, which finally solves the problem of excessive data volume caused by the increase of proof files in the blockchain.
[0094] Every time the N™ zero-knowledge proof file is stored in the blockchain, the format of the N'™ zero-knowledge proof file stored each time is unified. If the format of the stored proof file is different, it is necessary to add the corresponding format character field to the proof file with different formats to distinguish. When a large amount of proof files are stored, the added format field itself does not prove the corresponding transaction data, resulting in a waste of blockchain resources. By unifying the N® zero-knowledge proof file every time it is stored, the effect of saving unnecessary blockchain resources is achieved. 10
[0095] Depending on how old or new the block is, bytes are allocated with different preset weights when generating the N'! zero-knowledge proof file. When N is equal to 100, the server receives the 100! temporary zero-knowledge proof file sent by the application terminal. When combining the 100% temporary zero-knowledge proof file and the 99" zero-knowledge proof file, 100 bytes are allocated to the 100% temporary zero-knowledge proof file, and 99 bytes are allocated to the 99" zero-knowledge proof file. In this way, the older the user transaction data of the block, the fewer bytes are allocated to the proof file. Since the older the user transaction data is, the less important it is, in this embodiment, by gradually iterating the zero-knowledge proof corresponding to the user transaction data of the older blocks, the N! zero-knowledge proof file that is smaller than the zero-knowledge proof file obtained by normal superposition is finally obtained. When the zero-knowledge proof corresponding to the user transaction data of an older block needs to be queried, the older zero-knowledge proof is read by traversing each block until the older block is found.
[0096] The strings that appear more frequently in the (N-1)® zero-knowledge proof file are made into a corresponding dictionary list, and a special code is used to represent this string, and the dictionary list is stored in the blockchain. When the N™ zero-knowledge proof file is generated, the string in the (N-1)* zero-knowledge proof file is searched and replaced according to the dictionary list, that is, a long string is replaced by a short string. Thus, the N® zero-knowledge proof file that is smaller than the zero-knowledge proof file obtained by normal superposition is obtained, which ultimately saves blockchain resources.
[0097] Operation S1004, storing the N™ zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N* zero-knowledge proof.
[0098] The N zero-knowledge proof file contains the entire contents of the first zero-knowledge proof file to the (N-I)? zero-knowledge proof file. That is, only one N# zero-knowledge proof is needed to verify the correctness of the past information corresponding to the first zero-knowledge proof file to the (N-I)! zero-knowledge proof file, which omits the following operation: when querying the proof of the historical target block, it is necessary to traverse one block from the N™ block until the historical target block is traversed, and which is guaranteed that at any point in time, only the current correct state update is saved on the blockchain. The N" zero-knowledge proof is stored in the blockchain for storage, so that the verification query of the N™ block is performed based on the N® zero-knowledge proof.
[0099] In this embodiment, the method includes: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N® block sent by an application terminal, denoted as N temporary zero-knowledge proof, N being not less than 2; obtaining 1
(N-1) zero-knowledge proof corresponding to (N-1)" block from the blockchain; combining the (N-1)® zero-knowledge proof and the N'? temporary zero-knowledge proof to obtain N™ zero-knowledge proof corresponding to the N® block; and storing the N® zero-knowledge proof in the blockchain, to verify and query user data of the N# block based on the N® zero-knowledge proof, which solves the problem that the amount of data is too large due to the increase of snark proofs in the block. The (N-1)" zero-knowledge proof is combined with the
N!2 temporary zero-knowledge proof, and the N™ zero-knowledge proof finally generated occupies less blockchain space resources, to solve the problem that the amount of blockchain data is too large due to the increase of snark proofs in the block.
[0100] As shown in FIG. 3, FIG. 3 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure. Before the operation S1001 of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of Nt block sent by the application terminal, the user data management method further includes:
[0101] Operation S1000, when receiving a first temporary zero-knowledge proof of a first block sent by the application terminal, storing the first temporary zero-knowledge proof in the blockchain as a first zero-knowledge proof, to verify and query user data of the first block based on the first zero-knowledge proof.
[0102] The technical solutions of the present disclosure adopt recursive methods. The (N-1)" zero-knowledge proof file is continuously called, and combined with the N® temporary zero-knowledge proof file, to generate the N™ zero-knowledge proof file, and N is not less than 2. When N is equal to 1, there is no 0 zero-knowledge proof file in the blockchain. When receiving the instruction to store the first proof, the first temporary zero-knowledge proof of the first block sent by the application terminal is received, and the first temporary zero-knowledge proof is stored in the blockchain, to verify and query the user data of the first block based on the first zero-knowledge proof. Based on the first zero-knowledge proof, the server combines the second temporary zero-knowledge proof of the second block sent from the application terminal based on the first zero-knowledge proof to obtain the second zero-knowledge proof, and recurses until the Nth zero-knowledge proof is obtained.
[0103] Compared with storing each zero-knowledge proof into the blockchain, in this embodiment, less space and resources are occupied in the blockchain, which solves the problem that as more and more snark proofs are generated in the blockchain, the amount of data will also increase.
[0104] As shown in FIG. 4, FIG. 4 is a schematic flowchart of the user data management 12 method according to another embodiment of the present disclosure. Before the operation S1001 of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of N* block sent by the application terminal, the user data management method further includes:
[0105] Operation S100, receiving user data corresponding to the N block sent by the application terminal.
[0106] When the application terminal interacts with the user, user data is generated, and the server receives the user data in real time. The user data includes user transaction data, user information data, and the like.
[0107] Operation S200, storing the user data corresponding to the N# block in an inter planetary file system (IPFS), and sending storage address information to the application terminal, for the application terminal to generate a common reference string (CRS) based on the storage address information, and generate a temporary zero-knowledge proof of the N® block based on the CRS.
[0108] As a transfer station, the server sends the user data received from the application terminal to the IPFS for storage, receives the storage address information sent by IPFS based on the user data after storing the user data, and then sends the storage address information to the application terminal, such that the application terminal performs calculation based on the storage address information through the Groth algorithm to obtain the CRS, generates a temporary zero-knowledge proof of the N® block based on the CRS, so as to send the generated temporary zero-knowledge proof of the N™ block to the server.
[0109] In technical solutions of this embodiment, the user data management method includes receiving the user data corresponding to the N'™ block sent by the application terminal; and storing the user data corresponding to the N# block in IPFS, and sending storage address information to the application terminal, for the application terminal to generate a CRS based on the storage address information, and generate a temporary zero-knowledge proof of the N# block based on the CRS, which ensures that other user terminals cannot obtain the user data, and the security of the user data is improved.
[0110] As shown in FIG. 5, FIG. 5 is a schematic flowchart of the user data management method according to another embodiment of the present disclosure. Based on the embodiment shown in FIG. 2, in this embodiment, the user data management method further includes:
[0111] Operation S1010, when receiving a query instruction for querying the user data corresponding to the N'™ block, generating a transaction evidence according to the query instruction, a serialized transaction data and a zk-snarks protocol. 13
[0112] When receiving the query instruction for querying the user data corresponding to the
N!! block, the application terminal serializes the IPFS address of the user data, and calculates the CRS required by the zk-snarks protocol according to the algorithm of the zk-snarks protocol, and generates the N'! temporary zero-knowledge proof corresponding to the N® block based on the CRS, that is, the transaction proof. The algorithm of the zk-snarks protocol may be the Groth16 algorithm.
[0113] Operation $1020, verifying the transaction evidence based on the N® zero-knowledge proof corresponding to the N® block and a preset evidence verification condition to obtain a verification result.
[0114] After obtaining the transaction evidence through the operation S1010, the transaction evidence is sent to the blockchain, the smart contract in the blockchain verifies the transaction evidence and the proof part corresponding to the N® block in the N® zero-knowledge proof, to verify whether the transaction evidence and the proof part are the same, and obtain the verification result.
[0115] Operation S1030, querying the corresponding user data from the IPFS according to the verification result, and returning the corresponding user data to the user terminal for a user to view.
[0116] If the verification result is that the transaction evidence is the same as the proof part corresponding to the N® block in the N® zero-knowledge proof, the verification result that passes the verification will be returned as the output of the data proof and sent to the server. The server queries IPFS for the corresponding user data according to the verification result, and finally sends the user data to the user terminal for the user to view.
[0117] In technical solutions of this embodiment, the user data management method includes: when receiving the query instruction for querying the user data corresponding to the
N™ block, generating the transaction evidence according to the query instruction, the serialized transaction data and the zk-snarks protocol; verifying the transaction evidence based on the N? zero-knowledge proof corresponding to the N™ block and the preset evidence verification condition to obtain the verification result; and querying the corresponding user data from the
IPFS according to the verification result, and returning the corresponding user data to the user terminal for the user to view. The smart contract carried on the blockchain is used as the verifier of transaction data to ensure the openness of verification. After the verification is passed, IPFS is used to find the corresponding storage address, and the user data on the storage address is returned to the application terminal for the user to view, which improves the user experience.
[0118] As shown in FIG. 6, FIG. 6 is a schematic flowchart of the user data management 14 method according to another embodiment of the present disclosure. Before the operation S1001 of when receiving the storage proof instruction, receiving the temporary zero-knowledge proof of N' block sent by the application terminal, denoted as N temporary zero-knowledge proof, the user data management method further includes:
[0119] Operation S10, verifying whether the transaction data corresponding to the NU temporary zero-knowledge proof exists.
[0120] The server sends a data verification instruction to IPFS to verify whether the transaction data corresponding to the N® temporary zero-knowledge proof is stored in IPFS, and receives the result returned by IPFS. If the transaction data corresponding to the N# temporary zero-knowledge proof is stored in IPFS, the operation S20 is executed. If the transaction data corresponding to the N'! temporary zero-knowledge proof is not stored in IPFS, the first error message is sent through the application terminal. The first error message is to indicate that the transaction data corresponding to the N' temporary zero-knowledge proof is not stored in IPFS.
[0121] Operation S20, if the transaction data corresponding to the N% temporary zero-knowledge proof exists, verifying whether a transaction content corresponding to the N'? temporary zero-knowledge proof is correct.
[0122] When the transaction data corresponding to the N temporary zero-knowledge proof is stored in IPFS, it is possible to confirm the content of the transaction data, confirm whether the sender of the transaction signature matches, confirm whether the transaction timestamp is correct, etc., to obtain the confirmation result.
[0123] Operation S30, if the transaction content corresponding to the N™ temporary zero-knowledge proof is correct, obtaining the (N-1)® zero-knowledge proof corresponding to the (N-1)® block from the blockchain.
[0124] If it is confirmed that the sender of the transaction signature, the transaction time stamp and other transaction contents are correct, the operation $1002 of obtaining the (N-I) zero-knowledge proof corresponding to the (N-1)" block from the blockchain is executed.
[0125] In technical solutions of this embodiment, the user data management method further includes: verifying whether the transaction data corresponding to the N® temporary zero-knowledge proof exists; if the transaction data corresponding to the N temporary zero-knowledge proof exists, verifying whether a transaction content corresponding to the N® temporary zero-knowledge proof is correct; and if the transaction content corresponding to the
N temporary zero-knowledge proof is correct, obtaining the (N-1)" zero-knowledge proof corresponding to the (N-1) block from the blockchain, which prevents user data from being 13 lost during IPFS storage, improving user experience.
[0126] The above embodiment describes the user data management method based on the server. This embodiment describes a user data management method based on an application terminal, and the user data management method includes the following operations:
[0127] Operation S80, sending a temporary zero-knowledge proof of N! block to a server, denoted as N™ temporary zero-knowledge proof, N being not less than 2.
[0128] The user data management method includes: sending the temporary zero-knowledge proof of N block to the server, denoted as N temporary zero-knowledge proof, for the server to obtain (N-1)" zero-knowledge proof corresponding to (N-1) block from the blockchain; combining the (N-1) zero-knowledge proof and the N temporary zero-knowledge proof to obtain N™ zero-knowledge proof corresponding to the N® block; and storing the N™ zero-knowledge proof in the blockchain, to verify and query user data of the N block based on the N® zero-knowledge proof.
[0129] In technical solutions of this embodiment, the user data management method includes: after the application terminal generates the temporary zero-knowledge proof of the N# block based on the storage address information corresponding to the user data of the N™ block sent by the server, sending the temporary zero-knowledge proof of N® block to the server, denoted as N® temporary zero-knowledge proof, for the server to obtain (N-1)® zero-knowledge proof corresponding to (N-I) block from the blockchain; combining the (N-1)# zero-knowledge proof and the N® temporary zero-knowledge proof to obtain N!? zero-knowledge proof corresponding to the N® block; and storing the N' zero-knowledge proof in the blockchain, to verify and query user data of the N" block based on the N® zero-knowledge proof.
[0130] As shown in FIG. 7, FIG. 7 is a schematic flowchart of an application terminal of the user data management method according to an embodiment of the present disclosure.
Before the operation S80 of sending the temporary zero-knowledge proof of N block to the server, the user data management method further includes:
[0131] Operation S50, sending the user data corresponding to the N® block to the server, for the server to store the user data corresponding to the N!! block in an inter planetary file system (IPFS).
[0132] After obtaining the user data generated by the user interaction, the application terminal uploads the user data to the server for the server to store the user data in IPFS.
[0133] Operation S60, receiving storage address information sent by the server.
[0134] After storing the user data in IPFS, the server receives the storage address 16 information sent by IPFS based on the user data, and then sends the storage address information to the application terminal, for the application terminal to generate a common reference string (CRS) based on the storage address information.
[0135] Operation S70, generating a common reference string (CRS) based on the storage address information, and generating a temporary zero-knowledge proof of the N® block based on the CRS.
[0136] The application terminal serializes the IPFS address of the user data, and calculates the CRS required by the zk-snarks protocol according to the algorithm of the zk-snarks protocol, and generates the N' temporary zero-knowledge proof corresponding to the N* block based on the CRS.
[0137] In technical solutions of this embodiment, the user data management method includes: sending the user data corresponding to the N block to the server, for the server to store the user data corresponding to the N'? block in the IPFS; receiving storage address information sent by the server, and generating the CRS based on the storage address information, and generating the N temporary zero-knowledge proof of the N¥ block based on the CRS. The N temporary zero-knowledge proof is sent to the server, for the server to combine the (N-1) temporary zero-knowledge proof of the (N-I)? block sent from the application terminal to obtain the N® zero-knowledge proof based on the N® temporary zero-knowledge proof.
[0138] The process of the blockchain data compression and storage method based on recursive zk-snarks and the process of the metaverse user data management method based on recursive zk-snarks will be deseribed in detail below with reference to FIG. 8.
[0139] As shown in FIG. 8, the present disclosure provides a blockchain data compression and storage method based on recursive zk-snarks, including following operations:
[0140] 1) Proving single block data based on zk-snarks
[0141] 1-1) For a single block, zk-snarks technology is adopted to make a proof of the transaction in each block.
[0142] After the server stores the first user data corresponding to the first block in IPFS, the application terminal sends the first user data verification instruction to IPFS through the server, finds the data on the storage address according to the storage address information, and confirms the data. First, confirm whether the data on the storage address exists. After confirming the data on the storage address exists, confirm whether the content of the data is the same as the first user data stored in the server. The content can be whether the sender of the transaction signature is the same, whether the transaction timestamp matches, and the method involved in the 17 transaction, etc. After confirming that the contents are the same, the application terminal generates the CRS according to the storage address information, and then generates a corresponding first temporary zero-knowledge proof based on the CRS.
[0143] 1-2) Only this proof is stored in the block. Since the proof of the correctness of the transaction is stored on the blockchain, not the transaction itself. This proof takes up very little space, and the block size is compressed.
[0144] After the first temporary zero-knowledge proof is generated, the first temporary zero-knowledge proof is sent to the server to be stored in the first block in the blockchain. The blockchain is only used to store zero-knowledge proofs, and the transaction data is stored in
IPFS, and the size of the first block 1s compressed.
[0145] 1-3) When verifying, the proof is taken out to verify the transaction of this block.
[0146] When receiving the verification instruction, the server takes out the first temporary zero-knowledge proof from the first block of the blockchain. Since the first temporary zero-knowledge proof is the first proof stored in the blockchain, the first temporary zero-knowledge proof is the first zero-knowledge proof. By checking the first temporary zero-knowledge proof, it can be determined that the first user data corresponding to the first temporary zero-knowledge proof is correct.
[0147] 2) The operations of proving massive block data based on recursive zk-snarks include:
[0148] 2-1) Using the method in 1) to perform a zk-snarks proof on the block 1, obtain the proof file (proof1) of the block 1, and store the proof in the block I.
[0149] The method of storing the first zero-knowledge proof in the block 1 is the same as the above-mentioned method of storing the proof in a single block, that is, the first zero-knowledge proof is stored in the block 1.
[0150] 2-2) Using the method in 1) to perform a zk-snarks proof on the block 2, obtain the proof file (proof2temp) of the block 2, combine proof] and proof2temp to obtain proof2, and store the proof? in the block 2.
[0151] Starting from block 2, the second zero-knowledge proof is to be stored in block 2.
The second zero-knowledge proof is obtained based on the second temporary zero-knowledge proof generated by the second user data corresponding to the second block and the first zero-knowledge proof. After the server stores the second user data corresponding to the second block in IPFS, the application terminal sends the second user data verification instruction to
IPFS through the server, finds the data on the storage address according to the storage address information, and confirms the data. First, confirm whether the data on the storage address 18 exists. After confirming that the data on the storage address exists, confirm whether the content of the data is the same as the second user data stored in the server. After confirming that the contents are the same, the application terminal generates the CRS according to the storage address information, to generate the corresponding second temporary zero-knowledge proof based on CRS, combine the second temporary zero-knowledge proof with the first zero-knowledge proof, obtain the second zero-knowledge proof, and store the second zero-knowledge proof in block 2.
[0152] 2-3) Using the method in 1) to perform a zk-snarks proof on block n (n>2), and obtain the proof file (proofntemp) of block n, combine proofn-1 and proofntemp to obtain proofn, and store proofn in block n.
[0153] Confirm the third user data corresponding to block 3, and generate the CRS based on the storage address corresponding to the third user data, generate the third temporary zero-knowledge proof based on CRS, and combine the third temporary zero-knowledge proof with the second zero-knowledge proof to obtain the third zero-knowledge proof, store the third zero-knowledge proof in block 3, and repeat this recursively until the n® zero-knowledge proof file is stored in block n.
[0154] 2-4) For any current latest block, only one latest proof is needed to verify the correctness of all past information. This ensures that at any point in time, only the current correct state update is saved on the blockchain, and a large amount of transaction raw data is not saved.
[0155] The n zero-knowledge proof file obtained by the above method includes the first zero-knowledge proof to the n!2 zero-knowledge proof. That is, only one n® zero-knowledge proof is needed to verify the correctness of the user data corresponding to the 1% to n® zero-knowledge proofs, and the corresponding user data is stored in IPFS.
[0156] The present disclosure provides a metaverse user data management method based on recursive zk-snarks, including the following operations:
[0157] Store the user data:
[0158] 1-1) When the interactive data is generated at the Metaverse application terminal, the users send their transaction data to the Metaverse application backend, and the Metaverse application backend receives the transaction data and stores the transaction data in IPFS, and returns the IPFS address of the transaction data.
[0159] The Metaverse application terminal sends the collected user data, namely transaction data, to the Metaverse application backend, namely the Metaverse cloud server. After the
Metaverse application backend receives the transaction data, the transaction data is stored in 19
IPFS, and obtains the storage address information returned by IPFS based on the stored transaction data.
[0160] 1-2) The Metaverse application terminal serializes the IPFS address of the user data, and calculates and generates the CRS required by the zk-snarks protocol according to the IPFS address of the serialized user data.
[0161] After the Metaverse application backend obtains the storage address information, the storage address information is sent to the application terminal, for the application terminal to obtain the CRS through calculation based on the storage address information. The specific calculation process is: the Metaverse application terminal serializes the storage address, and calculates the CRS through the Groth16 algorithm in the zk-snarks protocol according to the serialized storage address.
[0162] 1-3) The Metaverse application terminal stores the zero-knowledge proof evidence composed of CRS in the blockchain.
[0163] After the CRS is obtained, the corresponding temporary zero-knowledge proof is generated according to the CRS, and then sent to the server, so that the server can combine the temporary zero-knowledge proof and the previous zero-knowledge proof to obtain the zero-knowledge proof. The zero-knowledge proof is then stored in the blockchain to verify and query the user data of the corresponding block based on the zero-knowledge proof.
[0164] Verify and query the user data
[0165] 2-1) When the user needs to query the user data, the Metaverse application backend is used as the prover, and the evidence is generated according to the serialized transaction data and the zk-snarks protocol.
[0166] When receiving a query instruction for querying the user data corresponding to the
Nt! block, the application terminal serializes the IPFS address of the user data, and based on the serialized IPFS address, according to the Groth16 algorithm in the zk-snarks protocol, the CRS required by the non-interactive zero-knowledge proof zk-snarks protocol 1s generated. Then, based on the CRS, the N™ temporary zero-knowledge proof corresponding to the N' block is generated, that is, the transaction proof, the transaction proof is sent to the server, and the server prover will provide the proof to the blockchain.
[0167] 2-2) The smart contract carried on the blockchain acts as the verifier of transaction data, the verifier uses the CRS stored on the chain and verifies the generated evidence from the
Metaverse application backend based on the evidence verification conditions of the zk-snarks protocol sent by the server, and obtains the verification result as the output of the data proof.
[0168] After the server provides the blockchain with the generated transaction proof of the 20
Metaverse application backend, the smart contract in the blockchain generates correct evidence based on the CRS stored on the chain and based on the evidence verification conditions of the zk-snarks protocol sent by the server, verifies and compares the transaction evidence with the correct evidence. The way of comparison can be to check whether the two are the same. If the transaction evidence is the same as the correct evidence, the blockchain will return the proof to the server as the output of the data proof.
[0169] 2-3) The Metaverse application backend goes to IPFS to query according to the verification result, to query the final data, and return the final data to the user terminal for the user to view.
[01790] After the server receives the pass certificate returned by the blockchain, the pass certificate contains the storage address of the target user data in IPFS, the server queries and copies the target data from IPFS according to the storage address, and then sends the target data to the application terminal for the user to view.
[0171] The present disclosure provides a metaverse user data management method based on recursive zk-snarks. Through the recursive optimization of the commonly used zk-snarks, the blockchain data is effectively compressed and optimized. The metaverse user data management method based on recursive zk-snarks effectively completes the privacy protection, fast verification and efficient storage of user data in the metaverse scenario.
[0172] Besides, the present disclosure provides a user data management device, including:
[0173] a receiving module, for when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N! block sent by an application terminal, denoted as Nt temporary zero-knowledge proof, N being not less than 2;
[0174] an acquisition module for obtaining (N-1)" zero-knowledge proof corresponding to (N-1) block from the blockchain:
[0175] a combination module for combining the (N-1)® zero-knowledge proof and the N'? temporary zero-knowledge proof to obtain N' zero-knowledge proof corresponding to the N* block; and
[0176] a storage module for storing the N zero-knowledge proof in the blockchain, to verify and query user data of the N# block based on the N™ zero-knowledge proof.
[0177] For the principle and implementation process implemented in this embodiment, please refer to the above-mentioned embodiments, which will not be repeated herein.
[0178] Besides, the present disclosure further provides a terminal device, including a memory, a processor, a user data management program stored in the memory and executable on the processor, and when the user data management program is executed by the processor, the 21 operations of the user data management method as described above are implemented.
[0179] Since the user data management program adopts all the technical solutions of the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of the foregoing embodiments, and will not be repeated herein.
[0180] Besides, the present disclosure further provides a computer-readable storage medium, a user data management program is stored in the computer-readable storage medium, and when the user data management program is executed by a processor, the operations of the user data management method as described above are implemented.
[0181] One by one zero-knowledge proof files are stacked in the blockchain in the related art. The present disclosure provides a user data management method, applied to a server connected to a blockchain, and wherein the user data management method comprises following operations: when receiving a storage proof instruction, receiving a temporary zero-knowledge proof of N* block sent by an application terminal, denoted as N' temporary zero-knowledge proof, N being not less than 2; obtaining (N-1)" zero-knowledge proof corresponding to (N-1)® block from the blockchain; combining the (N-1)" zero-knowledge proof and the N temporary zero-knowledge proof to obtain N™ zero-knowledge proof corresponding to the N block; and storing the N' zero-knowledge proof in the blockchain, to verify and query user data of the N# block based on the N® zero-knowledge proof. Combined with the recursive method, the final
N™ zero-knowledge proof takes up less space resources in the blockchain, which optimizes the storage method of the zero-knowledge proof in the blockchain, and solves the problem of excessive data volume caused by the increase of zero-knowledge proof files in the blockchain, realizes safe and effective protection of user data, and supports rapid verification of data reliability to support massive application interactions.
[0182] It should be noted that in this document, the terms “comprise”, “include” or any other variants thereof are intended to cover a non-exclusive inclusion. Thus, a process, method, article, or system that includes a series of elements not only includes those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to the process, method, article, or system. If there are no more restrictions, the element defined by the sentence “including a...” does not exclude the existence of other identical elements in the process, method, article or system that includes the element.
[0183] The serial numbers of the foregoing embodiments of the present disclosure are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0184] Through the description of the above embodiment, those skilled in the art can clearly 22 understand that the above-mentioned embodiments can be implemented by software plus a necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of the present disclosure can be embodied in the form of software product in essence or the part that contributes to the existing technology. The computer software product is stored on a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, including several instructions to cause a terminal device (such as a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method described in each embodiment of the present disclosure.
[0185] The above are only some embodiments of the present disclosure, and do not limit the scope of the present disclosure thereto. Under the inventive concept of the present disclosure, equivalent structural transformations made according to the description and drawings of the present disclosure, or direct/indirect application in other related technical fields are included in the scope of the present disclosure. 23

Claims (10)

CONCLUSIESCONCLUSIONS 1. Werkwijze voor het beheer van gebruikersgegevens, die wordt gekenmerkt doordat methode voor het beheer van de gebruikersgegevens, wordt toegepast op een server die is verbonden met een blockchain en waarbij werkwijze voor het beheer van gebruikersgegevens de volgende bewerkingen bevat: het ontvangen - bij het ontvangen van een opslagbewijs instructie - van een tijdelijk nulkennisbewijs van een, N-de blok verzonden door een toepassingsterminal, aangeduid als het N-de tijdelijke nulkennisbewijs, waarbij N niet minder dan 2 is; het verkrijgen van een (N-1)-de nulkennisbewijs dat overeenkomt met het (N-1)-de blok van de blockchain; het combineren van het (N-1)-de nulkennisbewijs en het N-de tijdelijke nulkennisbewijs om het N-de nulkennisbewijs dat overeenkomt met het N-de blok te verkrijgen; en het opslaan van het N-de nulkennisbewijs in de blockchain, om gebruikersgegevens van het N-de blok gebaseerd op het N-de nulkennisbewijs te verifiëren en op te vragen.1. A user data management method characterized in that a user data management method is applied to a server connected to a blockchain and a user data management method includes the following operations: receiving - upon receiving receiving a store receipt instruction - of a temporary zero-knowledge proof of an Nth block sent by an application terminal, referred to as the Nth temporary zero-knowledge proof, where N is not less than 2; obtaining an (N-1)th zero-knowledge proof corresponding to the (N-1)th block of the blockchain; combining the (N-1)th Zero Knowledge Evidence and the Nth Temporary Zero Knowledge Evidence to obtain the Nth Zero Knowledge Evidence corresponding to the Nth Block; and storing the Nth zero-knowledge proof in the blockchain, to verify and query user data of the Nth block based on the Nth zero-knowledge proof. 2. Werkwijze voor het beheer van gebruikersgegevens van conclusie 1, waarbij vóór de bewerking van wanneer het ontvangen - bij het ontvangen van een opslagbewijs instructie - van een tijdelijk nulkennisbewijs van een N-de blok verzonden door de toepassingsterminal, de werkwijze voor beheer voor gebruikersgegevens verder bevat: bij ontvangst van een eerste tijdelijk nulkennisbewijs van een eerste blok verzonden door de toepassingsterminal, het opslaan van het eerste tijdelijke nulkennisbewijs in de blockchain als een eerste nulkennisbewijs, om gebruikersgegevens van het eerste blok te verifiëren en op te vragen gebaseerd op het eerste nulkennisbewijs.The user data management method of claim 1, wherein before processing when receiving - upon receipt of a token instruction - a temporary zero-knowledge proof of an Nth block sent by the application terminal, the user data management method further includes: upon receipt of a first temporary zero-knowledge proof of a first block sent by the application terminal, storing the first temporary zero-knowledge proof in the blockchain as a first zero-knowledge proof, to verify and query user data of the first block based on the first zero knowledge proof. 3. Werkwijze voor het beheer van gebruikersgegevens van conclusie 1, waarbij vóór de bewerking van wanneer het ontvangen - bij het ontvangen van een opslagbewijs instructie - van een tijdelijk nulkennisbewijs van een N-de blok verzonden door een toepassingsterminal, aangeduid als het N-de tijdelijke nulkennisbewijs, de werkwijze voor het beheer van gebruikersgegevens verder bevat: het ontvangen van gebruikersgegevens die overeenkomen met het N-de blok dat door de toepassingsterminal is verzonden, en het opslaan van de gebruikersgegevens die overeenkomen met het N-de blok in een interplanetair bestandssysteem (IPFS), en het verzenden van opslagadresinformatie naar de 24 toepassingsterminal, om de toepassingsterminal een gemeenschappelijke referentiestring (CRS) te laten genereren gebaseerd op de informatie over het opslagadres, en een tijdelijk nulkennisbewijs van het N-de-blok te laten genereren gebaseerd op het CRS.The user data management method of claim 1, wherein before the processing of when receiving - upon receiving a token instruction - a temporary zero-knowledge proof of an Nth block sent by an application terminal, referred to as the Nth temporary zero-knowledge proof, the user data management method further includes: receiving user data corresponding to the Nth block sent by the application terminal, and storing the user data corresponding to the Nth block in an interplanetary file system (IPFS), and sending storage address information to the 24 application terminal, to cause the application terminal to generate a common reference string (CRS) based on the storage address information, and to generate a temporary zero-knowledge proof of the Nth block based on the CRS. 4. Werkwijze voor het beheer van gebruikersgegevens van conclusie 3, verder bevattende: het genereren bij het ontvangen van een vragen-instructie voor het opvragen van de gebruikersgegevens die overeenkomen met het N-de blok - van een transactiebewijs volgens de vragen-instructie, een geserialiseerde transactiegegevens en een zk-snarks protocol, het verifiëren van het transactiebewijs gebaseerd op het nulkennisbewijs dat overeenkomt met het N-de blok en een vooraf ingestelde voorwaarde voor de verificatie van bewijsmateriaal om een verificatieresultaat te verkrijgen, en het opvragen van de overeenkomstige gebruikersgegevens van de IPFS volgens het verificatieresultaat, en het terugzenden van de bijbehorende gebruikersgegevens naar de gebruikersterminal zodat een gebruiker deze kan bekijken.The user data management method of claim 3, further comprising: upon receiving a request instruction for requesting the user data corresponding to the Nth block, generating a transaction receipt according to the request instruction, a serialized transaction data and a zk-snarks protocol, verifying the transaction proof based on the zero-knowledge proof corresponding to the Nth block and pre-set evidence verification condition to obtain a verification result, and requesting the corresponding user data from the IPFS according to the verification result, and returning the associated user data to the user terminal for a user to view. 5. Werkwijze voor het beheer van gebruikersgegevens van conclusie 1, waarbij vóór de bewerking van wanneer het ontvangen van een opslagbewijs instructie, het ontvangen - van een tijdelijk nulkennisbewijs van een N-de blok verzonden door een toepassingsterminal, aangeduid als het N-de tijdelijke nulkennisbewijs, de werkwijze voor het beheer van gebruikersgegevens verder bevat: het verifiëren of de transactiegegevens, die overeenkomen met het N-de tijdelijke nulkennisbewijs, bestaan; indien de transactiegegevens die overeenkomen met het N-de tijdelijke nulkennisbewijs bestaan, het verifiëren of de transactie inhoud, die overeenkomt met het N-de tijdelijke correct isen indien de transactie inhoud die overeenkomt met het N-de tijdelijke nulkennisbewijs correct is, het verkrijgen van het (N-1)-de nulkennisbewijs dat overeenkomt met het (N-1)-de blok van de blockchain.The user data management method of claim 1, wherein before the processing of when receiving a receipt instruction, receiving - a temporary zero-knowledge proof of an Nth block sent by an application terminal, referred to as the Nth temporary zero-knowledge proof, the user data management method further comprising: verifying whether the transaction data corresponding to the Nth temporary zero-knowledge proof exists; if the transaction data corresponding to the Nth temporary zero knowledge proof exists, verifying whether the transaction content corresponding to the Nth temporary is correct, and if the transaction content corresponding to the Nth temporary zero knowledge proof is correct, obtaining the (N-1)th zero-knowledge proof corresponding to the (N-1)th block of the blockchain. 6. Werkwijze voor het beheer van gebruikersgegevens, die wordt gekenmerkt doordat methode voor het beheer van de gebruikersgegevens wordt toegepast op een toepassingsterminal, bevattende de volgende bewerkingen: het verzenden van een tijdelijk nulkennisbewijs van het N-de blok naar een server, aangeduid als het N-de tijdelijke nulkennisbewijs, om de server het (N-1)-de het 25 nulkennisbewijs te laten verkrijgen dat overeenkomt met het (N-1)-de blok van de blockchain, waarbij N niet minder dan 2 is; het combineren van het (N-1)-de nulkennisbewijs en het N-de tijdelijke nulkennisbewijs om het N-de nulkennisbewijs dat overeenkomt met het N-de blok te verkrijgen; en het opslaan van het N-de nulkennisbewijs in de blockchain, om gebruikersgegevens van de N-de blok gebaseerd op het N-de nulkennisbewijs te verifiëren en op te vragen.A user data management method, characterized in that a user data management method is applied to an application terminal, comprising the operations of: transmitting a temporary zero-knowledge proof of the Nth block to a server referred to as the Nth temporary zero-knowledge proof, to have the server obtain the (N-1)th zero-knowledge proof corresponding to the (N-1)th block of the blockchain, where N is not less than 2; combining the (N-1)th zero knowledge proof and the Nth temporary zero knowledge proof to obtain the Nth zero knowledge proof corresponding to the Nth block; and storing the Nth zero-knowledge proof in the blockchain, to verify and query user data of the Nth block based on the Nth zero-knowledge proof. 7. Werkwijze voor het beheer van gebruikersgegevens van conclusie 6, waarbij vóór de uitvoering van verzending van een tijdelijk nulkennisbewijs van het N-de blok naar een server, de werkwijze voor het beheer van gebruikersgegevens verder bevat: het verzenden van de gebruikersgegevens die overeenkomen met het N-de blok naar de server, om de server de gebruikersgegevens die overeenkomen met het N-de blok in een interplanetair bestandssysteem (IPFS), te laten opslaan; het ontvangen van opslagadresgegevens die door de server zijn verzonden; en een gemeenschappelijke referentiestring (CRS) te laten genereren gebaseerd op de informatie van het opslagadres, en een tijdelijk nulkennisbewijs van het N-de blok te laten genereren gebaseerd op het CRS.The user data management method of claim 6, wherein before performing transmission of a temporary zero-knowledge proof of the Nth block to a server, the user data management method further comprises: sending the user data corresponding to the Nth block to the server, to have the server store the user data corresponding to the Nth block in an interplanetary file system (IPFS); receiving storage address data sent by the server; and generate a common reference string (CRS) based on the storage address information, and generate a temporary zero-knowledge proof of the Nth block based on the CRS. 8. Inrichting voor het beheer van gebruikersgegevens, die gekenmerkt is doordat ze bevat: een ontvangende module, om bij het ontvangen van een opslagbewijs instructie, een tijdelijk nulkennisbewijs van het N-de blok te ontvangen, die verzonden is door een toepassingsterminal, die wordt aangeduid als het N-de tijdelijke nulkennisbewijs, waarbij N niet minder dan 2 is; een acquisitiemodule voor het verkrijgen van (N-1)-de het nulkennisbewijs dat overeenkomt met (N-1)-de blok van de blockchain; een combinatiemodule voor het combineren van het (N-1)-de nulkennisbewijs en het N-de tijdelijke nulkennisbewijs om het N-de nulkennisbewijs te verkrijgen dat overeenkomt met het N-de blok; en een opslagmodule voor het opslaan van het N-de nulkennisbewijs in de blockchain, om te verifiëren en opvragen van gebruikersgegevens van het N-de blok op basis van het N-de nulkennisbewijs.8. A user data management device, characterized in that it comprises: a receiving module, upon receipt of a token instruction, to receive a temporary zero-knowledge token of the Nth block sent by an application terminal, which is referred to as the Nth temporary zero-knowledge proof, where N is not less than 2; an acquisition module for obtaining (N-1)-th zero-knowledge proof corresponding to (N-1)-th block of the blockchain; a combination module for combining the (N-1)th zero-knowledge proof and the Nth temporary zero-knowledge proof to obtain the Nth zero-knowledge proof corresponding to the Nth block; and a storage module for storing the Nth zero-knowledge proof in the blockchain to verify and retrieve user data of the Nth block based on the Nth zero-knowledge proof. 9. Eindinrichting, die gekenmerkt is doordat ze bevat een geheugen, een processor, een gebruikersgegevens beheerprogramma, dat opgeslagen is in het geheugen en uitvoerbaar is op 26 de processor, en wanneer bij het uitvoeren van het gebruikersgegevens beheerprogramma door de processor, de bewerkingen van de gebruikersgegevens werkwijze voor beheer volgens een van de conclusies 1 tot 7 worden geimplementeerd.9. Terminal device, characterized in that it includes a memory, a processor, a user data management program stored in the memory and executable on the processor, and when the processor executes the user data management program, the operations of the user data management method according to any one of claims 1 to 7 can be implemented. 10. Computerleesbaar opslagmedium, gekenmerkt doordat, een gebruikersgegevens beheerprogramma opgeslagen is in het computerleesbare opslagmedium en doordat bij het uitvoeren van de gebruikersgegevens beheerprogramma door een processor, de bewerkingen van het beheer van gebruikersgegevens werkwijze volgens een van de conclusies 1 tot 7 worden geimplementeerd. 27A computer readable storage medium, characterized in that a user data management program is stored in the computer readable storage medium and in that when the user data management program is executed by a processor, the operations of the user data management method according to any one of claims 1 to 7 are implemented. 27
NL2032902A 2022-08-30 2022-08-30 User data management method, device, terminal apparatus and medium NL2032902B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
NL2032902A NL2032902B1 (en) 2022-08-30 2022-08-30 User data management method, device, terminal apparatus and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
NL2032902A NL2032902B1 (en) 2022-08-30 2022-08-30 User data management method, device, terminal apparatus and medium

Publications (1)

Publication Number Publication Date
NL2032902B1 true NL2032902B1 (en) 2023-07-03

Family

ID=85158385

Family Applications (1)

Application Number Title Priority Date Filing Date
NL2032902A NL2032902B1 (en) 2022-08-30 2022-08-30 User data management method, device, terminal apparatus and medium

Country Status (1)

Country Link
NL (1) NL2032902B1 (en)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANTOINE RONDELET: "Zecale: Reconciling Privacy and Scalability on Ethereum", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 16 October 2020 (2020-10-16), XP081787903 *
PANAIT ANDREEA-ELENA ET AL: "On Using zk-SNARKs and zk-STARKs in Blockchain-Based Identity Management", 19 November 2020, 16TH EUROPEAN CONFERENCE - COMPUTER VISION - ECCV 2020, PAGE(S) 130 - 145, XP047576384 *

Similar Documents

Publication Publication Date Title
EP3837652B1 (en) Distributed blockchain data storage under account model
CN102651775B (en) Based on method, the equipment and system of many tenants shared object management of cloud computing
CN113094396B (en) Data processing method, device, equipment and medium based on node memory
AU2019378667C1 (en) Performing map iterations in blockchain-based system
US20230074102A1 (en) Method and apparatus for processing data based on block chain, device and readable storage medium
CN112579606A (en) Workflow data processing method and device, computer equipment and storage medium
CN112950211B (en) Transaction duplication checking method, device, equipment and medium
AU2019379711B2 (en) Performing map iterations in a blockchain-based system
KR20210055631A (en) Data security of shared blockchain data storage based on error correction codes
CN111815454B (en) Data uplink method and device, electronic equipment and storage medium
EP3769230B1 (en) Taking snapshots of blockchain data
WO2023045617A1 (en) Transaction data processing method and apparatus, device and medium
CN112615847A (en) Data sharing and privacy protection method based on block chain
KR20180005542A (en) Apparatus and method for verifing data integrity
CN114070847B (en) Method, device, equipment and storage medium for limiting current of server
CN111523897B (en) Anti-attack method, device and storage medium
CN111339193B (en) Category encoding method and device
NL2032902B1 (en) User data management method, device, terminal apparatus and medium
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN116842012A (en) Method, device, equipment and storage medium for storing Redis cluster in fragments
CN110851853A (en) Data isolation method and device, computer equipment and storage medium
WO2023279770A1 (en) Data storage method, apparatus and system, storage medium, and program product
CN112765681B (en) Block distributed block chain generation method, storage medium and electronic device
CN116542668A (en) Block chain-based data processing method, equipment and readable storage medium
CN117010889A (en) Data processing method, device, equipment, medium and product