CN115756966A - Block chain data archiving and recovering method and system - Google Patents

Block chain data archiving and recovering method and system Download PDF

Info

Publication number
CN115756966A
CN115756966A CN202211497739.9A CN202211497739A CN115756966A CN 115756966 A CN115756966 A CN 115756966A CN 202211497739 A CN202211497739 A CN 202211497739A CN 115756966 A CN115756966 A CN 115756966A
Authority
CN
China
Prior art keywords
data
block
archiving
recovery
file
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.)
Pending
Application number
CN202211497739.9A
Other languages
Chinese (zh)
Inventor
龙飞
汪昌帅
贺伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Electronic Commerce Co Ltd
Original Assignee
Tianyi Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Electronic Commerce Co Ltd filed Critical Tianyi Electronic Commerce Co Ltd
Priority to CN202211497739.9A priority Critical patent/CN115756966A/en
Publication of CN115756966A publication Critical patent/CN115756966A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block chain data archiving and recovering method and system, and relates to the technical field of block chains. The method comprises the following steps: acquiring a data archiving request or a data recovery request of a user; verifying the filing authority or the recovery authority of the user according to the user identity information in the data filing request or the data recovery request; after the verification is passed, data archiving is carried out, corresponding block information is read according to the number of the entry reference start stop block, the validity of the block is verified, and after the verification is successful, the content of the block file and the export block are read, so that the data archiving is completed; and after the verification is passed, data recovery is carried out, block information is deserialized, the integrity of the block data is verified, and after the verification is successful, the transaction data under the corresponding block is written into the corresponding position in the file to complete the data recovery. The invention can effectively archive and backup the block chain data and recover the data, effectively reduce the occupation of the block chain data on the hard disk space and reduce the hardware cost and the operation and maintenance cost.

Description

Block chain data archiving and recovering method and system
Technical Field
The invention relates to the technical field of block chains, in particular to a block chain data archiving and recovering method and a block chain data archiving and recovering system.
Background
In the process of using the block chain network, when one transaction is called, all block chain node participants can store the full amount of transaction data, and can increase along with the calling of the transaction, a large amount of hard disk space of a physical machine can be occupied, however, the block chain does not provide a corresponding operation and maintenance mode.
With the wider application of the block chain technology, the technical characteristics of the block chain can help customers solve the problems of a plurality of scenes such as increasing credit, storing evidence, authenticating and the like, and meanwhile, the practical application also finds that the data of a plurality of node participants of the block chain needs to be stored in full, the data can be continuously increased along with the calling of the transaction, and each participant node can occupy more and more physical machine hard disk space, so that the reduction of the hard disk pressure of a physical machine becomes very important.
Disclosure of Invention
In order to overcome the above problems or at least partially solve the above problems, embodiments of the present invention provide a method and a system for archiving and recovering blockchain data, which combine technical means such as blockchain storage, blockchain data structure, blockchain identity system, and the like to archive and backup blockchain data and recover data, so as to effectively reduce the occupation of blockchain data on hard disk space and reduce hardware cost and operation and maintenance cost.
The embodiment of the invention is realized by the following steps:
in a first aspect, an embodiment of the present invention provides a method for archiving and recovering blockchain data, including the following steps:
acquiring a data archiving request of a user;
extracting and verifying the filing authority of the user according to the user identity information in the data filing request;
after the verification is passed, data archiving is carried out, corresponding block information is read according to the number of the entry-participation stop block, the validity of the block is verified, and after the verification is successful, the content of the block file and the export block are read to finish the data archiving;
after the filing is finished, when a user needs to perform data recovery, acquiring a data recovery request of the user;
extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request;
and after the verification is passed, performing data recovery, deserializing the block information, verifying the integrity of the block data, and after the verification is successful, writing the transaction data under the corresponding block into a corresponding position in the file to finish the data recovery.
In order to solve the problems in the prior art, the method files the transaction data with the largest proportion in the block according to the characteristics of the data structure of the block chain, reserves the block head data, ensures each function of the block chain to the greatest extent, does not influence the consensus process of the block chain, and does not influence the execution process of the intelligent contract. Meanwhile, data verification is required in the data recovery process, and two-step verification of transaction generation block hash verification and hash comparison is carried out, so that the risk that data are modified is avoided. The invention combines the technical means of block chain storage, block chain data structure, block chain identity system and the like to carry out filing backup and data recovery on the block chain data, can effectively reduce the occupation of the block chain data on the hard disk space, and reduces the hardware cost and the operation and maintenance cost.
Based on the first aspect, in some embodiments of the present invention, the above method for performing data archiving, reading corresponding block information according to an entry reference start/stop block number, verifying block validity, and after successful verification, reading the content of a block file and exporting a block includes the following steps:
reading the block information in a preset range according to the entry reference starting and ending block number, verifying whether the block number is legal, and checking whether the block is filed;
if the block number is legal and the block is already filed, filing the data of the block in the designated range according to the entry reference stop block number, finding the data content of the corresponding block in the block file, deleting the transaction data in the corresponding block in the block file, writing the whole block data into a backup file, and storing the whole block data into a path of the physical machine.
Based on the first aspect, in some embodiments of the present invention, the method for performing data recovery, deserializing block information, verifying integrity of block data, and writing transaction data under a corresponding block into a corresponding position in a file after successful verification includes the following steps:
importing block data in a file according to the path of the access reference import file;
and writing the transaction data under the corresponding block into the corresponding position in the file according to the block number in the imported file, and finishing data recovery after success.
Based on the first aspect, in some embodiments of the present invention, the method for archiving and restoring blockchain data further includes the following steps:
before the block data is imported, whether the block data is tampered or not is verified, and if the block data is not tampered, the block data is imported.
Based on the first aspect, in some embodiments of the present invention, the method for verifying whether block data is tampered includes the following steps:
and calculating a target block hash through the transaction hash in the block, judging whether the target block hash is consistent with the block hash in the imported file, if so, judging whether the block hash in the imported file is consistent with the chain hash, and if so, importing the block data.
Based on the first aspect, in some embodiments of the present invention, the method for verifying the archiving authority of the user according to the user identity information in the data archiving request includes the following steps:
carrying out role authentication distribution on the filing authority based on a PKI system of the block chain;
and after the data archiving request of the user is acquired, verifying whether the user has the archiving authority or not according to the user identity information in the data archiving request.
In a second aspect, an embodiment of the present invention provides a system for archiving and restoring blockchain data, including: request acquisition module, authentication module, data filing module and data recovery module, wherein:
the request acquisition module is used for acquiring a data archiving request and a data recovery request of a user;
the identity authentication module is used for extracting and authenticating the archiving authority of the user according to the user identity information in the data archiving request; the data recovery system is also used for extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request;
the data filing module is used for filing data after the verification is passed, reading corresponding block information according to the entry reference starting and ending block number, verifying the validity of the block, and reading the content of the block file and the export block after the verification is successful to finish the data filing;
and the data recovery module is used for recovering data after the verification is passed, deserializing the block information and verifying the integrity of the block data, and writing the transaction data under the corresponding block into the corresponding position in the file after the verification is successful so as to complete the data recovery.
In order to solve the problems in the prior art, the system files the transaction data with the largest proportion in the block according to the characteristics of a block chain data structure through the cooperation of a plurality of modules such as a request acquisition module, an identity verification module, a data filing module and a data recovery module, reserves block head data, ensures each function of the block chain to the maximum extent, does not influence the consensus process of the block chain, and does not influence the execution process of an intelligent contract. Meanwhile, data verification is required in the data recovery process, and two-step verification of transaction generation block hash verification and hash comparison is carried out, so that the risk that data are modified is avoided. The invention combines the technical means of block chain storage, block chain data structure, block chain identity system and the like to carry out filing backup and data recovery on the block chain data, thereby effectively reducing the occupation of the block chain data on the hard disk space and reducing the hardware cost and the operation and maintenance cost.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory for storing one or more programs; a processor. The program or programs, when executed by a processor, implement the method of any of the first aspects as described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method according to any one of the first aspect described above.
The embodiment of the invention at least has the following advantages or beneficial effects:
the embodiment of the invention provides a block chain data archiving and recovering method and a block chain data archiving and recovering system, which are used for archiving transaction data with the largest proportion in a block according to the characteristics of a block chain data structure, reserving block header data, ensuring each function of the block chain to the greatest extent, and not influencing the consensus process of the block chain and the execution process of an intelligent contract. Meanwhile, data verification is required in the data recovery process, and two steps of transaction generation block hash verification and hash comparison verification are adopted, so that the risk of data modification is avoided. The invention combines the technical means of block chain storage, block chain data structure, block chain identity system and the like to carry out filing backup and data recovery on the block chain data, can effectively reduce the occupation of the block chain data on the hard disk space, and reduces the hardware cost and the operation and maintenance cost.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flowchart of a method for archiving and restoring blockchain data according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating data archiving according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating data recovery according to an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a blockchain data archiving and recovery system according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Description of reference numerals: 100. a request acquisition module; 200. an identity verification module; 300. a data archiving module; 400. a data recovery module; 101. a memory; 102. a processor; 103. a communication interface.
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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the 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.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
In the description of the embodiments of the present invention, "a plurality" means at least 2.
Example (b):
as shown in fig. 1 to fig. 3, in a first aspect, an embodiment of the present invention provides a method for archiving and recovering block chain data, including the following steps:
s1, acquiring a data archiving request of a user;
s2, extracting and verifying the filing authority of the user according to the user identity information in the data filing request;
further, comprising: carrying out role authentication distribution on the filing authority based on a PKI system of the block chain; and after the data archiving request of the user is acquired, verifying whether the user has the archiving authority or not according to the user identity information in the data archiving request.
In some embodiments of the present invention, the block network has its own identity authentication system, which is generally a PKI system, and performs role authentication and allocation on the filing authority depending on the PKI system, and a user having the authority can initiate filing, and after initiating a data filing process, first verifies whether the identity of the initiator has the authority to perform filing, and if not, ends the process, and after passing the identity verification, enters a service processing process.
S3, after the verification is passed, data archiving is carried out, corresponding block information is read according to the entry reference starting and ending block number, the block validity is verified, after the verification is successful, the content of the block file and the export block are read, and the data archiving is completed;
further, as shown in fig. 2, the step of performing data archiving includes:
reading the block information in a preset range according to the entry reference starting and ending block number, verifying whether the block number is legal, and checking whether the block is filed; if the block number is legal and the block is already filed, filing the data of the block in the designated range according to the entry reference stop block number, finding the data content of the corresponding block in the block file, deleting the transaction data in the corresponding block in the block file, writing the whole block data into a backup file, and storing the whole block data into a path of the physical machine.
In some embodiments of the present invention, after passing the identity authentication, the block information in the established range may be read according to the entry-reference stop block number, and the block number is checked to see whether it is legal or not, and whether the block has been filed or not is checked, and the next step is performed after passing the authentication. After identity verification and parameter verification, data archiving can be carried out on the blocks in the specified range according to the number of the entering reference ending block, the data content of the corresponding block is found in the block file, the transaction data in the corresponding block is deleted in the block file, the whole block data is written into a backup file and stored in a path of a physical machine, and the backup data can be transferred to a file service or a database automatically in the follow-up process.
S4, after the filing is finished, when a user needs to perform data recovery, acquiring a data recovery request of the user;
s5, extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request; the block network has an identity authentication system of itself, generally a PKI system, and a user with the authority can initiate data recovery only by performing role authentication distribution on the data recovery authority according to the PKI system, after a data recovery process is initiated, firstly, whether the identity of an initiator has the authority to recover is verified, if not, the process is ended, and after the identity verification is passed, a service processing process is started.
And S6, after the verification is passed, data recovery is carried out, block information is deserialized, the integrity of block data is verified, and after the verification is successful, transaction data under the corresponding block are written into the corresponding position in the file to complete the data recovery.
Further, as shown in fig. 3, the step of performing data recovery includes:
importing block data in a file according to the path of the access reference import file; and writing the transaction data under the corresponding block into the corresponding position in the file according to the block number in the imported file, and finishing data recovery after success.
Further, still include: before the block data is imported, whether the block data is tampered or not is verified, and if the block data is not tampered, the block data is imported.
Further, comprising: and calculating a target block hash through the transaction hash in the block, judging whether the target block hash is consistent with the block hash in the imported file, if so, judging whether the block hash in the imported file is consistent with the chain hash, and if so, importing the block data.
In some embodiments of the present invention, in the data recovery process, after passing the identity authentication, the block data in the file may be imported according to the path where the import-reference file is located. Before importing, verifying whether block data is tampered, firstly, calculating block hash through transaction hash in the blocks, and comparing whether the imported block hash is consistent with the hash on the chain, namely, the data is not tampered, secondly, comparing whether the imported block hash is consistent with the hash on the chain, and if so, importing the block data. After passing the identity authentication and the block data authentication, the block storage file on the block chain can be newly added according to the block number in the import file, that is, the transaction data under the corresponding block is written into the corresponding position in the file, and the data recovery process is completed after the transaction data is successfully written.
In order to solve the problems in the prior art, the system files the transaction data with the largest proportion in the block according to the characteristics of a block chain data structure through the cooperation of a plurality of modules such as a request acquisition module, an identity verification module, a data filing module and a data recovery module, reserves block head data, ensures each function of the block chain to the maximum extent, does not influence the consensus process of the block chain, and does not influence the execution process of an intelligent contract. Meanwhile, data verification is required in the data recovery process, and two steps of transaction generation block hash verification and hash comparison verification are adopted, so that the risk of data modification is avoided. The invention combines the technical means of block chain storage, a block chain data structure, a block chain identity system, a Hash digest algorithm and the like to carry out filing backup and data recovery on the block chain data, thereby effectively reducing the occupation of the block chain data on the hard disk space and reducing the hardware cost and the operation and maintenance cost.
Compared with the existing mode of filing all blocks, the method and the device for filing the transaction data in the blocks have the advantages that the transaction data occupying the largest ratio in the blocks are filed, the purpose of reducing the hard disk occupation is achieved, the method and the device are safer, and the risk of data tampering is avoided. The invention provides a recovery method for the archived data, avoids centralized storage of the archived data and reduces the risk of tampering the archived data. The invention comprehensively verifies the recovery of the archived data, verifies whether the block hash generated by transaction is normal or not, verifies whether the generated block hash is consistent with the link or not, and ensures the risk-free recovery of the data.
As shown in fig. 4, in a second aspect, an embodiment of the present invention provides a system for archiving and restoring blockchain data, including: request acquisition module 100, authentication module 200, data archiving module 300, and data recovery module 400, wherein:
a request obtaining module 100, configured to obtain a data archiving request and a data recovery request of a user;
the identity authentication module 200 is used for extracting and authenticating the archiving authority of the user according to the user identity information in the data archiving request; the data recovery system is also used for extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request;
the data archiving module 300 is configured to perform data archiving after the verification is passed, read corresponding block information according to the entry reference start/stop block number and verify the validity of the block, and after the verification is successful, read the content of the block file and export the block to complete data archiving;
and the data recovery module 400 is used for recovering data after the verification is passed, deserializing the block information, verifying the integrity of the block data, and writing the transaction data under the corresponding block into a corresponding position in the file to complete data recovery after the verification is successful.
In order to solve the problems in the prior art, the system files the transaction data with the largest proportion in the block according to the characteristics of the data structure of the block chain by matching a plurality of modules such as the request acquisition module 100, the identity verification module 200, the data filing module 300, the data recovery module 400 and the like, reserves the block head data, ensures each function of the block chain to the maximum extent, does not influence the consensus process of the block chain, and does not influence the execution process of the intelligent contract. Meanwhile, data verification is required in the data recovery process, and two steps of transaction generation block hash verification and hash comparison verification are adopted, so that the risk of data modification is avoided. The invention combines the technical means of block chain storage, block chain data structure, block chain identity system and the like to carry out filing backup and data recovery on the block chain data, can effectively reduce the occupation of the block chain data on the hard disk space, and reduces the hardware cost and the operation and maintenance cost.
As shown in fig. 5, in a third aspect, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs; a processor 102. The one or more programs, when executed by the processor 102, implement the method of any of the first aspects as described above.
Also included is a communication interface 103, and the memory 101, processor 102 and communication interface 103 are electrically connected to each other, directly or indirectly, to enable transfer or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 101 may be used to store software programs and modules, and the processor 102 executes the software programs and modules stored in the memory 101 to thereby execute various functional applications and data processing. The communication interface 103 may be used for communicating signaling or data with other node devices.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the embodiments provided in the present application, it should be understood that the disclosed method and system and method can be implemented in other ways. The method and system embodiments described above are merely illustrative and, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the processor 102, implements the method as in any one of the first aspect described above. The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (9)

1. A method for block chain data archiving and recovery, comprising the steps of:
acquiring a data archiving request of a user;
extracting and verifying the filing authority of the user according to the user identity information in the data filing request;
after the verification is passed, data archiving is carried out, corresponding block information is read according to the number of the entry reference start stop block, the validity of the block is verified, and after the verification is successful, the content of the block file and the export block are read, so that the data archiving is completed;
after the filing is finished, when a user needs to perform data recovery, acquiring a data recovery request of the user;
extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request;
and after the verification is passed, data recovery is carried out, block information is deserialized, the integrity of the block data is verified, and after the verification is successful, the transaction data under the corresponding block is written into the corresponding position in the file to complete the data recovery.
2. A method for archiving and recovering block chain data according to claim 1, wherein the method for archiving data, reading corresponding block information according to the entry reference stop block number and verifying block validity, and after successful verification, reading the contents of the block file and exporting the blocks comprises the following steps:
reading the block information in a preset range according to the entry reference starting and ending block number, verifying whether the block number is legal, and checking whether the block is filed;
if the block number is legal and the block is already filed, filing the data of the block in the specified range according to the entry-participation-stop block number, finding the data content of the corresponding block in the block file, deleting the transaction data in the corresponding block in the block file, writing the whole block data into a backup file, and storing the whole block data into a path of the physical machine.
3. A method for archiving and recovering blockchain data according to claim 1, wherein said method for performing data recovery, deserializing block information and verifying integrity of data of a block, and after successful verification, writing transaction data under the corresponding block to a corresponding location in a file comprises the steps of:
according to the path of the input reference input file, block data in the file is input;
and writing the transaction data under the corresponding block into the corresponding position in the file according to the block number in the imported file, and finishing data recovery after success.
4. A method for blockchain data archiving and recovery according to claim 3, further comprising the steps of:
before the block data is imported, whether the block data is tampered or not is verified, and if the block data is not tampered, the block data is imported.
5. A blockchain data archiving and recovery method according to claim 4, wherein said method of verifying whether the blockchain data is tampered with includes the steps of:
and calculating a target block hash through the transaction hash in the block, judging whether the target block hash is consistent with the block hash in the imported file, if so, judging whether the block hash in the imported file is consistent with the chain hash, and if so, importing the block data.
6. A method for block chain data archiving and recovery according to claim 1, wherein said method for verifying the archiving authority of the user according to the user identification information in the data archiving request comprises the following steps:
carrying out role authentication distribution on the filing authority based on a PKI system of the block chain;
and after the data archiving request of the user is acquired, verifying whether the user has the archiving authority or not according to the user identity information in the data archiving request.
7. A blockchain data archiving and recovery system, comprising: request acquisition module, authentication module, data filing module and data recovery module, wherein:
the request acquisition module is used for acquiring a data archiving request and a data recovery request of a user;
the identity authentication module is used for extracting and authenticating the archiving authority of the user according to the user identity information in the data archiving request; the data recovery system is also used for extracting and verifying the recovery authority of the user according to the user identity information in the data recovery request;
the data filing module is used for filing data after the verification is passed, reading corresponding block information according to the entry reference starting and ending block number, verifying the validity of the block, and reading the content of the block file and the export block after the verification is successful to finish the data filing;
and the data recovery module is used for recovering data after the verification is passed, deserializing the block information and verifying the integrity of the block data, and writing the transaction data under the corresponding block into the corresponding position in the file after the verification is successful so as to complete the data recovery.
8. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the one or more programs, when executed by the processor, implement the method of any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202211497739.9A 2022-11-25 2022-11-25 Block chain data archiving and recovering method and system Pending CN115756966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211497739.9A CN115756966A (en) 2022-11-25 2022-11-25 Block chain data archiving and recovering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211497739.9A CN115756966A (en) 2022-11-25 2022-11-25 Block chain data archiving and recovering method and system

Publications (1)

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

Family

ID=85338992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211497739.9A Pending CN115756966A (en) 2022-11-25 2022-11-25 Block chain data archiving and recovering method and system

Country Status (1)

Country Link
CN (1) CN115756966A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116755640A (en) * 2023-08-21 2023-09-15 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium of alliance chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116755640A (en) * 2023-08-21 2023-09-15 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium of alliance chain
CN116755640B (en) * 2023-08-21 2024-02-09 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and storage medium of alliance chain

Similar Documents

Publication Publication Date Title
CN113537984A (en) Content verification method and device based on block chain and electronic equipment
CN113472720B (en) Digital certificate key processing method, device, terminal equipment and storage medium
US11663595B1 (en) Blockchain transactional identity verification
CN115756966A (en) Block chain data archiving and recovering method and system
CN109446208A (en) A kind of date storage method, computer readable storage medium and server
CN112037058A (en) Data verification method, device and storage medium
CN113052688A (en) Credit card handling method and device based on block chain
CN113362068B (en) Method for verifying block chain state transfer by light node
CN110223075B (en) Identity authentication method and device, computer equipment and storage medium
CN112258188B (en) Processing method, device, equipment and system for block chain transaction
CN109033818B (en) Terminal, authentication method, and computer-readable storage medium
CN110766403A (en) Data processing device and method based on block chain and storage medium
CN111260364B (en) Block chain-based extensible quick payment method and system
CN110503432B (en) Method, device and computer readable storage medium for processing resource transfer request
CN111131329A (en) Data consensus method and device for block chain system and hardware equipment
CN111047322A (en) Intelligent contract deployment method and device based on block chain and hardware equipment
CN116433369A (en) Verification method and device
CN111179524B (en) ATM (automatic Teller machine) card retaining and retrieving method and device
CN115061924A (en) Automatic test case generation method and generation device
CN114255134A (en) Account number disassembling method and device and storage medium
CN113935071A (en) Data processing method, device, equipment and medium based on block chain system
CN112633271A (en) Financial transaction system authentication method based on OCR recognition
CN113610527B (en) Alliance chain transaction method, device, system, terminal equipment and storage medium
CN109255702B (en) Method and device for changing account opening mechanism
CN112561473A (en) Intention file generation method and device, computer 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