WO2018137624A1 - 共享数据回收方法、装置、计算机设备及存储介质 - Google Patents
共享数据回收方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2018137624A1 WO2018137624A1 PCT/CN2018/073884 CN2018073884W WO2018137624A1 WO 2018137624 A1 WO2018137624 A1 WO 2018137624A1 CN 2018073884 W CN2018073884 W CN 2018073884W WO 2018137624 A1 WO2018137624 A1 WO 2018137624A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- node
- block height
- shared
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1474—Error detection or correction of the data by redundancy in operations in transactions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/18—Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
- G06F11/183—Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits by voting, the voting not being performed by the redundant components
- G06F11/184—Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits by voting, the voting not being performed by the redundant components where the redundant components implement processing functionality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting 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/6227—Protecting 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 where protection concerns the structure of data, e.g. records, types, queries
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0623—Securing storage systems in relation to content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0894—Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3236—Cryptographic 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 cryptographic hash functions
- H04L9/3239—Cryptographic 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 cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Definitions
- the present invention relates to the field of information technology, and in particular, to a shared data recovery method, apparatus, computer device, and storage medium.
- a blockchain refers to a block generated by a cryptographic method. For example, in the scenario of storing transaction information, when generating a block, it needs to be generated based on the data in the previous block and the current transaction information. The data in each block in the blockchain is associated with the data in the previous block. Therefore, it is impossible to tamper with the data on the block to ensure that any data on the block is public. Transparent, improve the security of transaction information.
- each node may jointly maintain a shared data based on the blockchain technology.
- For a node after generating new data, it may be generated based on the existing blockchain.
- the new block which sends the new block to other nodes in the data sharing system for storage, so that the same shared data is stored in each node. Since the data on the blockchain is transparent and difficult to be tampered with, data security and data consistency in the data sharing system can be guaranteed.
- the inventors have found that the related art has at least the following problems: as the data in the blockchain continues to increase, the storage space required for each node in the data sharing system to store shared data is increasing, making it high. In the frequency data generation environment, the amount of data shared data increases sharply, and the storage space required for each node to store shared data will rapidly expand, bringing pressure on each node in the data sharing system to store and share data. Therefore, it is urgent to A shared data recovery method that reduces node storage pressure in a data sharing system while ensuring security and data consistency.
- the present invention provides a shared data recovery method, device, computer device and storage medium. .
- a shared data recovery method is provided, where the method is applied to a first node, where the first node is an arbitrary node in a data sharing system, and the method includes:
- each node in the data sharing system When receiving the plurality of second feature values broadcast by the at least one second node, if the sharing stored by each node in the data sharing system is determined according to the first feature value and the plurality of second feature values And the data in the first block height range is consistent in the data, and the recycling indication information is broadcasted to the at least one second node, where each second feature value is used to uniquely indicate the shared data stored on the second node. Data within a block height range;
- the method provided by the embodiment of the present invention calculates the first feature value of the first node in the first block height range and the second feature value of the second node in the first block height range, and determines the node storage.
- the data in the height range of the first block in the shared data is consistent
- the data in the range of the first block in the shared data is recovered, which ensures the consistency and security of the data included in the block, and also reduces the data.
- a shared data collection device the device being applied to a first node, the first node being an arbitrary node in a data sharing system, the device comprising:
- a calculating module configured to acquire a first feature value of the first node when receiving the recycling request that carries the first block height, where the first feature value is used to uniquely indicate the shared data stored on the first node Data in the height range of the first block;
- a first broadcast module configured to broadcast the first feature value to at least one second node in the data sharing system, where the second node is a node other than the first node;
- a second broadcast module configured to: when receiving the plurality of second feature values broadcast by the at least one second node, determine the data sharing system according to the first feature value and the plurality of second feature values And the data in the first block height range in the shared data stored by each node is consistent, and the recycling indication information is broadcasted to the at least one second node, and each second feature value is used to uniquely indicate the second node. Data in the first block height range of the stored shared data;
- a recycling module configured to recover data in the first block height range in the shared data if a preset number of multiple recycling indication information is received.
- the device provided by the embodiment of the present invention calculates the first feature value of the first node in the first block height range and the second feature value of the second node in the first block height range, and determines the node storage.
- the data in the height range of the first block in the shared data is consistent
- the data in the range of the first block in the shared data is recovered, which ensures the consistency and security of the data included in the block, and also reduces the data.
- a computer device comprising a processor and a memory, the memory storing at least one instruction loaded by the processor and executed to implement the following method:
- a computer readable storage medium storing instructions stored by a processor in a terminal to perform a shared data recycling method described below is provided:
- FIG. 1A is a schematic diagram of a data sharing system according to an exemplary embodiment
- FIG. 1B is a schematic diagram of node storage in a data sharing system according to an exemplary embodiment
- FIG. 2A is a flowchart of a shared data recovery method according to an exemplary embodiment
- FIG. 2B is a schematic diagram of information transmission in a data sharing system according to an exemplary embodiment
- FIG. 2C is a flowchart of a shared data recovery method according to an exemplary embodiment
- FIG. 3A is a block diagram of a shared data recovery apparatus according to an exemplary embodiment
- FIG. 3B is a block diagram of a shared data recovery apparatus according to an exemplary embodiment
- FIG. 3C is a block diagram of a shared data recovery apparatus according to an exemplary embodiment
- FIG. 3D is a block diagram of a shared data recovery apparatus according to an exemplary embodiment
- FIG. 3E is a block diagram of a shared data recovery apparatus according to an exemplary embodiment
- FIG. 4 is a block diagram of a terminal 400 according to an exemplary embodiment
- FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
- the data sharing system 100 refers to a system for performing data sharing between a node and a node.
- the data sharing system may include N nodes 101, and the N nodes 101 may refer to any one of data sharing systems.
- Hardware such as a server or terminal, and a client for data sharing can be installed on the hardware, where N is a positive integer.
- Each node 101 can generate data while performing normal work and maintain shared data within the data sharing system based on the data.
- information connections may exist between each node in the data sharing system, and information can be transmitted between the nodes through the above information connection.
- all nodes in the data sharing system store the generated data as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
- the storage of the data by the foregoing node may be a process of storing the data to the blockchain after determining the consensus between the nodes based on the consensus algorithm, which is not described in the embodiment of the present invention.
- the data sharing system can be a trading system, and the trading system refers to a system for financial transactions.
- the trading system may include N nodes, each of which generates ledger data when conducting a transaction, and maintains a shared ledger within the trading system based on the ledger data.
- each node in the data sharing system there is a node identifier corresponding thereto, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so as to be subsequently determined according to the node identifiers of other nodes. Broadcast information to other nodes in the data sharing system.
- a node identifier list as shown in Table 1 can be maintained in each node, and the node name and the node identifier are correspondingly stored in the node identifier list.
- the node identifier may be an IP (Internet Protocol) protocol and any other information that can be used to identify the node. Table 1 only uses an IP address as an example for description.
- Each node in the data sharing system can be configured with one or more identical blockchains.
- a blockchain consists of multiple blocks, each of which stores different data.
- the data stored in all blocks on the blockchain constitutes the shared data of the node where the blockchain is located.
- the book data stored in the block includes the block height, the transferee address, Receiver address, amount, signature, public key, last message hash value and current information hash value.
- the block height is used to indicate the location of the current block in the blockchain in the trading system; the transferee address is used to indicate the originating address of the transaction recorded in the current block; the recipient address is used to indicate the current block
- the receiving address of the recorded transaction the amount refers to the transaction amount of the transaction recorded in the current block; the signature is used to identify the originating user of the transaction recorded in the current block, and the function is to distinguish the transaction initiated by different users; the public key is used to indicate and
- the node associated with the book data stored in the current block, the hash value of the previous message is the hash value generated by the previous block of the current block according to the stored book data. The hash value of this piece of information is the current block according to the currently stored book.
- the hash value generated by the data It should be noted that, when generating the current information hash value, the current block needs to generate all data in the account book data in the block, so that the current information hash value generated by the current block is related to the hash value of the previous information. Therefore, the purpose of concatenating the blocks in the blockchain is achieved, so that any falsification of the reconciliation data can be detected by the traceability of the block feature values, so that the shared account book is not easily falsified, and the sharing is ensured. The security of the books.
- the block height may be set in the block, and the block height is used to indicate the position of the current block in the blockchain. Since the block chains included in different nodes are the same, the blocks included in the block chain have the same block height in different nodes.
- the data sharing system can maintain the data information table and the MySQL (My Structure Quest Language) transaction.
- the data information table in the transaction system may be an account table, and the account table is used to store the detailed information in the account data stored in the block, the detailed information It refers to the outflow and flow direction of related transaction amount in the book data, including address information and amount information, and the address information and the amount information are generated according to the data in the MySQL transaction.
- the MySQL transaction includes the flow information, the update from address amount, and the update from address amount.
- the flow information is used to indicate the outflow and flow of the transaction amount, and the transfer can be based on the account data stored in the block.
- the person address and the recipient address are generated; the update from the address amount is used to indicate the amount of the transaction transferred out of the flow information, which can be generated according to the amount in the ledger data stored in the block; the update to address amount is used to indicate the transfer of the flow information.
- the transaction amount can also be generated based on the amount in the ledger data stored in the block.
- the address information and the amount information can be generated based on the update from address amount and the update from address amount.
- the data sharing system is a transaction system
- the shared data is a shared account book.
- the method is used in a transaction system.
- the transaction system includes N nodes, and the method includes the following steps.
- the first node may be any node in the transaction system
- the received recovery request may be from any node in the transaction system, which may be referred to as a second node in this embodiment, in order to reduce the transaction system.
- the middle node stores the pressure of sharing the ledger
- the second node may initiate the shared ledger recycling process.
- the first block height is determined according to the daily transaction information amount of the transaction system and the remaining storage space, and the second node carries the recovery of the first block height.
- the request is broadcast to a node other than the second node in the transaction system. Through this kind of broadcasting, all the nodes in the transaction system can receive the recycling request for unified data recovery and ensure data consistency.
- only the reclaiming request received by the first node is taken from the second node as an example, that is, the second node initiates the shared account book reclaiming process as an example for description.
- the reason for the second node to initiate the shared account book collection process may be multiple. For example, one reason may be that the second node initiates a shared account book collection process according to its actual storage condition, that is, the second node may pass the second The node stores the remaining storage space after the shared account is checked, so as to determine whether the shared account stored by the second node needs to be recycled, and if the shared account stored by the second node needs to be recycled, the shared account book collection process is initiated;
- the reason may be that the preset period or the preset data amount is set in the transaction system. When the second node detects the interval preset period or the data amount of the stored shared books reaches the preset data amount, the shared account book collection process is initiated. In order to keep the data in the transaction system consistent, the second node needs to send a recycle request to other nodes in the transaction system for the shared account book recovery. When the recovery request is generated, the following steps 1 and 2 can be implemented.
- Step 1 When the second node detects that the remaining storage space is smaller than the preset storage space, the first block height is determined according to the daily transaction information amount of the transaction system and the remaining storage space.
- the second node When the second node detects that the remaining storage space is smaller than the preset storage space, it means that as the amount of the book data increases, the second node generates a storage pressure for storing the shared book, and the storage pressure will gradually become more and more over time. The larger, therefore, in order to ensure the increase of the normal amount of ledger data for a period of time, consider the amount of daily transaction information and the remaining storage space based on the trading system to determine how much book data to recycle.
- the transaction system can count the amount of daily transaction information in the transaction system, count the amount of transaction information received by the daily trading system, and periodically send the statistically obtained daily transaction information amount to each node in the transaction system.
- the threshold value of the number of days may be set, and the threshold value of the day is multiplied by the amount of daily transaction information to obtain a storage space threshold value, and the storage is determined.
- the spatial difference between the spatial threshold and the remaining storage space, the spatial difference is taken as the data amount of the book data to be recovered, and the first block height is determined in the shared book according to the amount of data.
- the height of the first block carried in the recycling request substantially indicates a range, that is, the book data stored in the block of the first height in the blockchain to the middle of the height of the first block is recovered, and only the remaining The book data corresponding to the height of the first block and the book data of the block height after the first block height.
- the preset storage space may be the same or different for different nodes. If the storage capacity of each node is the same, and the remaining storage space after storing the same size shared account is the same, the same preset storage may be set for it. Space, and if the storage capacity between the nodes is different, the remaining storage space after storing the same size shared account will be different, you can set different preset storage space for it, so that the node can be based on its own The actual storage situation is used to initiate the shared ledger recycling process.
- the transaction may be performed.
- the preset first block height is obtained in the system, and the shared account book collection process is initiated based on the preset first block height, and the first block height is determined without performing the above-mentioned daily transaction information amount and remaining storage space according to the transaction system. the process of.
- Step 2 The second node broadcasts a recycling request carrying the first block height to at least one first node in the transaction system.
- the second node When the first block height is determined, the second node generates a recycle request based on the first block height, so that the first block height is carried in the recycle request. At the same time, the recycling request carrying the second block height is broadcasted to other nodes in the transaction system according to the node identifiers of the other nodes.
- the process of generating the recovery request may be that the second node detects that the remaining storage space is smaller than the preset storage space, or detects an interval preset period, or detects that the data amount of the shared account stored by the second node reaches
- the recovery request is automatically generated and sent, and the staff may determine that the remaining storage space of the second node is smaller than the preset storage space, or the interval preset period is detected, or the storage of the second node is detected.
- the amount of data of the shared ledger reaches a preset amount of data, and is triggered by a staff member to generate and send a reclaiming request, which is not specifically limited in the present invention.
- the initiating recovery may also be a control node in at least one second node in the transaction system, and the control node may detect that the remaining storage space of the multiple nodes is smaller than the preset storage space, or detect an interval preset period, Or when it is detected that the data amount of the shared ledger stored by the multiple nodes reaches the preset data amount, trigger generation and send a recycle request.
- the reclaiming request received by the first node is taken from the second node as an example, since the first node and the second node are two nodes in the transaction system having the accounting function, therefore, A node can also initiate a shared ledger reclamation process.
- the following description is only taken as an example in which the first node initiates the shared account book collection process.
- the reason why the first node initiates the shared account book collection process may be multiple. For example, one reason may be that the first node initiates a shared account book collection process according to its actual storage condition, that is, the first node may pass the first The node stores the remaining storage space after the shared account book is detected, so as to determine whether the shared account book stored by the first node needs to be recycled, and if the shared account book stored by the first node needs to be recycled, the shared account book collection process is initiated; The reason may be that a preset period or a preset data amount is set in the transaction system. When the first node detects the interval preset period or the data amount of the stored shared books reaches the preset data amount, the shared account book collection process is initiated. In order to keep the data in the transaction system consistent, the first node needs to send a recycle request to other nodes in the transaction system for the shared account book recovery. When the recovery request is generated, the following steps 1 and 2 can be implemented.
- Step 1 When the first node detects that the remaining storage space is smaller than the preset storage space, the second block height is determined according to the daily transaction information amount of the transaction system and the remaining storage space. It can be understood that the amount of daily shared information of the data sharing system includes the amount of daily transaction information of the trading system.
- the first node When the first node detects that the remaining storage space is smaller than the preset storage space, it means that as the amount of the book data increases, the first node generates a storage pressure for storing the shared book, and the storage pressure will gradually become more and more over time. The larger, therefore, in order to ensure the increase of the normal amount of ledger data for a period of time, consider the amount of daily transaction information and the remaining storage space based on the trading system to determine how much book data to recycle.
- the transaction system can count the amount of daily transaction information in the transaction system, count the amount of transaction information received by the daily trading system, and periodically send the statistically obtained daily transaction information amount to each node in the transaction system.
- the threshold value of the number of days may be set, and the threshold value of the day is multiplied by the amount of daily transaction information to obtain a storage space threshold value, and the storage is determined.
- the spatial difference between the space threshold and the remaining storage space, the spatial difference is used as the data amount of the book data to be recovered, and the second block height is determined in the shared book according to the amount of data.
- the height of the second block carried in the recycling request substantially indicates a range, that is, the book data stored in the block of the first height in the block chain to the middle of the height of the second block needs to be recovered. Only the book data corresponding to the second block height and the book data of the block height after the second block height remain.
- the preset storage space may be the same or different for different nodes. If the storage capacity of each node is the same, and the remaining storage space after storing the same size shared account is the same, the same preset storage may be set for it. Space, and if the storage capacity between the nodes is different, the remaining storage space after storing the same size shared account will be different, you can set different preset storage space for it, so that the node can be based on its own The actual storage situation is used to initiate the shared ledger recycling process.
- a preset period or a preset data amount is set in the transaction system, when the first node detects the interval preset period or the data amount of the stored shared account book reaches or exceeds the preset data amount, Obtaining a preset second block height in the transaction system, and initiating a shared account book collection process based on the preset second block height, determining the second area without performing the above-mentioned daily transaction information amount and remaining storage space according to the transaction system The process of block height.
- step 1 when it is detected that the remaining storage space of the first node is smaller than the preset storage space, determining the number according to the daily shared information amount of the data sharing system and the remaining storage space.
- the height of the second block may be determined according to the amount of daily shared information of the data sharing system, and may be determined by detecting the amount of data of the currently stored shared data is greater than the preset data.
- the quantity is determined according to the amount of daily shared information of the data sharing system.
- Step 2 The first node broadcasts a recycling request carrying the second block height to at least one second node in the transaction system.
- the first node When the second block height is determined, the first node generates a recycle request based on the second block height, so that the second block height is carried in the recycle request. At the same time, the recycling request carrying the second block height is broadcasted to other nodes in the transaction system according to the node identifiers of the other nodes.
- the foregoing process of generating a reclaiming request may be that the first node detects that the remaining storage space is smaller than a preset storage space, or detects an interval preset period, or detects that the data amount of the shared account stored by the first node reaches
- the trigger is automatically generated and sent, and the remaining storage space of the first node is determined to be smaller than the preset storage space, or an interval preset period is detected, or the first node is detected.
- the amount of data of the shared ledger reaches a preset amount of data, and is triggered by a staff member to generate and send a reclaiming request, which is not specifically limited in the present invention.
- the initiating recovery may also be a control node in at least one first node in the transaction system, and the control node may detect that the remaining storage space of the plurality of nodes is smaller than a preset storage space, or detect an interval preset period, Or when it is detected that the data amount of the shared ledger stored by the multiple nodes reaches the preset data amount, trigger generation and send a recycle request.
- the first node determines the account book data in the range of the first block to be recovered in the shared ledger.
- the block height in the block included in the blockchain is continuous.
- the first node may determine, in its stored blockchain, the book data included in the block height range from the block height of the first block to the height of the first block .
- the height of the first block in the blockchain is Height (1)
- the block height of the second block is Height(2)
- the block height of the third block is Height(3)
- the block height of the fourth block is Height(4)
- the block height of the fifth block is Height(5)
- the height of the first block can be Height(3)
- a node can determine, in the blockchain of the shared ledger, that the book data to be recovered is stored in the block indicated by the block heights Height(1) to Height(3) according to the first block height Height(3).
- the book data is also the book data included in the block with the block height of Height (1) and the book data included in the block with the block height of Height (2) as the book data to be recovered.
- the first feature value is used to uniquely indicate the data in the first block height range of the shared data stored on the first node.
- the first feature value is shared by the first node.
- the ledger data is obtained within the height of the first block in the ledger.
- the foregoing step 201 to step 203 are actually a process in which the first node acquires the first feature value of the first node when receiving the recovery request carrying the first block height.
- the hash algorithm is used as an example.
- the first feature value may be a hash value of the book data in the height range of the first block, and may be implemented by other algorithms in the process of actual application. This is not specifically limited.
- the first node broadcasts the first feature value to N-1 second nodes in the transaction system.
- the second node is a node other than the first node, and since the first node is an arbitrary node in the transaction system, when the first node obtains the first feature value, the other N-1 pieces are obtained.
- the first feature value may be sent to the N-1 second nodes in a manner of sending in sequence. The specific sending manner is not limited in the embodiment of the present invention.
- the second node when the second node receives the reclaim request carrying the first block height, the second node may also generate the second feature based on the first block height in the reclaim request. Value and broadcast in the trading system.
- the first node receives N-1 second feature values broadcast by the N-1 second nodes.
- Each of the second eigenvalues is used to uniquely indicate the data in the first block height range of the shared data stored on the second node; in the embodiment of the present invention, the second eigenvalue broadcasted by the second node may be the first The eigenvalue of the ledger data within the first block height range in the shared ledger stored by the two nodes.
- the following steps that need to be performed may be determined based on the consensus algorithm.
- the consensus algorithm is used to determine whether the data stored in multiple nodes in the system are consistent, and determine whether there is an abnormality in the current system according to the number of nodes in which the stored data is consistent.
- the consensus algorithm may be a BFT (Byzantine Fault Tolerance), and a PBFT (Practical Byzantine Fault Tolerance) may be used. The present invention does not specifically limit this. In this way, the consensus algorithm can use the 3F+1 mechanism to determine whether the number of equal feature values reaches a preset number among the plurality of second feature values.
- F is the number of nodes that can be fault-tolerant in the current trading system, which can be preset.
- the number of equal feature values included in the first feature value and the plurality of second feature values mentioned above reaches a preset number, that is, represents that the first feature value and the plurality of second feature values are equal.
- the number of eigenvalues reaches a preset number.
- the preset number is 3, if the first eigenvalue of the first node is 1F8359E, the second eigenvalue received by the first node is four, respectively, 1F84678E, 1F8359E, 1F8359E, 1F8359E, there are four 1F8359E among the first feature value and the four second feature values, so that the first node can consider that the number of equal feature values in the first feature value and the plurality of second feature values reaches the preset
- the number that is, the number of occurrences of 1F8359E reaches 3 times, determines that the book data of the shared books stored by the nodes in the transaction system is consistent.
- the number of equal feature values included in the first feature value and the plurality of second feature values does not reach a preset number, it is determined that there are more nodes in which the book data of the shared book stored by the node in the transaction system is inconsistent, resulting in a transaction system There is an error in it, and the transaction system needs to be repaired, that is, the following step 208 is performed.
- the process of determining whether the number of equal feature values included in the first feature value and the plurality of second feature values reaches a preset number is substantially determining that the first feature value and the plurality of second feature values are included Whether the maximum number of equal feature values reaches a preset number. For example, if the first characteristic value of the first node is 1F8359E, six second eigenvalues are received, and the six second eigenvalues are 1F84678E, 1F84678E, 1F8359E, 1F8359E, 1F8359E, 1F1248E, then the second second eigenvalues.
- the first node only needs to be at the first eigenvalue and It is sufficient to determine whether the number of feature values equal to 1F8359E reaches a preset number among the second feature values, and it is not necessary to determine whether the number of feature values equal to 1F84678E reaches a preset number.
- the execution order of the foregoing step 204 and step 205 is in no particular order, that is, the first node may first broadcast the first feature value to N-1 second nodes in the transaction system, or may receive N- first.
- the N-1 second eigenvalues broadcast by the second node may also perform the foregoing steps 204 and 205 at the same time, which is not specifically limited by the present invention.
- the N-1 second nodes When the first node receives the reclaiming request carrying the first block height, the N-1 second nodes also receive the reclaiming request, and perform the above steps 201 to 205, so the first node can receive the N. - A second eigenvalue sent by the second node.
- the process shown in the above step 205 is actually a process of determining whether the book data of the shared book stored by each node in the transaction system is consistent according to the first feature value and the plurality of second feature values, to determine whether the subsequent need to
- the at least one second node broadcasts the reclaim indication information to ensure that the shared ledger is reclaimed only when the account books of the shared accounts stored by the nodes in the transaction system are consistent, thereby ensuring the account book data of the shared accounts stored by the nodes in the transaction system. Consistency and security.
- the first node determines the first block height in the shared book stored by each node in the transaction system. If the accounting data in the range is consistent, the recycling indication information is broadcast to the N-1 second nodes, and the recycling indication information is used to instruct the node to collect the accounting data in the first block height range.
- the reclaim indication information is broadcast to the N-1 second nodes, so that the N-1 second nodes perform the reclaiming operation on the shared ledger.
- the process of broadcasting the indication information is consistent with the foregoing process of broadcasting the first feature value to the N-1 second nodes in the transaction system, and details are not described herein.
- each node of the N-1 second nodes since there is an information connection between all the nodes in the transaction system, each node of the N-1 second nodes also receives the recovery request sent by other nodes, and performs the above. Step 201 to step 205, so that each of the N-1 second nodes needs to determine that the book data of the shared books stored by each node in the transaction system is consistent according to the second feature value sent by the other nodes.
- the recycling indication information is broadcast to other nodes of the transaction system. For any node in the trading system, only when it determines that the feature value generated by itself is equal to the second feature value sent by other nodes received and the number of feature values is equal to a preset number, it will be sent to other nodes in the trading system.
- the account data in the first block height range in the shared ledger is recovered.
- the first node if the first node receives the preset number of collection indication information, it indicates that the shared account book can be currently reclaimed, so that the first node will determine the first block height in the shared account book.
- the book data to be recovered is recycled.
- the process of recovering data mentioned in the embodiment of the present invention is essentially a process of data transfer of data to be recovered, and the specific process is to determine a preset first storage location, and the first zone is to be shared data.
- the block-determined data to be recovered is transferred to the first storage location. Since this part of the data may not be accessed frequently, the process can also be regarded as a process of data cold standby. Further, after the recovery, the current block feature value of the block corresponding to the first block height may be reserved on the first node, so that when the data to be restored or traced needs to be restored later, the first block may be reserved.
- the block height is obtained by corresponding to the current block feature value of the block, and the transferred recovered book data is also acquired at the first storage location, thereby further ensuring data security and reducing the pressure on the first node to store the shared data.
- each of the N-1 second nodes can also receive multiple collection indication information broadcasted by other nodes in the transaction system.
- the received collection indication information reaches a preset number, retrieve the data to be recovered determined according to the first block height in the shared ledger, so that the shared data stored by the nodes in the data sharing system can maintain the consistency of the data in the shared data after performing the shared data recovery. And security.
- the first node determines a target feature value in the first feature value and the at least one second feature value,
- the target feature value is a feature value other than the feature value of the at least one second feature value that is equal to the first feature value, and sends an error message to the designated second node for notifying the designated second node of the stored value.
- An error occurs in the shared data, and the designated second node is the second node that transmits the target feature value.
- the target feature value in the target feature value refers to the feature value of the second feature value that is not equal to the first feature value, and sends an error message to the designated second node as an example, and in the process of actual application, the transaction
- Each node in the system sends an error message to the designated second node after determining the target feature value of the first feature value and the at least one second feature value.
- the error message sent to the designated node may carry an error prompt.
- the second node is designated to obtain an error message in the error message, and determine The book data in the currently stored shared book is inconsistent with the book data of the shared book stored by other nodes in the transaction system, and the shared book is obtained from other nodes, and the currently stored shared book is replaced, so that the currently stored shared book is The shared accounts stored by other nodes in the trading system are consistent, and the repair of the trading system is realized.
- the nodes in the transaction system can be divided into a billing node and a non-billing node, and the billing node is used to store the shared ledger in the trading system, and continuously updates the shared ledger according to the transaction information received by the trading system every day;
- the accounting node is used to store the mirrored data of the shared ledger, that is, the shared ledger is backed up, and the data content of the mirrored data is used to indicate the data change of the shared ledger.
- the shared accounting book may also be stored in the non-billing node, which is not specifically limited in the present invention.
- the foregoing steps 201 to 208 are steps that need to be performed when the first node is a billing node, that is, only the shared account book is stored in the first node; and when the first node is a non-accounting node,
- the mirrored data of the shared ledger and the shared ledger may be stored in a node at the same time.
- the following steps 209 and 210 may be performed.
- the first node that stores the mirrored data may perform the recovery of the shared ledger in the foregoing step 207, and then perform the following steps 209 and 210; or for consistency of data.
- the above-mentioned step 207 and the following steps 209 and 210 are performed at the same time, and the present invention does not specifically limit this.
- the first node receives the multiple collection indication information broadcast by the N-1 second nodes, determining the mirror data in the first block height range from the mirror data of the shared data.
- the change process of the shared ledger stored by the node in the transaction system is recorded in the mirror data, that is, only the current status of the user account involved in the ledger data included in the shared ledger is recorded, and the mirrored data is recorded.
- the first node may store the mirrored data of the shared ledger and the shared ledger, so that the mirrored data to be recovered may be determined according to the first block height in the mirrored data of the shared ledger.
- the process of determining the mirror data to be recovered is consistent with the process of determining the account data to be recovered in the foregoing step 202, and details are not described herein.
- the first node acquires a second feature value of the mirror data in the first block height range, and recovers the mirror data in the first block height range from the mirror data of the shared data, and stores the second feature value to In the remaining mirror data.
- the first node according to the first block height carried in the recycling request because the mirror data is generated, the mirror data corresponding to the different blocks is also distinguished based on the block height, and the mirrors corresponding to the different blocks are mirrored.
- the block height of the data is consistent with the block height in the shared book, so in the mirror data, the second feature value in the first block height range can be obtained according to the first block height.
- the process of obtaining the second feature value is consistent with the process of obtaining the first feature value, and details are not described herein.
- the first node After determining the second feature value of the mirror data in the first block height range according to the first block height, the first node recovers the mirror data in the first block height range from the mirrored data of the shared book. .
- the process of recovering the mirrored data is consistent with the process of recovering the reconciliation data, that is, determining a preset second storage location, and transferring the mirrored data in the first block height range to the second storage location, because the partial mirror image Data may not be accessed frequently, so the process can be seen as a process of data cold standby, leaving only mirrored data outside the height of the first block.
- the second feature value may be stored in the remaining mirror data on the first node, so that when the subsequent restored mirror data needs to be restored or traced, the second feature value may be acquired based on the retained second feature value, or The second storage location acquires the transferred mirrored data, further ensuring the security of the mirrored data, and reducing the pressure on the first node to store the mirrored data.
- the block height of the first block in the blockchain is Height (1)
- the block height of the second block is Height(2)
- the block height of the third block is Height(3)
- the block height of the fourth block is Height(4)
- the block height of the fifth block is Height(5), according to the first block.
- the block height Height(3) determines the mirror data to be recovered in the mirror data, that is, the mirror data corresponding to the block indicated by the block heights Height(1) to Height(3), according to the block height Height(1)
- the second eigenvalue generated by the mirror data corresponding to the block indicated by Height(3) is 1F84678E, and the mirror data in the range of Height(1) to Height(3) is recovered, that is, Height(1) to Height are also obtained.
- the mirror data in the range is deleted, and only the mirror data corresponding to Height(3) and the mirror data after Height(3) are retained, and 1F84678E is stored to the position corresponding to Height(3).
- the purpose of the collection of the shared data is to expand the remaining storage space of the node, and the specific implementation manner may be various.
- the data is transferred, thereby expanding the remaining The purpose of the storage space, but in fact, the data can be compressed to reduce its storage volume, thereby expanding the remaining storage space.
- the first feature of the first node in the first block height range can be calculated.
- the method provided by the embodiment of the present invention calculates the first feature value of the first node in the first block height range and the second feature value of the second node in the first block height range, and determines the node storage.
- the data in the height range of the first block in the shared data is consistent
- the data in the range of the first block in the shared data is recovered, which ensures the consistency and security of the data included in the block, and also reduces the data.
- determining whether the number of equal feature values included in the first feature value and the plurality of second feature values reaches a preset number determining, by using each node in the data sharing system, And the data of the shared data is consistent, and the recycling indication information is broadcasted to the at least one second node, so that the at least one second is only reached when the number of equal feature values included in the first feature value and the plurality of second feature values reaches a preset number
- the node broadcasts the recycling indication information to ensure that the shared data stored by the node is consistent and secure when it is recycled.
- determining the second block height according to the daily shared information amount of the data sharing system and the remaining storage space, and carrying the second The block height recovery request is broadcast to at least one second node in the data sharing system, so that when it is detected that the node has the pressure to store the shared data, the shared data can be immediately requested to be recovered, thereby reducing the actual pressure on the node to store the shared data.
- the mirror data in the first block height range is determined from the mirror data of the shared data, and the first region is obtained.
- the second characteristic value of the mirror data in the block height range, from the mirror data of the shared data, the mirror data in the height range of the first block is recovered, and the second feature value is stored in the remaining mirror data, so that the shared data is
- the mirrored data can also be recovered according to the first block height, further reducing the pressure on the node to store shared data.
- FIG. 3A is a block diagram of a shared data recovery apparatus, according to an exemplary embodiment.
- the apparatus includes a calculation module 301, a first broadcast module 302, a second broadcast module 303, and a recycle module 304.
- the calculating module 301 is configured to acquire a first feature value of the first node when receiving the recycling request carrying the first block height, where the first feature value is used to uniquely indicate the storage on the first node Sharing data in the first block height range of the data;
- the first broadcast module 302 is configured to broadcast the first feature value to at least one second node in the data sharing system, where the second node is a node other than the first node;
- the second broadcast module 303 is configured to: when receiving the plurality of second feature values broadcast by the at least one second node, determine, according to the first feature value and the plurality of second feature values, the storage by each node in the data sharing system And the data in the first block height range of the shared data is consistent, and the recycling indication information is broadcast to the at least one second node, where each second feature value is used to uniquely indicate the first block in the shared data stored on the second node. Data within the height range;
- the recovery module 304 is configured to recover data in a range of a first block height in the shared data if a preset number of multiple collection indication information is received.
- An apparatus by calculating a first feature value of a first node in a first block height range and a second feature value of a second node in a first block height range, and determining the node storage
- the data in the height range of the first block in the shared data is consistent
- the data in the range of the first block in the shared data is recovered, which ensures the consistency and security of the data included in the block, and also reduces the data.
- the calculation module 301 includes an extraction sub-module 3011, a determination sub-module 3012, and a calculation sub-module 3013.
- the extraction submodule 3011 is configured to extract a first block height in the recycling request
- the determining sub-module 3012 is configured to determine, in the shared data, data in a range of heights of the first block to be recovered according to the first block height;
- the calculation sub-module 3013 is configured to perform eigenvalue calculation on the data in the first block height range based on the hash algorithm to obtain the first feature value of the first node.
- the second broadcast module 304 is configured to determine, when the number of equal feature values included in the first feature value and the plurality of second feature values reaches a preset number, determine each node in the data sharing system. The data in the stored shared data in the range of the first block height is consistent, and the recycling indication information is broadcast to the at least one second node.
- the apparatus further includes a retention module 305.
- the reservation module 305 is configured to retain a current block feature value of the block corresponding to the first block height.
- the apparatus further includes a third broadcast module 306.
- the third broadcast module 306 is configured to determine a second block height according to the daily shared information amount and the remaining storage space of the data sharing system when detecting that the remaining storage space of the first node is smaller than the preset storage space;
- the second block height recovery request is broadcast to at least one second node in the data sharing system; or, every preset period, the second block height is determined according to the daily shared information amount of the data sharing system;
- the block height recovery request is broadcast to at least one second node in the data sharing system; or, when it is detected that the data amount of the currently stored shared data is greater than the preset data amount, determining according to the daily shared information amount of the data sharing system a second block height; broadcasting a recycle request carrying the second block height to at least one second node in the data sharing system.
- the apparatus further includes a determination module 307 and an acquisition module 308.
- the determining module 307 is configured to: if the multiple pieces of the recycling indication information broadcast by the at least one second node are received, determine the mirrored data in the first block height range from the mirrored data of the shared data;
- the obtaining module 308 is configured to acquire a second feature value of the mirror data in the first block height range
- the recovery module 304 is further configured to recover mirror data in a range of a first block height from the mirror data of the shared data, and store the second feature value in the remaining mirror data.
- the method provided by the embodiment of the present invention may be applied to any node in a data sharing system, where the node may be any type of computer device, the computer device includes a processor and a memory, and the memory stores at least one instruction.
- the instructions are loaded and executed by the processor to implement the following method:
- the instructions are also used by the processor to load and execute to implement the following method:
- the instructions are also used by the processor to load and execute to implement the following method:
- the instructions are also used by the processor to load and execute to implement the following method:
- the current block feature value of the block corresponding to the first block height is reserved.
- the instructions are also used by the processor to load and execute to implement the following method:
- determining a second block height according to the daily shared information amount of the data sharing system and the remaining storage space determining a second block height according to the daily shared information amount of the data sharing system and the remaining storage space; a block height recovery request is broadcast to a computer device other than the computer device in the data sharing system; or
- the instructions are also used by the processor to load and execute to implement the following method:
- the mirrored data in the first block height range is recovered, and the second feature value is stored in the remaining mirrored data.
- the above-mentioned computer device as a node may be in the form of a terminal, such as the terminal 400 shown in FIG. 4, or may be in the form of a server, such as the server 500 shown in FIG.
- FIG. 4 is a block diagram of a terminal 400, according to an exemplary embodiment.
- the terminal 400 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
- the terminal 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an I/O (Input/Output) interface 412, Sensor component 414, and communication component 416.
- a processing component 402 a memory 404
- a power component 406 a multimedia component 408, an audio component 410
- an I/O (Input/Output) interface 412 an I/O (Input/Output) interface 412
- Sensor component 414 the terminal 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an I/O (Input/Output) interface 412, Sensor component 414, and communication component 416.
- I/O Input/Output
- Processing component 402 typically controls the overall operation of terminal 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
- Processing component 402 can include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above.
- processing component 402 can include one or more modules to facilitate interaction between component 402 and other components.
- processing component 402 can include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
- Memory 404 is configured to store various types of data to support operation at terminal 400. Examples of such data include instructions for any application or method operating on terminal 400, contact data, phone book data, messages, pictures, videos, and the like.
- the memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as SRAM (Static Random Access Memory), EEPROM (Electrically-Erasable Programmable Read-Only Memory) Erasable Programmable Read Only Memory (EPROM), PROM (Programmable Read-Only Memory), ROM (Read-Only Memory, Read only memory), magnetic memory, flash memory, disk or optical disk.
- SRAM Static Random Access Memory
- EEPROM Electrically-Erasable Programmable Read-Only Memory
- EPROM Erasable Programmable Read Only Memory
- PROM Programmable Read-Only Memory
- ROM Read-Only Memory, Read only memory
- magnetic memory flash memory, disk or optical disk.
- Power component 406 provides power to various components of terminal 400.
- Power component 406 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 400.
- the multimedia component 408 includes a screen between the terminal 400 and the user that provides an output interface.
- the screen may include an LCD (Liquid Crystal Display) and a TP (Touch Panel). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
- the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
- the multimedia component 408 includes a front camera and/or a rear camera. When the terminal 400 is in an operation mode such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
- the audio component 410 is configured to output and/or input an audio signal.
- the audio component 410 includes a MIC (Microphone) that is configured to receive an external audio signal when the terminal 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
- the received audio signal may be further stored in memory 404 or transmitted via communication component 416.
- audio component 410 also includes a speaker for outputting an audio signal.
- the I/O interface 412 provides an interface between the processing component 402 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
- Sensor assembly 414 includes one or more sensors for providing terminal 400 with various aspects of status assessment.
- sensor component 414 can detect an open/closed state of device 400, a relative positioning of components, such as a display and a keypad of terminal 400, and sensor component 414 can also detect a change in position of a component of terminal 400 or terminal 400, the user The presence or absence of contact with the terminal 400, the orientation or acceleration/deceleration of the terminal 400 and the temperature change of the terminal 400.
- Sensor assembly 414 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
- Sensor assembly 414 may also include a light sensor, such as a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-coupled Device) image sensor for use in imaging applications.
- the sensor assembly 414 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
- Communication component 416 is configured to facilitate wired or wireless communication between terminal 400 and other devices.
- the terminal 400 can access a wireless network based on a communication standard such as WiFi, 2G or 3G, or a combination thereof.
- communication component 416 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
- the communication component 416 further includes an NFC (Near Field Communication) module to facilitate short range communication.
- the NFC module can be based on RFID (Radio Frequency Identification) technology, IrDA (Infra-red Data Association) technology, UWB (Ultra Wideband) technology, BT (Bluetooth) technology and Other technologies to achieve.
- the terminal 400 may be configured by one or more ASICs (Application Specific Integrated Circuits), DSP (Digital Signal Processor), DSPD (Digital Signal Processor Device). Device), PLD (Programmable Logic Device), FPGA (Field Programmable Gate Array), controller, microcontroller, microprocessor or other electronic component implementation for performing the above Shared data recycling method.
- ASICs Application Specific Integrated Circuits
- DSP Digital Signal Processor
- DSPD Digital Signal Processor Device
- PLD Programmable Logic Device
- FPGA Field Programmable Gate Array
- controller microcontroller, microprocessor or other electronic component implementation for performing the above Shared data recycling method.
- a non-transitory computer readable storage medium comprising instructions, such as a memory 404 comprising instructions executable by the processor 420 of the terminal 400 to perform the above method.
- the non-transitory computer readable storage medium may be a ROM, a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, and optical data. Storage devices, etc.
- FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
- the server 500 may generate a large difference due to different configurations or performances, and may include one or More than one central processing unit (CPU) 501 and one or more memories 502, wherein the memory 502 stores at least one instruction, the at least one instruction being loaded and executed by the processor 501 to implement The shared data recovery method provided by the foregoing various method embodiments.
- the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface for input and output.
- the server may also include other components for implementing the functions of the device, and details are not described herein.
- a computer readable storage medium such as a memory comprising instructions executable by a processor in a terminal to perform the shared data recovery method of the above embodiments.
- the computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Power Engineering (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种共享数据回收方法、装置、计算机设备及存储介质,属于信息技术领域。所述方法包括:当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值(201-203);将第一特征值广播至数据共享系统中的至少一个第二节点(204);如果根据第一特征值和多个第二特征值确定数据共享系统内各个节点所存储的共享数据的数据一致,则向至少一个第二节点广播回收指示信息(206);如果接收到由预设数目的多个回收指示信息,对共享数据中第一区块高度范围内的数据进行回收(207)。通过判断第一特征值和第二特征值是否一致,对共享数据进行回收,保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
Description
本申请要求于2017年1月24日提交中国国家知识产权局、申请号为2017100551116、发明名称为“共享数据回收方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及信息技术领域,特别涉及一种共享数据回收方法、装置、计算机设备及存储介质。
随着信息技术的发展,区块链作为一项全新的技术得到大力的发展。区块链技术脱胎于2008年出现的比特币技术,是比特币的底层技术。区块链是指一串使用密码学方法相关联产生的区块,例如,在存储交易信息的场景下,在生成区块时,需要基于上一个区块中的数据和当前交易信息生成,这样便使得区块链中每个区块中的数据均与上一个区块中的数据存在关联,因此,无法通过篡改区块上的数据来进行作弊,能够确保区块上的任何数据均是公开透明的,提高了交易信息的安全性。
近年来,由于区块链在生成共享数据时的安全性,因此区块链技术被频繁应用于诸如金融领域等需要将数据共享,同时还需要保障共享数据安全的领域中。在实施时,数据共享系统中可以存在多个节点,各个节点可以基于区块链技术共同维护一个共享数据,对于一个节点来说,在生成新的数据后,可以基于已有的区块链生成新的区块,该节点会将新的区块发送给数据共享系统中的其他节点进行存储,这样每个节点中均存储有相同的共享数据。由于区块链上的数据是公开透明的且难以被篡改,可以保证数据共享系统中数据的安全性和数据一致性。
在实现本发明的过程中,发明人发现相关技术至少存在以下问题:随着区块链中的数据不断增加,数据共享系统中每个节点存储共享数据所需的存储空 间不断增长,使得在高频的数据生成环境下,共享数据的数据量急剧增加,每个节点存储共享数据所需的存储空间会急剧膨胀,给数据共享系统中每个节点带来存储共享数据的压力,因此亟需一种能够在保证安全性和数据一致性的同时,降低数据共享系统中节点存储压力的共享数据回收方法。
发明内容
为了在保证区块链中包括的数据具有一致性和安全性的前提下,也降低数据共享系统中节点存储共享数据的压力,本发明提供一种共享数据回收方法、装置、计算机设备及存储介质。
根据本发明实施例的一方面,提供一种共享数据回收方法,所述方法应用于第一节点,所述第一节点为数据共享系统中的任意节点,所述方法包括:
当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值,所述第一特征值用于唯一指示所述第一节点上所存储的共享数据中第一区块高度范围内的数据;
将所述第一特征值广播至所述数据共享系统中的至少一个第二节点,所述第二节点为所述第一节点以外的节点;
当接收到所述至少一个第二节点广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播回收指示信息,每个第二特征值用于唯一指示第二节点上所存储的共享数据中第一区块高度范围内的数据;
如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
本发明实施例提供的方法,通过计算第一节点在第一区块高度范围内的第一特征值和第二节点在第一区块高度范围内的第二特征值,并在确定节点存储的共享数据中第一区块高度范围内的数据一致时,再对共享数据中第一区块高度范围内的数据进行回收,既保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
根据本公开实施例的一方面,提供一种共享数据回收装置,所述装置应用于第一节点,所述第一节点为数据共享系统中的任意节点,所述装置包括:
计算模块,用于当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值,所述第一特征值用于唯一指示所述第一节点上所存储的共享数据中第一区块高度范围内的数据;
第一广播模块,用于将所述第一特征值广播至所述数据共享系统中的至少一个第二节点,所述第二节点为所述第一节点以外的节点;
第二广播模块,用于当接收到所述至少一个第二节点广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播回收指示信息,每个第二特征值用于唯一指示第二节点上所存储的共享数据中第一区块高度范围内的数据;
回收模块,用于如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
本发明实施例提供的装置,通过计算第一节点在第一区块高度范围内的第一特征值和第二节点在第一区块高度范围内的第二特征值,并在确定节点存储的共享数据中第一区块高度范围内的数据一致时,再对共享数据中第一区块高度范围内的数据进行回收,既保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
根据本公开实施例的一方面,提供一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现下述方法:
当接收到携带第一区块高度的回收请求时,获取所述计算机设备的第一特征值,所述第一特征值用于唯一指示所述计算机设备上所存储的共享数据中第一区块高度范围内的数据;
将所述第一特征值广播至所述数据共享系统中所述计算机设备以外的计算机设备;
当接收到所述计算机设备以外的计算机设备广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个计算机设备所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述计算机设备以外的至少一个计算机设备广播回收指示信息,每个第二特征值用于唯一指示所述计算机设备以外的计算机设备上所存储的共享数据中第一 区块高度范围内的数据;
如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
根据本公开实施例的一方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有指令,所述指令可由终端中的处理器执行以完成下述共享数据回收方法:
当接收到携带第一区块高度的回收请求时,获取终端的第一特征值,所述第一特征值用于唯一指示所述终端上所存储的共享数据中第一区块高度范围内的数据;
将所述第一特征值广播至所述数据共享系统中所述终端以外的终端;
当接收到所述终端以外的终端广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个终端所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述终端以外的终端广播回收指示信息,每个第二特征值用于唯一指示所述终端以外的终端上所存储的共享数据中第一区块高度范围内的数据;
如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
图1A是根据一示例性实施例示出的一种数据共享系统的示意图;
图1B是根据一示例性实施例示出的一种数据共享系统中节点存储的示意图;
图2A是根据一示例性实施例示出的一种共享数据回收方法的流程图;
图2B是根据一示例性实施例示出的一种数据共享系统中信息传输的示意图;
图2C是根据一示例性实施例示出的一种共享数据回收方法的流程图;
图3A是根据一示例性实施例示出的一种共享数据回收装置的框图;
图3B是根据一示例性实施例示出的一种共享数据回收装置的框图;
图3C是根据一示例性实施例示出的一种共享数据回收装置的框图;
图3D是根据一示例性实施例示出的一种共享数据回收装置的框图;
图3E是根据一示例性实施例示出的一种共享数据回收装置的框图;
图4是根据一示例性实施例示出的一种终端400的框图;
图5是本发明实施例提供的一种服务器的结构示意图。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
在对本发明进行详细的解释说明之前,先对本发明实施例涉及的数据共享系统进行简单的介绍。
参见图1A,数据共享系统100是指用于进行节点与节点之间数据共享的系统,该数据共享系统中可以包括N个节点101,该N个节点101可以是指数据共享系统中的任一硬件,例如服务器或终端,而在硬件上可以安装有用于进行数据共享的客户端,其中,N为正整数。每个节点101可以在进行正常工作时生成数据,并基于数据维护该数据共享系统内的共享数据。为了保证数据共享系统内的信息互通,数据共享系统中的每个节点之间可以存在信息连接,节点之间可以通过上述信息连接进行信息传输。例如,当数据共享系统中的任意节点生成数据时,数据共享系统中的全部节点便将生成的数据作为共享数据中的数据进行存储,使得数据共享系统中全部节点上存储的数据均一致。需要说明的是,上述节点对数据的存储可以是基于共识算法确定节点之间共识之后将数据存储至区块链的过程,本发明实施例不做赘述。
其中,数据共享系统可为交易系统,交易系统指用于金融交易的系统。交易系统中可以包括N个节点,每个节点在进行交易时生成账本数据,并基于账本数据维护该交易系统内的共享账本。
对于数据共享系统中的每个节点,均具有与其对应的节点标识,而且数据共享系统中的每个节点均可以存储有数据共享系统中其他节点的节点标识,以 便后续根据其他节点的节点标识,将信息广播至数据共享系统中的其他节点。每个节点中可维护一个如表1所示的节点标识列表,将节点名称和节点标识对应存储至该节点标识列表中。其中,节点标识可为IP(Internet Protocol,网络之间互联的协议)地址以及其他任一种能够用于标识该节点的信息,表1中仅以IP地址为例进行说明。
表1
| 节点名称 | 节点标识 |
| 节点1 | 117.114.151.174 |
| 节点2 | 117.116.189.145 |
| … | … |
| 节点N | 119.123.789.258 |
数据共享系统中的每个节点可以配置有一条或多条相同的区块链。一条区块链由多个区块组成,每个区块均存储有不同的数据,区块链上的全部区块存储的数据组成了区块链所在节点的共享数据。以数据共享系统为交易系统,共享数据为共享账本,区块特征值为hash(哈希)值为例进行说明,参见图1B,区块中存储的账本数据包括区块高度、转账人地址、接收人地址、金额、签名、公钥、上一条信息hash值和当前信息hash值。其中,区块高度用于指示当前区块在交易系统中的区块链中所处的位置;转账人地址用于指示当前区块所记录交易的发起地址;接收人地址用于指示当前区块所记录交易的接收地址;金额是指当前区块所记录交易的交易额;签名用于标识当前区块所记录交易的发起用户,功能在于区别不同用户所发起的交易;公钥用于指示与当前区块存储的账本数据相关的节点,上一条信息hash值为当前区块的上一区块根据其存储的账本数据生成的hash值,本条信息hash值是为当前区块根据当前存储的账本数据生成的hash值。需要说明的是,当前区块在生成当前信息hash值时,需要基于该区块内的账本数据中的全部数据生成,这样便使得当前区块生成的当前信息hash值与上一条信息hash值相关,因而实现了将区块链中的区块串联起来的目的,使得对账本数据的任何篡改,均能够通过区块特征值的追溯而检测到,从而使得共享账本不容易被篡改,保证了共享账本的安全性。
为了使区块可以串联形成区块链并区分区块链上的各个区块,可以在区块中设置有区块高度,该区块高度用于指示当前区块在区块链中的位置,由于不同的节点包括的区块链是相同的,因此,区块链包括的区块在不同节点中的区块高度也是相同的。
为了保证数据共享系统中涉及的数据的安全性,数据共享系统可以维护数据信息表和MySQL(My Structure Quest Language,关系型数据库管理系统)事务。以数据共享系统为交易系统,共享数据为共享账本为例进行说明,在交易系统中数据信息表可为账户表,账户表用于对区块存储的账本数据中的详细信息进行存储,详细信息中涉及账本数据中相关交易额的流出和流向,包括地址信息和金额信息,地址信息和金额信息均根据MySQL事务中的数据生成。MySQL事务中包括流水信息、update from(转出)地址金额和update from(转出)地址金额,其中,流水信息用于指示交易额的流出和流向,可以根据区块存储的账本数据中的转账人地址和接收人地址生成;update from地址金额用于指示流水信息中转出的交易额,可以根据区块存储的账本数据中的金额生成;update to地址金额用于指示流水信息中转入的交易额,也可以根据区块存储的账本数据中的金额生成。这样,在生成账户表时,便可基于update from地址金额和update from(转出)地址金额生成地址信息和金额信息。
图2A是根据一示例性实施例示出的一种共享数据回收方法的流程图,如图2A所示,以数据共享系统为交易系统,共享数据为共享账本为例,该方法用于交易系统中的第一节点和至少一个第二节点中,交易系统中包括N个节点,该方法包括以下步骤。
201、当第一节点接收到携带第一区块高度的回收请求时,提取回收请求中的第一区块高度。
在本发明实施例中,第一节点可为交易系统中的任意节点,所接收到的回收请求可以来自交易系统中的任意节点,在本实施例中可以称为第二节点,为了降低交易系统中节点存储共享账本的压力,可以由第二节点发起该共享账本回收流程。例如,当第二节点检测到剩余存储空间小于预设存储空间时,根据交易系统的日交易信息量和剩余存储空间,确定第一区块高度,第二节点将携带第一区块高度的回收请求广播至交易系统中的该第二节点以外的节点。通过这种广播的方式,可以使得交易系统中的所有节点都接收到该回收请求,以进行统一的数据回收,保证数据一致性。
在本发明实施例中,仅以第一节点所接收到的回收请求来自第二节点为例进行说明,也即是,以第二节点发起该共享账本回收流程为例进行说明。
第二节点发起该共享账本回收流程的原因可以有多种,例如,一种原因可 为第二节点根据自身的实际存储情况发起共享账本回收流程,也即是,第二节点可以通过对第二节点存储共享账本后的剩余存储空间进行检测,从而判断是否需要对第二节点存储的共享账本进行回收,若需要对第二节点存储的共享账本进行回收,则发起共享账本回收流程;另一种原因可为交易系统中设置有预设周期或预设数据量,当第二节点检测到间隔预设周期或者其存储的共享账本的数据量达到预设数据量,则发起共享账本回收流程。为了使交易系统中的数据保持一致,第二节点需要向交易系统中的其他节点发送回收请求,以便进行共享账本回收,在生成回收请求时可以通过执行下述步骤一和步骤二实现。
步骤一、当第二节点检测到剩余存储空间小于预设存储空间时,根据交易系统的日交易信息量和剩余存储空间,确定第一区块高度。
当第二节点检测到剩余存储空间小于预设存储空间时,则意味着随着账本数据量的增加,第二节点会产生存储共享账本的存储压力,且存储压力随着时间的推移会越来越大,因此,为了保证一段时间内保持正常的账本数据量的增加,可以考虑基于交易系统的日交易信息量和剩余存储空间,来确定究竟要回收掉多少账本数据。
其中,交易系统可以对交易系统中的日交易信息量进行统计,统计每天交易系统接收到的交易信息量,并每天定时将统计得到的日交易信息量发送给交易系统中的每个节点。第二节点在根据交易系统的日交易信息量和剩余存储空间确定第一区块高度时,可以设置天数临界值,用天数临界值与日交易信息量相乘,得到存储空间临界值,确定存储空间临界值与剩余存储空间之间的空间差值,将空间差值作为需要进行回收的账本数据的数据量,并根据数据量在共享账本中确定第一区块高度。其中,回收请求中所携带的第一区块高度实质指示的是一个范围,也即将区块链中首个高度的区块至第一区块高度中间范围内存储的账本数据进行回收,仅剩余第一区块高度对应的账本数据及第一区块高度之后区块高度的账本数据。
其中,对于不同节点,其预设存储空间可以相同也可以不同,如果各个节点的存储能力相同,在存储相同大小的共享账本后的剩余存储空间也相同,则可以为其设置相同的预设存储空间,而如果各个节点之间的存储能力有差异,在存储相同大小的共享账本后的剩余存储空间会有所不同,则可以为其设置不同的预设存储空间,以便使得节点可以根据自身的实际存储情况来发起共享账本回收流程。
需要说明的是,若交易系统中设置有预设周期或预设数据量,则当第二节点检测到间隔预设周期或者其存储的共享账本的数据量达到预设数据量,即可在交易系统中获取预设的第一区块高度,并基于预设的第一区块高度发起共享账本回收流程,无需执行上述根据交易系统的日交易信息量和剩余存储空间,确定第一区块高度的过程。
步骤二、第二节点将携带第一区块高度的回收请求广播至交易系统中的至少一个第一节点。
当确定了第一区块高度时,第二节点便基于第一区块高度生成回收请求,使回收请求中携带第一区块高度。同时,根据其他节点的节点标识,将携带有第二区块高度的回收请求广播至交易系统中的其他节点。
需要说明的是,上述生成回收请求的过程可为第二节点在检测到剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到第二节点存储的共享账本的数据量达到预设数据量时,自动触发生成并发送回收请求,也可为工作人员在确定第二节点的剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到第二节点存储的共享账本的数据量达到预设数据量,由工作人员人为的进行触发生成并发送回收请求,本发明对此不进行具体限定。
实际上,发起回收的还可以是交易系统中至少一个第二节点中的控制节点,该控制节点可以在检测到多个节点的剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到多个节点存储的共享账本的数据量达到预设数据量时,触发生成并发送回收请求。
在上述实施例中,仅以第一节点所接收到的回收请求来自第二节点为例进行说明,由于第一节点和第二节点是交易系统中具有记账功能的两个节点,因此,第一节点也可以发起共享账本回收流程。为了便于理解,下述仅以第一节点发起该共享账本回收流程为例进行说明。
第一节点发起该共享账本回收流程的原因可以有多种,例如,一种原因可为第一节点根据自身的实际存储情况发起共享账本回收流程,也即是,第一节点可以通过对第一节点存储共享账本后的剩余存储空间进行检测,从而判断是否需要对第一节点存储的共享账本进行回收,若需要对第一节点存储的共享账本进行回收,则发起共享账本回收流程;另一种原因可为交易系统中设置有预设周期或预设数据量,当第一节点检测到间隔预设周期或者其存储的共享账本的数据量达到预设数据量,则发起共享账本回收流程。为了使交易系统中的数 据保持一致,第一节点需要向交易系统中的其他节点发送回收请求,以便进行共享账本回收,在生成回收请求时可以通过执行下述步骤一和步骤二实现。
步骤一、当第一节点检测到剩余存储空间小于预设存储空间时,根据交易系统的日交易信息量和剩余存储空间,确定第二区块高度。可以理解的是,数据共享系统的日共享信息量包括交易系统的日交易信息量。
当第一节点检测到剩余存储空间小于预设存储空间时,则意味着随着账本数据量的增加,第一节点会产生存储共享账本的存储压力,且存储压力随着时间的推移会越来越大,因此,为了保证一段时间内保持正常的账本数据量的增加,可以考虑基于交易系统的日交易信息量和剩余存储空间,来确定究竟要回收掉多少账本数据。
其中,交易系统可以对交易系统中的日交易信息量进行统计,统计每天交易系统接收到的交易信息量,并每天定时将统计得到的日交易信息量发送给交易系统中的每个节点。第一节点在根据交易系统的日交易信息量和剩余存储空间确定第二区块高度时,可以设置天数临界值,用天数临界值与日交易信息量相乘,得到存储空间临界值,确定存储空间临界值与剩余存储空间之间的空间差值,将空间差值作为需要进行回收的账本数据的数据量,并根据数据量在共享账本中确定第二区块高度。其中,回收请求中所携带的第二区块高度实质指示的是一个范围,也即需要将区块链中首个高度的区块至第二区块高度中间范围内存储的账本数据进行回收,仅剩余第二区块高度对应的账本数据及第二区块高度之后区块高度的账本数据。
其中,对于不同节点,其预设存储空间可以相同也可以不同,如果各个节点的存储能力相同,在存储相同大小的共享账本后的剩余存储空间也相同,则可以为其设置相同的预设存储空间,而如果各个节点之间的存储能力有差异,在存储相同大小的共享账本后的剩余存储空间会有所不同,则可以为其设置不同的预设存储空间,以便使得节点可以根据自身的实际存储情况来发起共享账本回收流程。
需要说明的是,若交易系统中设置有预设周期或预设数据量,则当第一节点检测到间隔预设周期或者其存储的共享账本的数据量达到或大于预设数据量,即可在交易系统中获取预设的第二区块高度,并基于预设的第二区块高度发起共享账本回收流程,无需执行上述根据交易系统的日交易信息量和剩余存储空间,确定第二区块高度的过程。
可以理解的是上述步骤一中,可以是当检测到所述第一节点的剩余存储空间小于预设存储空间时,根据所述数据共享系统的日共享信息量和所述剩余存储空间,确定第二区块高度;可以是每到预设周期,则根据所述数据共享系统的日共享信息量,确定第二区块高度;可以是当检测到当前存储的共享数据的数据量大于预设数据量,则根据所述数据共享系统的日共享信息量,确定第二区块高度。
步骤二、第一节点将携带第二区块高度的回收请求广播至交易系统中的至少一个第二节点。
当确定了第二区块高度时,第一节点便基于第二区块高度生成回收请求,使回收请求中携带第二区块高度。同时,根据其他节点的节点标识,将携带有第二区块高度的回收请求广播至交易系统中的其他节点。
需要说明的是,上述生成回收请求的过程可为第一节点在检测到剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到第一节点存储的共享账本的数据量达到预设数据量时,自动触发生成并发送回收请求,也可为工作人员在确定第一节点的剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到第一节点存储的共享账本的数据量达到预设数据量,由工作人员人为的进行触发生成并发送回收请求,本发明对此不进行具体限定。
实际上,发起回收的还可以是交易系统中至少一个第一节点中的控制节点,该控制节点可以在检测到多个节点的剩余存储空间小于预设存储空间,或检测到间隔预设周期,或者检测到多个节点存储的共享账本的数据量达到预设数据量时,触发生成并发送回收请求。
202、根据第一区块高度,第一节点在共享账本中确定待回收的第一区块高度范围内的账本数据。
在本发明实施例中,节点中存储的区块链在生成时,区块链包括的区块中的区块高度为连续的。其中,根据第一区块高度,第一节点可在其存储的区块链中确定从第一个区块的区块高度到第一区块高度之间的区块高度范围内包括的账本数据。例如,若区块链中第一个区块的区块高度为Height(高度)(1),第二个区块的区块高度为Height(2),第三个区块的区块高度为Height(3),第四个区块的区块高度为Height(4),第五个区块的区块高度为Height(5),则第一区块高度可为Height(3),这样第一节点便可以根据第一区块高度Height(3),在共享账本的区块链中确定待回收的账本数据即为区块高度Height(1) 至Height(3)所指示的区块中存储的账本数据,也即将区块高度为Height(1)的区块中包括的账本数据和区块高度为Height(2)的区块中包括的账本数据作为待回收的账本数据。
203、基于哈希算法,对第一区块高度范围内的账本数据进行特征值计算,得到第一节点的第一特征值。
该第一特征值用于唯一指示所述第一节点上所存储的共享数据中第一区块高度范围内的数据,本发明实施例中,第一特征值由第一节点上所存储的共享账本中第一区块高度范围内账本数据得到。其中,上述步骤201至步骤203,事实上是第一节点在接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值的过程。本发明实施例以哈希算法为例,第一特征值可为第一区块高度范围内的账本数据的哈希值,而在实际应用的过程中,还可以采用其他算法实现,本发明对此不进行具体限定。
204、第一节点将第一特征值广播至交易系统中的N-1个第二节点。
在本发明实施例中,第二节点为第一节点以外的节点,由于第一节点为交易系统中的任意节点,因此,当第一节点得到第一特征值后,便获取其他N-1个第二节点的N-1个节点标识,将第一特征值进行复制,并向N-1个节点标识指示的第二节点广播第一特征值,以使N-1个节点均可以接收到相同的第一特征值。当然,还可以采用依次发送的方式来将第一特征值发送给N-1个第二节点,本发明实施例对具体发送方式不做限定。
而对于交易系统中的N-1个第二节点来说,在第二节点在接收到携带第一区块高度的回收请求时,可以也基于回收请求中的第一区块高度生成第二特征值,并在交易系统中进行广播。
205、第一节点接收N-1个第二节点广播的N-1个第二特征值。
每个第二特征值用于唯一指示一个第二节点上所存储的共享数据中第一区块高度范围内的数据;在本发明实施例中,第二节点广播的第二特征值可以为第二节点存储的共享账本中第一区块高度范围内的账本数据的特征值。
在本发明实施例中可以基于共识算法确定下述需要继续执行的步骤。其中,共识算法用于确定系统中多个节点中存储的数据是否一致,并根据存储的数据一致的节点个数判断当前系统中是否存在异常。共识算法可为BFT(Byzantine Fault Tolerance,容错算法),具体可以采用PBFT(Practical Byzantine Fault Tolerance,实用拜占庭容错算法),本发明对此不进行具体限定。 这样共识算法可以采用3F+1的机制判断多个第二特征值中,相等特征值数目是否达到预设数目。其中,F为当前交易系统可容错的节点数,可为预先设置。当第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目时,则确定交易系统中节点所存储的共享账本的账本数据一致,可以对共享账本进行回收,也即执行下述步骤206。
需要说明的是,上述提及的第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目,也即表示第一特征值和多个第二特征值中相等的特征值的数目达到预设数目,例如,设预设数目为3,若第一节点的第一特征值为1F8359E,第一节点接收到的第二特征值为四个,分别为1F84678E、1F8359E、1F8359E、1F8359E,则第一特征值和四个第二特征值中存在四个1F8359E,这样第一节点即可认为第一特征值和多个第二特征值中相等特征值的数目达到了预设数目,也即1F8359E的出现次数达到了3次,则确定交易系统中节点存储的共享账本的账本数据一致。当第一特征值和多个第二特征值中所包括的相等特征值数目未达到预设数目时,则确定交易系统中节点所存储的共享账本的账本数据不一致的节点较多,导致交易系统中存在错误,需要对交易系统进行修复,也即执行下述步骤208。
其中,在确定第一特征值和多个第二特征值中所包括的相等特征值数目是否达到预设数目的过程,实质上是确定第一特征值和多个第二特征值中所包括的最多的相等特征值数目是否达到预设数目。例如,若第一节点的第一特征值为1F8359E,接收到六个第二特征值,六个第二特征值分别为1F84678E、1F84678E、1F8359E、1F8359E、1F8359E、1F1248E,则六个第二特征值中存在三个1F8359E的第二特征值,两个1F84678E的第二特征值,也即1F8359E为第一节点接收到的最多的第二特征值,则第一节点仅需在第一特征值和多个第二特征值中确定等于1F8359E的特征值的数目是否达到预设数目即可,无需对判断等于1F84678E的特征值的数目是否达到预设数目。
需要说明的是,上述步骤204和步骤205的执行顺序不分先后,也即第一节点可以先将第一特征值广播至交易系统中的N-1个第二节点,也可以先接收N-1个第二节点广播的N-1个第二特征值,也可以同时执行上述步骤204和步骤205,本发明对此不进行具体限定。在第一节点接收到携带第一区块高度的回收请求时,N-1个第二节点也会接收到该回收请求,并执行上述步骤201至步骤205,因此,第一节点可以接收到N-1个第二节点发送的第二特征值。
上述步骤205所示的过程,事实上也即为根据第一特征值和多个第二特征值确定交易系统内各个节点所存储的共享账本的账本数据是否一致的过程,以确定后续是否需要向至少一个第二节点广播回收指示信息,保证了仅在交易系统内各个节点所存储的共享账本的账本数据一致的情况下对共享账本进行回收,保证了交易系统中节点所存储共享账本的账本数据的一致性和安全性。
206、如果第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目,则第一节点确定交易系统内各个节点所存储的共享账本中所述第一区块高度范围内的账本数据一致,则向N-1个第二节点广播回收指示信息,该回收指示信息用于指示节点对第一区块高度范围内的账本数据进行回收。
在本发明实施例中,如果第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目,则说明交易系统中节点上所存储共享账本的账本数据一致,这样便可以对共享账本进行回收,因此,向N-1个第二节点广播回收指示信息,以使N-1个第二节点执行对共享账本的回收操作。其中,广播回收指示信息的过程与上述将第一特征值广播至交易系统中的N-1个第二节点的过程一致,此处不再进行赘述。
需要说明的是,参见图2B,由于交易系统中的全部节点之间均存在信息连接,因此,N-1个第二节点中每个节点也会接收到其他节点发送的回收请求,并执行上述步骤201至步骤205,这样便需要N-1个第二节点中的每个节点在基于其他节点发送的第二特征值确定交易系统内各个节点所存储的共享账本的账本数据一致时,也会向交易系统的其他节点广播回收指示信息。对于交易系统中的任意节点,仅在其确定自身生成的特征值与接收到的其他节点发送的第二特征值相等且相等的特征值数目达到预设数目,才会向交易系统内的其他节点广播回收指示信息;若交易系统中的某一节点确定其自身生成的特征值与接收到的其他节点发送的第二特征值存在相等的特征值,但是相等的特征值的数目未达到预设数目,则将不会向其他节点广播回收指示信息。
207、如果第一节点接收到预设数目的回收指示信息,则对共享账本中第一区块高度范围内的账本数据进行回收。
在本发明实施例中,如果第一节点接收到预设数目的回收指示信息,则表示当前可以对共享账本进行回收,这样,第一节点便会将在共享账本中根据第一区块高度确定的待回收的账本数据进行回收。
其中,本发明实施例中提及的对数据进行的回收过程实质为将待回收的数 据进行数据转移的过程,具体过程为确定预先设置的第一存储位置,将在共享数据中根据第一区块高度确定的待回收的数据转移到第一存储位置,由于这部分数据可能不会被经常访问到,因此,该过程也可以看做一个数据冷备的过程。进一步地,在进行回收后,还可以在第一节点上保留第一区块高度对应区块的当前区块特征值,以便后续需要还原或追溯被回收的数据时,可以基于保留的第一区块高度对应区块的当前区块特征值进行获取,也可在第一存储位置获取转移的被回收账本数据,进一步保证了数据的安全性,同时减轻了第一节点存储共享数据的压力。
需要说明的是,N-1个第二节点中的每个节点也均可接收到交易系统中其他节点广播的多个回收指示信息,当接收到的回收指示信息达到预设数目时,即可对在共享账本中根据第一区块高度确定的待回收的数据进行回收,这样便可以保持数据共享系统中节点所存储共享数据在执行共享数据回收后,依旧可以保持共享数据中数据的一致性和安全性。
208、如果第一特征值和多个第二特征值中所包括的相等特征值数目未达到预设数目,则第一节点确定第一特征值和至少一个第二特征值中的目标特征值,该目标特征值为该至少一个第二特征值中与所述第一特征值相等的特征值以外的特征值,向指定第二节点发送错误信息,用于通知该指定第二节点其所存储的共享数据发生错误,该指定第二节点为发送该目标特征值的第二节点。
在本发明实施例中,以第一节点的第一特征值和多个第二特征值中所包括的相等特征值数目未达到预设数目时,确定第一特征值和至少一个第二特征值中的目标特征值,目标特征值是指第二特征值中与所述第一特征值不相等的特征值,并向指定第二节点发送错误信息为例,而在实际应用的过程中,交易系统中的每个节点在确定第一特征值和至少一个第二特征值中的目标特征值后,均会向指定第二节点发送错误信息。其中,向指定节点发送的错误信息中可以携带错误提示。当指定第二节点接收到错误信息时,需要统计接收到的错误信息的数目,若接收到的错误信息的个数超过个数阈值,则指定第二节点获取错误信息中的错误提示,确定其当前存储的共享账本中的账本数据与交易系统中其他节点存储的共享账本的账本数据不一致,并从其他节点获取该共享账本,对当前存储的共享账本进行替换,以使当前存储的共享账本与交易系统中其他节点存储的共享账本一致,实现对交易系统的修复。
其中,交易系统中的节点可以分为记账节点和非记账节点,记账节点用于 存储交易系统中的共享账本,并根据交易系统每天接收到的交易信息对共享账本进行持续更新;非记账节点用于存储共享账本的镜像数据,也即对共享账本进行备份,该镜像数据的数据内容用于指示共享账本的数据变化。进一步地,非记账节点中也可以存储共享账本,本发明对此不进行具体限定。
需要说明的是,上述步骤201至步骤208为第一节点是记账节点时需要执行的步骤,也即第一节点中仅存储有共享账本;对于第一节点为非记账节点的情况,第一节点中可能同时存储有共享账本和共享账本的镜像数据,这样参见图2C,需要在执行上述步骤207对共享账本进行回收时,还可以执行下述步骤209和步骤210。其中,为了减轻第一节点的负载,存储有镜像数据的第一节点可以先执行上述步骤207中对共享账本的回收后,再执行下述步骤209和步骤210;也可以为了数据的一致性和安全性,同时执行上述步骤207以及下述步骤209和步骤210,本发明对此不进行具体限定。
209、如果第一节点接收到由N-1个第二节点广播的多个回收指示信息,则从共享数据的镜像数据中,确定第一区块高度范围内的镜像数据。
在本发明实施例中,镜像数据中记录了交易系统中节点存储的共享账本的变化过程,也即共享账本中仅显示其包括的账本数据中涉及的用户账户的现状,而镜像数据则记录了共享账本的账本数据中涉及的用户账户在一定时间段内的变化情况。若第一节点为非记账节点,则第一节点中可能存储有共享账本以及共享账本的镜像数据,这样便可以在共享账本的镜像数据中根据第一区块高度确定待回收的镜像数据。其中,确定待回收的镜像数据的过程与上述步骤202中确定待回收的账本数据的过程一致,此处不再进行赘述。
210、第一节点获取第一区块高度范围内的镜像数据的第二特征值,从共享数据的镜像数据中,回收第一区块高度范围内的镜像数据,并将第二特征值存储至剩余镜像数据中。
在本发明实施例中,第一节点根据回收请求中携带的第一区块高度,由于镜像数据在生成时也是基于区块高度来区分不同区块对应的镜像数据,且不同区块对应的镜像数据的区块高度与区块在共享账本中的区块高度一致,因此在镜像数据中,可以根据第一区块高度,来获取第一区块高度范围内的第二特征值。其中,获取第二特征值的过程与获取第一特征值的过程一致,此处不再进行赘述。
当根据第一区块高度确定第一区块高度范围内的镜像数据的第二特征值 后,第一节点便从共享账本的镜像数据中,将第一区块高度范围内的镜像数据进行回收。其中,对镜像数据的回收过程与对账本数据的回收过程一致,也即确定预先设置的第二存储位置,将第一区块高度范围内的镜像数据转移到第二存储位置,由于这部分镜像数据可能不会被经常访问到,因此,该过程可以看做一个数据冷备的过程,仅仅保留第一区块高度范围外的镜像数据。进一步地,还可以在第一节点上将第二特征值存储至剩余镜像数据中,以便后续需要还原或追溯被回收的镜像数据时,可以基于保留的第二特征值进行获取,也可在第二存储位置获取转移的被回收镜像数据,进一步保证了镜像数据的安全性,同时减轻了第一节点存储镜像数据的压力。
例如,若第一区块高度为Height(3),区块链中第一个区块的区块高度为Height(高度)(1),第二个区块的区块高度为Height(2),第三个区块的区块高度为Height(3),第四个区块的区块高度为Height(4),第五个区块的区块高度为Height(5),则根据第一区块高度Height(3),在镜像数据中确定待回收的镜像数据即为区块高度Height(1)至Height(3)所指示的区块对应的镜像数据,根据区块高度Height(1)至Height(3)所指示的区块对应的镜像数据生成的第二特征值为1F84678E,则将Height(1)至Height(3)范围内的镜像数据进行回收,也即将Height(1)至Height(3)范围内的镜像数据删除,仅仅保留Height(3)所对应的镜像数据及Height(3)以后的镜像数据,并将1F84678E存储至Height(3)对应的位置。
在本发明实施例中,对共享数据的回收的目的在于扩大节点的剩余存储空间,其具体实现方式可以有多种,例如,在本发明实施例中是通过对数据进行转移,从而达到扩大剩余存储空间的目的,而实际上还可以对数据进行压缩,以缩小其存储体积,从而达到扩大剩余存储空间的目的,具体地,可以计算第一节点在第一区块高度范围内的第一特征值和第二节点在第一区块高度范围内的第二特征值,并判断第一特征值和第二特征值是否一致确定节点存储的共享数据中第一区块高度范围内的数据是否一致,之后再对共享数据中第一区块高度范围内的数据进行压缩,使得每个节点上的共享数据的存储体积能够在相同程度上缩小,既保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
本发明实施例提供的方法,通过计算第一节点在第一区块高度范围内的第一特征值和第二节点在第一区块高度范围内的第二特征值,并在确定节点存储 的共享数据中第一区块高度范围内的数据一致时,再对共享数据中第一区块高度范围内的数据进行回收,既保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
在另一个实施例中,通过提取回收请求中的第一区块高度,根据第一区块高度,在共享数据中确定待回收的第一区块高度范围内的共享数据,并基于哈希算法,对第一区块高度范围内的数据进行特征值计算,得到第一节点的第一特征值,保证了数据共享系统内的全部节点均可以按照第一区块高度对共享数据进行回收。
在另一个实施例中,判断第一特征值和多个第二特征值中所包括的相等特征值数目是否达到预设数目,如果达到预设数目,则确定数据共享系统内各个节点所存储的共享数据的数据一致,向至少一个第二节点广播回收指示信息,使得仅在第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目时才向至少一个第二节点广播回收指示信息,保证了节点所存储的共享数据在进行回收时也保持一致性和安全性。
在另一个实施例中,当检测到第一节点的剩余存储空间小于预设存储空间时,根据数据共享系统的日共享信息量和剩余存储空间,确定第二区块高度,并将携带第二区块高度的回收请求广播至数据共享系统中的至少一个第二节点,使得当检测到节点存在存储共享数据的压力时,可以即刻请求对共享数据进行回收,降低了节点存储共享数据的实际压力。
在另一个实施例中,如果接收到由至少一个第二节点广播的多个回收指示信息,则从共享数据的镜像数据中,确定第一区块高度范围内的镜像数据,并获取第一区块高度范围内的镜像数据的第二特征值,从共享数据的镜像数据中,回收第一区块高度范围内的镜像数据,并将第二特征值存储至剩余镜像数据中,使得共享数据的镜像数据也可以根据第一区块高度进行回收,进一步地减少了节点存储共享数据的压力。
图3A是根据一示例性实施例示出的一种共享数据回收装置的框图。参照图3A,该装置包括计算模块301,第一广播模块302,第二广播模块303和回收模块304。
该计算模块301,用于当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值,所述第一特征值用于唯一指示所述第一节点上所存储的 共享数据中第一区块高度范围内数据;
该第一广播模块302,用于将第一特征值广播至数据共享系统中的至少一个第二节点,第二节点为第一节点以外的节点;
该第二广播模块303,用于当接收到至少一个第二节点广播的多个第二特征值时,如果根据第一特征值和多个第二特征值确定数据共享系统内各个节点所存储的共享数据中第一区块高度范围内的数据一致,则向至少一个第二节点广播回收指示信息,每个第二特征值用于唯一指示第二节点上所存储的共享数据中第一区块高度范围内的数据;
该回收模块304,用于如果接收到预设数目的多个回收指示信息,对共享数据中第一区块高度范围内的数据进行回收。
本公开实施例提供的装置,通过计算第一节点在第一区块高度范围内的第一特征值和第二节点在第一区块高度范围内的第二特征值,并在确定节点存储的共享数据中第一区块高度范围内的数据一致时,再对共享数据中第一区块高度范围内的数据进行回收,既保证了区块中包括的数据一致性和安全性,也降低了数据共享系统中节点存储共享数据的压力。
在另一个实施例中,参见图3B,该计算模块301,包括提取子模块3011,确定子模块3012和计算子模块3013。
该提取子模块3011,用于提取回收请求中的第一区块高度;
该确定子模块3012,用于根据第一区块高度,在共享数据中确定待回收的第一区块高度范围内的数据;
该计算子模块3013,用于基于哈希算法,对第一区块高度范围内的数据进行特征值计算,得到第一节点的第一特征值。
在另一个实施例中,该第二广播模块304,用于当第一特征值和多个第二特征值中所包括的相等特征值数目达到预设数目,则确定数据共享系统内各个节点所存储的共享数据中第一区块高度范围内的数据一致,则向至少一个第二节点广播回收指示信息。
在另一个实施例中,参见图3C,该装置还包括保留模块305。
该保留模块305,用于保留第一区块高度对应区块的当前区块特征值。
在另一个实施例中,参见图3D,该装置还包括第三广播模块306。
该第三广播模块306,用于当检测到第一节点的剩余存储空间小于预设存储空间时,根据数据共享系统的日共享信息量和剩余存储空间,确定第二区块 高度;将携带第二区块高度的回收请求广播至数据共享系统中的至少一个第二节点;或,每到预设周期,则根据数据共享系统的日共享信息量,确定第二区块高度;将携带第二区块高度的回收请求广播至数据共享系统中的至少一个第二节点;或,当检测到当前存储的共享数据的数据量大于预设数据量,则根据数据共享系统的日共享信息量,确定第二区块高度;将携带第二区块高度的回收请求广播至数据共享系统中的至少一个第二节点。
在另一个实施例中,参见图3E,该装置还包括确定模块307和获取模块308。
该确定模块307,用于如果接收到由至少一个第二节点广播的多个回收指示信息,则从共享数据的镜像数据中,确定第一区块高度范围内的镜像数据;
该获取模块308,用于获取第一区块高度范围内的镜像数据的第二特征值;
该回收模块304,还用于从共享数据的镜像数据中,回收第一区块高度范围内的镜像数据,并将第二特征值存储至剩余镜像数据中。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本发明实施例所提供的方法,可以应用于数据共享系统中的任一节点上,节点可以是任一种计算机设备,该计算机设备包括理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述理器加载并执行以实现下述方法:
当接收到携带第一区块高度的回收请求时,获取所述计算机设备的第一特征值,所述第一特征值用于唯一指示所述计算机设备上所存储的共享数据中第一区块高度范围内数据;
将所述第一特征值广播至所述数据共享系统中除所述计算机设备以外的计算机设备;
当接收到所述计算机设备以外的计算机设备广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述计算机设备以外的计算机设备广播回收指示信息,每个第二特征值用于唯一指示除所述计算机设备以外的计算机设备上所存储的共享数据中第一区块高度范围内的数据;
如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区 块高度范围内的数据进行回收。
在一种可能实现方式中,所述指令还用于由所述理器加载并执行以实现下述方法:
提取所述回收请求中的第一区块高度;
根据所述第一区块高度,在所述共享数据中确定待回收的第一区块高度范围内的数据;
基于哈希算法,对所述第一区块高度范围内的数据进行特征值计算,得到所述计算机设备的第一特征值。
在一种可能实现方式中,所述指令还用于由所述理器加载并执行以实现下述方法:
判断所述第一特征值和所述多个第二特征值中所包括的相等特征值数目是否达到所述预设数目;
如果达到所述预设数目,则确定所述数据共享系统内各个计算机设备所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述计算机设备以外的计算机设备广播所述回收指示信息。
在一种可能实现方式中,所述指令还用于由所述理器加载并执行以实现下述方法:
保留所述第一区块高度对应区块的当前区块特征值。
在一种可能实现方式中,所述指令还用于由所述理器加载并执行以实现下述方法:
当检测到所述计算机设备的剩余存储空间小于预设存储空间时,根据所述数据共享系统的日共享信息量和所述剩余存储空间,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中所述计算机设备以外的计算机设备;或,
每到预设周期,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统除所述计算机设备以外的计算机设备;或,
当检测到当前存储的共享数据的数据量大于预设数据量,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统除所述计算机设备以外的计算机设备。
在一种可能实现方式中,所述指令还用于由所述理器加载并执行以实现下 述方法:
如果接收到由所述计算机设备以外的计算机设备广播的多个回收指示信息,则从所述共享数据的镜像数据中,确定所述第一区块高度范围内的镜像数据;
获取所述第一区块高度范围内的镜像数据的第二特征值;
从所述共享数据的镜像数据中,回收所述第一区块高度范围内的镜像数据,并将所述第二特征值存储至剩余镜像数据中。
上述作为节点的计算机设备即可以采用终端形式,如图4所示的终端400,也可以采用服务器形式,如图5所示的服务器500。图4是根据一示例性实施例示出的一种终端400的框图。例如,终端400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图4,终端400可以包括以下一个或多个组件:处理组件402,存储器404,电源组件406,多媒体组件408,音频组件410,I/O(Input/Output,输入/输出)的接口412,传感器组件414,以及通信组件416。
处理组件402通常控制终端400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件402可以包括一个或多个处理器420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件402可以包括一个或多个模块,便于处理组件402和其他组件之间的交互。例如,处理组件402可以包括多媒体模块,以方便多媒体组件408和处理组件402之间的交互。
存储器404被配置为存储各种类型的数据以支持在终端400的操作。这些数据的示例包括用于在终端400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如SRAM(Static Random Access Memory,静态随机存取存储器),EEPROM(Electrically-Erasable Programmable Read-Only Memory,电可擦除可编程只读存储器),EPROM(Erasable Programmable Read Only Memory,可擦除可编程只读存储器),PROM(Programmable Read-Only Memory,可编程只读存储器),ROM(Read-Only Memory,只读存储器),磁存储器,快闪存储器,磁盘或光盘。
电源组件406为终端400的各种组件提供电力。电源组件406可以包括电源管理系统,一个或多个电源,及其他与为终端400生成、管理和分配电力相关联的组件。
多媒体组件408包括在所述终端400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括LCD(Liquid Crystal Display,液晶显示器)和TP(Touch Panel,触摸面板)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件408包括一个前置摄像头和/或后置摄像头。当终端400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件410被配置为输出和/或输入音频信号。例如,音频组件410包括一个MIC(Microphone,麦克风),当终端400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件416发送。在一些实施例中,音频组件410还包括一个扬声器,用于输出音频信号。
I/O接口412为处理组件402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件414包括一个或多个传感器,用于为终端400提供各个方面的状态评估。例如,传感器组件414可以检测到设备400的打开/关闭状态,组件的相对定位,例如组件为终端400的显示器和小键盘,传感器组件414还可以检测终端400或终端400一个组件的位置改变,用户与终端400接触的存在或不存在,终端400方位或加速/减速和终端400的温度变化。传感器组件414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件414还可以包括光传感器,如CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物)或CCD(Charge-coupled Device,电荷耦合元件)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器 或温度传感器。
通信组件416被配置为便于终端400和其他设备之间有线或无线方式的通信。终端400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件416还包括NFC(Near Field Communication,近场通信)模块,以促进短程通信。例如,在NFC模块可基于RFID(Radio Frequency Identification,射频识别)技术,IrDA(Infra-red Data Association,红外数据协会)技术,UWB(Ultra Wideband,超宽带)技术,BT(Bluetooth,蓝牙)技术和其他技术来实现。
在示例性实施例中,终端400可以被一个或多个ASIC(Application Specific Integrated Circuit,应用专用集成电路)、DSP(Digital signal Processor,数字信号处理器)、DSPD(Digital signal Processor Device,数字信号处理设备)、PLD(Programmable Logic Device,可编程逻辑器件)、FPGA)(Field Programmable Gate Array,现场可编程门阵列)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述共享数据回收方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器404,上述指令可由终端400的处理器420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、RAM(Random Access Memory,随机存取存储器)、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器)、磁带、软盘和光数据存储设备等。
另外,上述共享数据回收方法还可以应用于服务器上,图5是本发明实施例提供的一种服务器的结构示意图,该服务器500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)501和一个或一个以上的存储器502,其中,所述存储器502中存储有至少一条指令,所述至少一条指令由所述处理器501加载并执行以实现上述各个方法实施例提供的共享数据回收方法。当然,该服务器还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由终端中的处理器执行以完成上述实施例中的共享数据回收方法。例如,所述计算机可读存储介质可以是ROM、随机存取存储器(RAM)、 CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。
Claims (20)
- 一种共享数据回收方法,其特征在于,所述方法应用于第一节点,所述第一节点为数据共享系统中的任意节点,所述方法包括:当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值,所述第一特征值用于唯一指示所述第一节点上所存储的共享数据中第一区块高度范围内的数据;将所述第一特征值广播至所述数据共享系统中的至少一个第二节点,所述第二节点为所述第一节点以外的节点;当接收到所述至少一个第二节点广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播回收指示信息,每个第二特征值用于唯一指示第二节点上所存储的共享数据中第一区块高度范围内的数据;如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
- 根据权利要求1所述的方法,其特征在于,所述获取第一节点的第一特征值包括:提取所述回收请求中的第一区块高度;根据所述第一区块高度,在所述共享数据中确定待回收的第一区块高度范围内的数据;基于哈希算法,对所述第一区块高度范围内的数据进行特征值计算,得到所述第一节点的第一特征值。
- 根据权利要求1所述的方法,其特征在于,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播回收指示信息包括:当所述第一特征值和所述多个第二特征值中所包括的相等特征值数目达到 所述预设数目,则确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播所述回收指示信息。
- 根据权利要求1所述的方法,其特征在于,所述如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收之后,所述方法还包括:保留所述第一区块高度对应区块的当前区块特征值。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当检测到所述第一节点的剩余存储空间小于预设存储空间时,根据所述数据共享系统的日共享信息量和所述剩余存储空间,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:每到预设周期,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当检测到当前存储的共享数据的数据量大于预设数据量,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:如果接收到由所述至少一个第二节点广播的多个回收指示信息,则从所述共享数据的镜像数据中,确定所述第一区块高度范围内的镜像数据;获取所述第一区块高度范围内的镜像数据的第二特征值;从所述共享数据的镜像数据中,回收所述第一区块高度范围内的镜像数据,并将所述第二特征值存储至剩余镜像数据中。
- 一种共享数据回收装置,其特征在于,所述装置应用于第一节点,所述第一节点为数据共享系统中的任意节点,所述装置包括:计算模块,用于当接收到携带第一区块高度的回收请求时,获取第一节点的第一特征值,所述第一特征值用于唯一指示所述第一节点上所存储的共享数据中第一区块高度范围内的数据;第一广播模块,用于将所述第一特征值广播至所述数据共享系统中的至少一个第二节点,所述第二节点为所述第一节点以外的节点;第二广播模块,用于当接收到所述至少一个第二节点广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播回收指示信息,每个第二特征值用于唯一指示第二节点上所存储的共享数据中第一区块高度范围内的数据;回收模块,用于如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
- 根据权利要求9所述的装置,其特征在于,所述第二广播模块,用于当所述第一特征值和所述多个第二特征值中所包括的相等特征值数目达到所述预设数目则确定所述数据共享系统内各个节点所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述至少一个第二节点广播所述回收指示信息。
- 根据权利要求9所述的装置,其特征在于,所述装置还包括:第三广播模块,用于当检测到所述第一节点的剩余存储空间小于预设存储空间时,根据所述数据共享系统的日共享信息量和所述剩余存储空间,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点;或,每到预设周期,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点;或,当检测到当前存储的共享数据的数据量大于预设数据量,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中的至少一个第二节点。
- 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现下述方法:当接收到携带第一区块高度的回收请求时,获取所述计算机设备的第一特征值,所述第一特征值用于唯一指示所述计算机设备上所存储的共享数据中第一区块高度范围内数据;将所述第一特征值广播至所述数据共享系统中所述计算机设备以外的计算机设备;当接收到所述计算机设备以外的计算机设备广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个计算机设备所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述计算机设备以外的至少一个计算机设备广播回收指示信息,每个第二特征值用于唯一指示所述计算机设备以外的计算机设备上所存储的共享数据中第一区块高度范围内的数据;如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:提取所述回收请求中的第一区块高度;根据所述第一区块高度,在所述共享数据中确定待回收的第一区块高度范围内的数据;基于哈希算法,对所述第一区块高度范围内的数据进行特征值计算,得到所述计算机设备的第一特征值。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:当所述第一特征值和所述多个第二特征值中所包括的相等特征值数目达到预设数目时,则确定所述数据共享系统内各个计算机设备所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述计算机设备以外的至少一个计 算机设备广播所述回收指示信息。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:保留所述第一区块高度对应区块的当前区块特征值。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:当检测到所述计算机设备的剩余存储空间小于预设存储空间时,根据所述数据共享系统的日共享信息量和所述剩余存储空间,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中所述计算机设备以外的计算机设备。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:每到预设周期,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中所述计算机设备以外的计算机设备。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:当检测到当前存储的共享数据的数据量大于预设数据量,则根据所述数据共享系统的日共享信息量,确定第二区块高度;将携带所述第二区块高度的回收请求广播至所述数据共享系统中所述计算机设备以外的计算机设备。
- 根据权利要求12所述的计算机设备,其特征在于,所述指令还用于由所述处理器加载并执行以实现下述方法:如果接收到由所述计算机设备以外的计算机设备广播的多个回收指示信息,则从所述共享数据的镜像数据中,确定所述第一区块高度范围内的镜像数据;获取所述第一区块高度范围内的镜像数据的第二特征值;从所述共享数据的镜像数据中,回收所述第一区块高度范围内的镜像数据,并将所述第二特征值存储至剩余镜像数据中。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,所述指令可由终端中的处理器执行以完成下述共享数据回收方法:当接收到携带第一区块高度的回收请求时,获取终端的第一特征值,所述第一特征值用于唯一指示所述终端上所存储的共享数据中第一区块高度范围内的数据;将所述第一特征值广播至所述数据共享系统中所述终端以外的终端;当接收到所述终端以外的终端广播的多个第二特征值时,如果根据所述第一特征值和所述多个第二特征值确定所述数据共享系统内各个终端所存储的共享数据中所述第一区块高度范围内的数据一致,则向所述终端以外的终端广播回收指示信息,每个第二特征值用于唯一指示所述终端以外的终端上所存储的共享数据中第一区块高度范围内的数据;如果接收到预设数目的多个回收指示信息,对所述共享数据中所述第一区块高度范围内的数据进行回收。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP18744537.4A EP3575948B1 (en) | 2017-01-24 | 2018-01-23 | Shared data recovery method, device, computer equipment and storage medium |
| US16/430,077 US10795778B2 (en) | 2017-01-24 | 2019-06-03 | Shared data recovery method and apparatus, computer device, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710055111.6A CN107977163B (zh) | 2017-01-24 | 2017-01-24 | 共享数据回收方法及装置 |
| CN201710055111.6 | 2017-01-24 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/430,077 Continuation US10795778B2 (en) | 2017-01-24 | 2019-06-03 | Shared data recovery method and apparatus, computer device, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018137624A1 true WO2018137624A1 (zh) | 2018-08-02 |
Family
ID=62004240
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/073884 Ceased WO2018137624A1 (zh) | 2017-01-24 | 2018-01-23 | 共享数据回收方法、装置、计算机设备及存储介质 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US10795778B2 (zh) |
| EP (1) | EP3575948B1 (zh) |
| CN (1) | CN107977163B (zh) |
| MA (1) | MA47382A (zh) |
| WO (1) | WO2018137624A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109544200A (zh) * | 2018-10-11 | 2019-03-29 | 南京邮电大学 | 一种基于区块链的公共健身器材有奖使用方法 |
| WO2019179540A2 (en) | 2019-07-11 | 2019-09-26 | Alibaba Group Holding Limited | Shared blockchain data storage |
| US10892898B2 (en) | 2019-07-11 | 2021-01-12 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
Families Citing this family (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108667931B (zh) * | 2018-05-10 | 2021-10-29 | 上海敏皓电力投资有限公司 | 基于gps/北斗定位的自组织区块链网络 |
| US11646879B2 (en) * | 2018-06-12 | 2023-05-09 | Electronics And Telecommunications Research Institute | Method and apparatus for selecting distributed consensus node based on proof of nonce |
| CN109508146B (zh) * | 2018-10-11 | 2021-07-23 | 广西师范大学 | 一种区块链的周期性存储空间回收方法 |
| US10791122B2 (en) | 2019-07-04 | 2020-09-29 | Alibaba Group Holding Limited | Blockchain user account data |
| CN110474775B (zh) * | 2019-07-04 | 2020-09-01 | 阿里巴巴集团控股有限公司 | 一种块链式账本中的用户创建方法、装置及设备 |
| CN110598882B (zh) * | 2019-09-29 | 2023-09-19 | 腾讯科技(深圳)有限公司 | 一种回收可回收包装物的方法、装置和存储介质 |
| US12099997B1 (en) | 2020-01-31 | 2024-09-24 | Steven Mark Hoffberg | Tokenized fungible liabilities |
| EP3958144A1 (en) * | 2020-08-19 | 2022-02-23 | Siemens Aktiengesellschaft | Blockchain blocks storage management |
| KR102221436B1 (ko) * | 2020-10-26 | 2021-03-03 | 주식회사 동일아이씨티 | 컴퓨터 프로그램 자동 실행 방법 |
| CN112732487B (zh) * | 2021-01-07 | 2024-01-23 | 中国银联股份有限公司 | 一种数据恢复方法及装置 |
| CN112905554B (zh) * | 2021-02-07 | 2024-05-10 | 全链通有限公司 | 基于区块链的数据共享方法和装置 |
| CN112822224B (zh) * | 2021-04-19 | 2021-06-22 | 国网浙江省电力有限公司 | 一种用于财务数据查询的安全传输方法 |
| CN115269734B (zh) * | 2022-09-27 | 2022-11-29 | 北京奥星贝斯科技有限公司 | 分布式数据库的存储管理方法及装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102346755A (zh) * | 2010-07-30 | 2012-02-08 | 财团法人工业技术研究院 | 渐进式备份的高延展并行资源回收系统与方法 |
| CN103488576A (zh) * | 2013-09-18 | 2014-01-01 | 珠海金山网络游戏科技有限公司 | 一种高性能小区块内存管理方法 |
| CN106201742A (zh) * | 2016-07-04 | 2016-12-07 | 沈阳东软医疗系统有限公司 | 一种共享内存管理方法、装置及系统 |
| US20160371021A1 (en) * | 2015-06-17 | 2016-12-22 | International Business Machines Corporation | Secured Multi-Tenancy Data in Cloud-Based Storage Environments |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI375887B (en) * | 2008-10-31 | 2012-11-01 | A Data Technology Co Ltd | Flash memory device with wear-leveling mechanism and controlling method thereof |
| TW201142646A (en) * | 2010-05-21 | 2011-12-01 | xiang-yu Li | Cloud data storage system |
| JP5685213B2 (ja) * | 2012-02-22 | 2015-03-18 | 日本電信電話株式会社 | 差分レプリケーションシステム、マスターデータベース装置、及びスレーブデータベース装置 |
| US11461690B2 (en) * | 2016-07-18 | 2022-10-04 | Nantomics, Llc | Distributed machine learning systems, apparatus, and methods |
| CN107124278B (zh) * | 2017-03-30 | 2021-03-30 | 腾讯科技(深圳)有限公司 | 业务处理方法、装置以及数据共享系统 |
| US20190279172A1 (en) * | 2018-03-06 | 2019-09-12 | Dash Core Group, Inc. | Methods and Systems for Object Validated Blockchain Accounts |
| US11374736B2 (en) * | 2018-06-20 | 2022-06-28 | Clemson University | System and method for homomorphic encryption |
-
2017
- 2017-01-24 CN CN201710055111.6A patent/CN107977163B/zh active Active
-
2018
- 2018-01-23 WO PCT/CN2018/073884 patent/WO2018137624A1/zh not_active Ceased
- 2018-01-23 EP EP18744537.4A patent/EP3575948B1/en active Active
- 2018-01-23 MA MA047382A patent/MA47382A/fr unknown
-
2019
- 2019-06-03 US US16/430,077 patent/US10795778B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102346755A (zh) * | 2010-07-30 | 2012-02-08 | 财团法人工业技术研究院 | 渐进式备份的高延展并行资源回收系统与方法 |
| CN103488576A (zh) * | 2013-09-18 | 2014-01-01 | 珠海金山网络游戏科技有限公司 | 一种高性能小区块内存管理方法 |
| US20160371021A1 (en) * | 2015-06-17 | 2016-12-22 | International Business Machines Corporation | Secured Multi-Tenancy Data in Cloud-Based Storage Environments |
| CN106201742A (zh) * | 2016-07-04 | 2016-12-07 | 沈阳东软医疗系统有限公司 | 一种共享内存管理方法、装置及系统 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3575948A4 |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109544200A (zh) * | 2018-10-11 | 2019-03-29 | 南京邮电大学 | 一种基于区块链的公共健身器材有奖使用方法 |
| WO2019179540A2 (en) | 2019-07-11 | 2019-09-26 | Alibaba Group Holding Limited | Shared blockchain data storage |
| EP3673620A4 (en) * | 2019-07-11 | 2020-09-30 | Alibaba Group Holding Limited | SHARED BLOCK CHAIN DATA STORAGE |
| US10892898B2 (en) | 2019-07-11 | 2021-01-12 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
| US11055712B2 (en) | 2019-07-11 | 2021-07-06 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
| US11088849B2 (en) | 2019-07-11 | 2021-08-10 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
| US11270308B2 (en) | 2019-07-11 | 2022-03-08 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
| US11405219B2 (en) | 2019-07-11 | 2022-08-02 | Advanced New Technologies Co., Ltd. | Shared blockchain data storage |
Also Published As
| Publication number | Publication date |
|---|---|
| US10795778B2 (en) | 2020-10-06 |
| MA47382A (fr) | 2019-12-04 |
| CN107977163A (zh) | 2018-05-01 |
| EP3575948A1 (en) | 2019-12-04 |
| EP3575948B1 (en) | 2021-11-17 |
| US20190286532A1 (en) | 2019-09-19 |
| EP3575948A4 (en) | 2020-08-26 |
| CN107977163B (zh) | 2019-09-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018137624A1 (zh) | 共享数据回收方法、装置、计算机设备及存储介质 | |
| CN106598488B (zh) | 分布式数据读取方法及装置 | |
| WO2016155233A1 (zh) | 智能场景删除方法和装置 | |
| WO2016206293A1 (zh) | 运营商网络的接入方法和装置 | |
| RU2662398C2 (ru) | Способы, устройства, терминал и маршрутизатор для отправки сообщения | |
| WO2017128718A1 (zh) | 获取终端信息的方法及装置 | |
| CN105791325A (zh) | 图像发送方法和装置 | |
| CN108573034A (zh) | 数据备份方法、装置、计算机设备及可读存储介质 | |
| CN106713127B (zh) | 即时聊天记录的获取及处理方法和装置 | |
| CN106920170B (zh) | 交易提醒方法和装置 | |
| US10324910B2 (en) | Contact record processing method and apparatus | |
| CN103914337A (zh) | 服务调用方法、装置及终端 | |
| CN114328629A (zh) | 数据缓存方法、装置、电子设备及存储介质 | |
| WO2019183761A1 (zh) | 信息记录方法和信息记录装置 | |
| CN107222576A (zh) | 相册同步方法及装置 | |
| CN106412481B (zh) | 基于VoLTE视频通话的提示方法、装置及终端 | |
| US12127055B2 (en) | Method for processing link failure information and electronic device | |
| CN108647285B (zh) | 分布式文件系统中重命名方法、装置及分布式文件系统 | |
| WO2017113659A1 (zh) | 一种管理应用程序的方法和装置 | |
| CN118300858A (zh) | 数据加密方法、装置、设备、存储介质 | |
| CN116501515A (zh) | 信息同步方法、装置、电子设备及存储介质 | |
| CN108009025A (zh) | 数据存储方法及装置 | |
| CN110716985B (zh) | 一种节点信息处理方法、装置及介质 | |
| CN111290882A (zh) | 数据文件备份方法、数据文件备份装置及电子设备 | |
| CN105516456B (zh) | 通信事件转移方法、装置及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18744537 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2018744537 Country of ref document: EP Effective date: 20190826 |