CN109885258B - Data deleting device and method based on block chain - Google Patents
Data deleting device and method based on block chain Download PDFInfo
- Publication number
- CN109885258B CN109885258B CN201910105016.1A CN201910105016A CN109885258B CN 109885258 B CN109885258 B CN 109885258B CN 201910105016 A CN201910105016 A CN 201910105016A CN 109885258 B CN109885258 B CN 109885258B
- Authority
- CN
- China
- Prior art keywords
- block
- data
- block chain
- blockchain node
- blocks
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a data deleting device and method based on a block chain. Generating a first block, the first block comprising a first age; when the first time effect arrives, determining the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block as invalid data. So that the blockchain can more delicately cope with increasingly large data sizes.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a data deleting device and method based on a block chain.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain becomes a hot topic in nearly two years, and the counterfeiting behavior of data in the circulation process in the system in the traditional transaction mode can be effectively solved through the integration of technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, so that a credible transaction environment is constructed, and a credible society is created.
The concept of blockchain was first proposed by this wisdom in 2008, in the original paper of this wisdom, the two words "blockchain" and "chain" are used separately and are collectively called blockchain when widely used, and are not changed into a word until 2016: "Block chain". The blockchain becomes the core component of the bitcoin: as a common ledger for all transactions. However, the application scenario of the block chain technology itself is far beyond the range of bitcoin. The blockchain technique cannot be treated as tied to bitcoins.
Distributed Ledger Technology (DLT) is essentially a decentralized data storage Technology that can share, synchronize, and replicate data in a network of multiple network nodes, multiple physical addresses, or multiple organizations. Compared with the traditional distributed storage system, the distributed account book technology mainly has two different characteristics: the traditional distributed storage system executes a data management mechanism controlled by a certain central node or an authority, and the distributed book usually performs operations such as data storage, data replication and the like by adopting a multi-party decision and common maintenance mode based on a certain consensus rule. In the face of explosive growth of internet data, a way of constructing a data management system by a single center organization is being challenged more currently, a service party has to continuously add investment to construct a large-scale data center, so that the problem of efficiency of various huge resource pools such as calculation, network and storage is brought, and the problem of increasingly severe reliability is brought by the continuously increasing scale and complexity of the system. However, the data maintenance strategy of decentralized distributed account book technology can just effectively reduce the burden of system bloat. In some application scenarios, even a huge resource pool precipitated by a large number of scattered nodes in the internet can be effectively utilized. The traditional distributed storage system decomposes data in the system into a plurality of segments, then stores the segments in the distributed system, nodes of any one party in the distributed account book respectively have independent and complete data storage, the nodes do not interfere with each other and have equal authority, and the final consistency of the data storage is achieved through mutual periodicity or event-driven consensus. After decades of development, the short board of the highly centralized data management system in the traditional business system has been receiving increasing attention from people in terms of data credibility and network security. In order to solve the problems, people continuously add an additional management mechanism or technology, which further increases the maintenance cost of the traditional business system and reduces the operation efficiency of commercial behaviors. The distributed accounting book technology can fundamentally and greatly improve the phenomenon, because each node maintains a set of complete data copies, and the modification of any single node or a few clusters on data cannot affect most copies of the whole situation. In other words, whether the service provider intentionally modifies without authorization or malicious attack of a network hacker, most of nodes in the distributed book cluster need to be affected at the same time to tamper the existing data, otherwise, the remaining nodes in the system will quickly discover and trace back malicious behaviors in the system, which obviously greatly improves the reliability and security assurance of the data in the service system. However, since each node maintains a complete set of data copies, the maintenance cost of each node is higher and higher as the data size is larger and larger.
Disclosure of Invention
Based on the foregoing problem, embodiments of the present invention provide a data deleting apparatus and method based on a block chain. So that the blockchain can more delicately cope with increasingly large data sizes.
In a first aspect, a method for deleting data based on a block chain is provided. The method comprises the following steps:
generating a first block, the first block comprising a first age;
when the first time effect arrives, determining the first block and all blocks in the chain of blocks that precede the first block and are in the same branch as the first block as invalid data.
Optionally, the determining, as invalid data, the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block comprises:
deleting the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block.
Optionally, the method further comprises:
when data synchronization is performed between the block link points, valid data is synchronized.
Optionally, the method is applied to a blockchain node in a blockchain node network, wherein the blockchain nodes in the blockchain node network comprise a master blockchain node and a slave blockchain node, the master blockchain node is used for synchronizing invalid data and valid data, and the slave blockchain node is used for synchronizing valid data.
Optionally, the method further comprises:
receiving an invalid data synchronization request sent from a blockchain node;
sending the invalid data to the slave block link point.
In a second aspect, an apparatus for deleting data based on a block chain is provided. The device comprises:
a generating unit, configured to generate a first block, where the first block includes a first age;
a determining unit, configured to determine, as invalid data, the first block and all blocks that precede the first block and are in the same branch as the first block in the block chain when the first time effect arrives.
Optionally, the determining unit is specifically configured to delete the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block.
Optionally, the method further comprises:
and the synchronization unit is used for synchronizing the effective data when data synchronization is carried out between the block chain nodes.
Optionally, the apparatus is adapted for use with a blockchain node in a blockchain-link-point network, the blockchain node in the blockchain-point network including a master blockchain node for synchronizing invalid data and valid data and a slave blockchain node for synchronizing valid data.
Optionally, the method further comprises:
a receiving unit, configured to receive an invalid data synchronization request sent from a block link node;
a sending unit, configured to send the invalid data to the slave block link point.
In a third aspect, the present specification provides a computer device, including a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method steps of the first aspect when executing the program.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect described above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The embodiment of the invention can realize the classified management of the data in the block chain, reduce the data synchronization load of the block chain and ensure that the block chain can more leisurely cope with increasingly huge data scale.
Drawings
FIG. 1 illustrates an exemplary architecture for applying embodiments provided herein;
FIG. 2 is a flow chart provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a block chain-based quality assurance data processing device and method. Fig. 1 shows an exemplary architecture to which the embodiments provided herein apply.
As shown in fig. 1, one or more block link nodes 101 may be provided in the exemplary architecture, and when there are a plurality of block link nodes 101, a network of block link nodes is formed. Blockchain node 101 may connect one or more clients 102. The client 102 may be implemented in software or hardware. When implemented as hardware, it may use a notebook computer, a desktop computer, a mobile terminal, and the like.
The client 102 may be configured to interact with the blockchain link point 101, for example, the client 102 may query the record in the blockchain and may record the information in the blockchain. The block chain node 101 may store a block chain, and the client 102 may obtain the block chain from the block chain node 101, or may send a newly generated block to the block chain node 101; where the client 102 may be divided into various clients by function, such as a query client, a packaging client, etc., where the packaging client may be used to package new tiles, etc. Here, a block is an element forming a block chain.
For the purpose of facilitating understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 2 is a block chain-based data deletion method according to an embodiment of the present invention. As shown in fig. 2, the method includes: s210, generating a first block, wherein the first block comprises a first aging; s220, when the first time effect arrives, determining the first block and all blocks which are in front of the first block and in the same branch with the first block in the block chain as invalid data.
When data recording is performed through a block chain, a data generation block is generally recorded as needed, and the block may include a block header, where the block header may include an identifier of the block and an identifier of a previous block, so that all blocks may form a chain structure, and the chain structure may be a tree structure. The tile header may also include a timestamp and an age. Whether the aging is reached can be judged according to the time stamp. For example, the blockchain is used to record a production date and a shelf life of a product, the aging may be the expiration of the shelf life or a specified length of time after the expiration of the shelf life, and the timestamp may indicate the production date of the product.
When it is determined that the first time effect corresponding to the first block arrives, the first block may be determined as invalid data. Since the block chain is a chain structure in which one block is connected to another block, a problem occurs if only the first block is set as invalid data. For example, if the first block is deleted, the next block of the first block cannot be connected to the previous block of the first block. At this time, all blocks before the first block may be deleted entirely. In addition, since the blockchain may be a tree structure, when deleting, the first block and all blocks that precede the first block and are in the same branch as the first block may be deleted.
Wherein determining the block as invalid data may include various forms.
In one example, the aforementioned determining as invalid data the first block and all blocks in the chain of blocks that precede the first block and that are in the same branch as the first block comprises:
deleting the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block.
In another example, the tiles may be classified with stale data being aged and valid data not aged. Based on this, the method may further comprise: when data synchronization is performed between the block link points, valid data is synchronized.
Further, the method is applicable to blockchain nodes in a blockchain link point network. Nodes in a block-linked node network may be ranked, with different levels of block-linked nodes synchronizing different classes of data. For example, a tile link point in a tile link point network may be divided into a master tile link node for synchronizing invalid data and valid data and a slave tile link point for synchronizing valid data. Based on this, the method further comprises: receiving an invalid data synchronization request sent from a blockchain node; invalid data is sent to the slave block link point.
The embodiment of the invention can realize the classified management of the data in the block chain, reduce the data synchronization load of the block chain and ensure that the block chain can more leisurely cope with increasingly huge data scale.
Fig. 3 is a block chain-based data deleting device according to an embodiment of the present invention, as shown in fig. 3, the device includes:
a generating unit 301, configured to generate a first block, where the first block includes a first age;
a determining unit 302, configured to determine, as invalid data, the first block and all blocks that precede the first block and are in the same branch as the first block in the block chain when the first time effect arrives.
Optionally, the determining unit is specifically configured to delete the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block.
Optionally, the method further comprises:
the synchronization unit 303 is configured to synchronize valid data when data synchronization is performed between the block link points.
Optionally, the apparatus is adapted for use with a blockchain node in a blockchain-link-point network, the blockchain node in the blockchain-point network comprising a master blockchain node for synchronizing invalid data and valid data and a slave blockchain node for synchronizing valid data.
Optionally, the method further comprises:
a receiving unit, configured to receive an invalid data synchronization request sent from a block link node;
a sending unit, configured to send the invalid data to the slave block link point.
Fig. 4 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification, where the computer device may include: a processor 410, a memory 420, an input/output interface 430, and a bus 440. Wherein the processor 410, memory 420, input/output interface 430 and communication interface 440 are communicatively coupled to each other within the device via bus 440.
The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 420 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 420 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 420 and called to be executed by the processor 410.
The input/output interface 430 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface can be further included for connecting a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
It should be noted that although the above-mentioned device only shows the processor 410, the memory 420, the input/output interface 430 and the bus 440, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the scope of the present invention should be included in the scope of the present invention.
Claims (4)
1. A block chain-based data deletion method is characterized by comprising the following steps:
generating a first block, the first block comprising a first age;
when the first time effect arrives, determining the first block and all blocks which are before the first block and are in the same branch with the first block in the block chain as invalid data; the determining as invalid data the first block and all blocks in the chain of blocks that precede the first block and that are in the same branch as the first block comprises: deleting the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block;
when data synchronization is carried out among the block chain link points, effective data are synchronized;
the method is applicable to a blockchain node in a blockchain node network, wherein the blockchain nodes in the blockchain node network comprise a master blockchain node and a slave blockchain node, the master blockchain node is used for synchronizing invalid data and valid data, and the slave blockchain node is used for synchronizing valid data.
2. The method of claim 1, further comprising:
receiving an invalid data synchronization request sent from a blockchain node;
sending the invalid data to the slave block link point.
3. An apparatus for deleting data based on a block chain, the apparatus comprising:
a generating unit, configured to generate a first block, where the first block includes a first age;
a determining unit, configured to determine, as invalid data, the first block and all blocks preceding the first block and in the same branch as the first block in the block chain when the first time effect arrives; the determining unit is specifically configured to delete the first block and all blocks in the block chain that precede the first block and are in the same branch as the first block;
the synchronization unit is used for synchronizing effective data when data synchronization is carried out among the block chain link points;
the device is suitable for the block chain nodes in the block chain link point network, the block chain link points in the block chain link point network comprise main block chain nodes and slave block chain link points, the main block chain nodes are used for synchronizing invalid data and valid data, and the slave block chain link points are used for synchronizing valid data.
4. A computer readable storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910105016.1A CN109885258B (en) | 2019-02-01 | 2019-02-01 | Data deleting device and method based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910105016.1A CN109885258B (en) | 2019-02-01 | 2019-02-01 | Data deleting device and method based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109885258A CN109885258A (en) | 2019-06-14 |
CN109885258B true CN109885258B (en) | 2023-02-21 |
Family
ID=66927898
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910105016.1A Active CN109885258B (en) | 2019-02-01 | 2019-02-01 | Data deleting device and method based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109885258B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110493148B (en) * | 2019-08-12 | 2022-04-01 | 深圳前海微众银行股份有限公司 | Block processing, block consensus and block synchronization method and device |
CN113655965B (en) * | 2021-08-20 | 2024-07-26 | 湖北央中巨石信息技术有限公司 | Capacity expansion method of block chain network, block chain network system and block chain network operation method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106598490A (en) * | 2016-11-25 | 2017-04-26 | 深圳前海微众银行股份有限公司 | Access method for block chain data and block chain management system |
WO2018103850A1 (en) * | 2016-12-08 | 2018-06-14 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and apparatus for creating a finite blockchain |
CN108270836A (en) * | 2017-01-03 | 2018-07-10 | 华为技术有限公司 | Data processing method, equipment and system based on block chain |
CN108694665A (en) * | 2017-04-05 | 2018-10-23 | 三星Sds株式会社 | Block chain managing device, data processing system and present deal processing method |
CN108810127A (en) * | 2018-06-04 | 2018-11-13 | 立旃(上海)科技有限公司 | Disaster recovery method based on block chain and device |
CN108876364A (en) * | 2017-05-16 | 2018-11-23 | 江峰 | A kind of band buries in oblivion the block catenary system of mechanism |
CN109032802A (en) * | 2018-07-26 | 2018-12-18 | 国信优易数据有限公司 | A kind of block catenary system and management method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106452785B (en) * | 2016-09-29 | 2019-05-17 | 财付通支付科技有限公司 | Block chain network, branch node and block chain network application method |
CN107332876B (en) * | 2017-05-31 | 2020-05-08 | 深圳前海微众银行股份有限公司 | Method and device for synchronizing block chain state |
-
2019
- 2019-02-01 CN CN201910105016.1A patent/CN109885258B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106598490A (en) * | 2016-11-25 | 2017-04-26 | 深圳前海微众银行股份有限公司 | Access method for block chain data and block chain management system |
WO2018103850A1 (en) * | 2016-12-08 | 2018-06-14 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and apparatus for creating a finite blockchain |
CN108270836A (en) * | 2017-01-03 | 2018-07-10 | 华为技术有限公司 | Data processing method, equipment and system based on block chain |
CN108694665A (en) * | 2017-04-05 | 2018-10-23 | 三星Sds株式会社 | Block chain managing device, data processing system and present deal processing method |
CN108876364A (en) * | 2017-05-16 | 2018-11-23 | 江峰 | A kind of band buries in oblivion the block catenary system of mechanism |
CN108810127A (en) * | 2018-06-04 | 2018-11-13 | 立旃(上海)科技有限公司 | Disaster recovery method based on block chain and device |
CN109032802A (en) * | 2018-07-26 | 2018-12-18 | 国信优易数据有限公司 | A kind of block catenary system and management method |
Also Published As
Publication number | Publication date |
---|---|
CN109885258A (en) | 2019-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11750607B2 (en) | Identifying accounts having shared credentials | |
CN108270874B (en) | Application program updating method and device | |
KR20210003234A (en) | Maintaining blocks of a blockchain in a segmented blockchain network | |
EP3572966B1 (en) | Blockchain management method, blockchain management program, blockchain management device, and blockchain management system | |
CN107493340B (en) | Data distribution verification method, device and system in block chain network | |
AU2018348333A1 (en) | Data isolation in a blockchain network | |
MX2014011988A (en) | Telemetry system for a cloud synchronization system. | |
CN111400112A (en) | Writing method and device of storage system of distributed cluster and readable storage medium | |
CN111291060A (en) | Method, device and computer readable medium for managing block chain nodes | |
JP6617253B1 (en) | Document management system | |
WO2022134797A1 (en) | Data fragmentation storage method and apparatus, a computer device, and a storage medium | |
CN110597918A (en) | Account management method and device and computer readable storage medium | |
WO2023011022A1 (en) | Blockchain-based data processing method, and device and computer-readable storage medium | |
CN109885258B (en) | Data deleting device and method based on block chain | |
US20200394162A1 (en) | Operation management method for distributed ledger system, operation management system for distributed ledger system, and operation management program for distributed ledger system | |
CN109857810A (en) | Data synchronization unit and method based on block chain | |
CN112398956B (en) | Data processing method, device and equipment based on block chain and readable storage medium | |
WO2019222399A1 (en) | Conflict resolution in distributed computing | |
CN114422343A (en) | Service configuration method, device, system and computer readable storage medium | |
CN114416883A (en) | Block chain light node data synchronization method, device, equipment and readable storage medium | |
CN112417052B (en) | Data synchronization method, device, equipment and storage medium in block chain network | |
Shen et al. | Achieving data consistency by contextualization in web-based collaborative applications | |
JP7305898B2 (en) | Operation response method, operation response device, electronic device and storage medium | |
US20220114276A1 (en) | Controlling a data network with respect to a use of a distributed database | |
CN115208671B (en) | Firewall configuration method, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |