Backup method and device of operation and maintenance data, storage medium and electronic equipment
By using encryption and hashing operations in operation and maintenance data backup, and using blockchain consensus algorithm for storage and verification, the reliability and security issues in operation and maintenance data backup are solved, and efficient and secure data backup are achieved. recover.
Patent Information
- Application Number
- CN202410981373.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
The existing operation and maintenance data backup methods are low in reliability during local backups, and the lack of effective verification mechanisms in cloud backup and third-party backups, resulting in data being vulnerable to attack, leakage and tampering during transmission, and the backup reliability is not high.
By receiving the operation and maintenance data submitted by the user, encrypting it according to the pre-set encryption strategy, and hashing the encrypted data, using smart contracts to transmit the encrypted operation and maintenance data and hash values to the blockchain, based on the blockchain The consensus algorithm is stored and verified to ensure the security and integrity of the data.
It improves the reliability and security of operation and maintenance data backup, prevents data tampering and leakage, ensures the transparency and immutability of data during transmission and storage, and enhances the reliability of data recovery.
Smart Images

Figure CN118939474A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a method, device, storage medium and electronic device for backing up operation and maintenance data. Background Art
[0002] Blockchain is a decentralized distributed ledger technology that uses cryptography to achieve functions such as information addressing, verification, storage and transactions through a peer-to-peer blockchain network. With its decentralization, transparency, traceability and tamper-proof characteristics, it is widely used in application scenarios including data backup and smart contract transactions.
[0003] Operation and maintenance data backup is one of the important measures to ensure the security of operation and maintenance data. In the related technology, the backup of operation and maintenance data mainly includes local backup, cloud backup and third-party backup. Among them, the local backup method is to back up the operation and maintenance data to a local storage device, for example, to store the operation and maintenance data on a hard disk, tape, CD and other devices. The cloud backup method is to back up the operation and maintenance data to a cloud storage service, for example, Amazon (AWS, Amazon Web Services) server, Google Cloud (GoogleCloud) server, Microsoft Cloud (Azure) server and other cloud servers. The third-party backup method is to back up the operation and maintenance data to a third-party server.
[0004] However, for the above-mentioned backup methods of operation and maintenance data, for local backup, if the local physical storage device is damaged or lost, the backed-up operation and maintenance data cannot be restored, and the backup reliability is low. For cloud backup or third-party backup, due to the lack of an effective verification mechanism when backing up data, the backed-up operation and maintenance data may be attacked by hackers during transmission, resulting in data leakage, loss and malicious tampering, which also makes the backup reliability of operation and maintenance data low. Summary of the invention
[0005] In view of this, the present invention provides a method, device, storage medium and electronic device for backing up operation and maintenance data.
[0006] Specifically, the present invention is achieved through the following technical solutions:
[0007] According to a first aspect of the present invention, a method for backing up operation and maintenance data is provided, and the method for backing up operation and maintenance data comprises:
[0008] Receiving the operation and maintenance data to be backed up submitted by the user, and encrypting the operation and maintenance data to be backed up according to a preset encryption policy to obtain encrypted operation and maintenance data;
[0009] Performing a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmitting the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract;
[0010] The node on the blockchain that receives the encrypted operation and maintenance data initiates a data storage request in the blockchain, and stores the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain;
[0011] The hash value is returned to the user, so that the user constructs a mapping relationship between the operation and maintenance data to be backed up and the hash value.
[0012] Optionally, the node on the blockchain that receives the encrypted operation and maintenance data initiates a data storage request in the blockchain, based on a consensus reached between the node and other nodes in the blockchain, including:
[0013] The node on the blockchain that receives the encrypted operation and maintenance data verifies the signature of the encrypted operation and maintenance data;
[0014] After the verification is passed, the generated data storage request is signed and then broadcasted, and the data storage request carries the encrypted operation and maintenance data and hash value;
[0015] After the number of data storage requests received from other nodes in the blockchain exceeds a preset number threshold, a consensus request is sent to other nodes in the blockchain;
[0016] After the number of consensus requests received from other nodes in the blockchain exceeds a preset consensus threshold, the encrypted operation and maintenance data and the hash value are stored.
[0017] Optionally, after returning the hash value to the user so that the user builds a mapping relationship between the operation and maintenance data to be backed up and the hash value, the method further includes:
[0018] Performing a hash operation on the operation and maintenance data to be backed up according to the same hash algorithm as that used to perform a hash operation on the encrypted operation and maintenance data to obtain a first hash value;
[0019] If the first Hash value is the same as the Hash value, the step of enabling the user to construct a mapping relationship between the operation and maintenance data to be backed up and the Hash value is performed.
[0020] Optionally, the method further comprises:
[0021] If the first hash value is different from the hash value, a data re-backup request is initiated. In the data re-backup request, the operation and maintenance data to be backed up, the first hash value corresponding to the operation and maintenance data to be backed up, and the hash value returned to the user are carried, so as to use the carried operation and maintenance data to be backed up and the first hash value to replace the stored operation and maintenance data to be backed up and the hash value.
[0022] Optionally, the method further comprises:
[0023] From the mapping relationship, query the target hash value of the operation and maintenance data to be restored, encapsulate the target hash value in the operation and maintenance data restoration request, and send it to the blockchain;
[0024] Receiving the operation and maintenance data recovery request response returned by the blockchain, parsing the operation and maintenance data recovery request response, and obtaining the carried encrypted operation and maintenance data to be recovered;
[0025] Decrypting the encrypted operation and maintenance data to be restored to obtain the backup operation and maintenance data to be restored;
[0026] A hash operation is performed on the backup operation and maintenance data to be restored to obtain a second hash value, and if the second hash value is the same as the target hash value, it is determined that the backup operation and maintenance data to be restored is the operation and maintenance data to be restored.
[0027] Optionally, the method further comprises:
[0028] The user's client negotiates encryption and decryption strategies with the server in advance. The client encrypts the operation and maintenance data to be backed up submitted by the user according to the negotiated encryption and decryption strategies, encapsulates the encrypted operation and maintenance data to be backed up in a data backup request, and sends it to the server through the client.
[0029] Optionally, the encryption algorithms included in the encryption / decryption strategy include: Advanced Encryption Standard Algorithm, International Data Encryption Algorithm, and Digital Signature Algorithm.
[0030] According to a second aspect of the present invention, there is provided a backup device for operation and maintenance data, the backup device for operation and maintenance data comprising:
[0031] The data backup module is used to receive the operation and maintenance data to be backed up submitted by the user, and encrypt the operation and maintenance data to be backed up according to a preset encryption strategy to obtain encrypted operation and maintenance data;
[0032] A data verification module is used to perform a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmit the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract;
[0033] The blockchain network module is used to receive the encrypted operation and maintenance data, initiate a data storage request in the blockchain, store the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain; and return the hash value to the user so that the user can construct a mapping relationship between the operation and maintenance data to be backed up and the hash value.
[0034] According to a third aspect of the present invention, there is provided a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for backing up operation and maintenance data in any possible implementation of the first aspect.
[0035] According to a fourth aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for backing up operation and maintenance data in any possible implementation of the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 A flowchart of a method for backing up operation and maintenance data provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a backup device for operation and maintenance data provided by an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] See also Figure 1 The embodiment of the present invention provides a method for backing up operation and maintenance data, which may include the following steps:
[0043] S101, receiving operation and maintenance data to be backed up submitted by a user, and encrypting the operation and maintenance data to be backed up according to a preset encryption policy to obtain encrypted operation and maintenance data;
[0044] In an embodiment of the present invention, as an optional embodiment, a user submits operation and maintenance data to be backed up through a system interface or application of a client, wherein the operation and maintenance data to be backed up may be operation and maintenance data generated by an operation and maintenance system that is selected by the user according to a pre-set backup strategy and that complies with the backup strategy, for example, specific files, databases, configuration files, etc. that meet the backup strategy, and the embodiment of the present invention does not limit this.
[0045] In an embodiment of the present invention, as an optional embodiment, the user can encapsulate the operation and maintenance data to be backed up in a data backup request and submit it through the client. After the server receives the data backup request submitted by the user, it parses the data backup request, obtains the operation and maintenance data to be backed up, and prepares for subsequent processing.
[0046] In an embodiment of the present invention, as an optional embodiment, in order to improve the security of data transmission, the client negotiates an encryption and decryption strategy with the server in advance. The user encrypts the operation and maintenance data to be backed up according to the negotiated encryption and decryption strategy, encapsulates the encrypted operation and maintenance data to be backed up in a data backup request, and sends it to the server through the client. The server parses the data backup request, obtains the encrypted operation and maintenance data to be backed up, and decrypts the encrypted operation and maintenance data to be backed up according to the negotiated encryption and decryption strategy to obtain the operation and maintenance data to be backed up.
[0047] In an embodiment of the present invention, as an optional embodiment, the encryption algorithm included in the encryption and decryption strategy includes but is not limited to: Advanced Encryption Standard (AES) algorithm, International Data Encryption Algorithm (IDEA) algorithm, Digital Signature (DSA) algorithm or other reliable encryption algorithms.
[0048] In an embodiment of the present invention, the encryption algorithm used by the server to encrypt the encrypted operation and maintenance data obtained by parsing the data to be backed up may be the same as the encryption and decryption strategy used by the client, or may be different from the encryption and decryption strategy used by the client. The embodiment of the present invention does not limit this.
[0049] S102, performing a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmitting the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract;
[0050] In an embodiment of the present invention, a hash operation is performed on the encrypted operation and maintenance data using a pre-set hash algorithm. As an optional embodiment, the hash algorithm used for the hash operation includes but is not limited to: Secure Hash Algorithm (SHA) algorithm-256, Message Digest Algorithm 5 (MD5) algorithm, etc. The hash value is a unique identifier of the operation and maintenance data to be backed up, and is used for subsequent integrity verification of the operation and maintenance data to be backed up.
[0051] In the embodiment of the present invention, the smart contract is a program stored on the blockchain, which is automatically executed when pre-set conditions are met. It is responsible for performing data storage, verification and recovery operations, and generating corresponding transaction records on the blockchain to ensure the transparency and security of the data processing process.
[0052] S103: The node on the blockchain that receives the encrypted operation and maintenance data initiates a data storage request in the blockchain, and stores the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain;
[0053] In an embodiment of the present invention, as an optional embodiment, based on a consensus algorithm, a node receiving the encrypted operation and maintenance data reaches a consensus with other nodes in the blockchain. The node receiving the encrypted operation and maintenance data on the blockchain initiates a data storage request in the blockchain, based on the consensus reached between the node and other nodes in the blockchain, including:
[0054] The node on the blockchain that receives the encrypted operation and maintenance data verifies the signature of the encrypted operation and maintenance data;
[0055] After the verification is passed, the generated data storage request is signed and then broadcasted, and the data storage request carries the encrypted operation and maintenance data and hash value;
[0056] After the number of data storage requests received from other nodes in the blockchain exceeds a preset number threshold, a consensus request is sent to other nodes in the blockchain;
[0057] After the number of consensus requests received from other nodes in the blockchain exceeds a preset consensus threshold, the encrypted operation and maintenance data and the hash value are stored.
[0058] In an embodiment of the present invention, the node receiving the encrypted operation and maintenance data and hash value verifies the signature of the server that uploaded the encrypted operation and maintenance data and hash value, and after passing the signature verification, encapsulates the encrypted operation and maintenance data and hash value in a data storage request. As an optional embodiment, the data storage request is encrypted and signed using an asymmetric encryption algorithm or a symmetric encryption algorithm, and then broadcasted within the blockchain. After receiving the data storage request, other nodes in the blockchain verify the signature in the data storage request, and after the signature verification passes, return the signed data storage request to the node.
[0059] The node that receives the encrypted operation and maintenance data and hash value verifies the signature of the received data storage request. After the signature verification is passed, the number of data storage requests is increased by 1. If the number of data storage requests exceeds the preset number threshold, the consensus request is broadcast. For example, in the case where the consensus algorithm is the Practical Byzantine Fault Tolerance (PBFT) algorithm, the number of consensus nodes in the blockchain is 3a+1, where a is the number of fault-tolerant nodes that can be supported in the blockchain. The number threshold can be set to 2a+1, that is, the number of data storage requests exceeds 2a+1, and a consensus request is initiated. As an optional embodiment, the consensus request is encrypted and signed using an asymmetric encryption algorithm or a symmetric encryption algorithm.
[0060] After receiving the consensus request, other nodes in the blockchain will verify the signature of the consensus request. After the signature is verified, the consensus request will be encrypted and signed using an asymmetric encryption algorithm or a symmetric encryption algorithm and then broadcast.
[0061] The node that receives the encrypted operation and maintenance data and hash value verifies the signature of the received consensus request. After the signature verification is passed, the number of consensus requests is increased by 1. If the number of consensus requests exceeds the preset consensus threshold, for example, more than 2a+1, a consensus is reached, the encrypted operation and maintenance data and hash value are stored, and the data storage request success information is returned to the server, indicating that the backup of the operation and maintenance data to be backed up is successful.
[0062] In an embodiment of the present invention, as an optional embodiment, the blockchain uses a consensus algorithm to ensure that the blockchain data recorded on the blockchain cannot be tampered with and is consistent. The consensus algorithm includes but is not limited to: Proof of Work (PoW), Proof of Stake (PoS), PBFT, etc.
[0063] S104: Return the hash value to the user, so that the user can build a mapping relationship between the operation and maintenance data to be backed up and the hash value.
[0064] In this embodiment, as an optional embodiment, the nodes on the blockchain store encrypted operation and maintenance data and hash values, and the encrypted operation and maintenance data and the hash values have a one-to-one correspondence. The server is notified that the operation and maintenance data to be backed up is successfully stored, and the server returns the hash value corresponding to the operation and maintenance data to be backed up to the user. The user sets the mapping relationship between the operation and maintenance data to be backed up and the hash value based on the received hash value and stores it. Among them, as an optional embodiment, setting the mapping relationship between the operation and maintenance data to be backed up and the hash value can be setting the mapping relationship between the keywords of the operation and maintenance data to be backed up and the hash value. In this way, after the operation and maintenance data to be backed up is lost, the hash value mapped by the mapping relationship can be obtained based on the keywords of the operation and maintenance data to be backed up, so as to restore the lost operation and maintenance data from the blockchain.
[0065] In this embodiment, as another optional embodiment, the mapping relationship constructed can also be a mapping relationship between the timestamp of the operation and maintenance data to be backed up and the operation and maintenance data to be backed up. Since users generally back up data on the blockchain less frequently, after an abnormality occurs in the subsequent operation and maintenance data, the operation and maintenance data stored by the user that is closest to the timestamp can be obtained from the blockchain based on the approximate timestamp.
[0066] In this embodiment, as an optional embodiment, after returning the hash value to the user so that the user builds a mapping relationship between the operation and maintenance data to be backed up and the hash value, the method further includes:
[0067] Performing a hash operation on the operation and maintenance data to be backed up according to the same hash algorithm as that used to perform a hash operation on the encrypted operation and maintenance data to obtain a first hash value;
[0068] If the first Hash value is the same as the Hash value, the step of enabling the user to construct a mapping relationship between the operation and maintenance data to be backed up and the Hash value is performed.
[0069] In an embodiment of the present invention, as an optional embodiment, if the first hash value is different from the hash value, it indicates that the operation and maintenance data to be backed up has been tampered with during the transmission process, and a data re-backup request is initiated. In the data re-backup request, the operation and maintenance data to be backed up, the first hash value corresponding to the operation and maintenance data to be backed up, and the hash value returned to the user are carried to update the operation and maintenance data to be backed up corresponding to the hash value returned to the user on the blockchain, that is, the operation and maintenance data to be backed up and the first hash value are used to replace the stored operation and maintenance data to be backed up and the hash value.
[0070] In an embodiment of the present invention, as an optional embodiment, the method further includes:
[0071] From the mapping relationship, query the target hash value of the operation and maintenance data to be restored, encapsulate the target hash value in the operation and maintenance data restoration request, and send it to the blockchain;
[0072] Receiving the operation and maintenance data recovery request response returned by the blockchain, parsing the operation and maintenance data recovery request response, and obtaining the carried encrypted operation and maintenance data to be recovered;
[0073] Decrypting the encrypted operation and maintenance data to be restored to obtain the backup operation and maintenance data to be restored;
[0074] A hash operation is performed on the backup operation and maintenance data to be restored to obtain a second hash value, and if the second hash value is the same as the target hash value, it is determined that the backup operation and maintenance data to be restored is the operation and maintenance data to be restored.
[0075] In the embodiment of the present invention, as an optional embodiment, the user initiates an operation and maintenance data recovery request through the client's system interface or application. In the operation and maintenance data recovery request, the identifier of the backup data to be restored (operation and maintenance data to be restored) is carried, for example, a hash value, and the timestamp of the operation and maintenance data to be restored corresponding to the backup operation and maintenance data to be restored when it is transmitted to the blockchain. The user can select the data version to be restored by querying the hash value, timestamp or other identifiers.
[0076] In an embodiment of the present invention, after receiving the operation and maintenance data recovery request, the server can authenticate the identity of the user and the legitimacy of the operation and maintenance data recovery request in order to ensure the security of the operation and maintenance data. As an optional embodiment, the identity authentication can adopt multi-factor authentication (MFA, Multi-factor authentication), digital signature and the like, so that it can be ensured that only authorized users can perform the operation and maintenance data recovery operation.
[0077] In the embodiment of the present invention, after receiving the operation and maintenance data recovery request, the node on the blockchain reads the backed-up encrypted operation and maintenance data and hash value, and encapsulates them in the operation and maintenance data recovery request response. As an optional embodiment, since each node on the blockchain stores the backup operation and maintenance data (encrypted operation and maintenance data and hash value), the backup operation and maintenance data can be obtained from any node on the blockchain.
[0078] In the embodiment of the present invention, after receiving the operation and maintenance data recovery request response, the user (client) performs parsing to obtain the encrypted operation and maintenance data to be recovered, decrypts the encrypted operation and maintenance data to be recovered, and recovers the original operation and maintenance data (backup operation and maintenance data to be recovered). The decryption process uses the same algorithm and key as the encryption process to ensure that the encrypted operation and maintenance data can be correctly decrypted.
[0079] In the embodiment of the present invention, a method for backing up and restoring operation and maintenance data based on blockchain is proposed. By receiving the operation and maintenance data to be backed up submitted by the user, the operation and maintenance data to be backed up is encrypted according to the pre-set encryption strategy to obtain the encrypted operation and maintenance data; the encrypted operation and maintenance data is hashed to obtain the hash value, and the encrypted operation and maintenance data and the hash value are transmitted to the blockchain through the pre-set smart contract; the node receiving the encrypted operation and maintenance data on the blockchain initiates a data storage request in the blockchain, and stores the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain; the hash value is returned to the user, so that the user can construct a mapping relationship between the operation and maintenance data to be backed up and the hash value. In this way, in the data backup process, the data is encrypted and a unique hash value is generated, which can ensure the security of the data during the transmission and storage process and improve the backup reliability of the operation and maintenance data; at the same time, based on the distributed storage characteristics of the blockchain, each node of the blockchain can store a complete copy of the data, further improving the security of the operation and maintenance data and ensuring the reliability of the operation and maintenance data when it is restored.
[0080] Figure 2 A schematic diagram of a backup device for operation and maintenance data provided by an embodiment of the present invention. Figure 2 As shown, as an optional embodiment, the backup device of operation and maintenance data includes: a data backup module 201, a data verification module 202 and a blockchain network module 203, wherein:
[0081] The data backup module 201 is used to receive the operation and maintenance data to be backed up submitted by the user, and encrypt the operation and maintenance data to be backed up according to a preset encryption policy to obtain encrypted operation and maintenance data;
[0082] In the embodiment of the present invention, as an optional embodiment, the data backup module 201 is further used for:
[0083] The encryption and decryption strategy is pre-negotiated with the client of the user, so that the client encrypts the operation and maintenance data to be backed up submitted by the user according to the negotiated encryption and decryption strategy, and encapsulates the encrypted operation and maintenance data to be backed up in a data backup request for sending.
[0084] The data verification module 202 is used to perform a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmit the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract;
[0085] The blockchain network module 203 is used to receive the encrypted operation and maintenance data, initiate a data storage request in the blockchain, and store the encrypted operation and maintenance data and hash value based on the consensus reached between the node and other nodes in the blockchain; return the hash value to the user so that the user can construct a mapping relationship between the operation and maintenance data to be backed up and the hash value.
[0086] In the embodiment of the present invention, the user submits a data backup request including the operation and maintenance data to be backed up through the data backup module. As an optional embodiment, the user submits the operation and maintenance data to be backed up to the data backup module through the system interface or application of the client, wherein the submitted operation and maintenance data to be backed up may be a specific file, database, configuration file, etc. selected by the user, which is not limited in the embodiment of the present invention.
[0087] In the embodiment of the present invention, after receiving the data backup request submitted by the user, the data backup module parses the data backup request, obtains the operation and maintenance data to be backed up, and prepares for subsequent processing.
[0088] In the embodiment of the present invention, after parsing and obtaining the operation and maintenance data to be backed up, in order to ensure the security of the operation and maintenance data to be transmitted, the data backup module encrypts the operation and maintenance data obtained by parsing. As an optional embodiment, the encryption algorithm used for encryption processing in the encryption strategy includes but is not limited to: AES algorithm, IDEA algorithm, DSA algorithm, so as to convert the original operation and maintenance data into encrypted operation and maintenance data.
[0089] In the embodiment of the present invention, as an optional embodiment, in order to ensure the integrity of the backed-up operation and maintenance data, the encrypted operation and maintenance data obtained after encryption can also be hashed to generate a unique hash value. The hash algorithm used for the hash operation includes but is not limited to: Secure Hash Algorithm (SHA) algorithm-256, Message Digest Algorithm 5 (MD5) algorithm, etc. The hash value is a unique identifier of the operation and maintenance data and is used to verify the integrity of the operation and maintenance data.
[0090] In the embodiment of the present invention, the encrypted operation and maintenance data and its corresponding hash value are transmitted to the blockchain through a smart contract. Each node on the blockchain receives the transmitted encrypted operation and maintenance data and hash value for storage to ensure the immutability and transparency of the operation and maintenance data. Among them, the smart contract is responsible for executing the data storage operation and generating corresponding transaction records on the blockchain.
[0091] In an embodiment of the present invention, the user may also request verification of the integrity of the backup operation and maintenance data through the client's system interface or application. As an optional embodiment, the user may select a specific data file or backup record for verification. After receiving the data verification request, the stored backup operation and maintenance data and its hash value are read from the blockchain. As an optional embodiment, the backup operation and maintenance data may be obtained from any node on the blockchain. A hash operation is performed on the currently acquired backup operation and maintenance data to generate a current hash verification value. Among them, the hash operation process uses the same hash algorithm as that used for backup to ensure the consistency of the hash calculation results. By comparing the hash values, the currently generated hash value is compared with the hash value stored on the blockchain. If the hash values match, the data integrity verification passes, otherwise the verification fails.
[0092] In an embodiment of the present invention, as an optional embodiment, the blockchain network module includes multiple blockchain nodes, and the blockchain nodes are used to jointly maintain the blockchain account book. Each blockchain node stores complete blockchain data, for example, encrypted operation and maintenance data, to ensure distributed storage and high availability of blockchain data.
[0093] In an embodiment of the present invention, as an optional embodiment, the blockchain network module ensures that the blockchain data recorded on the blockchain cannot be tampered with and is consistent through a consensus algorithm. Among them, the consensus algorithm includes but is not limited to: Proof of Work (PoW), Proof of Stake (PoS), Practical Byzantine Fault Tolerance (PBFT), etc.
[0094] In an embodiment of the present invention, as an optional embodiment, the blockchain network module 203 includes:
[0095] A signature verification unit (not shown in the figure), which is used for a node on the blockchain that receives the encrypted operation and maintenance data to verify the signature of the encrypted operation and maintenance data;
[0096] A broadcast unit, configured to sign and broadcast the generated data storage request after the verification is passed, wherein the data storage request carries the encrypted operation and maintenance data and the hash value;
[0097] A consensus unit, configured to send a consensus request to other nodes in the blockchain after the number of data storage requests received from other nodes in the blockchain exceeds a preset number threshold;
[0098] The backup unit is used to store the encrypted operation and maintenance data and the hash value after the number of consensus requests received from other nodes in the blockchain exceeds a preset consensus threshold.
[0099] In the embodiment of the present invention, as an optional embodiment, the blockchain network module 203 is also used for:
[0100] Performing a hash operation on the operation and maintenance data to be backed up according to the same hash algorithm as that used to perform a hash operation on the encrypted operation and maintenance data to obtain a first hash value;
[0101] If the first Hash value is the same as the Hash value, the step of enabling the user to construct a mapping relationship between the operation and maintenance data to be backed up and the Hash value is performed.
[0102] In the embodiment of the present invention, as another optional embodiment, the blockchain network module 203 is also used for:
[0103] If the first hash value is different from the hash value, a data re-backup request is initiated. In the data re-backup request, the operation and maintenance data to be backed up, the first hash value corresponding to the operation and maintenance data to be backed up, and the hash value returned to the user are carried, so as to use the carried operation and maintenance data to be backed up and the first hash value to replace the stored operation and maintenance data to be backed up and the hash value.
[0104] In an embodiment of the present invention, as an optional embodiment, the device further includes:
[0105] The data recovery module 204 is used to query the target hash value of the operation and maintenance data to be restored from the mapping relationship, encapsulate the target hash value in the operation and maintenance data recovery request, and send it to the blockchain;
[0106] Receiving the operation and maintenance data recovery request response returned by the blockchain, parsing the operation and maintenance data recovery request response, and obtaining the carried encrypted operation and maintenance data to be recovered;
[0107] Decrypting the encrypted operation and maintenance data to be restored to obtain the backup operation and maintenance data to be restored;
[0108] A hash operation is performed on the backup operation and maintenance data to be restored to obtain a second hash value, and if the second hash value is the same as the target hash value, it is determined that the backup operation and maintenance data to be restored is the operation and maintenance data to be restored.
[0109] In the embodiment of the present invention, as an optional embodiment, the user initiates an operation and maintenance data recovery request through the client's system interface or application. In the operation and maintenance data recovery request, the identifier of the backup data to be restored (operation and maintenance data to be restored) is carried, for example, a hash value, a timestamp of the operation and maintenance data to be restored being transmitted to the blockchain. The user can select the data version to be restored by querying the hash value, timestamp or other identifiers.
[0110] In the embodiment of the present invention, in order to ensure the security of operation and maintenance data, the data recovery module authenticates the identity of the user and the legitimacy of the operation and maintenance data recovery request. As an optional embodiment, the identity authentication can adopt multi-factor authentication (MFA, Multi-factor authentication), digital signature and other methods, so that it can be ensured that only authorized users can perform operation and maintenance data recovery operations.
[0111] In the embodiment of the present invention, the data recovery module reads the blockchain data, that is, reads the backed-up encrypted operation and maintenance data and hash value from the blockchain. As an optional embodiment, since each node on the blockchain stores the backed-up operation and maintenance data (encrypted operation and maintenance data and hash value), the backed-up operation and maintenance data can be obtained from any node on the blockchain.
[0112] In the embodiment of the present invention, after the backup operation and maintenance data is obtained, the backup operation and maintenance data is decrypted, that is, the data recovery module decrypts the read encrypted operation and maintenance data to restore the original operation and maintenance data. The decryption process uses the same algorithm and key as the encryption process to ensure that the encrypted operation and maintenance data can be correctly decrypted.
[0113] In the embodiment of the present invention, after decrypting the encrypted operation and maintenance data, the restored data is returned, that is, the data recovery module returns the decrypted data to the user, completing the data recovery operation. As an optional embodiment, the user can apply the restored original operation and maintenance data to the original system to ensure the continuity and integrity of the operation and maintenance operation.
[0114] In the embodiment of the present invention, the smart contract is a program stored on the blockchain, which is automatically executed when pre-set conditions are met and is used to automate data backup, verification and recovery operations to ensure the transparency and security of the process.
[0115] In the embodiment of the present invention, the operation and maintenance data to be backed up is recorded on the blockchain using blockchain technology, and based on the distributed ledger technology of the blockchain, each node of the blockchain can store a copy of the backup operation and maintenance data, thereby ensuring the non-tamperability and high reliability of the backup operation and maintenance data. At the same time, through the consensus algorithm, any single node on the blockchain cannot modify the data alone, ensuring the integrity and security of the data and guaranteeing the non-tamperability of the operation and maintenance data.
[0116] At the same time, based on the distributed storage characteristics of blockchain, each node of the blockchain can store a complete copy of the data, so even if some nodes fail, other nodes can still provide data access and recovery services. In this way, through multi-node redundant storage, disaster recovery capabilities and high data availability are enhanced, ensuring that data recovery operations can be performed in any situation.
[0117] Furthermore, during the data backup process, the data is encrypted and a unique hash value is generated, which can ensure the security and privacy of the data during transmission and storage. Even if the backup data is intercepted during transmission or the storage medium storing the backup data is accessed, unauthorized users cannot decrypt and read the data, thus ensuring the privacy of the data.
[0118] Furthermore, the integrity of the backup data can be ensured by recording the hash value of the data through the smart contract on the blockchain and comparing the hash value when the data is restored. Based on the immutability of the blockchain and the automatic execution of the smart contract, the data verification process can be made transparent and efficient, ensuring that the backup data has not been tampered with and realizing data integrity verification.
[0119] Moreover, by realizing automated operations of data backup, verification and recovery through smart contracts, users only need to initiate operations through a simple interface or application, and the system will automatically complete the data encryption, storage, verification and recovery process, which greatly simplifies the operation process and improves the ease of use and reliability of the system.
[0120] In addition, by utilizing the transparency of blockchain, all backup and recovery operations are recorded on the blockchain through smart contracts, forming an unalterable operation log. Operation and maintenance personnel can view the operation history through the blockchain browser or query interface, ensuring the high transparency and auditability of the system, and facilitating operation and maintenance management and problem tracking.
[0121] Based on the same inventive concept, an embodiment of the present invention further provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method for backing up operation and maintenance data in any possible implementation manner described above are implemented.
[0122] Alternatively, the storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0123] Based on the same inventive concept, see Figure 3 The embodiment of the present invention further provides an electronic device, including a memory 101 (such as a non-volatile memory), a processor 102, and a computer program stored in the memory 101 and executable on the processor 102. When the processor 102 executes the program, the steps of the operation and maintenance data backup method in any possible implementation manner described above can be equivalent to the operation and maintenance data backup device described above. Of course, the processor can also be used to process other data or operations. The electronic device can be a PC, a server, a terminal, and other devices.
[0124] like Figure 3As shown, the electronic device may also generally include: a memory 103, a network interface 104, and an internal bus 105. In addition to these components, other hardware may also be included, which will not be described in detail.
[0125] It should be pointed out that the above-mentioned backup device for operation and maintenance data can be implemented through software. As a device in a logical sense, it is formed by the processor 102 of the electronic device in which it is located reading the computer program instructions stored in the non-volatile memory into the memory 103 for execution.
[0126] The embodiments of the subject matter and functional operations described in this specification may be implemented in the following: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules in computer program instructions encoded on a tangible non-temporary program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information and transmit it to a suitable receiver device for execution by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
[0127] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform the corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits), and the apparatus can also be implemented as special purpose logic circuits.
[0128] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to this large-capacity storage device to receive data from it or to transmit data to it, or both. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0129] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0130] Although this specification includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments in this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although the features may work as above in certain combinations and even initially claim protection, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0131] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.
[0132] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0134] The above is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A method for backing up operation and maintenance data, characterized in that: include: Receiving the operation and maintenance data to be backed up submitted by the user, and encrypting the operation and maintenance data to be backed up according to a preset encryption policy to obtain encrypted operation and maintenance data; Performing a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmitting the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract; The node on the blockchain that receives the encrypted operation and maintenance data initiates a data storage request in the blockchain, and stores the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain; The hash value is returned to the user, so that the user constructs a mapping relationship between the operation and maintenance data to be backed up and the hash value.
2. The method for backing up operation and maintenance data according to claim 1, characterized in that: The node on the blockchain that receives the encrypted operation and maintenance data initiates a data storage request in the blockchain, based on a consensus reached between the node and other nodes in the blockchain, including: The node on the blockchain that receives the encrypted operation and maintenance data verifies the signature of the encrypted operation and maintenance data; After the verification is passed, the generated data storage request is signed and then broadcasted, and the data storage request carries the encrypted operation and maintenance data and hash value; After the number of data storage requests received from other nodes in the blockchain exceeds a preset number threshold, a consensus request is sent to other nodes in the blockchain; After the number of consensus requests received from other nodes in the blockchain exceeds a preset consensus threshold, the encrypted operation and maintenance data and the hash value are stored.
3. The method for backing up operation and maintenance data according to claim 1, characterized in that: After returning the hash value to the user so that the user builds a mapping relationship between the operation and maintenance data to be backed up and the hash value, the method further includes: Performing a hash operation on the operation and maintenance data to be backed up according to the same hash algorithm as that used to perform a hash operation on the encrypted operation and maintenance data to obtain a first hash value; If the first Hash value is the same as the Hash value, the step of enabling the user to construct a mapping relationship between the operation and maintenance data to be backed up and the Hash value is performed.
4. The method for backing up operation and maintenance data according to claim 3, characterized in that: The method further comprises: If the first hash value is different from the hash value, a data re-backup request is initiated. In the data re-backup request, the operation and maintenance data to be backed up, the first hash value corresponding to the operation and maintenance data to be backed up, and the hash value returned to the user are carried, so as to use the carried operation and maintenance data to be backed up and the first hash value to replace the stored operation and maintenance data to be backed up and the hash value.
5. The method for backing up operation and maintenance data according to any one of claims 1 to 4, characterized in that: The method further comprises: From the mapping relationship, query the target hash value of the operation and maintenance data to be restored, encapsulate the target hash value in the operation and maintenance data restoration request, and send it to the blockchain; Receiving the operation and maintenance data recovery request response returned by the blockchain, parsing the operation and maintenance data recovery request response, and obtaining the carried encrypted operation and maintenance data to be recovered; Decrypting the encrypted operation and maintenance data to be restored to obtain the backup operation and maintenance data to be restored; A hash operation is performed on the backup operation and maintenance data to be restored to obtain a second hash value, and if the second hash value is the same as the target hash value, it is determined that the backup operation and maintenance data to be restored is the operation and maintenance data to be restored.
6. The method for backing up operation and maintenance data according to any one of claims 1 to 4, characterized in that: The method further comprises: The user's client negotiates encryption and decryption strategies with the server in advance. The client encrypts the operation and maintenance data to be backed up submitted by the user according to the negotiated encryption and decryption strategies, encapsulates the encrypted operation and maintenance data to be backed up in a data backup request, and sends it to the server through the client.
7. The method for backing up operation and maintenance data according to claim 6, characterized in that: The encryption algorithms included in the encryption and decryption strategy include: Advanced Encryption Standard Algorithm, International Data Encryption Algorithm, and Digital Signature Algorithm.
8. A backup device for operation and maintenance data, characterized in that: The backup device of the operation and maintenance data comprises: The data backup module is used to receive the operation and maintenance data to be backed up submitted by the user, and encrypt the operation and maintenance data to be backed up according to a preset encryption strategy to obtain encrypted operation and maintenance data; A data verification module is used to perform a hash operation on the encrypted operation and maintenance data to obtain a hash value, and transmit the encrypted operation and maintenance data and the hash value to the blockchain through a pre-set smart contract; The blockchain network module is used to receive the encrypted operation and maintenance data, initiate a data storage request in the blockchain, store the encrypted operation and maintenance data and the hash value based on the consensus reached between the node and other nodes in the blockchain; and return the hash value to the user so that the user can construct a mapping relationship between the operation and maintenance data to be backed up and the hash value.
9. A storage medium, characterized in that: The storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method for backing up operation and maintenance data as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for backing up operation and maintenance data described in any one of claims 1 to 7 are implemented.
