US12572584B2ActiveUtilityA1

Data storage method and apparatus based on blockchain network

Assignee: TENCENT TECH SHENZHEN CO LTDPriority: May 12, 2021Filed: Nov 9, 2022Granted: Mar 10, 2026
Est. expiryMay 12, 2041(~14.8 yrs left)· nominal 20-yr term from priority
G06F 16/275G06F 16/134G06F 16/41G06F 16/184G06F 3/064G06F 3/067H04L 9/50G06F 16/27G06F 16/182G06F 16/172G06F 3/0623
44
PatentIndex Score
0
Cited by
17
References
14
Claims

Abstract

A data storage method and apparatus, an electronic device, a non-transitory computer-readable storage medium, and a computer program product are provided. The method includes: receiving a storage request carrying multimedia data transmitted by a target device, storing multimedia data in local space of a target storage node, and generating a target storage proof of the multimedia data, the target storage proof indicating that the target storage node has stored the multimedia data, and transmitting the target storage proof to a consensus node, to cause the consensus node, after receiving an uploading request about the multimedia data transmitted by the target device, to perform consensus verification on the multimedia data according to the target storage proof, and store a data identifier of the multimedia data that passes the consensus verification in a blockchain of the consensus node.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A data storage method, performed by at least one processor, comprising:
 receiving a storage request transmitted by a target device, the storage request carrying multimedia data;   storing the multimedia data in a local space of a target storage node in a blockchain network, and generating a target storage proof of the multimedia data, the target storage proof indicating that the target storage node has stored the multimedia data;   transmitting the target storage proof to a consensus node in the blockchain network independent of the target storage node, to cause the consensus node, after receiving an uploading request about the multimedia data transmitted by the target device, to perform consensus verification on the multimedia data according to the target storage proof and store a data identifier of the multimedia data that passes the consensus verification in a blockchain of the consensus node, the data identifier indicating that the multimedia data has been successfully stored in the blockchain network; and   returning a notification message to the target device after transmitting the target storage proof to the consensus device, the notification message notifying a user of the target device that the multimedia data has been successfully stored in the blockchain network and the data identifier of the multimedia data has been successfully transmitted to the consensus node,   wherein generating the target storage proof comprises:
 obtaining the data identifier of the multimedia data, and obtaining a node identifier of the target storage node; and 
 generating the target storage proof of the multimedia data based on the data identifier and the node identifier of the target storage node, and 
   wherein obtaining the data identifier of the multimedia data comprises:
 performing data analysis on the multimedia data to obtain data attribute information of the multimedia data; and 
 performing a hash operation on the data attribute information to obtain the data identifier of the multimedia data. 
   
     
     
         2 . The data storage method according to  claim 1 , wherein the performing data analysis on the multimedia data comprises at least one of the following:
 performing feature extraction processing on the multimedia data to obtain data features of the multimedia data, and adding the data features to the data attribute information of the multimedia data;   performing keyword extraction processing on the multimedia data to obtain keyword information of the multimedia data, and adding the keyword information to the data attribute information of the multimedia data; and   based on the multimedia data being text, performing digest extraction processing on the multimedia data to obtain digest information of the multimedia data, and adding the digest information to the data attribute information of the multimedia data.   
     
     
         3 . The data storage method according to  claim 1 , wherein a node type of the target storage node is a first node type or a second node type, the first node type including a node type that requires at least two storage nodes to jointly maintain one piece of data, and the second node type including a node type that requires one storage node to independently maintain the one piece of data. 
     
     
         4 . The data storage method according to  claim 3 , wherein based on the node type being the first node type, the blockchain network comprises N storage nodes under the first node type, and N is an integer greater than 1; and the target storage node is a storage node in the N storage nodes; and
 the data storage method further comprises:   selecting M reference storage nodes from remaining storage nodes, wherein M∈[1, N−1], and the remaining storage nodes are storage nodes other than the target storage node among the N storage nodes; and   synchronizing the multimedia data to the M reference storage nodes, to cause each of the M reference storage nodes, after storing the multimedia data, to transmit a reference storage proof about the multimedia data to the consensus node, and to cause the consensus node, after receiving the uploading request, to perform the consensus verification on the multimedia data according to the target storage proof and the reference storage proof transmitted by each of the M reference storage nodes.   
     
     
         5 . The data storage method according to  claim 4 , wherein each of the N storage nodes corresponds to a level, and a manner in which the consensus node performs the consensus verification on the multimedia data according to the target storage proof and the reference storage proof transmitted by each of the M reference storage nodes is as follows:
 determining that the consensus verification succeeds in response to calculating that a sum of the target storage proof and the reference storage proof in the blockchain network is greater than a quantity threshold; or   determining that the consensus verification succeeds in response to calculating that quantities of storage proofs corresponding to storage nodes of the N storage nodes that have stored the multimedia data at different levels are all greater than quantity thresholds corresponding to the different levels; or   performing weighted sum operation on the quantities of storage proofs corresponding to the storage nodes of the N storage nodes that have stored the multimedia data at the different levels, and determining that the consensus verification succeeds based on a storage evaluation score obtained by performing the weighted sum operation being greater than a score threshold.   
     
     
         6 . The data storage method according to  claim 1 , further comprising:
 receiving a data access request transmitted by an access device, the data access request carrying the data identifier of the multimedia data and a device identifier of the access device;   reading current ownership information of the multimedia data from the blockchain according to the data identifier, the current ownership information comprising a device identifier of a current device with ownership of the multimedia data, and the current device being a device that owns the ownership of the multimedia data in response to receiving the data access request; and   performing identifier hit processing on the current ownership information by using the device identifier of the access device, and based on a hit succeeding, determining that the access device has an access permission to the multimedia data and returning the multimedia data to the access device.   
     
     
         7 . A data storage apparatus comprising:
 at least one non-transitory memory configured to store program code; and   at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:   receiving code configured to cause the at least one processor to receive a storage request transmitted by a target device, the storage request carrying multimedia data; and   processing code configured to cause the at least one processor to:   store the multimedia data in a local space of a target storage node in a blockchain network, and generate a target storage proof of the multimedia data, the target storage proof indicating that the target storage node has stored the multimedia data;   transmit the target storage proof to a consensus node in the blockchain network independent of the target storage node, to cause the consensus node, after receiving an uploading request about the multimedia data transmitted by the target device, to perform consensus verification on the multimedia data according to the target storage proof and store a data identifier of the multimedia data that passes the consensus verification in a blockchain of the consensus node, the data identifier indicating that the multimedia data has been successfully stored in the blockchain network; and   return a notification message to the target device after transmitting the target storage proof to the consensus device, the notification message notifying a user of the target device that the multimedia data has been successfully stored in the blockchain network and the data identifier of the multimedia data has been successfully transmitted to the consensus node,   wherein the processing code is further configured to cause the at least one processor:
 perform data analysis on the multimedia data to obtain data attribute information of the multimedia data; 
 perform a hash operation on the data attribute information to obtain the data identifier of the multimedia data; and 
 generate the target storage proof of the multimedia data based on the data identifier and a node identifier of the target storage node. 
   
     
     
         8 . The data storage apparatus according to  claim 7 , wherein the processing code is further configured to cause the at least one processor to perform at least one of the following:
 perform feature extraction processing on the multimedia data to obtain data features of the multimedia data, and adding the data features to the data attribute information of the multimedia data;   perform keyword extraction processing on the multimedia data to obtain keyword information of the multimedia data, and add the keyword information to the data attribute information of the multimedia data; and   based the multimedia data being text, perform digest extraction processing on the multimedia data to obtain digest information of the multimedia data, and add the digest information to the data attribute information of the multimedia data.   
     
     
         9 . The data storage apparatus according to  claim 7 , wherein a node type of the target storage node is a first node type or a second node type, the first node type including a node type that requires at least two storage nodes to jointly maintain one piece of data and the second node type including a node type that requires one storage node to independently maintain the one piece of data. 
     
     
         10 . The data storage apparatus according to  claim 9 , wherein based on the node type being the first node type, the blockchain network comprises N storage nodes under the first node type, and N is an integer greater than 1; and the target storage node is a storage node in the N storage nodes; and
 the processing code is further configured to cause the at least one processor to:   select M reference storage nodes from remaining storage nodes, wherein M∈[1, N−1], and the remaining storage nodes are storage nodes other than the target storage node among the N storage nodes; and   synchronize the multimedia data to the M reference storage nodes, to cause each of the M reference storage nodes, after storing the multimedia data, to transmit a reference storage proof about the multimedia data to the consensus node, and to cause the consensus node, after receiving the uploading request, to perform the consensus verification on the multimedia data according to the target storage proof and the reference storage proof transmitted by each of the M reference storage nodes.   
     
     
         11 . The data storage apparatus according to  claim 10 , wherein each of the N storage nodes corresponds to a level, and a manner in which the consensus node performs the consensus verification on the multimedia data according to the target storage proof and the reference storage proof transmitted by each of the M reference storage nodes is as follows:
 determining that the consensus verification succeeds in response to calculating that a sum of the target storage proof and the reference storage proof in the blockchain network is greater than a quantity threshold; or   determining that the consensus verification succeeds in response to calculating that quantities of storage proofs corresponding to storage nodes of the N storage nodes that have stored the multimedia data at different levels are all greater than quantity thresholds corresponding to the different levels; or   performing weighted sum operation on the quantities of storage proofs corresponding to the storage nodes of the N storage nodes that have stored the multimedia data at the different levels, and determining that the consensus verification succeeds based on a storage evaluation score obtained by performing the weighted sum operation being greater than a score threshold.   
     
     
         12 . The data storage apparatus according to  claim 7 , wherein the processing code is further configured to cause the at least one processor to:
 receive a data access request transmitted by an access device, the data access request carries the data identifier of the multimedia data and a device identifier of the access device;   read current ownership information of the multimedia data from the blockchain according to the data identifier, the current ownership information includes a device identifier of a current device with ownership of the multimedia data, and the current device being to a device that owns the ownership of the multimedia data in response to receiving the data access request; and   perform identifier hit processing on the current ownership information by using the device identifier of the access device, and based on a hit succeeding, determine that the access device has an access permission to the multimedia data, and return the multimedia data to the access device.   
     
     
         13 . A non-transitory computer-readable storage medium, storing computer code that, when executed at least one processor, causes the at least one processor to:
 receive a storage request transmitted by a target device, the storage request carrying multimedia data;   store the multimedia data in a local space of a target storage node in a blockchain network, and generate a target storage proof of the multimedia data, the target storage proof indicating that the target storage node has stored the multimedia data;   transmit the target storage proof to a consensus node in the blockchain network independent of the target storage node, to cause the consensus node, after receiving an uploading request about the multimedia data transmitted by the target device, to perform consensus verification on the multimedia data according to the target storage proof, and store a data identifier of the multimedia data that passes the consensus verification in a blockchain of the consensus node, the data identifier indicating that the multimedia data has been successfully stored in the blockchain network; and   return a notification message to the target device after transmitting the target storage proof to the consensus device, the notification message notifying a user of the target device that the multimedia data has been successfully stored in the blockchain network and the data identifier of the multimedia data has been successfully transmitted to the consensus node,   wherein generating the target storage proof comprises:
 obtaining the data identifier of the multimedia data, and obtaining a node identifier of the target storage node; and 
 generating the target storage proof of the multimedia data based on the data identifier and the node identifier of the target storage node, and 
   wherein obtaining the data identifier of the multimedia data comprises:
 performing data analysis on the multimedia data to obtain data attribute information of the multimedia data; and 
 performing a hash operation on the data attribute information to obtain the data identifier of the multimedia data. 
   
     
     
         14 . The non-transitory computer-readable storage medium according to  claim 13 , wherein the performing data analysis on the multimedia data comprises at least one of the following:
 performing feature extraction processing on the multimedia data to obtain data features of the multimedia data, and adding the data features to the data attribute information of the multimedia data;   performing keyword extraction processing on the multimedia data to obtain keyword information of the multimedia data, and adding the keyword information to the data attribute information of the multimedia data; and   based the multimedia data being text, performing digest extraction processing on the multimedia data to obtain digest information of the multimedia data, and adding the digest information to the data attribute information of the multimedia data.

Join the waitlist — get patent alerts

Track US12572584B2 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.