Blockchain data archiving method and device

By generating archived data sets and storing them in a distributed file storage system, the problem of infinite increase in disk space in the blockchain system is solved, and data security and storage space savings are achieved.

CN112380166BActive Publication Date: 2024-10-01SHANGHAI INSURANCE EXCHANGE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011259647.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-12
Publication Date
2024-10-01
Estimated Expiration
2040-11-12

AI Technical Summary

Technical Problem

When the blockchain system stores data, disk space increases indefinitely, causing storage costs and disk space to become bottlenecks. Existing technologies cannot effectively solve this problem.

Method used

By generating archived data sets, storing them in a distributed file storage system, and deleting local data, we leverage the scalability and multi-backup features of the distributed file storage system to configure a certain number of backups to ensure data security and save disk space. space.

Benefits of technology

It effectively saves the disk usage space of the blockchain system, ensures data security, and reduces storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112380166B_ABST
    Figure CN112380166B_ABST
Patent Text Reader

Abstract

The present application provides a blockchain data archiving method and device, wherein the method is applied to a blockchain node, including: generating an archived data set based on the block data of the blockchain system; storing the archived data set in a distributed file storage system; deleting the archived data set and the block data corresponding to the archived data set. The above scheme packages the block data and archives it in a distributed file storage system, and deletes the locally archived block data at the same time, which can effectively save the disk usage space of the blockchain system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain data archiving method and device. Background Art

[0002] At present, in the actual use of blockchain technology, blockchain nodes generally store all data. Usually, the underlying blockchain directly uses a key-value database (for example, LevelDB) to store block data and status data. Generally, when using this type of database, it is used directly. Although some key-value databases have certain compression and archiving functions, they only compress the storage space to a limited extent.

[0003] However, as the blockchain system gradually uses more space in applications, the pressure on the disk will increase. If the blockchain is used to store data without restraint, the storage cost and disk space will become the bottleneck restricting the blockchain system.

[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a blockchain data archiving method and device to solve the problem of unlimited increase in storage space used by blockchain systems in the prior art.

[0006] An embodiment of the present application provides a blockchain data archiving method, including: generating an archived data set based on block data of a blockchain system; storing the archived data set in a distributed file storage system; and deleting the archived data set and the block data corresponding to the archived data set.

[0007] In one embodiment, after the archived data set is generated, the method further includes: compressing the archived data set to obtain a compressed archived data set.

[0008] In one embodiment, generating an archived data set based on block data of a blockchain system includes: determining whether to archive the block data of the blockchain system; and generating an archived data set based on the block data of the blockchain system if it is determined that the block data of the blockchain system is to be archived.

[0009] In one embodiment, determining whether to archive block data of a blockchain system includes: obtaining a current block height, a block height of a previous block archive, a number of hot blocks retained, and a number of blocks archived at one time; determining whether the current block height is greater than the sum of the block height of a previous block archive, the number of hot blocks retained, and the number of blocks archived at one time; and determining to archive the block data of the blockchain system if it is determined that the current block height is greater than the sum of the block height of a previous block archive, the number of hot blocks retained, and the number of blocks archived at one time.

[0010] In one embodiment, generating an archive data set includes: generating an instance of an archive data structure for each block in a number of archived blocks, obtaining multiple instances of the archive data structure; and forming an archive data set from the multiple instances of the archive data structure in block order.

[0011] In one embodiment, storing an archived data set in a distributed file storage system includes: initiating a first consensus request, wherein the first consensus request is used to verify the archived data set; and storing the archived data set in the distributed file storage system when consensus is reached in the first consensus request.

[0012] In one embodiment, deleting the archived data set and the block data corresponding to the archived data set includes: initiating a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification; when consensus is reached on the second consensus request, deleting the archived data set and the block data corresponding to the archived data set.

[0013] In one embodiment, after deleting the archived data set and the block data corresponding to the archived data set, the method further includes: generating an archive list, wherein the archive list includes the correspondence between the identification information of the block and the identification information of the archived data set.

[0014] In one embodiment, after the archive list is generated, it also includes: receiving a query request from a user client, wherein the query request includes identification information of the block; querying identification information of an archive data set corresponding to the identification information of the block from the archive list; reading the archive data set from a distributed file storage system according to the identification information of the archive data set; verifying the read archive data set; and returning the archive data set to the user client if the verification is correct.

[0015] An embodiment of the present application also provides a blockchain data archiving device, which is located in a blockchain node and includes: a generation module, which is used to generate an archived data set based on the block data of the blockchain system; a storage module, which is used to store the archived data set in a distributed file storage system; and a deletion module, which is used to delete the archived data set and the block data corresponding to the archived data set.

[0016] An embodiment of the present application also provides a computer device, including a processor and a memory for storing processor-executable instructions, wherein when the processor executes the instructions, the steps of the blockchain data archiving method described in any of the above embodiments are implemented.

[0017] An embodiment of the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed, implement the steps of the blockchain data archiving method described in any of the above embodiments.

[0018] In an embodiment of the present application, a blockchain data archiving method is provided. Based on the block data of the blockchain system, an archive data set is generated, a first consensus request is initiated to verify the archive data set, and when the first consensus request reaches a consensus, the archive data set is stored in a distributed file storage system, a second consensus request is initiated to download the archive data set from the distributed file storage system and verify it, and when the second consensus request reaches a consensus, the local archive data set of the blockchain node and the data of a preset number of blocks are deleted, thereby completing the archiving of blockchain data. In the above scheme, an archive data set is generated based on the block data of the blockchain system and uploaded to the distributed file storage system for archiving and preservation, and the local archive data set and the block data corresponding to the archive data set are deleted at the same time. Since the distributed file storage system has the characteristics of scalability, configurability, multiple backups and not easy to lose, the distributed file storage system is used to save the archive data and configure a certain number of backups, which can ensure the security of the block data. At the same time, the block data is deleted from the blockchain node after archiving, which can save a lot of disk usage space. The above scheme solves the technical problem of unlimited increase in storage space used by the blockchain system in the prior art, and achieves the technical effect of effectively saving the disk usage space of the blockchain system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. In the drawings:

[0020] Figure 1 A flowchart of a blockchain data archiving method in an embodiment of the present application is shown;

[0021] Figure 2 A flowchart of a blockchain data archiving method in an embodiment of the present application is shown;

[0022] Figure 3 A schematic diagram of a blockchain data archiving device in an embodiment of the present application is shown;

[0023] Figure 4 A schematic diagram of a computer device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0025] Those skilled in the art know that the embodiments of the present application can be implemented as a system, device, method or computer program product. Therefore, the present application can be implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0026] In a scenario example provided in the embodiments of this specification, when the blockchain system is started, each blockchain node simultaneously starts a distributed file storage system, for example, IPFS (InterPlanetary File System). When archiving the block data of the blockchain system, the distributed file storage system can be used to save the archived data, configure a certain number of backups, and archive the block data of the blockchain. After archiving, the block data is deleted locally from the blockchain node. If you need to query the data, go directly to the distributed file storage system to query and download. Since the query frequency of blockchain historical data is low, the above solution has little impact on system performance, but it will save more disk usage space.

[0027] Specifically, in this scenario example, the blockchain system will record the block height of the last block archive, which is 0 when the system is just started. When the blockchain system detects that the current block height > the last archived block height + the number of archived blocks + the number of hot blocks retained, the archiving function will be triggered. The number of archived blocks can be the number of block data archived each time. The number of hot blocks retained indicates how many hot blocks the system retains at least and does not archive.

[0028] When the blockchain node runs to this height, it triggers its own archiving function and packages the block data of the number of archived blocks at a time into an archive data set. Each block will generate an archive data structure, which includes data such as the block header, block body, and receipt of block transactions (one block can correspond to multiple receipts). The archive data structures of multiple blocks form an archive data set. There are as many archive data structures in an archive data set as the number of archived blocks at a time. After the block data is packaged, it can also be compressed. Among them, the compression algorithm used can be configured in the genesis block and unified across the entire chain.

[0029] When one of the blockchain nodes completes the packaging work, it will issue a first consensus request. The consensus request algorithm can be the Byzantine consensus algorithm or other consensus algorithms (for example, the raft algorithm). The Byzantine consensus algorithm is used as an example for explanation. The blockchain node that makes the first consensus request can be the blockchain node that packages the next block of the current block, or the blockchain node that packages the archived data set the fastest. This application does not impose any restrictions on this.

[0030] In the case of the Byzantine consensus algorithm, due to the long consensus time, a branch of Byzantine consensus can be started in addition to the main Byzantine consensus, which is specifically used for the Byzantine consensus of systemic data. After the blockchain node issues the first consensus request, the first consensus request will be broadcast to the blockchain nodes of the entire network and placed in the system transaction queue of the blockchain nodes of the entire network. Each blockchain node has a system transaction pool, and the transactions in the transaction pool will be subject to independent inspection logic. Since this kind of consensus request has a long processing time, the delay of this system-level archiving transaction needs to be set independently and for a long time.

[0031] After other blockchain nodes complete local archive verification, they will enter the voting phase. If the archive block number and archive hash value of the first consensus request are consistent, a consent vote will be issued. After receiving more than two-thirds of the consent votes from the blockchain nodes in the entire network, the blockchain node that initiated the first consensus request will send a message that it has received more than two-thirds of the consent votes from the entire network, and wait for messages from other blockchain nodes. If the blockchain node receives more than two-thirds of the consent votes from the consensus nodes in the entire network, it will enter the upload phase.

[0032] In the upload phase, the blockchain node that proposes the first consensus request uploads and submits the archived data set to the distributed file storage system for storage. If the blockchain node has a problem at this stage, a timeout will occur. If a timeout occurs, other blockchain nodes will initiate the first consensus request and upload the archived data set to the distributed file storage system after reaching a consensus. For example, when archiving, all nodes archive together, but the archiving request is initiated by the node that packages the next block. For example: at the beginning, the block height of the last archive is 0, the number of archived blocks at a time is 1000, and the number of hot blocks reserved is 500. Then, archiving starts from 1500 blocks, and the first consensus request is initiated by the packaging node of 1501 blocks. If a timeout occurs, the first consensus request is submitted by the packaging node of 1502 blocks.

[0033] If the upload is successful, the blockchain node issues a second consensus request. After receiving the second consensus request, other nodes download the archived data set from the distributed file storage system and verify it. If the verification passes, a consent vote is issued. After receiving more than two-thirds of the consent votes from the blockchain nodes in the entire network, the node will issue a message that it has received more than two-thirds of the consent votes from the entire network, and wait for messages from other nodes. If the node receives more than two-thirds of the consent votes from the consensus nodes in the entire network, it will enter the deletion phase.

[0034] In the deletion phase, the blockchain node makes the result of the second consensus request into a transaction and puts it into the main consensus process, that is, issuing a third consensus request. After reaching a consensus on the third consensus request, each blockchain node deletes the locally archived block data and archived data sets. It should be noted that only the block body is deleted here, and the block header is retained for verification. In addition, an archive list can be generated locally, corresponding to which blocks are stored in which archived data set, to facilitate subsequent query and download.

[0035] When the archived data needs to be used, such as verification or query, the local archive list is queried to find the archived data set to which the block data belongs, the archived data set is read from the distributed file storage system, decompressed, and checked with the local block header. If the verification is correct, the archived data set is read and returned to the data caller.

[0036] An embodiment of the present application provides a blockchain data archiving method. Figure 1A flowchart of a blockchain data archiving method in an embodiment of the present application is shown. Although the present application provides method operation steps or device structures as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure described in the embodiments of the present application and shown in the drawings. When the method or module structure is applied to an actual device or terminal product, it can be connected according to the method or module structure shown in the embodiment or drawings for sequential execution or parallel execution (for example, a parallel processor or a multi-threaded processing environment, or even a distributed processing environment).

[0037] Specifically, Figure 1 As shown, a blockchain data archiving method provided by an embodiment of the present application may include the following steps.

[0038] Step S101, generating an archive data set based on the block data of the blockchain system.

[0039] Specifically, the method in this embodiment is applied to a blockchain node in a blockchain system. An archive data set can be generated based on the block data of the system. For example, the block data of the block to be archived can be packaged into an archive data set. When packaging the block data, the block header, block body and receipt corresponding to each block (i.e., the transaction result corresponding to the transaction content in the block) are packaged.

[0040] Step S102: storing the archived data set in a distributed file storage system.

[0041] After generating the archived data set, the blockchain node uploads the archived data set to the distributed file storage system for storage. The distributed file storage system can save a preset number of copies of the archived data set. The preset number can be set according to actual needs, for example, 3, 4, or 5.

[0042] Step S103: deleting the archived data set and the block data corresponding to the archived data set.

[0043] After storing the archived data set in the distributed file storage system, the blockchain node can delete the archived data set and the block data corresponding to the archived data set. Other blockchain nodes in the blockchain system can also delete the block data corresponding to the archived data set.

[0044] In the blockchain data archiving method in the above embodiment, an archived data set is generated based on the block data of the blockchain system and uploaded to the distributed file storage system for archiving and preservation, and the local archived data set and the block data corresponding to the archived data set are deleted. Since the distributed file storage system is scalable, configurable, has multiple backups and is not easy to lose, the archived data is saved by the distributed file storage system and a certain number of backups are configured, which can ensure the security of the block data. At the same time, the block data is deleted locally from the blockchain node after archiving, which can save a lot of disk usage space.

[0045] In some embodiments of the present application, storing an archived data set in a distributed file storage system may include: initiating a first consensus request, wherein the first consensus request is used to verify the archived data set; and if consensus is reached in the first consensus request, storing the archived data set in the distributed file storage system.

[0046] Specifically, after the blockchain node generates an archived data set, a first consensus request is initiated. The first consensus request is used to verify the archived data set. After the blockchain node initiates the first consensus request, the first consensus request is broadcast to the blockchain nodes of the entire network. After other blockchain nodes complete the local archive verification, they will enter the voting stage. If the verification of the number of archived blocks and the archived hash value of the first consensus request is consistent, a consent vote will be issued. Exemplarily, after receiving more than two-thirds of the consent votes from the blockchain nodes of the entire network, the blockchain node will issue a message that more than two-thirds of the consent votes from the entire network have been received, and wait for messages from other blockchain nodes. If the blockchain node receives a message that more than two-thirds of the consensus nodes of the entire network have agreed to vote, the first consensus request reaches a consensus. In the case where the first consensus request reaches a consensus, the archived data set is stored in the distributed file storage system. In the above manner, the correctness of the archived data set uploaded to the distributed file storage system can be guaranteed.

[0047] In some embodiments of the present application, deleting an archived data set and block data corresponding to the archived data set includes: initiating a second consensus request, wherein the second consensus request is used to download the archived data set from a distributed file storage system and perform verification; when consensus is reached in the second consensus request, deleting the archived data set and block data corresponding to the archived data set.

[0048] Specifically, when the archived data set is successfully uploaded to the distributed file storage system, the blockchain node initiates a second consensus request. The second consensus request is used to download the archived data set from the distributed file storage system and verify it. The second consensus request is broadcast to the blockchain nodes of the entire network. After receiving the second consensus request, other blockchain nodes download the archived data set from the distributed file storage system and verify it. If the verification passes, a consent vote is issued. After receiving more than two-thirds of the consent votes of the nodes in the entire network, the blockchain node will issue a message that more than two-thirds of the consent votes of the entire network have been received, and wait for messages from other nodes. If the blockchain node receives more than two-thirds of the consent votes of the consensus nodes in the entire network, the second consensus request consensus is successful. When the second consensus request reaches a consensus, the blockchain node can delete the archived data set and the block data corresponding to the archived data set. Other blockchain nodes in the blockchain system also delete the local archived data set and the corresponding block data. In the above manner, the block data is deleted only when the archived data set stored in the distributed file storage system is successfully verified, which can further ensure the accuracy of data archiving and avoid accidental deletion of data.

[0049] In some embodiments of the present application, deleting the archived data set and the block data corresponding to the archived data set may include: deleting the archived data set; deleting the block body of the block corresponding to the archived data set and retaining the block header. Specifically, the blockchain node may also delete the local archived data set and the corresponding block data. When deleting the block data, only the block body of each block is deleted, and the block header is retained to facilitate subsequent verification.

[0050] In some embodiments of the present application, when the second consensus request reaches a consensus, deleting the archived data set and the block data corresponding to the archived data set may include: when the second consensus request reaches a consensus, initiating a third consensus request, wherein the third consensus request is used to verify the result of the second consensus request; when the third consensus request reaches a consensus, deleting the archived data set and the block data corresponding to the archived data set.

[0051] Specifically, when the second consensus request reaches a consensus, the transaction result of the second consensus request is made into a third consensus request to verify the result of the second consensus request. Only when the third consensus request reaches a consensus, the archived data set and the corresponding block data are deleted. By initiating the third transaction request, data archiving can be guaranteed to be successful, the possibility of accidental deletion of block data can be reduced, and data security can be further guaranteed.

[0052] In some embodiments of the present application, the first consensus request and the second consensus request carry a first identification value, and the third consensus request carries a second identification value; wherein the consensus request carrying the first identification value is placed in a secondary transaction pool after being initiated, and the consensus request carrying the second identification value is placed in a primary transaction pool after being initiated, and the secondary transaction pool is independent of the primary transaction pool.

[0053] Considering that the consensus time of consensus request is relatively long, a branch consensus (or secondary consensus) can be started outside the main consensus, which is specifically used for the consensus of systemic data. Since this kind of transaction has a slow processing time, the delay of this system-level archiving transaction needs to be set independently and for a longer time. The first consensus request and the second consensus request are made in the branch consensus. The third consensus request involves the deletion of block data and can be placed in the main consensus. Specifically, it can be distinguished by setting the identification value of the consensus request. For example, the consensus request carrying the first identification value is made in the secondary consensus and is placed in the secondary transaction pool. The consensus request carrying the second identification value is made in the main consensus and is placed in the main transaction pool. The secondary transaction pool is independent of the main transaction pool. By placing the first and second consensus requests in the branch consensus, the transaction delay can be set separately.

[0054] In some embodiments of the present application, generating an archived data set based on the block data of the blockchain system may include: determining whether to archive the block data of the blockchain system; and if it is determined that the block data of the blockchain system is to be archived, generating an archived data set based on the block data of the blockchain system.

[0055] Specifically, before generating an archived data set, the blockchain node may determine whether to archive the block data of the blockchain system. For example, the blockchain node may determine whether the number of currently unarchived blocks is greater than a preset number, and if so, determine to archive the data of the blockchain system. For another example, the blockchain node may determine whether the ratio of the number of currently unarchived blocks to the total number of blocks is greater than a preset ratio, and if so, determine to archive the data of the blockchain system. In the case of determining to archive the block data of the blockchain system, an archived data set is generated based on the block data of the blockchain system. In the above manner, the blockchain node may determine whether to archive the blockchain system.

[0056] In some embodiments of the present application, determining whether to archive the block data of the blockchain system may include: obtaining the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; determining whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; and determining to archive the block data of the blockchain system if it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time.

[0057] Specifically, the blockchain system can record the block height of the last block archive. The hot block retention data indicates how many hot blocks the system retains at least and does not archive. The number of blocks archived once refers to the number of blocks that can be archived each time. After obtaining the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once, it can be determined whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once. In the case of determining that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once, it is determined that the block data of the blockchain system is archived. For example, at the beginning, the block height of the last archive is 0, the number of blocks archived once is 1000, and the number of hot blocks retained is 500. Then, when the current block height is 1501, it is determined that the block data of the blockchain system is archived. Through the above method, it can be determined whether to archive block data based on the current block height, the number of blocks archived at one time, the block height of the last block archive, and the number of hot blocks retained.

[0058] In some embodiments of the present application, generating an archive data set may include: generating an instance of an archive data structure for each block in a number of archived blocks, to obtain multiple instances of the archive data structure; and forming an archive data set from the multiple instances of the archive data structure in block order.

[0059] Specifically, all blockchain nodes in the entire network can determine whether to archive the block data of the blockchain system, and each blockchain node packages the data of the blocks of the number of blocks to be archived at one time. Each blockchain node can generate an instance of the archive data structure for each block in the number of blocks to be archived at one time, obtain multiple instances of the archive data structure, and form an archive data set with the multiple instances of the archive data structure in the order of blocks. In the above scheme, by forming the archive data set in the order of blocks, the archive data sets packaged by each blockchain node can be the same, which is convenient for subsequent verification.

[0060] In some embodiments of the present application, after the archived data set is generated, the process may further include: compressing the archived data set to obtain a compressed archived data set.

[0061] After the archived data set is generated based on the block data of the blockchain system, the archived data set can also be compressed to obtain a compressed archived data set. The compression algorithm can be set in the genesis block of the blockchain system and unified across the entire chain. After the first consensus request is successful, the compressed archived data set can be uploaded to the distributed file storage system, which can further save disk space.

[0062] In some embodiments of the present application, after deleting the archived data set and the block data corresponding to the archived data set, the process may further include: generating an archive list, wherein the archive list includes the correspondence between the identification information of the block and the identification information of the archived data set, that is, recording which blocks are stored in which archived data set. By generating the archive list, subsequent query of the archived block data is facilitated.

[0063] In some embodiments of the present application, after generating the archive list, it may also include: receiving a query request from a user client, wherein the query request includes identification information of a block; querying identification information of an archive data set corresponding to the identification information of the block from the archive list; reading the archive data set from a distributed file storage system according to the identification information of the archive data set; verifying the read archive data set; and returning the archive data set to the user client if the verification is correct.

[0064] Specifically, the user client can send a query request to the blockchain node. The query request carries the identification information of the block to be queried. The blockchain node can query the local archive list to find the identification information of the archive data set corresponding to the identification information of the block to be queried. After that, the blockchain node can read the corresponding archive data set from the distributed file storage system according to the identification information of the archive data set and verify it. If the verification is correct, the archive data set can be returned to the user client. In the above scheme, since the block data has been deleted locally from the blockchain node, when the data needs to be queried, it can be directly queried and downloaded from the distributed file storage system. Since the query frequency of blockchain historical data is low, the above scheme has little impact on system performance.

[0065] The above method is described below in conjunction with a specific embodiment. However, it should be noted that this specific embodiment is only for better illustrating the present application and does not constitute an improper limitation on the present application.

[0066] Please refer to Figure 2 , which shows a flowchart of a blockchain data archiving method in an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps.

[0067] Step 1, each blockchain node determines whether the current block height should be archived. For example, it can determine whether the current block height > the last archived block height + the number of archived blocks at one time + the number of hot blocks retained. If so, proceed to step 2, otherwise, repeat step 1;

[0068] Step 2: Each blockchain node archives its own data, that is, it packages the block data of the archived blocks into an archive data set;

[0069] Step 3, enter the proposal step to determine whether it is a proposal node. If so, execute step 5, otherwise execute step 4. For example, determine the node that packages the latest block as the proposal node or the node that packages the archived data set the fastest as the proposal node;

[0070] Step 4: The non-proposal node waits for the proposal and enters the timeout waiting period. If the timeout period expires, the node enters the next proposal node’s judgment.

[0071] Step 5: The proposal node initiates the proposal;

[0072] Step 6: Perform Byzantine consensus to reach consensus on the proposed transaction of the archived data set;

[0073] Step 7: Determine whether the consensus is successful. If so, proceed to step 8; otherwise, return to step 3.

[0074] Step 8: The proposal node uploads the archived data set to the distributed file storage system, and the non-proposal node waits for the upload to be successful and waits for the proposal to be uploaded;

[0075] Step 9: The proposal node successfully uploads the data, initiates a new proposal for successful upload, and the non-proposal node waits for the proposal to be uploaded. The proposal node and the non-proposal node reach a consensus to confirm whether the archived data set has been uploaded.

[0076] Step 10: Determine whether the consensus is successful. If yes, proceed to step 11; otherwise, return to step 3.

[0077] Step 11: The proposal node puts the proposal result into the main consensus as a transaction. The non-proposal node waits for the transaction to appear in the main consensus and determines whether the transaction appears in the main consensus. If so, execute step 12. Otherwise, the waiting timeout occurs and return to step 3.

[0078] Step 12: Each node discovers the transaction in the main consensus process and deletes it after reaching a consensus, so as to delete the local archived data set and the data of the archived blocks;

[0079] Step 13, end.

[0080] The method in the above embodiment can save the archived data by utilizing the characteristics of the distributed file storage system, which is scalable, configurable, with multiple backups and not easy to lose, when archiving the block data of the blockchain system. A certain number of backups can be configured to archive the block data of the blockchain. After archiving, the block data is deleted locally from the blockchain node. If the data needs to be queried, it can be directly queried and downloaded in the distributed file storage system. Since the query frequency of blockchain historical data is low, the above scheme has little impact on system performance, but it will save a lot of disk usage space.

[0081] Based on the same inventive concept, a blockchain data archiving device is also provided in the embodiments of the present application, as described in the following embodiments. Since the principle of solving the problem by the blockchain data archiving device is similar to that of the blockchain data archiving method, the implementation of the blockchain data archiving device can refer to the implementation of the blockchain data archiving method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived. Figure 3 is a structural block diagram of the blockchain data archiving device of the embodiment of the present application, such as Figure 3 As shown, it includes: a generating module 301, a storing module 302 and a deleting module 303, and the structure is described below.

[0082] The generation module 301 is used to generate an archive data set based on the block data of the blockchain system.

[0083] The storage module 302 is used to store the archived data set in a distributed file storage system.

[0084] The deletion module 303 is used to delete the archived data set and the block data corresponding to the archived data set.

[0085] In some embodiments of the present application, the generation module may also be used to: compress the archived data set to obtain a compressed archived data set.

[0086] In some embodiments of the present application, the generation module may include: a determination unit, used to determine whether to archive the block data of the blockchain system; and a generation unit, used to generate an archive data set based on the block data of the blockchain system when the determination unit determines to archive the block data of the blockchain system.

[0087] In some embodiments of the present application, the determination unit can be specifically used to: obtain the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; determine whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; if it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time, determine to archive the block data of the blockchain system.

[0088] In some embodiments of the present application, the generation unit can be specifically used to: generate an instance of an archive data structure for each block in a number of archived blocks, to obtain multiple instances of the archive data structure; and form an archive data set according to the block order of the multiple instances of the archive data structure.

[0089] In some embodiments of the present application, the storage module may specifically include: a first request initiating unit, used to initiate a first consensus request, wherein the first consensus request is used to verify the archived data set; and a storage unit, used to store the archived data set in a distributed file storage system when consensus is reached on the first consensus request.

[0090] In some embodiments of the present application, the deletion module may specifically include: a second request initiating unit, used to initiate a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification; a deletion unit, used to delete the archived data set and the block data corresponding to the archived data set when consensus is reached on the second consensus request.

[0091] In some embodiments of the present application, the deletion unit may be specifically used to: initiate a third consensus request when a consensus is reached on the second consensus request, wherein the third consensus request is used to verify the result of the second consensus request; and delete the archived data set and the block data corresponding to the archived data set when a consensus is reached on the third consensus request.

[0092] In some embodiments of the present application, the first consensus request and the second consensus request may carry a first identification value, and the third consensus request may carry a second identification value; wherein the consensus request carrying the first identification value may be placed in a secondary transaction pool after being initiated, and the consensus request carrying the second identification value may be placed in a primary transaction pool after being initiated, and the secondary transaction pool is independent of the primary transaction pool.

[0093] In some embodiments of the present application, the deletion module may be specifically used to: delete an archived data set; delete a block body of a block corresponding to the archived data set and retain a block header.

[0094] In some embodiments of the present application, the deletion module may also be used to: generate an archive list, wherein the archive list includes a correspondence between identification information of a block and identification information of an archive data set.

[0095] In some embodiments of the present application, the device may further include a query module, which may be used to: receive a query request from a user client, wherein the query request includes identification information of a block; query identification information of an archive data set corresponding to the identification information of the block from an archive list; read the archive data set from a distributed file storage system according to the identification information of the archive data set; verify the read archive data set; and return the archive data set to the user client if the verification is correct.

[0096] From the above description, it can be seen that the embodiment of the present application achieves the following technical effects: an archived data set is generated based on the block data of the blockchain system and uploaded to the distributed file storage system for archiving and preservation, and the local archived data set and the block data corresponding to the archived data set are deleted at the same time. Since the distributed file storage system has the characteristics of scalability, configurability, multiple backups and not easy to lose, the security of the block data can be guaranteed by saving the archived data through the distributed file storage system and configuring a certain number of backups. At the same time, the block data is deleted from the blockchain node locally after archiving, which can save a lot of disk usage space. The above solution solves the technical problem of unlimited increase in storage space used by the blockchain system in the prior art, and achieves the technical effect of effectively saving the disk usage space of the blockchain system.

[0097] The present application also provides a computer device, which can be found in Figure 4 The schematic diagram of the structure of the computer device based on the blockchain data archiving method provided in the embodiment of the present application is shown, and the computer device may specifically include an input device 41, a processor 42, and a memory 43. Among them, the memory 43 is used to store processor executable instructions. When the processor 42 executes the instructions, the steps of the blockchain data archiving method described in any of the above embodiments are implemented.

[0098] In this embodiment, the input device may specifically be one of the main devices for information exchange between the user and the computer system. The input device may include a keyboard, a mouse, a camera, a scanner, a light pen, a handwriting input board, a voice input device, etc.; the input device is used to input the original data and the program for processing these numbers into the computer. The input device can also obtain and receive data transmitted from other modules, units, and devices. The processor can be implemented in any appropriate manner. For example, the processor can take the form of a computer-readable medium, a logic gate, a switch, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, etc., such as a microprocessor or a processor and a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor. The memory may specifically be a memory device used to store information in modern information technology. The memory may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as a RAM, a FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.

[0099] In this embodiment, the functions and effects specifically realized by the computer device can be explained in comparison with other embodiments and will not be described in detail here.

[0100] In an embodiment of the present application, a computer storage medium based on the blockchain data archiving method is also provided, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the steps of the blockchain data archiving method described in any of the above embodiments are implemented.

[0101] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD) or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.

[0102] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments and will not be repeated here.

[0103] Based on one aspect of the present invention, an embodiment of the present invention discloses:

[0104] A1. A blockchain data archiving method, applied to a blockchain node, comprising:

[0105] Generate archived data sets based on the block data of the blockchain system;

[0106] Storing the archived data set in a distributed file storage system;

[0107] The archived data set and the block data corresponding to the archived data set are deleted.

[0108] A2. The method according to clause A1, after generating the archive data set, further comprising:

[0109] The archived data set is compressed to obtain a compressed archived data set.

[0110] A3. The method according to clause A1, generating an archive data set based on the block data of the blockchain system, comprising:

[0111] Determine whether to archive the block data of the blockchain system;

[0112] When it is determined that the block data of the blockchain system is to be archived, an archive data set is generated based on the block data of the blockchain system.

[0113] A4. Determining whether to archive block data of a blockchain system according to the method described in clause A3 includes:

[0114] Get the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time;

[0115] Determine whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once;

[0116] When it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time, it is determined that the block data of the blockchain system is to be archived.

[0117] A5. The method of clause A4, generating an archived data set, comprising:

[0118] Generate an instance of an archive data structure for each block in the number of blocks archived once, to obtain multiple instances of the archive data structure;

[0119] The instances of the plurality of archive data structures are formed into an archive data set in a block order.

[0120] A6. The method of clause A1, storing the archived data set in a distributed file storage system, comprising:

[0121] Initiating a first consensus request, wherein the first consensus request is used to verify the archived data set;

[0122] In a case where consensus is reached on the first consensus request, the archived data set is stored in a distributed file storage system.

[0123] A7. The method according to clause A6, deleting the archived data set and the block data corresponding to the archived data set, comprising:

[0124] Initiating a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification;

[0125] When consensus is reached on the second consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

[0126] A8. The method according to clause A7, wherein, when the second consensus request reaches a consensus, the archived data set and the block data corresponding to the archived data set are deleted, including:

[0127] In the case where the second consensus request reaches a consensus, a third consensus request is initiated, wherein the third consensus request is used to verify the result of the second consensus request;

[0128] When consensus is reached on the third consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

[0129] A9. The method according to clause A8, wherein the first consensus request and the second consensus request carry a first identification value, and the third consensus request carries a second identification value;

[0130] Among them, the consensus request carrying the first identification value is placed in the secondary transaction pool after being initiated, and the consensus request carrying the second identification value is placed in the main transaction pool after being initiated. The secondary transaction pool is independent of the main transaction pool.

[0131] A10. The method according to clause A1, deleting the archived data set and the block data corresponding to the archived data set, comprising:

[0132] deleting the archived data set;

[0133] Delete the block body of the block corresponding to the archived data set and retain the block header.

[0134] A11. The method according to clause A1, after deleting the archived data set and the block data corresponding to the archived data set, further comprising:

[0135] An archive list is generated, wherein the archive list includes a correspondence between identification information of the block and identification information of the archive data set.

[0136] A12. The method according to clause A11, after generating the archive list, further comprising:

[0137] Receiving a query request from a user client, wherein the query request includes identification information of a block;

[0138] Querying the archived data set identification information corresponding to the identification information of the block from the archived list;

[0139] Reading the archived data set from the distributed file storage system according to the identification information of the archived data set;

[0140] Verifying the read archived data set;

[0141] If the verification is correct, the archived data set is returned to the user client.

[0142] B13. A blockchain data archiving device, located at a blockchain node, comprising:

[0143] A generation module is used to generate archive data sets based on the block data of the blockchain system;

[0144] A storage module, used for storing the archived data set in a distributed file storage system;

[0145] The deletion module is used to delete the archived data set and the block data corresponding to the archived data set.

[0146] B14. The apparatus according to clause B13, wherein the generating module is further configured to:

[0147] The archived data set is compressed to obtain a compressed archived data set.

[0148] B15. The apparatus according to clause B13, wherein the generating module comprises:

[0149] A determination unit, used to determine whether to archive block data of the blockchain system;

[0150] A generating unit is used to generate an archive data set based on the block data of the blockchain system when the determining unit determines to archive the block data of the blockchain system.

[0151] B16. According to the apparatus of clause B15, the determining unit is specifically configured to:

[0152] Get the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time;

[0153] Determine whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once;

[0154] When it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time, it is determined that the block data of the blockchain system is to be archived.

[0155] B17. The apparatus according to clause B16, wherein the generating unit is specifically configured to:

[0156] Generate an instance of an archive data structure for each block in the number of blocks archived once, to obtain multiple instances of the archive data structure;

[0157] The instances of the plurality of archive data structures are formed into an archive data set in a block order.

[0158] B18. The device according to clause B13, wherein the storage module specifically comprises:

[0159] A first request initiating unit, configured to initiate a first consensus request, wherein the first consensus request is used to verify the archived data set;

[0160] A storage unit is used to store the archived data set in a distributed file storage system when a consensus is reached on the first consensus request.

[0161] B19. The apparatus according to clause B18, wherein the deletion module specifically comprises:

[0162] A second request initiating unit, configured to initiate a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification;

[0163] and a deleting unit, configured to delete the archived data set and the block data corresponding to the archived data set when a consensus is reached on the second consensus request.

[0164] B20. The apparatus according to clause B19, wherein the deletion unit is specifically configured to:

[0165] In the case where the second consensus request reaches a consensus, a third consensus request is initiated, wherein the third consensus request is used to verify the result of the second consensus request;

[0166] When consensus is reached on the third consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

[0167] B21. The apparatus according to clause B20, wherein the first consensus request and the second consensus request carry a first identification value, and the third consensus request carries a second identification value;

[0168] Among them, the consensus request carrying the first identification value is placed in the secondary transaction pool after being initiated, and the consensus request carrying the second identification value is placed in the main transaction pool after being initiated. The secondary transaction pool is independent of the main transaction pool.

[0169] B22. The apparatus according to clause B13, wherein the deletion module is specifically configured to:

[0170] deleting the archived data set;

[0171] Delete the block body of the block corresponding to the archived data set and retain the block header.

[0172] B23. The apparatus according to clause B13, wherein the deletion module is further configured to:

[0173] An archive list is generated, wherein the archive list includes a correspondence between identification information of the block and identification information of the archive data set.

[0174] B24. The apparatus according to clause B23, further comprising a query module, the query module being configured to:

[0175] Receiving a query request from a user client, wherein the query request includes identification information of a block;

[0176] Querying the archived data set identification information corresponding to the identification information of the block from the archived list;

[0177] Reading the archived data set from the distributed file storage system according to the identification information of the archived data set;

[0178] Verifying the read archived data set;

[0179] If the verification is correct, the archived data set is returned to the user client.

[0180] C25. A computer device comprising a processor and a memory for storing processor-executable instructions, wherein when the processor executes the instructions, the steps of the method described in any one of clauses A1 to A12 are implemented.

[0181] D26. A computer-readable storage medium having computer instructions stored thereon, which, when executed, implement the steps of the method described in any one of clauses A1 to A12.

[0182] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0183] It should be understood that the above description is for illustration and not for limitation. By reading the above description, many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art. Therefore, the scope of the present application should not be determined with reference to the above description, but should be determined with reference to the aforementioned claims and the full scope of equivalents possessed by these claims.

[0184] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A blockchain data archiving method, characterized in that: Applied to blockchain nodes, including: Generate archived data sets based on the block data of the blockchain system; Storing the archived data set in a distributed file storage system; Deleting the archived data set and the block data corresponding to the archived data set; Wherein, deleting the archived data set and the block data corresponding to the archived data set includes: deleting the archived data set; deleting the block body of the block corresponding to the archived data set and retaining the block header; the block header is used for verification; After deleting the archived data set and the block data corresponding to the archived data set, the method further includes: generating an archive list, wherein the archive list includes the correspondence between the identification information of the block and the identification information of the archived data set; the archive list is used for subsequent query and download; Among them, based on the block data of the blockchain system, an archive data set is generated, including: Determine whether to archive the block data of the blockchain system; In the case where it is determined to archive the block data of the blockchain system, an archive data set is generated based on the block data of the blockchain system; Among them, determining whether to archive the block data of the blockchain system includes: Obtain the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; the number of hot blocks retained indicates the number of hot blocks that are not archived and are retained at least in the blockchain system; Determine whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once; When it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time, it is determined to archive the block data of the blockchain system; The step of storing the archived data set in a distributed file storage system includes: Initiating a first consensus request, wherein the first consensus request is used to verify the archived data set; In a case where consensus is reached on the first consensus request, the archived data set is stored in a distributed file storage system.

2. The method according to claim 1, characterized in that After generating the archive dataset, it also includes: The archived data set is compressed to obtain a compressed archived data set.

3. The method according to claim 1, characterized in that: Generate an archive dataset, including: Generate an instance of an archive data structure for each block in the number of blocks archived once, to obtain multiple instances of the archive data structure; The instances of the plurality of archive data structures are formed into an archive data set in a block order.

4. The method according to claim 1, characterized in that: Deleting the archived data set and the block data corresponding to the archived data set includes: Initiating a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification; When consensus is reached on the second consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

5. The method according to claim 4, characterized in that In the case where a consensus is reached on the second consensus request, deleting the archived data set and the block data corresponding to the archived data set includes: In the case where the second consensus request reaches a consensus, a third consensus request is initiated, wherein the third consensus request is used to verify the result of the second consensus request; When consensus is reached on the third consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

6. The method according to claim 5, characterized in that The first consensus request and the second consensus request carry a first identification value, and the third consensus request carries a second identification value; Among them, the consensus request carrying the first identification value is placed in the secondary transaction pool after being initiated, and the consensus request carrying the second identification value is placed in the main transaction pool after being initiated. The secondary transaction pool is independent of the main transaction pool.

7. The method according to claim 1, characterized in that After the archive list is generated, it also includes: Receiving a query request from a user client, wherein the query request includes identification information of a block; Querying the archived data set identification information corresponding to the identification information of the block from the archived list; Reading the archived data set from the distributed file storage system according to the identification information of the archived data set; Verifying the read archived data set; If the verification is correct, the archived data set is returned to the user client.

8. A blockchain data archiving device, characterized in that: Located in blockchain nodes, including: A generation module is used to generate archive data sets based on the block data of the blockchain system; A storage module, used for storing the archived data set in a distributed file storage system; A deletion module, used for deleting the archived data set and the block data corresponding to the archived data set; The deletion module is specifically used to: delete the archived data set; delete the block body of the block corresponding to the archived data set and retain the block header; the block header is used for verification; The deletion module is further used to: generate an archive list, wherein the archive list includes the correspondence between the identification information of the block and the identification information of the archive data set; the archive list is used for subsequent query and download; Wherein, the generating module comprises: A determination unit, used to determine whether to archive block data of the blockchain system; A generating unit, configured to generate an archived data set based on the block data of the blockchain system when the determining unit determines to archive the block data of the blockchain system; The determining unit is specifically used for: Obtain the current block height, the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time; the number of hot blocks retained indicates the number of hot blocks that are not archived and are retained at least in the blockchain system; Determine whether the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived once; When it is determined that the current block height is greater than the sum of the block height of the last block archive, the number of hot blocks retained, and the number of blocks archived at one time, it is determined to archive the block data of the blockchain system; Wherein, the storage module specifically includes: A first request initiating unit, configured to initiate a first consensus request, wherein the first consensus request is used to verify the archived data set; A storage unit is used to store the archived data set in a distributed file storage system when a consensus is reached on the first consensus request.

9. The device according to claim 8, characterized in that The generation module is also used for: The archived data set is compressed to obtain a compressed archived data set.

10. The device according to claim 8, characterized in that The generating unit is specifically used for: Generate an instance of an archive data structure for each block in the number of blocks archived once, to obtain multiple instances of the archive data structure; The instances of the plurality of archive data structures are formed into an archive data set in a block order.

11. The device according to claim 8, characterized in that The deletion module specifically includes: A second request initiating unit, configured to initiate a second consensus request, wherein the second consensus request is used to download the archived data set from the distributed file storage system and perform verification; and a deleting unit, configured to delete the archived data set and the block data corresponding to the archived data set when a consensus is reached on the second consensus request.

12. The device according to claim 11, characterized in that The deleting unit is specifically used for: In the case where the second consensus request reaches a consensus, a third consensus request is initiated, wherein the third consensus request is used to verify the result of the second consensus request; When consensus is reached on the third consensus request, the archived data set and the block data corresponding to the archived data set are deleted.

13. The device according to claim 12, characterized in that The first consensus request and the second consensus request carry a first identification value, and the third consensus request carries a second identification value; Among them, the consensus request carrying the first identification value is placed in the secondary transaction pool after being initiated, and the consensus request carrying the second identification value is placed in the main transaction pool after being initiated. The secondary transaction pool is independent of the main transaction pool.

14. The device according to claim 8, characterized in that It also includes a query module, wherein the query module is used to: Receiving a query request from a user client, wherein the query request includes identification information of a block; Querying the archived data set identification information corresponding to the identification information of the block from the archived list; Reading the archived data set from the distributed file storage system according to the identification information of the archived data set; Verifying the read archived data set; If the verification is correct, the archived data set is returned to the user client.

15. A computer device, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the instructions.

16. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.