CN111506651A - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN111506651A
CN111506651A CN202010294796.1A CN202010294796A CN111506651A CN 111506651 A CN111506651 A CN 111506651A CN 202010294796 A CN202010294796 A CN 202010294796A CN 111506651 A CN111506651 A CN 111506651A
Authority
CN
China
Prior art keywords
data
database
auxiliary data
auxiliary
signature
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
CN202010294796.1A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010294796.1A priority Critical patent/CN111506651A/en
Publication of CN111506651A publication Critical patent/CN111506651A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing

Abstract

When the business data are stored, main data in the business data are stored into a block chain, and auxiliary data in the business data are stored into a common first database. Wherein the main data is more important than the auxiliary data. That is, the data stored in the block chain is not complete service data but main data in the service data, thereby ensuring the security of important data in the service data. In addition, in order to ensure the validity of the auxiliary data stored in the first database, when the auxiliary data is stored in the first database, signature data of the auxiliary data, which is used for verifying the validity of the auxiliary data, may also be stored in the first database. Therefore, by the scheme of the embodiment of the application, the data storage pressure of the block chain can be relieved, and the validity of the auxiliary data stored in the first database can be verified through the signature data.

Description

Data storage method and device
Technical Field
The present application relates to the field of data processing, and in particular, to a data storage method and apparatus.
Background
A block chain (block chain) is a chain data structure that combines blocks of data in a sequential manner. The block chain solves the problem of tamper resistance through a mode that all nodes share accounts, but also introduces a data redundancy problem, all nodes store one same data together, and all data changes are not changed on the basis of the original data due to the fact that it needs to be guaranteed that all data in the block chain have traceability characteristics, but through a mode of adding transaction action records newly, the block files on the block chain are increased continuously.
With the development of blockchain technology, the transaction types of the application blockchain are more and more, which results in more and more data stored in the blockchain, and this brings certain challenges to the data storage capacity of the blockchain.
Therefore, a solution is urgently needed to improve the above-mentioned problems.
Disclosure of Invention
The technical problem to be solved by the application is that more and more data are stored in a block chain, which brings certain challenges to the data storage capacity of the block chain, and a data storage method and a data storage device are provided.
In a first aspect, an embodiment of the present application provides a data storage method, where the method includes:
acquiring service data, wherein the service data comprises main data and auxiliary data, and the importance degree of the main data is higher than that of the auxiliary data;
storing the main data into a block chain;
and storing the auxiliary data and signature data of the auxiliary data into a first database, wherein the signature data is used for verifying the legality of the auxiliary data.
Optionally, the signature data is obtained by performing hash calculation on the auxiliary data by using a first hash algorithm, and the method further includes:
retrieving the helper data and the signature data from the first database,
performing hash calculation on the auxiliary data by using the first hash algorithm to obtain a first hash value;
and if the first hash value is the same as the signature data, determining that the value of a first parameter is a first value, wherein the first parameter and the auxiliary data are correspondingly stored in the first database, and the first value is used for indicating that the auxiliary data is legal.
Optionally, the method further includes:
if the first hash value is different from the signature data, acquiring backup auxiliary data and signature data from a second database, wherein the second database is a standby database of the first database;
and replacing the auxiliary data stored in the first database and the signature data of the auxiliary data with the signature data of the auxiliary data backed up from the backup.
Optionally, the method further includes:
and if the first hash value is different from the signature data, determining that the value of the first parameter is a second value, wherein the second value is used for indicating that the auxiliary data is illegal.
Optionally, the method further includes:
if the auxiliary data and the signature data in the first database are monitored to be deleted, acquiring the backed-up auxiliary data and the backed-up signature data from a second database, and storing the backed-up auxiliary data and the backed-up signature data acquired from the second database into the first database; alternatively, the first and second electrodes may be,
if the auxiliary data and the signature data in the first database are monitored to be deleted, adding a data missing mark to the first database, wherein the data missing mark is used for indicating that the auxiliary data of the service data is lost.
Optionally, if the auxiliary data backed up and the signature data backed up are not obtained from the second database, a data missing flag is added to the first database, where the data missing flag is used to indicate that the auxiliary data of the service data is lost.
In a second aspect, an embodiment of the present application provides a data storage device, including:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring service data, the service data comprises main data and auxiliary data, and the importance degree of the main data is higher than that of the auxiliary data;
a first storage unit for storing the main data into a block chain;
and the second storage unit is used for storing the auxiliary data and signature data of the auxiliary data into a first database, wherein the signature data is used for verifying the legality of the auxiliary data.
Optionally, the signature data is obtained by performing hash calculation on the auxiliary data by using a first hash algorithm, and the apparatus further includes:
a second obtaining unit configured to obtain the auxiliary data and the signature data from the first database,
the computing unit is used for carrying out hash computation on the auxiliary data by utilizing the first hash algorithm to obtain a first hash value;
a first determining unit, configured to determine, if the first hash value is the same as the signature data, that a value of a first parameter is a first value, where the first parameter and the auxiliary data are stored in the first database correspondingly, and the first value is used to indicate that the auxiliary data is legal.
Optionally, the apparatus further comprises:
a third obtaining unit, configured to obtain, if the first hash value is different from the signature data, backed-up auxiliary data and signature data from a second database, where the second database is a backup database of the first database;
a replacing unit, configured to replace the auxiliary data and the signature data of the auxiliary data stored in the first database with the signature data of the auxiliary data and the backup auxiliary data from the backup.
Optionally, the apparatus further comprises:
a second determining unit, configured to determine that the value of the first parameter is a second value if the first hash value is different from the signature data, where the second value is used to indicate that the auxiliary data is illegal.
Optionally, the apparatus further comprises:
a fourth obtaining unit, configured to obtain, if it is monitored that the auxiliary data and the signature data in the first database are deleted, backed-up auxiliary data and backed-up signature data from a second database;
a third storage unit, configured to store the backed-up auxiliary data and the backed-up signature data, which are acquired from the second database, in the first database; alternatively, the first and second electrodes may be,
a first adding unit, configured to add a data missing flag to the first database if it is monitored that the auxiliary data and the signature data in the first database are deleted, where the data missing flag is used to indicate that the auxiliary data of the service data is lost.
Optionally, if the obtaining of the backed-up auxiliary data and the backed-up signature data from the second database fails, the apparatus further includes:
a second adding unit, configured to add a data missing flag to the first database, where the data missing flag is used to indicate that auxiliary data of the service data is missing.
Compared with the prior art, the embodiment of the application has the following advantages:
in the embodiment of the application, when the business data is stored, the main data in the business data is stored in the block chain, and the auxiliary data in the business data is stored in the common first database. Wherein the main data refers to important data in the service data, and the auxiliary data refers to data of relatively low importance in the service data. I.e. the main data is of a higher importance than the auxiliary data. Therefore, in the embodiment of the application, the data stored in the block chain is not complete service data but main data in the service data, so that the security of important data in the service data is ensured. In addition, in order to ensure the validity of the auxiliary data stored in the first database, in the embodiment of the present application, when the auxiliary data is stored in the first database, signature data of the auxiliary data may also be stored in the first database, and the signature data is used for verifying the validity of the auxiliary data. Therefore, by the scheme of the embodiment of the application, the data storage pressure of the block chain can be relieved, and the validity of the auxiliary data stored in the first database can be verified through the signature data.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a data storage method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data verification method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data storage device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The inventor of the present application finds, through research, that with the development of the blockchain technology, the transaction types of the application blockchain are more and more, which results in more and more data stored in the blockchain, which brings certain challenges to the data storage capacity of the blockchain.
The inventor of the present application has also found in research that service data can be divided into two types, one type is core data with a relatively high importance degree and can also be referred to as "main data", and the other type is data with a relatively low importance degree relative to the core data and can also be referred to as "auxiliary data". The higher the importance level, the higher its requirements for safety. In order to reduce the data storage pressure of the blockchain, main data with relatively high requirements on security can be stored in the blockchain, and auxiliary data with relatively low requirements on security can be stored in a common database. However, the validity of the auxiliary data stored in the general database cannot be determined, because the data in the general database can be modified at will once the operation authority for the general database is obtained.
Therefore, a solution is needed to reduce the data storage pressure of the blockchain and determine whether the auxiliary data stored in the common database is legal.
In order to solve the above problem, an embodiment of the present application provides a data storage method.
Various non-limiting embodiments of the present application are described in detail below with reference to the accompanying drawings.
Exemplary method
Referring to fig. 1, the figure is a schematic flowchart of a data storage method according to an embodiment of the present application.
The data storage method provided in the embodiment of the present application may be executed by a first device, where the first device may be a terminal device or a server, and the embodiment of the present application is not particularly limited. Wherein the first device may be a device joined in a federation chain. I.e. the first device may be considered as a node in the federation chain.
The data storage method provided by the embodiment of the application can be implemented, for example, through the following steps S101 to S103.
S101: the method comprises the steps of obtaining service data, wherein the service data comprise main data and auxiliary data, and the importance degree of the main data is higher than that of the auxiliary data.
In the embodiment of the present application, the service data refers to data related to a specific service, and the embodiment of the present application is not particularly limited. The primary data refers to core data among the service data, and the auxiliary data refers to data other than the primary data.
With regard to the traffic data, the primary data, and the secondary data, the following is exemplified:
example 1: for construction site crew payroll services, the service data includes: name, identification number, construction site, year and month of wage, card number and bank to which it belongs, account number and bank to which it belongs, bank water flow, status of issue, class to which it belongs, nature of work, year of work, place of country, age, etc. The names, identity numbers, construction sites, payroll years, payroll numbers, banks to which the payroll numbers belong, public account numbers, banks to which the payroll numbers belong, running water of the banks and issuing states of the banks are important for preventing dishonest behaviors of enterprises on payroll of service workers, supervising timeliness of payroll issuing and guaranteeing rights and interests of the service workers, and the affiliated teams, working properties, working years, native place penetration, age and the like are relatively low in importance. Thus, the master data may include: name, identification card number, construction site, payroll year and month, payroll card number and bank, account number of public account and bank, bank flow and issuing state. The assistance data may include: class, nature of work, age of work, native place, age, etc.
Example 2: for the business of acquiring the house purchasing qualification by paying the deposit, the business data comprises: name, identification number, building name, deposit amount, payment account and bank to which the payment account belongs, enterprise account and bank to which the payment account belongs, bank flow, fund state, payment time, building developer, building delivery time and pre-sale house type. Wherein, the name, identification number, building name, deposit amount, payment account and its bank, enterprise account and its bank, bank flow, fund status and payment time are key data for determining whether the user has the house purchasing qualification, therefore, the main data can include: name, identification card number, building name, deposit amount, payment account and bank, enterprise account and bank, bank flow, fund state and payment time, the auxiliary data may include: floor developers, floor lead times and pre-sale house types.
S102: storing the main data into a block chain.
Considering that the importance of the master data is relatively high, the security requirement is higher. Therefore, in the embodiment of the present application, main data with a relatively high requirement on security can be stored in a blockchain, so that the security of the main data is ensured.
In the embodiment of the present application, the main data may be stored in the blockchain by using a conventional method for storing data in the blockchain, which is not described in detail herein.
S103: and storing the auxiliary data and signature data of the auxiliary data into a first database, wherein the signature data is used for verifying the legality of the auxiliary data.
In the embodiment of the present application, in order to subsequently obtain the auxiliary data from the first database, it may be determined whether the auxiliary data stored in the first database is legal. When the secondary data is stored in the first database, signature data of the secondary data may also be stored in the first database, which may be used to verify the validity of the secondary data.
In this embodiment of the application, the auxiliary data and the signature data may be directly stored in the first database, or the auxiliary data and/or the signature data may be stored in the first database after being encrypted, for example, the auxiliary data and/or the signature data may be encrypted by using a public key, and then the encrypted auxiliary data and/or the signature data may be decrypted by using a private key. The embodiments of the present application are not particularly limited.
It should be noted that the embodiment of the present application does not specifically limit the execution order of S102 and S103. In addition, after the main data and the auxiliary data are respectively stored in the block chain and the first database, an identifier can be further allocated to the main data and the auxiliary data for associating the auxiliary data with the main data. The identifier may be pre-allocated by the first device, or may be generated after the main data is stored in the block chain, which is not specifically limited in the embodiment of the present application. It is understood that the blockchain has primary data and the identifier stored therein, and the first database has secondary data and the identifier stored therein.
As can be seen from the above description, with the solution of the embodiment of the present application, not only the data storage pressure of the blockchain can be reduced, but also the validity of the auxiliary data stored in the first database can be verified through the signature data.
In an implementation manner of the embodiment of the present application, the signature data is obtained by performing hash calculation on the auxiliary data by using a first hash algorithm. For such a situation, in this embodiment of the present application, the first device may further perform the method shown in fig. 2 periodically or when receiving a corresponding trigger instruction, where fig. 2 is a flowchart illustrating a data verification method provided in this embodiment of the present application.
The method shown in fig. 2 can be implemented, for example, by the following steps S201 to S203.
S201: the helper data and the signature data are retrieved from the first database.
S202: and carrying out hash calculation on the auxiliary data by utilizing the first hash algorithm to obtain a first hash value.
S203: and if the first hash value is the same as the signature data, determining that the value of a first parameter is a first value, wherein the first parameter and the auxiliary data are correspondingly stored in the first database, and the first value is used for indicating that the auxiliary data is legal.
With respect to S201 to S203, it should be noted that, when the first device stores the auxiliary data and the signature data in the block chain, the signature data is obtained by performing hash calculation on the auxiliary data by using the first hash algorithm. The first hash algorithm is generally not compromised, and thus, if the first hash value is the same as the signature data, it may indicate that the auxiliary data has not been tampered with.
For this case, the first device may determine that the value of the first parameter is a first value, the first value being indicative that the auxiliary data has not been tampered with.
Correspondingly, if the first hash value is different from the signature data, the value of the first parameter is determined to be a second value, and the second value is used for indicating that the auxiliary data is illegal.
Thus, when the auxiliary data needs to be acquired from the first database for data analysis, whether the auxiliary data is tampered can be determined by the value of the first parameter without performing S201-S202, and whether the auxiliary data is legal can be determined by determining whether the first hash value is the same as the signature data, so that the data analysis efficiency can be improved.
In an implementation manner of the embodiment of the present application, in order to ensure data security, the first database may further include a corresponding standby database, that is, the second database. The second database is a backup of the first database, and the first device stores the same data in the second database when storing the data in the first database. In other words, the second database stores the backed-up auxiliary data and signature data.
For this case, if the first hash value is different from the signature data, the backup auxiliary data and the signature data may be obtained from a second database, and the auxiliary data and the signature data of the auxiliary data stored in the first database may be replaced with the signature data of the backup auxiliary data and the backup auxiliary data. Of course, since the second database may also be tampered with, after replacing the auxiliary data stored in the first database and the signature data of the auxiliary data with the backup auxiliary data and the signature data of the backup auxiliary data, the above S201-S203 may also be performed to determine whether the auxiliary data stored in the first database is legitimate after performing the above replacement operation.
In an implementation manner of the embodiment of the present application, the first device may further monitor whether data in the first database is maliciously deleted. Specifically, the first device may record a data number for each of the first databases, and determine whether the data in the first database is maliciously deleted according to the record number. For example, the record number is incremented and the increment is 1, and if the record number is faulted, for example, the record number 1 is followed by the record number 3, it can be determined that the data with the record number 2 in the first database is maliciously deleted. The auxiliary data and the signature data may be regarded as a piece of record data in the first database.
In this embodiment of the application, if the first device monitors that the auxiliary data and the signature data in the first database are deleted, the first device may add a data missing flag to the first database, where the data missing flag is used to indicate that the auxiliary data of the service data is missing. In this way, when the auxiliary data needs to be acquired from the first data path, the reason why the auxiliary data cannot be acquired can be determined based on the data missing flag. Alternatively, the first and second electrodes may be,
if the first device monitors that the auxiliary data and the signature data in the first database are deleted, the first device may acquire the backed-up auxiliary data and the backed-up signature data from the second database, and store the backed-up auxiliary data and the backed-up signature data acquired from the second database in the first database, so as to ensure the integrity of the data in the first database.
Of course, in view of the fact that the data in the second database may also be deleted, for this case, the first device may fail to obtain the backed-up auxiliary data and the backed-up signature data from the second database. For this case, the integrity of the data in the first database cannot be guaranteed by the second database. Thus, the first device may add a data loss marker to the first database. In this way, when the auxiliary data needs to be acquired from the first data path, the reason why the auxiliary data cannot be acquired can be determined based on the data missing flag.
Exemplary device
Based on the method provided by the above embodiment, the embodiment of the present application further provides an apparatus, which is described below with reference to the accompanying drawings.
Referring to fig. 3, the figure is a schematic structural diagram of a data storage device according to an embodiment of the present application. The apparatus shown in fig. 3 may specifically include, for example: a first acquisition unit 301, a first storage unit 302 and a second storage unit 303.
A first obtaining unit 301, configured to obtain service data, where the service data includes main data and auxiliary data, and the importance level of the main data is higher than that of the auxiliary data;
a first storage unit 302, configured to store the main data into a block chain;
a second storage unit 303, configured to store the auxiliary data and signature data of the auxiliary data in a first database, where the signature data is used to verify the validity of the auxiliary data.
Optionally, the signature data is obtained by performing hash calculation on the auxiliary data by using a first hash algorithm, and the apparatus further includes:
a second obtaining unit configured to obtain the auxiliary data and the signature data from the first database,
the computing unit is used for carrying out hash computation on the auxiliary data by utilizing the first hash algorithm to obtain a first hash value;
a first determining unit, configured to determine, if the first hash value is the same as the signature data, that a value of a first parameter is a first value, where the first parameter and the auxiliary data are stored in the first database correspondingly, and the first value is used to indicate that the auxiliary data is legal.
Optionally, the apparatus further comprises:
a third obtaining unit, configured to obtain, if the first hash value is different from the signature data, backed-up auxiliary data and signature data from a second database, where the second database is a backup database of the first database;
a replacing unit, configured to replace the auxiliary data and the signature data of the auxiliary data stored in the first database with the signature data of the auxiliary data and the backup auxiliary data from the backup.
Optionally, the apparatus further comprises:
a second determining unit, configured to determine that the value of the first parameter is a second value if the first hash value is different from the signature data, where the second value is used to indicate that the auxiliary data is illegal.
Optionally, the apparatus further comprises:
a fourth obtaining unit, configured to obtain, if it is monitored that the auxiliary data and the signature data in the first database are deleted, backed-up auxiliary data and backed-up signature data from a second database;
a third storage unit, configured to store the backed-up auxiliary data and the backed-up signature data, which are acquired from the second database, in the first database; alternatively, the first and second electrodes may be,
a first adding unit, configured to add a data missing flag to the first database if it is monitored that the auxiliary data and the signature data in the first database are deleted, where the data missing flag is used to indicate that the auxiliary data of the service data is lost.
Optionally, if the obtaining of the backed-up auxiliary data and the backed-up signature data from the second database fails, the apparatus further includes:
a second adding unit, configured to add a data missing flag to the first database, where the data missing flag is used to indicate that auxiliary data of the service data is missing.
Since the apparatus 300 is an apparatus corresponding to the method provided in the above method embodiment, and the specific implementation of each unit of the apparatus 300 is the same as that of the above method embodiment, for the specific implementation of each unit of the apparatus 300, reference may be made to the description part of the above method embodiment, and details are not repeated here.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the attached claims
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A method of data storage, the method comprising:
acquiring service data, wherein the service data comprises main data and auxiliary data, and the importance degree of the main data is higher than that of the auxiliary data;
storing the main data into a block chain;
and storing the auxiliary data and signature data of the auxiliary data into a first database, wherein the signature data is used for verifying the legality of the auxiliary data.
2. The method of claim 1, wherein the signature data is hashed to the auxiliary data using a first hashing algorithm, the method further comprising:
retrieving the helper data and the signature data from the first database,
performing hash calculation on the auxiliary data by using the first hash algorithm to obtain a first hash value;
and if the first hash value is the same as the signature data, determining that the value of a first parameter is a first value, wherein the first parameter and the auxiliary data are correspondingly stored in the first database, and the first value is used for indicating that the auxiliary data is legal.
3. The method of claim 2, further comprising:
if the first hash value is different from the signature data, acquiring backup auxiliary data and signature data from a second database, wherein the second database is a standby database of the first database;
and replacing the auxiliary data stored in the first database and the signature data of the auxiliary data with the signature data of the auxiliary data backed up from the backup.
4. The method of claim 2, further comprising:
and if the first hash value is different from the signature data, determining that the value of the first parameter is a second value, wherein the second value is used for indicating that the auxiliary data is illegal.
5. The method of claim 1, further comprising:
if the auxiliary data and the signature data in the first database are monitored to be deleted, acquiring the backed-up auxiliary data and the backed-up signature data from a second database, and storing the backed-up auxiliary data and the backed-up signature data acquired from the second database into the first database; alternatively, the first and second electrodes may be,
if the auxiliary data and the signature data in the first database are monitored to be deleted, adding a data missing mark to the first database, wherein the data missing mark is used for indicating that the auxiliary data of the service data is lost.
6. The method according to claim 5, wherein if the retrieving of the backed-up auxiliary data and the backed-up signature data from the second database fails, a data missing flag is added to the first database, wherein the data missing flag is used to indicate that the auxiliary data of the service data is lost.
7. A data storage device, characterized in that the device comprises:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring service data, the service data comprises main data and auxiliary data, and the importance degree of the main data is higher than that of the auxiliary data;
a first storage unit for storing the main data into a block chain;
and the second storage unit is used for storing the auxiliary data and signature data of the auxiliary data into a first database, wherein the signature data is used for verifying the legality of the auxiliary data.
8. The apparatus of claim 7, wherein the signature data is obtained by hashing the auxiliary data using a first hashing algorithm, the apparatus further comprising:
a second obtaining unit configured to obtain the auxiliary data and the signature data from the first database,
the computing unit is used for carrying out hash computation on the auxiliary data by utilizing the first hash algorithm to obtain a first hash value;
a first determining unit, configured to determine, if the first hash value is the same as the signature data, that a value of a first parameter is a first value, where the first parameter and the auxiliary data are stored in the first database correspondingly, and the first value is used to indicate that the auxiliary data is legal.
9. The apparatus of claim 8, further comprising:
a third obtaining unit, configured to obtain, if the first hash value is different from the signature data, backed-up auxiliary data and signature data from a second database, where the second database is a backup database of the first database;
a replacing unit, configured to replace the auxiliary data and the signature data of the auxiliary data stored in the first database with the signature data of the auxiliary data and the backup auxiliary data from the backup.
10. The apparatus of claim 8, further comprising:
a second determining unit, configured to determine that the value of the first parameter is a second value if the first hash value is different from the signature data, where the second value is used to indicate that the auxiliary data is illegal.
11. The apparatus of claim 7, further comprising:
a fourth obtaining unit, configured to obtain, if it is monitored that the auxiliary data and the signature data in the first database are deleted, backed-up auxiliary data and backed-up signature data from a second database;
a third storage unit, configured to store the backed-up auxiliary data and the backed-up signature data, which are acquired from the second database, in the first database; alternatively, the first and second electrodes may be,
a first adding unit, configured to add a data missing flag to the first database if it is monitored that the auxiliary data and the signature data in the first database are deleted, where the data missing flag is used to indicate that the auxiliary data of the service data is lost.
12. The apparatus of claim 11, wherein if the retrieving of the backed-up auxiliary data and the backed-up signature data from the second database fails, the apparatus further comprises:
a second adding unit, configured to add a data missing flag to the first database, where the data missing flag is used to indicate that auxiliary data of the service data is missing.
CN202010294796.1A 2020-04-15 2020-04-15 Data storage method and device Pending CN111506651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010294796.1A CN111506651A (en) 2020-04-15 2020-04-15 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010294796.1A CN111506651A (en) 2020-04-15 2020-04-15 Data storage method and device

Publications (1)

Publication Number Publication Date
CN111506651A true CN111506651A (en) 2020-08-07

Family

ID=71864797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010294796.1A Pending CN111506651A (en) 2020-04-15 2020-04-15 Data storage method and device

Country Status (1)

Country Link
CN (1) CN111506651A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204770A (en) * 2021-04-16 2021-08-03 宁波图灵奇点智能科技有限公司 Data protection system and method, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181119A1 (en) * 2012-12-26 2014-06-26 Industrial Technology Research Institute Method and system for accessing files on a storage system
CN104202361A (en) * 2014-08-13 2014-12-10 南京邮电大学 Cloud data protection method based on mobile agent
CN109299188A (en) * 2018-08-21 2019-02-01 平安科技(深圳)有限公司 Utilize block chain date storage method, device and electronic equipment
CN109525671A (en) * 2018-11-26 2019-03-26 远光软件股份有限公司 Date storage method, electronic equipment and storage medium based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181119A1 (en) * 2012-12-26 2014-06-26 Industrial Technology Research Institute Method and system for accessing files on a storage system
CN104202361A (en) * 2014-08-13 2014-12-10 南京邮电大学 Cloud data protection method based on mobile agent
CN109299188A (en) * 2018-08-21 2019-02-01 平安科技(深圳)有限公司 Utilize block chain date storage method, device and electronic equipment
CN109525671A (en) * 2018-11-26 2019-03-26 远光软件股份有限公司 Date storage method, electronic equipment and storage medium based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204770A (en) * 2021-04-16 2021-08-03 宁波图灵奇点智能科技有限公司 Data protection system and method, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6882474B2 (en) Systems and methods for detecting replay attacks
CN109242681B (en) Asset data storage method, device, equipment and system
Tosh et al. Data provenance in the cloud: A blockchain-based approach
Palm et al. Selective blockchain transaction pruning and state derivability
CN110826111B (en) Test supervision method, device, equipment and storage medium
CN108923932A (en) A kind of decentralization co-verification model and verification algorithm
CN108009445B (en) Semi-centralized trusted data management system
CN110633963A (en) Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
CN111770198B (en) Information sharing method, device and equipment
CN111178894B (en) Asset type registration and transaction record verification method and system
US10956204B1 (en) Free-riding node identification for blockchain
CN111506651A (en) Data storage method and device
Divya et al. Blockvoting: An online voting system using block chain
JP2023530594A (en) Permitted Event Processing in Distributed Databases
CN112418819A (en) Block chain system for integrity management of building enterprise
US20210350368A1 (en) Method and system for blockchain intrusion prevention
CN111814193B (en) Information sharing method, device and equipment
CN114650289B (en) Method and device for block chain consensus
US20200184038A1 (en) Integrity protected capacity license counting
CN115099800A (en) Block chain based method and device for transferring poor asset data
US20230009460A1 (en) Trail recording system and data verification method
CN114240588A (en) Annuity plan reconciliation method, device, equipment and medium based on block chain
KR102573034B1 (en) Information judgment server for blockchain, information judgment method for blockchain, and recording medium on which information judgment program for blockchain is recorded
CN110751483A (en) Financial accounting and sales rushing method and device based on block chain and electronic equipment
CN112861181A (en) Block chain-based method for developing security mechanism of crowd-sourcing software

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