CN114625568A - Block chain backup processing method, device and equipment and readable storage medium - Google Patents

Block chain backup processing method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN114625568A
CN114625568A CN202210212696.9A CN202210212696A CN114625568A CN 114625568 A CN114625568 A CN 114625568A CN 202210212696 A CN202210212696 A CN 202210212696A CN 114625568 A CN114625568 A CN 114625568A
Authority
CN
China
Prior art keywords
backup
data
node
request
backed
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
CN202210212696.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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202210212696.9A priority Critical patent/CN114625568A/en
Publication of CN114625568A publication Critical patent/CN114625568A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The invention provides a block chain backup processing method, a block chain backup processing device and a readable storage medium, which relate to the technical field of block chains and comprise the steps of receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up; sending the data to be backed up to a node in a block chain network; screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up; and sending the required backup information to a network distribution consensus layer for cross-link transaction processing. The invention has the beneficial effects that: for incomplete transactions, transaction account book backup can be carried out through real-time communication between the transaction nodes and the backup nodes, and then the recoverability of the account book data is guaranteed; the transaction node failure needs to be restarted without restarting the transaction, and new transactions can be processed in parallel during restarting, so that the effectiveness of a transaction node restarting scene is ensured.

Description

Block chain backup processing method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing blockchain backup.
Background
In the process of block chain cross-chain transaction, when a transaction node fails, the transaction cannot be processed continuously; time is needed for rebuilding the account book after the transaction node is restarted due to faults, and the timeliness of transaction is reduced; and the transaction can not be continued when the transaction in progress fails, and the transaction can not be continued until the transaction node account book is recovered.
Disclosure of Invention
The present invention is directed to a method, an apparatus, a device and a readable storage medium for processing blockchain backup, so as to solve the above-mentioned problems. In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present application provides a method for processing blockchain backup, including:
receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up;
sending the data to be backed up to a node in a block chain network to request the node in the block chain network to store the data to be backed up;
screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up;
and sending the required backup information to a network distribution consensus layer for cross-link transaction processing.
Preferably, receiving a data backup request sent by a source device, where the data backup request is used to request to backup data to be backed up, and the method includes:
acquiring first information, wherein the first information is a slicing result of each node in the block chain network on a block to be backed up stored in the node, and the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in the network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of a plurality of slices and positions of the plurality of slices in the data file;
and determining whether to backup the block to be backed up according to the slicing result of each node in the network distribution consensus layer on the block to be backed up, and if the slicing result of the block to be backed up meets the requirement, backing up.
Preferably, obtaining the required backup data then comprises:
calculating a block node address corresponding to the data to be backed up according to a consistency balancing algorithm;
sending a first request, wherein the first request comprises a request for sending backup data to the network distribution consensus layer of a node in a blockchain network corresponding to the blockchain node address;
and sending the acquired backup data request to a data storage layer of a node in the block chain network according to the first request, wherein the data storage layer stores the backup data.
Preferably, the receiving a data backup request sent by a source device, where the data backup request is used to request to backup data to be backed up, and the receiving includes:
establishing a mapping relation between a database aimed by a system backup instruction and a node in the block chain network according to the type of an operating system;
acquiring second information, wherein the second information comprises backup data of different databases, and sending the backup data to a conversion center;
and determining the backup data matched with the nodes in at least one block chain network to be backed up and stored according to the mapping relation of the backup data fed back by the conversion center.
Preferably, the sending the required backup information to a network distribution consensus layer for cross-chain transaction processing includes:
receiving second information, wherein the second information comprises a job request of an external system, and the job request comprises a node restarting operation request and a service request;
responding to the node restarting operation request, and performing consensus operation based on a preset restarting operation contract;
responding to success of consensus operation, sending a node restart instruction to a service execution unit so that the service execution unit performs closed-loop processing on services in a processing state within a preset restart transition time window;
and responding to the completion of processing of the received update type service from the service execution unit, and sending a node restart instruction to the external system so as to enable the external system to execute node restart operation.
Preferably, the sending the node restart instruction to the external system further includes:
updating a preset node restart to-be-executed identifier into a node restart to-be-executed state;
judging whether the preset node restart to-be-executed mark indicates a node restart to-be-executed state or not;
when the judgment result is negative, carrying out a reexamination operation on the operation request; and rejecting the update type service request when the judgment result is yes and the operation request is the update type service request.
In a second aspect, the present application further provides a device for processing a block chain backup, including a receiving module, a requesting module, a screening module, and a sending module, where:
a receiving module: the data backup method comprises the steps of receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up;
a request module: the data backup method comprises the steps that data to be backed up are sent to nodes in a block chain network so as to request the nodes in the block chain network to store the data to be backed up;
a screening module: the data backup device is used for screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up;
a sending module: and the backup information sending module is used for sending the required backup information to a network distribution consensus layer to carry out cross-chain transaction processing.
Preferably, the receiving module comprises a first obtaining module and a determining module, wherein:
a first obtaining module: the system comprises a network distribution consensus layer and a block chain network, wherein the network distribution consensus layer is used for acquiring first information, the first information is a slicing result of each node in the block chain network on a block to be backed up, the slicing result of each consensus node on the block to be backed up is stored by the node, the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in the network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of a plurality of slices and positions of the plurality of slices in the data file;
a judging module: and the backup device is used for determining whether to backup the block to be backed up according to the slicing result of each node in the network distribution consensus layer on the block to be backed up, and if the slicing result of the block to be backed up meets the requirement, backing up.
Preferably, the screening module, after the screening module, includes a calculating module, a first sending module and a second sending module, wherein:
a calculation module: the system comprises a data backup module, a data backup module and a data backup module, wherein the data backup module is used for calculating and obtaining a block node address corresponding to the data to be backed up according to a consistency balance algorithm;
a first sending module: the system comprises a network distribution consensus layer and a backup data acquisition layer, wherein the network distribution consensus layer is used for sending a first request, and the first request comprises a request for sending backup data to the network distribution consensus layer of a node in a blockchain network corresponding to the blocknode address;
a second sending module: and the data storage layer is used for sending the acquired backup data request to a data storage layer of a node in the block chain network according to the first request, and the data storage layer stores the backup data.
Preferably, the receiving module includes an establishing unit, an obtaining unit and a backup unit, wherein:
the establishing unit: the system comprises a database, a block chain network and a backup instruction, wherein the database is used for storing a mapping relation between a database and a node in the block chain network;
an acquisition unit: the system comprises a database, a conversion center and a database management server, wherein the database management server is used for acquiring first information, acquiring backup data of different databases and sending the backup data to the conversion center;
a backup unit: and the backup data matching with the node in the block chain network is determined to be backed up and stored according to the mapping relation of the backup data fed back by the conversion center.
Preferably, the sending module, after the receiving module, includes a request receiving module, an operation module, a processing module, and an instruction sending module, where:
a request receiving module: the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving second information, and the second information comprises a job request of an external system, and the job request comprises a node restart operation request and a service request;
an operation module: the node restarting operation system is used for responding to the node restarting operation request and performing consensus operation based on a preset restarting operation contract;
a processing module: the node restarting instruction is sent to a service execution unit in response to the success of the consensus operation, so that the service execution unit performs closed-loop processing on the service in the processing state within a preset restarting transition time window;
an instruction sending module: and the node restarting instruction is sent to the external system to enable the external system to execute node restarting operation in response to the fact that the received update type service from the service execution unit is processed.
Preferably, the instruction sending module further includes an updating module, a restarting judgment module and a checking module, wherein:
an update module: the system comprises a node restart to-be-executed identifier used for updating a preset node restart to-be-executed identifier into a node restart to-be-executed state;
a judging and restarting module: the node restarting to-be-executed identifier is used for judging whether the preset node restarting to-be-executed identifier indicates a node restarting to-be-executed state;
an inspection module: the operation request is subjected to repeated checking operation when the judgment result is negative; and when the judgment result is yes and the job request is an update type service request, rejecting the update type service request.
In a third aspect, the present application further provides a block chain backup processing device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the block chain backup processing method when the computer program is executed.
In a fourth aspect, the present application further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above block chain based backup processing method.
The invention has the beneficial effects that: for incomplete transactions, transaction account book backup can be carried out through real-time communication between the transaction nodes and the backup nodes, and then the recoverability of the account book data is guaranteed; the transaction node is required to be restarted when the fault occurs, the ledger data can be quickly recovered through the backup node without restarting the transaction, and new transactions can be processed in parallel during restarting, so that the effectiveness of a transaction node restarting scene is ensured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
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 schematic flowchart of a processing method for block chain backup according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a block chain backup processing device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a blockchain backup processing device according to an embodiment of the present invention.
In the figure, 701, a receiving module; 7011. a building unit; 7012. an acquisition unit; 7013. a backup unit; 702. a request module; 703. a screening module; 704. a sending module; 705. a first acquisition module; 706. a judgment module; 707. a calculation module; 708. a first sending module; 709. a second sending module; 710. a request receiving module; 711. an operation module; 712. a processing module; 713. an instruction sending module; 714. an update module; 715. judging a restarting module; 716. an inspection module; 800. block chain backup processing equipment; 801. a processor; 802. a memory; 803. a multimedia component; 804. an input/output (I/O) interface; 805. a communication component.
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. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1:
the embodiment provides a block chain backup processing method.
Referring to fig. 1, it is shown that the method includes step S100, step S200, step S300 and step S400.
S100, receiving a data backup request sent by a source device, wherein the data backup request is used for requesting backup of data to be backed up.
It is understood that step S100 is preceded by steps S98 and S99, wherein:
s98, acquiring first information, wherein the first information is a slicing result of each node in the block chain network on a block to be backed up stored in the node, and the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in the network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of a plurality of slices and positions of the plurality of slices in the data file;
and S99, determining whether to backup the block to be backed up according to the slicing result of each node in the network distribution consensus layer on the block to be backed up, and if the slicing result of the block to be backed up meets the requirement, backing up.
In a specific embodiment, one or more common nodes may be included in the blockchain system, where any two common nodes in the blockchain system may be connected in communication, for example, through a wired connection, or may also be connected in a wireless manner, which is not limited in this embodiment.
In the embodiment of the present invention, the consensus node in the blockchain system may have multiple functions, such as a routing function, a transaction function, a blockchain function, and a consensus function. For example, any one of the consensus nodes may send the transaction reported by the client to another consensus node, so as to implement a communication function between the consensus node and any other consensus node; alternatively, any of the consensus nodes may be used to record all historical transactions or all historical blocks of the blockchain system; alternatively, any of the consensus nodes may agree with other consensus nodes to generate a new block based on a successful transaction of the consensus. The routing function is a function that each of the common nodes in the blockchain system must have, and other functions can be set by those skilled in the art according to actual needs. The common node in the blockchain system may refer to a physical machine (server), or may also refer to a process or a series of processes running in the physical machine; for example, the consensus node may be a consensus server, or may also be a process running on the consensus server, which is not limited in particular.
It should be noted that step S100 includes S101, S102, and S103, where:
s101, establishing a mapping relation between a database aimed by a system backup instruction and a node in the block chain network according to the type of an operating system;
s102, obtaining second information, wherein the second information comprises backup data of different databases, and sending the backup data to a conversion center;
s103, according to the mapping relation of the backup data fed back by the conversion center, determining the backup data matched with the nodes in at least one block chain network to backup and store.
In this embodiment, the conversion center is a connection client, is connected with one or more databases through a database adapter, and is connected with one or more block link points through a block chain adapter; the system may comprise a blockchain adapter, which may be adapted to different types of blockchain nodes, wherein the read-write interface of each blockchain node may be encapsulated. The block chain adapter can select different block chain nodes to operate and schedule according to the operation type; the block chain adapter performs the following operations at the time of data backup: receiving a writing request and contents to be written sent by a conversion center, and writing data into corresponding block chain nodes according to an operation type instruction in the request; the block chain adapter performs the following operations at data recovery: receiving a reading request sent by a conversion center; obtaining data from the corresponding block chain node according to the operation type instruction in the request and returning the data; in the system, the conversion center manages the mapping relation between the database and one or more block chain nodes according to different instructions, and processes according to the mapping relation when backing up and restoring data. Further, since different databases and different block chain link reading and writing speeds may be different, it is preferable to set a message buffer queue for asynchronous processing, including a database message buffer queue and a block chain message buffer queue.
Specifically, the backup process is as follows:
1. chain a user E initiates a cross-chain asset transaction request to transaction node J1 requesting a cross-chain transaction with user F of chain B. The request field contains the following:
transaction ID, user E's chain A account C, chain A transaction asset amount, user E's chain B account C ', user F's chain B account D, chain B transaction asset amount, user F's chain A account D', digest1 ═ Hash (transaction ID, user E's chain A account C, chain A transaction asset amount, user E's chain B account C ', user F's chain B account D, chain B transaction asset amount, user F's chain A account D')
2. The transaction node J1 receives the cross-link asset transaction request and analyzes the request;
the get data fields include the following:
transaction ID, user E's chain A account C, chain A transaction asset amount, user E's chain B account C ', user F's chain B account D, chain B transaction asset amount, user F's chain A account D';
3. transaction node J1 initiates a query account balance for requests to chain a and chain B:
3.1, the transaction node J1 inquires the balance of the assets of the account C to the chain A, and the request comprises the data obtained by the analysis in the step 2: user E's A-chain account C;
3.2, the transaction node J1 inquires the account D asset allowance from the B chain, and the request comprises the data obtained by the analysis in the step 2: a B-chain account D of user F;
4. the A chain and the B chain respectively feed back the query result:
4.1, feeding back the balance of the account C assets in the chain A1;
4.2, B chain feedback account D asset balance 2;
5. transaction node J1 checks for asset balance:
5.1, the transaction node J1 checks whether the balance of the assets of the chain A account C1 is larger than the amount of the transaction assets of the chain A obtained by the analysis of the step 2, if so, the transaction is continued, otherwise, an error is reported and the transaction is quitted;
5.2, the transaction node J1 checks whether the balance of the D assets of the B chain account 2 is larger than the amount of the B chain transaction assets obtained by the analysis in the step 2, if so, the transaction continues, otherwise, an error is reported and the transaction exits;
6. and the transaction node J1 generates a pairing value according to the transaction request and the timestamp and records:
the pairing value generation formula is as follows:
hash Algorithm 1 ═ Hash { user E's chain A account C, A chain transaction asset amount, user E's chain B account C ', user F's chain B account D, B chain transaction asset amount, user F's chain A account D', timestamp }
7. The transaction node J1 selects the transaction node J2, the transaction node J3 and the transaction node Jn as backup nodes, and sends backup requests to the backup nodes:
the backup content contains the pairing value generated in step 6, as follows:
the pairing value Hash 1;
8. transaction node J1 initiates a transfer request:
8.1, transaction node J1 initiates a transfer request to A-chain user E:
the transfer request contains the following fields: the transaction node J1 accounts for the address CJ1 and the paired value Hash1 in the A chain;
8.2, transaction node J1 initiates a transfer request to B-chain user F: the transfer request contains the following fields: the transaction node J1 is at the B-chain account address CJ1' and the paired value Hash 1.
9. Transfer processing:
9.1, the user E receives the transfer request of the transaction node J1, and transfers to the transaction node J1 at the account address CJ1 of the chain A through the account address C of the chain A:
account C-original balance-A chain transaction balance
Account CJ1 balance of assets Account CJ1 original balance of assets + chain A transaction amount of assets
9.2, the user F receives the transfer request of the transaction node J1, and transfers the transfer request to the transaction node J1 at the account address CJ1' of the chain B through the account address D of the chain B;
account D-original-asset allowance-B chain transaction asset amount
Account CJ1 'allowance of assets Account CJ1' original allowance of assets + B chain transaction amount of assets
S200, sending the data to be backed up to a node in a block chain network to request the node in the block chain network to store the data to be backed up.
S300, screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up.
Specifically, the step of screening in this step is to select and delete backup information, and the flow is to invoke this flow after the transfer of the cross-chain transaction is successful:
1. the transaction node sends a request for deleting the backup information to the backup node:
the request information includes: the pairing value Hash;
2. the backup node deletes the backup information:
the deletion information is as follows: the pairing value Hash.
It is understood that S300 is followed by S301, S302 and S303, wherein:
s301, calculating to obtain a block node address corresponding to the data to be backed up according to a consistency balancing algorithm;
s302, sending a first request, where the first request includes sending a request for obtaining backup data to the network distribution consensus layer of a node in the blockchain network corresponding to the blockchain node address;
s303, according to the first request, sending the acquired backup data request to a data storage layer of a node in the block chain network, wherein the data storage layer stores the backup data.
When a certain block node has data to be uplink-linked, the block node receives the data to be uplink-linked, sends the received data to a data storage layer of the block node for storage, and performs hash calculation on the data to be uplink-linked by using a hash algorithm to generate a data backup hash value. In this embodiment, the hash algorithm may be one of the SHA-1 algorithm, the SHA-2 algorithm, the SHA-3 algorithm, the SHA256 algorithm, the MD5 algorithm, the SHA512 algorithm, and the RIPEMD160 algorithm. The data backup hash value should be calculated as a hash value with a short field.
The block node takes the data backup hash value as a key factor and calculates the backup block node address through a consistency balancing algorithm. In this embodiment, the consistency balancing algorithm may be one of a jumo consistency hash algorithm, a libconhash algorithm, a hash table algorithm, and a consistency hash algorithm.
And S400, sending the required backup information to a network distribution consensus layer for cross-chain transaction processing.
It is understood that in the present step S400, S401, S402, S403 and S404 are included thereafter, wherein:
s401, receiving second information, wherein the second information comprises a job request of an external system, and the job request comprises a node restarting operation request and a service request;
s402, responding to the node restarting operation request, and performing consensus operation based on a preset restarting operation contract;
s403, responding to success of the consensus operation, sending a node restart instruction to a service execution unit so that the service execution unit performs closed-loop processing on the service in a processing state in a preset restart transition time window;
s404, in response to the fact that the received update type service from the service execution unit is processed, sending a node restart instruction to the external system, so that the external system executes node restart operation.
When the operation request is the node restarting operation request, the node restarting operation request is subjected to consensus operation, after the consensus operation is successful, the instruction internal sending unit sends the node restarting instruction to the service execution unit, so that the service execution unit performs closed-loop processing on the service in the processing state in the restarting transition time window, and when the service execution unit finishes processing the update type service, the node restarting instruction is sent to the operation and maintenance management system, so that the operation and maintenance management system can execute the node restarting operation.
It should be noted that S405, S406, and S407 are further included after S404, where:
s405, updating the preset node restart to-be-executed identifier into a node restart to-be-executed state;
s406, judging whether the preset node restart to-be-executed mark indicates a node restart to-be-executed state or not;
s407, when the judgment result is negative, performing a duplication checking operation on the job request; and when the judgment result is yes and the job request is an update type service request, rejecting the update type service request.
In this embodiment, when the operation request is a query type service request, the operation corresponding to the query type service request may be directly executed without being limited by the node restarting the to-be-executed identifier.
Specifically, the restart process is as follows: in a scheme of restarting a cross-chain transaction node, two transaction scenarios are drawn up through a transaction platform: one is that the restart transaction is carried out under the environment that the node is trusted; the other is to perform a restart transaction under normal circumstances.
The first method comprises the following steps: the trusted environment restart process comprises the following steps:
1. the method comprises the steps that backup nodes are drawn up to be credible nodes by a credible environment; transaction node J1 failed, at which point the proposed transaction node J1 ledger was all cleared. One of the N backup nodes, J2, is selected to initiate the restart request. At the same time, a blockchain may optionally be requested to restore all transaction history data. And transaction node J1 may also process new transactions concurrently in parallel.
1.1, transaction node J1 initiates a restart request to backup node J2.
1.2, after receiving the restart request, the backup node J2 feeds back to the transaction node J1. The feedback information includes the following:
1.3, the transaction node J1 receives the pairing value and the block height value of the backup fed back by the backup node J2, and processes the pairing values one by one:
and the second method comprises the following steps: the common environment restart process comprises the following steps:
2. setting transaction nodes J1 of the current transaction through a transaction platform, wherein the transaction nodes J2, the transaction nodes J3 and the transaction nodes Jn are backup nodes, and setting the backup nodes to be common nodes:
2.1, when the transaction node J1 needs to restart the recovery data, initiating a ledger data recovery request to 3 backup nodes simultaneously.
And 2.2 and 3 backup nodes receive the restart request from the transaction node J1 and send the pairing value of each backup and the block height value of each backup to the transaction node J1.
The transaction node J1 receives feedback information of each backup node, where the feedback information includes the following: the pair value and the block height value of the backup.
2.3, the transaction node J1 obtains the feedback information of each backup node and sorts the feedback information.
And 2.4, performing hash operation after sorting, comparing the hash values by the transaction node J1, and taking more than half of feedback information with the same hash value as final recovery data.
And 2.5, processing the pairing values one by one.
Example 2:
as shown in fig. 2, the present embodiment provides a blockchain backup processing apparatus, referring to fig. 2, the apparatus includes a receiving module 701, a requesting module 702, a screening module 703 and a sending module 704, where:
the receiving module 701: the data backup device is used for receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up;
the request module 702: the backup method comprises the steps that data to be backed up are sent to nodes in a block chain network to request the nodes in the block chain network to store the data to be backed up;
the screening module 703: the system is used for screening the stored data to be backed up according to a hash value algorithm to obtain the data to be backed up;
the sending module 704: and the system is used for sending the required backup information to the network distribution consensus layer to carry out cross-chain transaction processing.
Specifically, the receiving module 701 includes a first obtaining module 705 and a determining module 706, where:
the first obtaining module 705: the method comprises the steps that first information is obtained, wherein the first information is the slicing result of each node in a block chain network on a block to be backed up stored in the node, the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in a network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of the plurality of slices and positions of the plurality of slices in the data file;
the judging module 706: and the backup module is used for determining whether to backup the block to be backed up according to the slicing result of the block to be backed up of each node in the network distribution consensus layer, and if the slicing result of the block to be backed up meets the requirement, performing backup.
Specifically, the screening module 703 then includes a calculating module 707, a first sending module 708, and a second sending module 709, where:
the calculation module 707: the method is used for calculating and obtaining a block node address corresponding to the data to be backed up according to a consistency balancing algorithm;
the first transmitting module 708: the backup data sending method comprises the steps of sending a first request, wherein the first request comprises a request for sending and obtaining backup data to a network distribution consensus layer of a node in a block chain network corresponding to a block node address;
the second sending module 709: and the data storage layer is used for sending the acquired backup data request to the data storage layer of the node in the block chain network according to the first request, and the data storage layer stores the backup data.
Specifically, the receiving module 701 includes a establishing unit 7011, an obtaining unit 7012, and a backup unit 7013, where:
establishing unit 7011: the system comprises a database, a block chain network and a backup instruction, wherein the database is used for storing a mapping relation between a database and a node in the block chain network, and the mapping relation is used for establishing a mapping relation between the database and the node in the block chain network, which is aimed at by the system backup instruction, according to the type of an operating system;
acquisition unit 7012: the system is used for acquiring second information, wherein the second information comprises backup data of different databases and sending the backup data to the conversion center;
backup unit 7013: and the backup data matching with the nodes in at least one block chain network is determined to be backed up and stored according to the mapping relation of the backup data fed back by the conversion center.
Specifically, the sending module 704, then, includes a receiving request module 710, an operation module 711, a processing module 712, and an instruction sending module 713, where:
the receive request module 710: the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving second information, the second information comprises a job request of an external system, and the job request comprises a node restarting operation request and a service request;
the operation module 711: the device comprises a network node, a network node and a network node, wherein the network node is used for responding to a node restarting operation request and performing consensus operation based on a preset restarting operation contract;
the processing module 712: the device is used for responding to success of consensus operation, and sending a node restarting instruction to a service execution unit so as to enable the service execution unit to carry out closed-loop processing on services in a processing state in a preset restarting transition time window;
the instruction sending module 713: and the node restarting instruction is sent to the external system to enable the external system to execute the node restarting operation in response to the fact that the received updating type service from the service execution unit is processed.
Specifically, the instruction sending module 713 further includes an updating module 714, a restarting judgment module 715, and a checking module 716, where:
the update module 714: the node restarting to-be-executed state updating device is used for updating a preset node restarting to-be-executed identifier into a node restarting to-be-executed state;
the judgment restart module 715: the node restarting to-be-executed state judging module is used for judging whether a preset node restarting to-be-executed mark indicates a node restarting to-be-executed state;
the checking module 716: the device is used for carrying out repeated checking operation on the job request when the judgment result is negative; and when the judgment result is yes and the job request is the update type service request, rejecting the update type service request.
Specifically, the overall structure flow is as follows:
1. the trading platform comprises a set of trading nodes, J1, J2, …, Jn, wherein each trading node has its account address in the blockchain. User E of blockchain A and user F of blockchain B select transaction node J1 as the transaction node of the cross-chain transaction, and the account addresses of transaction node J1 in chain A and chain B are J and J', respectively.
2. User E has an asset account on chain A by transferring the account's assets to transaction node's account address J in chain A, and then sends the transaction record to transaction node J1; user F owns the asset account on B-chain by transferring the asset of the account to transaction node's account address J' in B-chain and then sends the transaction record to transaction node J1; and the two transaction records are sent to the backup node for dynamic real-time storage.
3. If the transaction node suddenly fails and needs to be restarted, the whole information can be selected to be recovered. If only the incomplete transaction information is recovered, the incomplete transaction records of the transaction node are quickly recovered through the backup information of other transaction nodes.
If all information is recovered, the incomplete transaction records of the transaction node are quickly recovered through the backup information of other transaction nodes, and meanwhile, the transaction nodes can recover all the ledger information according to the blockchain ledger. The following detailed scheme flow is described in terms of recovering all ledger information.
4. And the transaction node restarts to continue to complete the transaction as long as the incomplete transaction record is recovered.
5. After the transaction is finished, the transaction information is sent to the backup node through the transaction node, the backup node inquires through the pairing value, 4 results are inquired, the transaction is judged to be finished, and finally 4 records of the backup book information of the transaction are deleted.
It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Example 3:
corresponding to the above method embodiment, the present embodiment further provides a block chain backup processing device, and a block chain backup processing device described below and a block chain backup processing method described above may be referred to in correspondence.
Fig. 3 is a block diagram illustrating a blockchain backup processing device 800 according to an exemplary embodiment. As shown in fig. 3, the blockchain backup processing apparatus 800 may include: a processor 801, a memory 802. The blockchain backup processing device 800 may also include one or more of a multimedia component 803, an I/O interface 804, and a communication component 805.
The processor 801 is configured to control the overall operation of the blockchain backup processing apparatus 800, so as to complete all or part of the steps in the above-mentioned blockchain backup processing method. The memory 802 is used to store various types of data to support the operation of the blockchain backup processing device 800, such data may include, for example, instructions for any application or method operating on the blockchain backup processing device 800, as well as application related data such as contact data, messaging, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the blockchain backup processing device 800 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the blockchain backup Processing Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, for performing the above-mentioned blockchain backup Processing method.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described blockchain backup processing method is also provided. For example, the computer readable storage medium may be the memory 802 including the program instructions, which are executable by the processor 801 of the blockchain backup processing device 800 to perform the blockchain backup processing method.
Example 4:
corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment, and a readable storage medium described below and a block chain backup processing method described above may be referred to in correspondence.
A readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the block chain backup processing method of the above-described method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
In summary, the transaction platform in the scheme of the system interacts with the multi-party blockchain, which can be divided into a trusted environment restart and a normal environment restart, and takes cross-chain interaction between the blockchain a chain and the blockchain B chain as an example, the interaction is performed between the blockchain a chain, the blockchain B chain and the transaction platform. By the incomplete transaction record backup and recovery processing scheme of the transaction platform, the user can be quickly recovered and restarted under the condition that the transaction platform fails in the cross-chain transaction so as to continue the transaction.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (14)

1. A block chain backup processing method is characterized by comprising the following steps:
receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up;
sending the data to be backed up to a node in a block chain network to request the node in the block chain network to store the data to be backed up;
screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up;
and sending the required backup information to a network distribution consensus layer for cross-link transaction processing.
2. The method according to claim 1, wherein the receiving a data backup request sent by a source device, the data backup request being used to request backup of data to be backed up, comprises:
acquiring first information, wherein the first information is a slicing result of each node in the block chain network on a block to be backed up stored in the node, and the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in the network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of a plurality of slices and positions of the plurality of slices in the data file;
and determining whether to backup the block to be backed up according to the slicing result of each node in the network distribution consensus layer on the block to be backed up, and if the slicing result of the block to be backed up meets the requirement, backing up.
3. The method of claim 1, wherein obtaining the required backup data comprises:
calculating a block node address corresponding to the data to be backed up according to a consistency balancing algorithm;
sending a first request, wherein the first request comprises a request for sending backup data to the network distribution consensus layer of a node in a blockchain network corresponding to the blockchain node address;
and sending the acquired backup data request to a data storage layer of a node in the block chain network according to the first request, wherein the data storage layer stores the backup data.
4. The method according to claim 1, wherein the receiving a data backup request sent by a source device, the data backup request being used to request backup of data to be backed up, includes:
establishing a mapping relation between a database aimed by a system backup instruction and a node in the block chain network according to the type of an operating system;
acquiring second information, wherein the second information comprises backup data of different databases, and the backup data is sent to a conversion center;
and determining the backup data matched with the nodes in at least one block chain network to be backed up and stored according to the mapping relation of the backup data fed back by the conversion center.
5. The blockchain backup processing method according to claim 1, wherein the sending the required backup information to a network distribution consensus layer for cross-chain transaction processing, then comprises:
receiving second information, wherein the second information comprises a job request of an external system, and the job request comprises a node restart operation request and a service request;
responding to the node restarting operation request, and performing consensus operation based on a preset restarting operation contract;
responding to success of consensus operation, and sending a node restarting instruction to a service execution unit so as to enable the service execution unit to perform closed-loop processing on services in a processing state in a preset restarting transition time window;
and responding to the completion of processing of the received update type service from the service execution unit, and sending a node restart instruction to the external system so as to enable the external system to execute node restart operation.
6. The blockchain backup processing method according to claim 5, wherein said sending a node restart instruction to the external system further comprises:
updating a preset node restart to-be-executed identifier into a node restart to-be-executed state;
judging whether the preset node restart to-be-executed identifier indicates a node restart to-be-executed state or not;
when the judgment result is negative, carrying out a reexamination operation on the operation request; and rejecting the update type service request when the judgment result is yes and the operation request is the update type service request.
7. A block chain backup processing apparatus, comprising:
a receiving module: the data backup method comprises the steps of receiving a data backup request sent by source equipment, wherein the data backup request is used for requesting backup of data to be backed up;
a request module: the data backup method comprises the steps that data to be backed up are sent to nodes in a block chain network so as to request the nodes in the block chain network to store the data to be backed up;
a screening module: the data backup device is used for screening the stored data to be backed up according to a Hash value algorithm to obtain the data to be backed up;
a sending module: and the backup information sending module is used for sending the required backup information to a network distribution consensus layer to carry out cross-chain transaction processing.
8. The device of claim 7, wherein the receiving module comprises:
a first obtaining module: the system comprises a network distribution consensus layer and a block chain network, wherein the network distribution consensus layer is used for acquiring first information, the first information is a slicing result of each node in the block chain network on a block to be backed up, the slicing result of each consensus node on the block to be backed up is stored by the node, the slicing result of each consensus node on the block to be backed up is obtained by slicing a data file of the block to be backed up in the network distribution consensus layer, and the data file comprises block data and signature data; the slicing result comprises check values of a plurality of slices and positions of the plurality of slices in the data file;
a judging module: and the backup device is used for determining whether to backup the block to be backed up according to the slicing result of each node in the network distribution consensus layer on the block to be backed up, and if the slicing result of the block to be backed up meets the requirement, backing up.
9. The blockchain backup processing apparatus of claim 7, wherein the screening module thereafter comprises:
a calculation module: the system comprises a data backup module, a data backup module and a data backup module, wherein the data backup module is used for calculating and obtaining a block node address corresponding to the data to be backed up according to a consistency balance algorithm;
a first transmitting module: the system comprises a network distribution consensus layer and a backup data acquisition layer, wherein the network distribution consensus layer is used for sending a first request, and the first request comprises a request for sending backup data to the network distribution consensus layer of a node in a blockchain network corresponding to the blocknode address;
a second sending module: and the data storage layer is used for sending the acquired backup data request to a data storage layer of a node in the block chain network according to the first request, and the data storage layer stores the backup data.
10. The device according to claim 7, wherein said receiving module comprises:
the establishing unit: the system comprises a database, a block chain network and a backup instruction, wherein the database is used for storing a mapping relation between a database and a node in the block chain network;
an acquisition unit: the system comprises a database, a conversion center and a database management server, wherein the database management server is used for acquiring first information, acquiring backup data of different databases and sending the backup data to the conversion center;
a backup unit: and the backup data matching with the node in at least one block chain network is determined to be backed up and stored according to the mapping relation of the backup data fed back by the conversion center.
11. The device of claim 7, wherein the sending module is followed by:
a request receiving module: the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving second information, and the second information comprises a job request of an external system, and the job request comprises a node restart operation request and a service request;
an operation module: the node restarting operation system is used for responding to the node restarting operation request and performing consensus operation based on a preset restarting operation contract;
a processing module: the node restarting instruction is sent to a service execution unit in response to the success of the consensus operation, so that the service execution unit performs closed-loop processing on the service in the processing state within a preset restarting transition time window;
an instruction sending module: and the node restarting instruction is sent to the external system to enable the external system to execute node restarting operation in response to the fact that the received update type service from the service execution unit is processed.
12. The device according to claim 11, wherein the command sending module further comprises:
an update module: the system comprises a node restart to-be-executed identifier used for updating a preset node restart to-be-executed identifier into a node restart to-be-executed state;
a judging and restarting module: the node restarting to-be-executed identifier is used for judging whether the preset node restarting to-be-executed identifier indicates a node restarting to-be-executed state;
an inspection module: the operation request is subjected to repeated checking operation when the judgment result is negative; and when the judgment result is yes and the job request is an update type service request, rejecting the update type service request.
13. A blockchain backup processing apparatus, comprising:
a memory for storing a computer program;
processor for implementing the steps of the blockchain backup processing method according to any one of claims 1 to 6 when executing the computer program.
14. A readable storage medium, characterized by: the readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the blockchain backup processing method according to any one of claims 1 to 6.
CN202210212696.9A 2022-03-04 2022-03-04 Block chain backup processing method, device and equipment and readable storage medium Pending CN114625568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210212696.9A CN114625568A (en) 2022-03-04 2022-03-04 Block chain backup processing method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210212696.9A CN114625568A (en) 2022-03-04 2022-03-04 Block chain backup processing method, device and equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114625568A true CN114625568A (en) 2022-06-14

Family

ID=81900391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210212696.9A Pending CN114625568A (en) 2022-03-04 2022-03-04 Block chain backup processing method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114625568A (en)

Similar Documents

Publication Publication Date Title
CN110400142B (en) Data processing method, device and storage medium
US11010240B2 (en) Tracking status and restarting distributed replication
US10761765B2 (en) Distributed object replication architecture
US7945814B2 (en) Remedying method for troubles in virtual server system and system thereof
US7769721B2 (en) Data recovery method in differential remote backup for a NAS system
US7644301B2 (en) Fault management system in multistage copy configuration
CN107992537B (en) Service attribute transmission method, device, computer equipment and storage medium
US11100094B2 (en) Taking snapshots of blockchain data
US20210049156A1 (en) Taking snapshots of blockchain data
KR102031589B1 (en) Methods and systems for processing relationship chains, and storage media
CN111522881A (en) Service data processing method, device, server and storage medium
CN114625568A (en) Block chain backup processing method, device and equipment and readable storage medium
CN116414628A (en) Transaction request processing method and device in new and old system switching process
CN115757270A (en) File version management system and method and computer equipment
CN110263305A (en) Configuration file control methods, device, equipment and storage medium
CN110489208B (en) Virtual machine configuration parameter checking method, system, computer equipment and storage medium
JP5466740B2 (en) System failure recovery method and system for virtual server
CN113656208B (en) Data processing method, device, equipment and storage medium of distributed storage system
CN112165512B (en) File release method and device, terminal equipment and storage medium
US11537474B2 (en) Recovery of a software-defined data center from persistent entity stores for virtual machines
US11354197B2 (en) Recovery of a software-defined data center
CN116974814A (en) Data recovery method, apparatus, device, storage medium and computer program product
CN117891563A (en) Control method and device of virtual machine, storage medium and electronic device
CN115563142A (en) Financial data stream processing method and device, electronic equipment and storage medium
CN117539678A (en) Backup data generation method and device, disaster recovery system and electronic equipment

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