CN109284206A - A kind of database backup method and relevant device based on block chain - Google Patents

A kind of database backup method and relevant device based on block chain Download PDF

Info

Publication number
CN109284206A
CN109284206A CN201811271233.XA CN201811271233A CN109284206A CN 109284206 A CN109284206 A CN 109284206A CN 201811271233 A CN201811271233 A CN 201811271233A CN 109284206 A CN109284206 A CN 109284206A
Authority
CN
China
Prior art keywords
data
database
target data
catenary system
block catenary
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
CN201811271233.XA
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201811271233.XA priority Critical patent/CN109284206A/en
Publication of CN109284206A publication Critical patent/CN109284206A/en
Pending legal-status Critical Current

Links

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/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6272Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database by registering files or documents with a third party

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present application discloses a kind of database backup method and relevant device based on block chain, safe and efficient and the blocks chain feature such as realize decentralization, can not distort for carrying out the backup procedure of database in block catenary system.The embodiment of the present application method includes: to obtain data in the present embodiment and acquire initial setting up;Initial setting up, which is acquired, according to the data generates intelligent contract;The data in database are encrypted according to the intelligent contract, obtain target data;Target data upload is backed up into block catenary system.Wherein, data in database are encrypted, after obtaining target data, target data upload is backed up into block catenary system, thus, the backup of database is realized based on block chain, in face of high flow capacity big data, node failure is effectively prevent, the problems such as loss of data caused by server delay machine, so that database keeps strong consistency.

Description

A kind of database backup method and relevant device based on block chain
Technical field
This application involves block chain technical field more particularly to a kind of database backup methods and correlation based on block chain Equipment.
Background technique
With the rapid development of office automation and e-commerce, enterprise is higher and higher to the dependence of information system, number Take on important role as the core of information system according to library.Especially some pairs of very high industries of data reliability requirement such as Bank, security, telecommunications etc., it is very heavy in case of hang-up or its loss meeting of loss of data.
In the prior art, generation database is more and more huger when micro services, in general, the Disaster Preparedness System of enterprise database It is to carry out data backup in the database itself, that is, depends between the server master-slave database of centralization when one section Between snapshot backup.
However, this backup mode needs to consume significant component of memory space in enterprise database, and flowed in height It measures in face of big data, is easy to produce because of node failure, the problems such as loss of data caused by server delay machine.
Apply for content
The embodiment of the present application discloses a kind of database backup method and relevant device based on block chain, in block Carry out the backup procedure of database in catenary system, it is safe and efficient and the blocks chain feature such as realize decentralization, can not distort.
The embodiment of the present application first aspect provides a kind of database backup method based on block chain, is applied to block chain Node device, which comprises
It obtains data and acquires initial setting up;
Initial setting up, which is acquired, according to the data generates intelligent contract;
The data in database are encrypted according to the intelligent contract, obtain target data;
Target data upload is backed up into block catenary system.
Optionally, described that the data in database are encrypted according to the intelligent contract, obtain target data Include:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
Optionally, the target data is uploaded described after backing up to block catenary system, the method also includes:
The target data is pulled from the block catenary system carries out data convert.
Optionally, from being pulled in the block catenary system before the target data carries out data convert, the method Further include:
Judge whether current data loses in the database;
Data convert is carried out if so, executing and pulling the target data from the block catenary system.
Optionally, the target data is uploaded described before backing up to block catenary system, the method also includes:
Obtain the target data abstract;
Calculate the cryptographic Hash of the target data abstract;
The cryptographic Hash upload that the target data is made a summary is backed up into the block catenary system.
Optionally, described to judge in the database whether current data loses and include:
Obtain the current data abstract of the database;
Calculate the cryptographic Hash of the current data abstract;
The cryptographic Hash of the target data abstract is obtained from block catenary system;
Judge that current data is according to the cryptographic Hash of the cryptographic Hash of current data abstract and target data abstract It is no to be tampered;
If so, determining that current data is lost in the database;
If not, it is determined that current data is not lost in database.
The embodiment of the present application second aspect provides a kind of database backup system based on block chain, is applied to block chain Node device, the system comprises:
First acquisition unit, for obtaining data acquisition initial setting up;
Generation unit generates intelligent contract for acquiring initial setting up according to the data;
Cryptographic processing unit obtains mesh for the data in database to be encrypted according to the intelligent contract Mark data;
First uploads backup units, for target data upload to be backed up to block catenary system.
Optionally, the encryption uploading unit is specifically used for:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
Optionally, the system also includes:
Reduction unit carries out data convert for pulling the target data from the block catenary system.
Optionally, the system also includes:
Judging unit, for judging whether current data loses in the database;
Execution unit, for executing from described when the judging unit determines that current data is lost in the database The target data is pulled in block catenary system carries out data convert.
Optionally, the system also includes:
Second acquisition unit obtains the target data abstract;
Computing unit, for calculating the cryptographic Hash of the target data abstract;
Second upload backup units are used to the cryptographic Hash upload that the target data is made a summary backing up to the block linkwork System;
Optionally, the judging unit is specifically used for:
Current data in the database is obtained to make a summary;
Calculate the cryptographic Hash of the current data abstract;
The cryptographic Hash of the target data abstract is obtained from block catenary system;
Judge that current data is according to the cryptographic Hash of the cryptographic Hash of current data abstract and target data abstract It is no to be tampered;
If so, determining that current data is lost in the database;
If not, it is determined that current data is not lost in database.
The embodiment of the present application third aspect provides a kind of computer installation, comprising:
Processor, memory, input-output equipment and bus;
The processor, memory, input-output equipment are connected with the bus respectively;
The processor is used to execute method as in the preceding embodiment.
The embodiment of the present application fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer journey Sequence: the step of method as in the preceding embodiment is realized when the computer program is executed by processor.
As can be seen from the above technical solutions, the embodiment of the present application has the advantage that in the present embodiment, obtains data and adopts Collect initial setting up;Initial setting up, which is acquired, according to the data generates intelligent contract;According to the intelligent contract in database Data are encrypted, and obtain target data;Target data upload is backed up into block catenary system.Wherein, to data Data in library are encrypted, and after obtaining target data, target data upload is backed up to block catenary system, from And realize that the backup of database effectively prevent node failure, server delay machine in face of high flow capacity big data based on block chain The problems such as caused loss of data, so that database keeps strong consistency.
Detailed description of the invention
Fig. 1 is an a kind of schematic diagram of the database backup method embodiment based on block chain in the embodiment of the present application;
Fig. 2 is a kind of another signal of the database backup method embodiment based on block chain in the embodiment of the present application Figure;
Fig. 3 is a kind of another signal of the database backup method embodiment based on block chain in the embodiment of the present application Figure;
Fig. 4 is a kind of another signal of the database backup method embodiment based on block chain in the embodiment of the present application Figure;
Fig. 5 is a kind of another signal of the database backup method embodiment based on block chain in the embodiment of the present application Figure;
Fig. 6 is an a kind of schematic diagram of the database backup system embodiment based on block chain in the embodiment of the present application;
Fig. 7 is an a kind of schematic diagram of computer installation embodiment in the embodiment of the present application.
Specific embodiment
The embodiment of the present application discloses a kind of database backup method and relevant device based on block chain, in block Carry out the backup procedure of database in catenary system, it is safe and efficient and the blocks chain feature such as realize decentralization, can not distort.
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection It encloses.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing Four " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein or describing Sequence other than appearance is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that covering is non-exclusive Include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to clearly arrange Those of out step or unit, but may include be not clearly listed or it is solid for these process, methods, product or equipment The other step or units having.
With the rapid development of office automation and e-commerce, enterprise is higher and higher to the dependence of information system, number Take on important role as the core of information system according to library.Especially some pairs of very high industries of data reliability requirement such as Bank, security, telecommunications etc., it is very heavy in case of hang-up or its loss meeting of loss of data.In the prior art, in incognito Generation database is more and more huger when business, and in general, the Disaster Preparedness System of enterprise database is counted in the database itself According to backup, i.e., dependent on the snapshot backup between the server master-slave database of centralization at regular intervals.However, this Kind backup mode needs to consume significant component of memory space in enterprise database, and in face of high flow capacity big data, holds Easily because of node failure, the problems such as loss of data caused by server delay machine.For this purpose, the embodiment of the present application provides one kind based on area The database backup method and relevant device of block chain, for carrying out the backup procedure of database in block catenary system, safety is high The blocks chain feature such as imitate and realize decentralization, can not distort.
In order to make it easy to understand, the detailed process in the embodiment of the present application is described below, referring to Fig. 1, the application A kind of one embodiment of the database backup method based on block chain includes: in embodiment
101, data are obtained and acquires initial setting up;
In the present embodiment, a node of the block chain node device as access block catenary system can also be used as simultaneously One of Database Administration Server, during the specific block chain node device obtains the realization of data acquisition initial setting up, Data acquisition initial setting up can be the data area of selection data acquisition encryption, the cipher mode of selection data acquisition, selection The either other data of the Encryption Algorithm of data acquisition acquire initial setting up, do not do specific restriction herein specifically.
Wherein, expansion is introduced herein by taking the Encryption Algorithm for selecting data to acquire as an example, for example, Encryption Algorithm can be set being RSA cryptographic algorithms, Advanced Encryption Standard (Advanced Encryption Standard, AES) Encryption Algorithm or be other Encryption Algorithm, do not do specific restriction herein.Furthermore it is also an option that the cipher mode of data acquisition, that is, arrange the side of encryption Formula be to all data to be backed up integrally carry out encrypting either to band back up each field of data encrypted again into The whole encryption of row, or other modes, do not limit specifically herein.
102, initial setting up is acquired according to the data generate intelligent contract;
In the present embodiment, the block chain node device according to acquired in step 101 data acquisition initial setting up by Intelligent contract is generated according to normal process.
103, the data in database are encrypted according to the intelligent contract, obtain target data;
In the present embodiment, which encrypts the data in database according to the content of intelligent contract Processing, obtains target data, i.e., encrypted data.
Specifically, can be by selection data acquisition encryption data area, selection data acquisition cipher mode and/ Or the data in database are encrypted in the setting such as Encryption Algorithm of selection data acquisition, after encryption, obtain To target data.Herein, due in block catenary system there are data sharing,
104, target data upload is backed up into block catenary system.
In the present embodiment, which backs up to block linkwork for the target data upload that step 103 generates In system, if thus it is subsequent there are in database the fault conditions such as loss of data either server delay machine when, can be from block Pulling data in catenary system realizes the reduction of Backup Data.The spy that can not be distorted of data in block catenary system is specifically utilized Property realize data backup safety assurance.
In the present embodiment, obtains data and acquire initial setting up;Initial setting up, which is acquired, according to the data generates intelligent contract; The data in database are encrypted according to the intelligent contract, obtain target data;The target data is uploaded Back up to block catenary system.Wherein, the data in database are encrypted, after obtaining target data, by the mesh Mark data upload backs up to block catenary system, thus, the backup of database is realized based on block chain, in high flow capacity big data face Before, node failure is effectively prevent, the problems such as loss of data caused by server delay machine, so that database keeps strong consistency.
In the embodiment of the present application, based on embodiment described in Fig. 1, specifically in step 103 according to the intelligent contract logarithm It is encrypted according to the data in library, the process for obtaining target data can be refined further.Below referring to Fig. 2, base The embodiment described in Fig. 1, in the embodiment of the present application in a kind of another embodiment of the database backup method based on block chain, Step 103 can specifically include:
201, coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
In the present embodiment, if data in database there are spcial character or data format are excessively multi-form, in order to improve The efficiency of subsequent data transmission can carry out coded treatment to the data in database in advance in step 103, obtain the first number According to.
Specifically, the operation of the coded treatment can be the data encoding in database into BASE46, BASE64 or It is that other coding forms carry out coded treatment, does not limit specifically herein.
202, first data are encrypted, obtain target data.
In the present embodiment, first data are encrypted according to the implementation process of encryption in step 103, are obtained Target data.
In the embodiment of the present application, based on embodiment described in Fig. 1 or Fig. 2, the target data is uploaded described in the step 104 Back up to after block catenary system, when needing to restore data, can in block catenary system pulling data.Under request in person Refering to Fig. 3, based on embodiment described in Fig. 1 or Fig. 2, a kind of database backup method based on block chain in the embodiment of the present application In another embodiment, after step 104, can also include:
301, the target data is pulled from the block catenary system carries out data convert.
In the present embodiment, when there are the fault conditions such as loss of data either server delay machine in database, Ke Yicong Pulling data in block catenary system realizes the reduction of Backup Data.It is specific using in block catenary system data can not distort Characteristic realize data backup safety assurance.
In the embodiment of the present application, based on embodiment described in Fig. 3, pulled from the block catenary system in step 301 described Before target data progress data convert, the condition of data convert can also be configured, so that meeting default setting with regard to certainly Dynamic trigger data reduction.It is a kind of based on block chain in the embodiment of the present application below referring to Fig. 4, based on embodiment described in Fig. 3 In another embodiment of database backup method, after step 301, can also include:
401, judge whether current data loses in the database;
In the present embodiment, before step 301, which judges whether current data loses in database It loses, if so, 402 are thened follow the steps, if it is not, thening follow the steps 403.There are many specific deterministic processes, such as can be data Library is tampered or data lead to loss of data because of server delay machine or are that other situations leads to loss of data, specifically Herein without limitation.
402, data convert is carried out if so, executing and pulling the target data from the block catenary system.
In the present embodiment, when step 401 determines that current data has the case where losing in database, then follow the steps 301 pull the target data from the block catenary system carries out data convert, specifically, so that the default setting of satisfaction is It determines when current data is lost in database with regard to automatic trigger data convert, to realize the safe operation of database.
403, other operations are executed.
In the present embodiment, when step 401 determines that current data is there is no the case where loss in database, then execute other Operation, for example, log-on data library self-inspection data whether lose, do not execute operation or be other operations, do not do herein specifically It limits.
In the embodiment of the present application, based in embodiment described in Fig. 4, the target data uploaded described in the step 104 standby Before part to block catenary system, can also judge whether current data loses in the database to specific judgment step 401 It is refined.Below referring to Fig. 5, based on embodiment described in Fig. 4, a kind of database based on block chain in the embodiment of the present application In another embodiment of backup method, before step 104, can also include:
501, the target data abstract is obtained;
In the present embodiment, which plucks according to target data obtained in normal process obtaining step 103 It wants.
502, the cryptographic Hash of the target data abstract is calculated;
In the present embodiment, the block chain node device is according to the number of targets acquired in normal process obtaining step 501 According to the cryptographic Hash of abstract.
503, the cryptographic Hash upload that the target data is made a summary is backed up into the block catenary system;
In the present embodiment, which backs up to the area for the cryptographic Hash upload that the target data is made a summary Block catenary system, this specific step can be transmitted together with target data upload is backed up to block catenary system in step 104, I.e. the cryptographic Hash of target data abstract is for identifying the target data.
In the present embodiment, step 401, which judges in the database whether current data loses, be can specifically include:
In the present embodiment, the current data abstract of database is obtained, the cryptographic Hash of current data abstract in database is calculated, Then the cryptographic Hash that the target data abstract can be obtained from block catenary system, specifically further according to the Kazakhstan of current data abstract Uncommon value and the cryptographic Hash of target data abstract judge whether current data is tampered, however, it is determined that cryptographic Hash is inconsistent, and determination is worked as Preceding data are tampered, that is, determine that current data is lost in the database, however, it is determined that then determine currently if it is determined that cryptographic Hash meets Data are not tampered with, that is, determine that current data is not lost in the database.Specifically, cryptographic Hash refers to as a kind of data Line can preferably be used for inspection data with the presence or absence of being tampered, to further improve the safety of data backup.
The method part in the embodiment of the present application is described above, below from the angle of virtual bench to the application Embodiment is illustrated.
Referring to Fig. 6, a kind of one embodiment packet of the database backup system based on block chain in the embodiment of the present application It includes:
First acquisition unit 601, for obtaining data acquisition initial setting up;
Generation unit 602 generates intelligent contract for acquiring initial setting up according to the data;
Cryptographic processing unit 603 is obtained for the data in database to be encrypted according to the intelligent contract Target data;
First uploads backup units 604, for target data upload to be backed up to block catenary system.
In the present embodiment, first acquisition unit 601, for obtaining data acquisition initial setting up;Generation unit 602, is used for Initial setting up, which is acquired, according to the data generates intelligent contract;Cryptographic processing unit 603, for according to the intelligent contract logarithm It is encrypted according to the data in library, obtains target data;First uploads backup units 604, is used for the target data Upload backs up to block catenary system.Wherein, the data in database are encrypted, after obtaining target data, by institute It states target data upload and backs up to block catenary system, thus, the backup of database is realized based on block chain, before data on flows, The problems such as effective anti-node failure, server delay machine, loss of data, so that database keeps strong cause property.
As a preferred embodiment, the encryption uploading unit 603 is specifically used for:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
As a preferred embodiment, the system also includes:
Reduction unit 605 carries out data convert for pulling the target data from the block catenary system.
As a preferred embodiment, the system also includes:
Judging unit 606, for judging whether current data loses in the database;
Execution unit 607, for executing from institute when the judging unit determines that current data is lost in the database It states and pulls the target data progress data convert in block catenary system.
As a preferred embodiment, the system also includes:
Second acquisition unit 608 obtains the target data abstract;
Computing unit 609, for calculating the cryptographic Hash of the target data abstract;
Second uploads backup units 610, and the cryptographic Hash upload for the target data to be made a summary backs up to the block Catenary system;
As a preferred embodiment, the judging unit 606 is specifically used for:
Current data in the database is obtained to make a summary;
Calculate the cryptographic Hash of the current data abstract;
The cryptographic Hash of the target data abstract is obtained from block catenary system;
Judge that current data is according to the cryptographic Hash of the cryptographic Hash of current data abstract and target data abstract It is no to be tampered;
If so, determining that current data is lost in the database;
If not, it is determined that current data is not lost in database.
The computer installation in the embodiment of the present application is described from the angle of entity apparatus below, referring to Fig. 7, this One embodiment of computer installation includes: in application embodiment
The computer installation 700 can generate bigger difference because configuration or performance are different, may include one or one A above central processing unit (central processing units, CPU) 701 (for example, one or more processors) With memory 705, one or more application program or data are stored in the memory 705.
Wherein, memory 705 can be volatile storage or persistent storage.The program for being stored in memory 705 can wrap One or more modules are included, each module may include to the series of instructions operation in server.Further, in Central processor 701 can be set to communicate with memory 705, and a series of fingers in memory 705 are executed on intelligent terminal 700 Enable operation.
The computer installation 700 can also include one or more power supplys 702, one or more wired or nothings Wired network interface 703, one or more input/output interfaces 704, and/or, one or more operating systems, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Processor 701 is specifically used for executing following steps:
It obtains data and acquires initial setting up;
Initial setting up, which is acquired, according to the data generates intelligent contract;
The data in database are encrypted according to the intelligent contract, obtain target data;
Target data upload is backed up into block catenary system.
It is described that the data in database are encrypted according to the intelligent contract as a preferred embodiment, it obtains Include to target data:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
As a preferred embodiment, it is described target data upload is backed up into block catenary system after, the side Method further include:
The target data is pulled from the block catenary system carries out data convert.
As a preferred embodiment, pulled from the block catenary system target data carry out data convert it Before, the method also includes:
Judge whether current data loses in the database;
Data convert is carried out if so, executing and pulling the target data from the block catenary system.
As a preferred embodiment, it is described target data upload is backed up into block catenary system before, the side Method further include:
Obtain the target data abstract;
Calculate the cryptographic Hash of the target data abstract;
The cryptographic Hash upload that the target data is made a summary is backed up into the block catenary system;
The cryptographic Hash that the target data and the target data are made a summary is associated storage, copy backup to the first clothes It is engaged in device;
It is described to judge in the database whether current data loses and include: as a preferred embodiment
Obtain the current data abstract of database in the first server;
Calculate the cryptographic Hash of the current data abstract;
The cryptographic Hash of the target data abstract is obtained from block catenary system;
Judge that current data is according to the cryptographic Hash of the cryptographic Hash of current data abstract and target data abstract It is no to be tampered;
If so, determining that current data is lost in the database;
If not, it is determined that current data is not lost in database.
It is understood that the size of the serial number of above steps is not meant in the various embodiments of the application Execution sequence it is successive, the execution of each step sequence should be determined by its function and internal logic, without coping with the embodiment of the present application Implementation process constitute any restriction.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of database backup method based on block chain, which is characterized in that be applied to block chain node device, the method Include:
It obtains data and acquires initial setting up;
Initial setting up, which is acquired, according to the data generates intelligent contract;
The data in database are encrypted according to the intelligent contract, obtain target data;
Target data upload is backed up into block catenary system.
2. the method according to claim 1, wherein it is described according to the intelligent contract to the data in database It is encrypted, obtaining target data includes:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
3. method according to claim 1 or 2, which is characterized in that target data upload is backed up to area described After block catenary system, the method also includes:
The target data is pulled from the block catenary system carries out data convert.
4. according to the method described in claim 3, it is characterized in that, pulling the target data from the block catenary system Before carrying out data convert, the method also includes:
Judge whether current data loses in the database;
Data convert is carried out if so, executing and pulling the target data from the block catenary system.
5. according to the method described in claim 4, it is characterized in that, target data upload is backed up to block chain described Before system, the method also includes:
Obtain the target data abstract;
Calculate the cryptographic Hash of the target data abstract;
The cryptographic Hash upload that the target data is made a summary is backed up into the block catenary system.
6. according to the method described in claim 4, it is characterized in that, described judge whether current data loses in the database Include:
Obtain the current data abstract of the database;
Calculate the cryptographic Hash of the current data abstract;
The cryptographic Hash of the target data abstract is obtained from block catenary system;
According to the current data abstract cryptographic Hash and the target data abstract cryptographic Hash judge current data whether by It distorts;
If so, determining that current data is lost in the database;
If not, it is determined that current data is not lost in database.
7. a kind of database backup system based on block chain, which is characterized in that be applied to block chain node device, the system Include:
First acquisition unit, for obtaining data acquisition initial setting up;
Generation unit generates intelligent contract for acquiring initial setting up according to the data;
Cryptographic processing unit obtains number of targets for the data in database to be encrypted according to the intelligent contract According to;
First uploads backup units, for target data upload to be backed up to block catenary system.
8. system according to claim 7, which is characterized in that the encryption uploading unit is specifically used for:
Coded treatment is carried out to the data in the database according to the intelligent contract, obtains the first data;
First data are encrypted, target data is obtained.
9. a kind of computer installation characterized by comprising
Processor, memory, input-output equipment and bus;
The processor, memory, input-output equipment are connected with the bus respectively;
The processor is for executing such as method as claimed in any one of claims 1 to 6.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program It is realized when being executed by processor such as the step of any one of claim 1 to 6 the method.
CN201811271233.XA 2018-10-29 2018-10-29 A kind of database backup method and relevant device based on block chain Pending CN109284206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811271233.XA CN109284206A (en) 2018-10-29 2018-10-29 A kind of database backup method and relevant device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811271233.XA CN109284206A (en) 2018-10-29 2018-10-29 A kind of database backup method and relevant device based on block chain

Publications (1)

Publication Number Publication Date
CN109284206A true CN109284206A (en) 2019-01-29

Family

ID=65174589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811271233.XA Pending CN109284206A (en) 2018-10-29 2018-10-29 A kind of database backup method and relevant device based on block chain

Country Status (1)

Country Link
CN (1) CN109284206A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917630A (en) * 2020-07-08 2020-11-10 北京艾智侠科技有限责任公司 Data transmission method, data transmission device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383754A (en) * 2016-09-19 2017-02-08 北京众享比特科技有限公司 Database backup and recovery system based on block chain technology, and database backup method based on block chain technology, and database recovery method based on block chain technology
CN107135661A (en) * 2016-12-26 2017-09-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, system and information collecting device
US20180227119A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Managing a database management system using a blockchain database
CN108629027A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Customer data base method for reconstructing, device, equipment and medium on block chain
CN108710924A (en) * 2018-04-27 2018-10-26 林清华 Information query method based on block chain and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383754A (en) * 2016-09-19 2017-02-08 北京众享比特科技有限公司 Database backup and recovery system based on block chain technology, and database backup method based on block chain technology, and database recovery method based on block chain technology
CN107135661A (en) * 2016-12-26 2017-09-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, system and information collecting device
US20180227119A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Managing a database management system using a blockchain database
CN108710924A (en) * 2018-04-27 2018-10-26 林清华 Information query method based on block chain and system
CN108629027A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Customer data base method for reconstructing, device, equipment and medium on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐斌: "《软件工程开源实验指导》", 31 August 2012, 浙江工商大学出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917630A (en) * 2020-07-08 2020-11-10 北京艾智侠科技有限责任公司 Data transmission method, data transmission device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN109189853B (en) Method and device for synchronizing data between block chains
CN109547477B (en) Data processing method and device, medium and terminal thereof
CN110602147B (en) Data encryption safe storage method, system and storage medium based on cloud platform
JP5986602B2 (en) Method, apparatus, terminal and server for synchronizing an exact copy of a terminal data set
CN112001502B (en) Federal learning training method and device for high-delay network environment robustness
CN111641563B (en) Flow self-adaption method and system based on distributed scene
CN109413178B (en) Block chain data receiving and recording method and data receiving and recording system based on Internet of things
CN110933040B (en) Block chain based data uplink method, device, equipment and medium
CN112365001B (en) Model generation method, device and server
CN113900598A (en) Block chain based data storage method, device, equipment and storage medium
CN114201278A (en) Task processing method, task processing device, electronic device, and storage medium
CN110109769A (en) Method for safety monitoring, device, equipment and the storage medium of application crash
CN109284206A (en) A kind of database backup method and relevant device based on block chain
CN114707159A (en) Multi-party data joint analysis system, method, equipment and medium
CN111026711A (en) Block chain based data storage method and device, computer equipment and storage medium
CN104536852A (en) Data recovery method and device
CN113204692A (en) Method and device for monitoring execution progress of data processing task
CN113296737A (en) Random number generation system, method and device and cloud server
CN106250274A (en) The backup method of a kind of virtual machine and device
CN106293996B (en) Method of data synchronization, main equipment, alternate device and system
CN116777576A (en) Bid data sharing method, device and storage medium
WO2023035690A1 (en) Method and apparatus for controlling air conditioner, and air conditioner
US10409517B2 (en) Method and device for data backup
CN112650640B (en) Program monitoring method and device, server and computer storage medium
CN102929746A (en) Quick backup and recovery method for lottery sale system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190129