Dual-site data storage method, product, device, equipment and storage medium
By using preset encryption algorithms to encrypt and store and transmit data in cloud computing, data security is ensured in the dual-site data storage process, the problem of being stolen during data transmission is solved, and overall security and performance is improved.
Patent Information
- Application Number
- CN202410757051.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-06-13
AI Technical Summary
In cloud computing, during the dual-site data storage process, data transmission is easily stolen by attack networks, resulting in damage to user information security.
The preset encryption algorithm is used to encrypt and store the stored data, and the data is encrypted through shared memory and encrypted disk to ensure the encryption of the data during transmission and avoid the degradation of the virtual machine's operating performance caused by self-encryption and decryption by each site.
It improves the data security of dual-site data storage, prevents data leakage during transmission, avoids the reduction of virtual machine operation performance, and realizes the security of data in dual-site storage.
Smart Images

Figure CN118363540B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the technical field of data storage, and in particular, to a dual-site data storage method, product, device, equipment, and storage medium. Background Art
[0002] In cloud computing, in order to ensure the stable operation of computing, two computing sites are used, one site as the main site and the other site as the backup site. The main site is responsible for processing normal business traffic and storing data. The backup site takes over the business traffic and processes data when the main site fails or is unavailable. In order to ensure data synchronization between the two sites, the data in the virtual machines in the sites needs to be transmitted in real time.
[0003] When transmitting data from the primary site to the backup site, the attack network may obtain the transmitted data during the data transmission process and then obtain business information, which is not conducive to the security of user information. Summary of the invention
[0004] The embodiments of the present application provide a dual-site data storage method, product, device, equipment and storage medium, aiming to improve data security during dual-site data storage.
[0005] A first aspect of an embodiment of the present application provides a dual-site data storage method, the method comprising:
[0006] The first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored corresponding to the currently executed task;
[0007] The first virtual machine management unit puts the unencrypted data to be stored into a shared memory;
[0008] The continuous data protection unit obtains the data to be stored from the shared memory;
[0009] The continuous data protection unit encrypts the data to be stored using the encryption algorithm;
[0010] When the current network bandwidth meets the data transmission condition, the continuous data protection unit sends the encrypted data to be stored to the second site.
[0011] Optionally, before the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, the method further includes:
[0012] In response to the initiation of the dual-site data storage task, establishing the shared memory in the first site;
[0013] The first virtual machine sends the key corresponding to the encryption algorithm to the continuous data protection unit, and the encryption algorithm encrypts the data to be stored by using the key.
[0014] Optionally, the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, including:
[0015] The first virtual machine management unit sends the data to be stored to the first encryption disk;
[0016] The first encryption disk performs encryption operation on the data to be stored by using the encryption algorithm to obtain the encrypted data to be stored;
[0017] The first encryption disk sends the encrypted data to be stored to the first physical storage disk.
[0018] Optionally, before the first virtual machine sends the data to be stored to the first encrypted disk, the method further includes:
[0019] The first virtual machine management unit receives a data packet to be stored corresponding to the task from the first virtual machine;
[0020] When the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit merges the data packets to be stored to obtain the data to be stored.
[0021] Optionally, the first virtual machine management unit puts the unencrypted data to be stored into a shared memory, including:
[0022] The first virtual machine management unit determines, according to the task information of the task, a starting address and an ending address of the data to be stored in the first cache of the first site;
[0023] Acquire the data to be stored in the first cache according to the start address and the end address;
[0024] Copying the data to be stored;
[0025] The copied data to be stored is sent to the shared memory.
[0026] Optionally, the continuous data protection unit obtains the data to be stored from the shared memory, including:
[0027] The continuous data protection unit receives a data acquisition prompt sent by the first virtual machine management unit;
[0028] The continuous data protection unit determines a storage location of the data to be stored in the shared memory according to the data acquisition prompt;
[0029] The continuous data protection unit obtains the data to be stored from the storage location.
[0030] Optionally, the continuous data protection unit encrypts the data to be stored using the encryption algorithm, including:
[0031] The continuous data protection unit sends the data to be stored to the second encryption disk;
[0032] The second encryption disk performs encryption operation on the data to be stored by using the encryption algorithm.
[0033] Optionally, the continuous data protection unit sends the encrypted data to be stored to the second site, including:
[0034] The continuous data protection unit obtains the network address of the second site from the server;
[0035] The continuous data protection unit sends the encrypted data to be stored to the second site according to the network address.
[0036] Optionally, the method further comprises:
[0037] When the current network bandwidth does not meet the data transmission condition, the continuous data protection unit stores the encrypted data to be stored in the second cache.
[0038] Optionally, the method further comprises:
[0039] Performing real-time monitoring on the network bandwidth;
[0040] When it is monitored that the network bandwidth meets the data transmission condition, fetching the encrypted data to be stored from the second cache;
[0041] The encrypted data to be stored is sent to the second site.
[0042] Optionally, the method further comprises:
[0043] The second site receives the encrypted data to be stored;
[0044] The second site stores the encrypted data to be stored in a second physical storage disk.
[0045] Optionally, the method further comprises:
[0046] The second site loads the encrypted data to be stored through a virtual disk;
[0047] The second site obtains the encrypted key corresponding to the data to be stored from the server;
[0048] The second site decrypts the encrypted data to be stored by using the key to obtain the unencrypted data to be stored.
[0049] A second aspect of an embodiment of the present application provides a computer program product, including a computer program / instructions, characterized in that when the computer program / instructions are executed by a processor, the steps in the method described in the first aspect of the present application are implemented.
[0050] A third aspect of an embodiment of the present application provides a dual-site data storage device, the device comprising:
[0051] An encryption storage module, used for the first virtual machine management unit in the first site to encrypt and store the to-be-stored data corresponding to the currently executed task using a preset encryption algorithm;
[0052] A shared memory module, used for the first virtual machine management unit to put the unencrypted data to be stored into the shared memory;
[0053] A data acquisition module, used for the continuous data protection unit to acquire the data to be stored from the shared memory;
[0054] A data encryption module, used for the continuous data protection unit to encrypt the data to be stored using the encryption algorithm;
[0055] The data sending module is used for the continuous data protection unit to send the encrypted data to be stored to the second site when the current network bandwidth meets the data transmission condition.
[0056] Optionally, the device further comprises:
[0057] A shared memory establishment module, configured to establish the shared memory in the first site in response to the initiation of the dual-site data storage task;
[0058] The key sending module is used for the first virtual machine to send the key corresponding to the encryption algorithm to the continuous data protection unit, and the encryption algorithm encrypts the data to be stored by using the key.
[0059] Optionally, the encryption storage module includes:
[0060] A first data sending submodule, configured for the first virtual machine management unit to send the data to be stored to the first encryption disk;
[0061] A first encryption operation submodule, configured for performing an encryption operation on the data to be stored by the first encryption disk through the encryption algorithm to obtain the encrypted data to be stored;
[0062] The second data sending submodule is used for the first encryption disk to send the encrypted data to be stored to the first physical storage disk.
[0063] Optionally, the device further comprises:
[0064] A data packet receiving module, used for the first virtual machine management unit to receive the data packet to be stored corresponding to the task from the first virtual machine;
[0065] The data packet merging module is used for, when the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit to merge the data packets to be stored to obtain the data to be stored.
[0066] Optionally, the shared memory module includes:
[0067] An address determination submodule, configured for the first virtual machine management unit to determine a start address and an end address of the data to be stored in the first cache of the first site according to the task information of the task;
[0068] A to-be-stored data acquisition submodule, configured to acquire the to-be-stored data in the first cache according to the start address and the end address;
[0069] A data copy submodule, used for copying the data to be stored;
[0070] The third data sending submodule is used to send the copied data to be stored to the shared memory.
[0071] Optionally, the data acquisition module includes:
[0072] A data acquisition prompt receiving submodule, used for the continuous data protection unit to receive the data acquisition prompt sent by the first virtual machine management unit;
[0073] A storage location determination submodule, used for the continuous data protection unit to determine the storage location of the data to be stored in the shared memory according to the data acquisition prompt;
[0074] The to-be-stored data acquisition submodule is used for the continuous data protection unit to acquire the to-be-stored data from the storage location.
[0075] Optionally, the data encryption module includes:
[0076] A fourth data sending submodule, used for the continuous data protection unit to send the data to be stored to the second encryption disk;
[0077] The second encryption operation submodule is used for the second encryption disk to perform encryption operation on the data to be stored through the encryption algorithm.
[0078] Optionally, the data sending module includes:
[0079] A network address acquisition submodule, used for the continuous data protection unit to acquire the network address of the second site from the server;
[0080] A fifth data sending submodule is used for the continuous data protection unit to send the encrypted data to be stored to the second site according to the network address.
[0081] Optionally, the device further comprises:
[0082] The second cache module is used for the continuous data protection unit to store the encrypted data to be stored in the second cache when the current network bandwidth does not meet the data transmission condition.
[0083] Optionally, the device further comprises:
[0084] A network monitoring module, used for real-time monitoring of the network bandwidth;
[0085] A data fetching module, configured to fetch the encrypted data to be stored from the second cache when it is detected that the network bandwidth meets the data transmission condition;
[0086] The second site data sending module is used to send the encrypted data to be stored to the second site.
[0087] Optionally, the device further comprises:
[0088] A second site data receiving module, used for the second site to receive the encrypted data to be stored;
[0089] The second physical storage disk data receiving module is used for the second site to store the encrypted data to be stored in the second physical storage disk.
[0090] Optionally, the device further comprises:
[0091] A data loading module, used for the second site to load the encrypted data to be stored through a virtual disk;
[0092] A key acquisition module, used for the second site to obtain the key corresponding to the encrypted data to be stored from the server;
[0093] The unencrypted data acquisition module is used for the second site to decrypt the encrypted data to be stored by using the key to obtain the unencrypted data to be stored.
[0094] A fourth aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the dual-site data storage method described in the first aspect of the present application are implemented.
[0095] A fifth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the dual-site data storage method described in the first aspect of the present application are implemented.
[0096] Using the dual-site data storage method provided by the present application, the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored corresponding to the currently executed task; the first virtual machine management unit puts the unencrypted data to be stored into a shared memory; the continuous data protection unit obtains the data to be stored from the shared memory; the continuous data protection unit encrypts the data to be stored using the encryption algorithm; when the current network bandwidth meets the data transmission conditions, the continuous data protection unit sends the encrypted data to be stored to the second site. In this method, in the process of dual-site data storage, the data to be stored is encrypted and stored by the first virtual machine management unit in the first site, and the unencrypted data to be stored is transmitted to the continuous data protection unit by setting a shared memory, and the continuous data protection unit encrypts the data to be stored and then transmits it to the second site, so that in the process of data transmission between the dual sites, the encrypted data to be stored are exposed to the outside, which improves the security of the data, and on the basis of realizing the dual-site data storage, it avoids the degradation of the virtual machine operation performance caused by each site encrypting and decrypting the data by itself, and realizes the improvement of data security in the dual-site storage process. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0098] Figure 1 is a flow chart of a dual-site data storage method proposed in an embodiment of the present application;
[0099] Figure 2 This is a schematic diagram of the dual-site disaster recovery strategy;
[0100] Figure 3 This is a schematic diagram of the LUKS encryption format proposed in an embodiment of the present application;
[0101] Figure 4 This is a schematic diagram of the first virtual machine management unit process proposed in one embodiment of the present application;
[0102] Figure 5 This is a schematic diagram of a dual-site data storage process proposed in an embodiment of the present application;
[0103] Figure 6 is a schematic diagram of a dual-site data storage device proposed in an embodiment of the present application;
[0104] Figure 7 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0105] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0106] refer to Figure 1 , Figure 1 1 is a flow chart of a dual-site data storage method proposed in one embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0107] S11: The first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the to-be-stored data corresponding to the currently executed task.
[0108] In this embodiment, the first site is the main site for executing business processes in cloud computing, and is mainly responsible for business traffic and data storage. The first virtual machine management unit (qemu) is used to manage the virtual machines in the first site. The preset encryption algorithm is an encryption algorithm based on LUKS (Linux Unified Key Setup, an encryption specification based on Linux), which allows users to choose from a series of symmetric encryption algorithms. A virtual machine is a complete computer system with complete hardware system functions and running in a completely isolated environment simulated by software. All work that can be done in a physical computer can be done in a virtual machine. The first virtual machine is a virtual machine in the first site.
[0109] In this embodiment, in order to ensure the stable operation of computing in cloud computing, a dual-site disaster recovery strategy is proposed, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the dual-site disaster recovery strategy. Figure 2 A dual-site disaster recovery strategy is adopted in which the virtual machine at the primary site stores data in physical storage, and then sends it to the physical storage at the backup site through the network. The virtual machine at the backup site processes the data when necessary. In the dual-site disaster recovery process, when the network bandwidth is not sufficient, IO (input / output) log caching will be performed at the primary site. Therefore, there are security risks in the IO cache and data transmission process generated by the attack network that causes insufficient bandwidth or insufficient network performance.
[0110] In this embodiment, when executing a task, the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored corresponding to the currently executed task. The encryption algorithm is stored in the encryption disk. When encrypting data, the data is first sent to the encryption disk, and the encryption algorithm in the encryption disk is called to operate on the data to be stored to obtain the encrypted data to be stored.
[0111] In this embodiment, the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, including:
[0112] S11 - 1: The first virtual machine management unit sends the data to be stored to a first encryption disk.
[0113] In this embodiment, the first encryption disk is a disk used to encrypt data in the first site. The disk stores a program corresponding to the encryption algorithm, which can be called by the first site. Running the encryption algorithm therein can encrypt the data to be stored in the first site.
[0114] In this embodiment, when the first virtual machine management unit receives the data to be stored, it first sends the data to be stored to the first encryption disk.
[0115] S11 - 2 : The first encryption disk performs encryption operation on the data to be stored by using the encryption algorithm to obtain the encrypted data to be stored.
[0116] In this embodiment, after receiving the data to be stored, the first encryption disk calls the encryption algorithm to perform encryption operation on the data to be stored to obtain the encrypted data to be stored.
[0117] For example, the encryption algorithm is based on LUKS. LUKS encryption adopts a two-level encryption method and introduces the master key as the key for disk encryption. This can avoid re-encrypting the encrypted disk when the user password is leaked but the master key is not leaked. The master key is the key factor of the encryption scheme. When the disk is encrypted for the first time, the encryption software randomly generates the plain text of the master key. After the first encryption is completed, it is encrypted into cipher text by cipher and saved to the disk as metadata. When the disk is decrypted, the master key cipher text is taken out from the disk and then decrypted by cipher to obtain the plain text of the disk. Therefore, the metadata of the LUK disk needs to save some encryption information. Reference Figure 3 , Figure 3 : is a schematic diagram of the LUKS encryption format proposed in an embodiment of the present application, such as Figure 3 As shown, a LUKS encrypted disk can be divided into three main parts, namely:
[0118] LUKS phdr: The disk header stores metadata related to the implementation specification and is an important field for implementing LUKS specification encrypted disks.
[0119] Key Material: stores the data obtained after the key master is decrypted and split and then encrypted. LUKS can support multiple user passwords, each of which can uniquely decrypt a key master. From the figure, we can see that there are 8 metadata (key slots), which store 8 (key data) accordingly. Therefore, LUKS supports setting up to 8 passwords.
[0120] Bulk data: ciphertext data on disk. The load-offset in the metadata specifies the starting offset of the encrypted data.
[0121] In this embodiment, the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, including:
[0122] S11-2-1: The first virtual machine management unit sends the data to be stored to the first encryption disk.
[0123] In this embodiment, the first virtual machine management unit sends the data to be stored to the first encryption disk.
[0124] S11-2-2: The first encryption disk performs encryption operation on the data to be stored by using the encryption algorithm to obtain the encrypted data to be stored.
[0125] In this embodiment, the first encryption disk performs encryption operation on the data to be stored by using an encryption algorithm to obtain encrypted data to be stored.
[0126] S11-2-3: The first encryption disk sends the encrypted data to be stored to the first physical storage disk.
[0127] In this embodiment, the first physical storage disk is used to store business data in the first site.
[0128] In this embodiment, the first encryption disk sends the encrypted data to be stored to the first physical storage disk. The first physical storage disk stores the first encryption disk.
[0129] In another embodiment of the present application, before the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, the method further includes:
[0130] S21: In response to the initiation of the dual-site data storage task, the shared memory is established in the first site.
[0131] In this embodiment, the dual-site data storage task is a task of synchronizing data to two sites when the cloud computing node executes a computing task.
[0132] In this embodiment, when the cloud computing node executes a computing task, a dual-site data storage task is started, and at this time, a corresponding shared memory is established in the first site.
[0133] S22: The first virtual machine sends the key corresponding to the encryption algorithm to the continuous data protection unit, and the encryption algorithm encrypts the data to be stored by using the key.
[0134] In this embodiment, the first virtual machine sends the key used when encrypting the first encrypted disk in the first site to the continuous data protection unit.
[0135] In this embodiment, before the first virtual machine sends the data to be stored to the first encrypted disk, the method further includes:
[0136] S31: The first virtual machine management unit receives a data packet to be stored corresponding to the task from the first virtual machine.
[0137] In this embodiment, before the first virtual machine sends the data to be stored to the first encryption disk, the first virtual machine management unit receives a data packet to be stored corresponding to the currently executed task from the first virtual machine.
[0138] S32: When the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit merges the data packets to be stored to obtain the data to be stored.
[0139] In this embodiment, when the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit merges the data packets to be stored to obtain complete data to be stored.
[0140] S12: The first virtual machine management unit puts the unencrypted data to be stored into a shared memory.
[0141] In this embodiment, the shared memory is a memory space shared by the first virtual machine and other devices.
[0142] In this embodiment, after the first virtual machine encrypts the data to be stored and stores it in the first physical storage disk, it puts the unencrypted data to be stored into the shared memory.
[0143] In this embodiment, reference Figure 4 , Figure 4 is a schematic diagram of the first virtual machine management unit process proposed in an embodiment of the present application, such as Figure 4 As shown, the data in the virtual machine is written to the disk, that is, the virtual machine data is stored in the physical storage disk. After the data is written to the disk and before the completion notification, another process in the first virtual machine obtains the task information of the currently executed task, and then intercepts the corresponding data from the cache according to the task information. The intercepted data is the data to be stored. After the data to be stored is intercepted, the data is copied and finally an event is generated, that is, a data storage event is generated.
[0144] In this embodiment, the specific steps of the first virtual machine management unit putting the unencrypted data to be stored into the shared memory include:
[0145] The first virtual machine management unit puts the unencrypted data to be stored into a shared memory, including:
[0146] S12-1: The first virtual machine management unit determines a start address and an end address of the data to be stored in the first cache of the first site according to the task information of the task.
[0147] In this embodiment, the task information refers to the relevant information of the task currently executed by the first site, including the start time of the task execution, the identifier of the task-related data, and other data. The first cache is a cache in the first site, which is used to temporarily store the relevant data of the computing task executed in the first site. The data stored in the first cache is unencrypted data. The data executed by each task has a corresponding start address and end address in the first cache.
[0148] In this embodiment, the first virtual machine management unit starts another thread when encrypting and storing the data to be stored. In the other thread, the data identifier of the data to be stored is determined based on the relevant information of the currently executed task. The data identifier of general data is identified in the beginning field of the data. Based on the data identifier, the starting address and ending address of the data to be stored in the first cache of the first site are determined.
[0149] S12-2: Acquire the data to be stored in the first cache according to the start address and the end address.
[0150] In this embodiment, after the start address and the end address of the unencrypted data to be stored in the first cache are determined, the data to be stored is obtained at the corresponding position in the first cache.
[0151] S12-3: Copy the data to be stored.
[0152] In this embodiment, after the data to be stored is acquired, a data copy is performed on the data to be stored.
[0153] S12-4: Send the copied data to be stored to the shared memory.
[0154] In this embodiment, the copied data to be stored is sent to the shared memory.
[0155] S13: The continuous data protection unit obtains the data to be stored from the shared memory.
[0156] In this embodiment, the continuous data protection unit (CDP) is a method for continuously capturing or tracking any changes that occur to target data without affecting the operation of primary data, and can restore to any previous time point.
[0157] In this embodiment, after the data is written to the disk, the first virtual machine management unit notifies the continuous data protection unit to obtain the data to be stored. After receiving the data acquisition reminder, the continuous data protection unit obtains the data to be stored from the shared memory according to the address of the data to be stored stored in the shared memory contained therein.
[0158] In this embodiment, the continuous data protection unit obtains the data to be stored from the shared memory, including:
[0159] S13-1: The continuous data protection unit receives a data acquisition prompt sent by the first virtual machine management unit.
[0160] In this embodiment, the data acquisition prompt is information sent by the first virtual machine management unit to the continuous data protection unit, which is used to prompt the continuous data protection unit to obtain corresponding data from the shared memory of the first site.
[0161] In this embodiment, after completing data encryption and storage, the first virtual machine management unit sends a data acquisition prompt to the continuous data protection unit, and the continuous data unit receives the data acquisition prompt sent by the first virtual machine management unit.
[0162] S13-2: The continuous data protection unit determines a storage location of the data to be stored in the shared memory according to the data acquisition prompt.
[0163] In this embodiment, the data acquisition prompt includes the storage location of the data to be stored in the shared memory. The continuous data protection unit determines the storage location of the data to be stored in the shared memory according to the data acquisition prompt.
[0164] S13-3: The continuous data protection unit obtains the data to be stored from the storage location.
[0165] In this embodiment, after determining the storage location of the data to be stored in the shared memory, the continuous data protection unit obtains the corresponding data to be stored from the storage location.
[0166] S14: The continuous data protection unit encrypts the data to be stored using the encryption algorithm.
[0167] In this embodiment, the continuous data protection unit uses the second encryption disk, runs the same encryption algorithm as the encryption algorithm in the first encryption disk, and uses the same key to encrypt the data to be stored.
[0168] In this embodiment, the specific steps of the continuous data protection unit using the encryption algorithm to encrypt the data to be stored include:
[0169] S14-1: The continuous data protection unit sends the data to be stored to the second encryption disk.
[0170] In this embodiment, after acquiring the unencrypted data to be stored, the continuous data protection unit sends the data to be stored to the second encryption disk.
[0171] S14-2: The second encryption disk performs encryption operation on the data to be stored using the encryption algorithm.
[0172] In this embodiment, the second encryption disk performs encryption operation on the data to be stored using the encryption algorithm used by the first encryption disk and the key used by the first encryption disk during encryption to obtain encrypted data to be stored. At this time, the encrypted data to be stored in the first physical storage disk of the first site and the encrypted data to be stored in the continuous data protection unit are encrypted using the same encryption algorithm and key to obtain encrypted data. During the transmission process, the data is always transmitted in an encrypted form.
[0173] S15: When the current network bandwidth meets the data transmission condition, the continuous data protection unit sends the encrypted data to be stored to the second site.
[0174] In this embodiment, it refers to the amount of data that can be transmitted per unit time, and its unit is bps (bits per second), that is, how many bits of information can be transmitted per second. The size of the network bandwidth determines the speed of network data transmission. The larger the bandwidth, the faster the transmission speed. In practical applications, the actual rate of network bandwidth is often affected by many factors, including user computer performance, network equipment quality, resource usage, network peak period, website service capacity, line loss, signal attenuation, etc., so the actual rate is usually lower than the theoretical rate. In addition, network bandwidth is also divided into upstream bandwidth and downstream bandwidth. Upstream bandwidth refers to the data transmission rate when the user's computer sends information to the network, while downstream bandwidth refers to the transmission rate when the network sends information to the user's computer. The size and stability of these two bandwidths have an important impact on the performance of network applications and user experience. In general, network bandwidth is one of the important indicators for measuring network performance, which determines the speed and efficiency of network data transmission. When choosing a network service, users should choose the appropriate bandwidth according to their needs to obtain a better network experience. The data transmission condition is a pre-set value of the network bandwidth that satisfies the data transmission. When the current network bandwidth reaches the value set in the data transmission condition, data transmission can be performed. If the current network bandwidth cannot reach the value set in the data transmission condition, data transmission will not be performed and the data will be stored in the second cache first.
[0175] In this embodiment, after encrypting the data to be stored and obtaining the encrypted data to be stored, the continuous data protection unit detects the current network bandwidth, and sends the encrypted data to be stored to the second site when the current network bandwidth meets the data transmission condition.
[0176] In this embodiment, the specific steps of the continuous data protection unit sending the encrypted data to be stored to the second site include:
[0177] S15-1: The continuous data protection unit obtains the network address of the second site from the server.
[0178] In this embodiment, the server is a background management node that manages all cloud computing tasks, which stores relevant information of all cloud computing tasks and relevant information of each cloud computing node in the cloud computing network. The second site is a backup computing node of the first site. When the first site is operating normally, it only needs to synchronize the data in the first site. When the first site fails and is unavailable, the second site starts to replace the first site to perform the corresponding computing tasks.
[0179] In this embodiment, the continuous data protection unit sends a request to the server to obtain the network address of the second site. After receiving the request, the server sends the network address of the second site to the continuous data protection unit.
[0180] S15-2: The continuous data protection unit sends the encrypted data to be stored to the second site according to the network address.
[0181] In this embodiment, after receiving the network address of the second site sent by the server, the continuous data protection unit sends the encrypted data to be stored to the second site.
[0182] In another embodiment of the present application, the method further includes:
[0183] S41: When the current network bandwidth does not meet the data transmission condition, the continuous data protection unit stores the encrypted data to be stored in a second cache.
[0184] In this embodiment, the second cache is a cache in the continuous data protection unit, and is used to temporarily store the data to be stored sent by the first site.
[0185] In this embodiment, when the current network bandwidth does not meet the data transmission condition, it means that the network transmission speed is too low. At this time, the continuous data protection unit stores the encrypted data to be stored in the second cache.
[0186] In this embodiment, the method further includes:
[0187] S42: Monitor the network bandwidth in real time.
[0188] In this embodiment, after the continuous data protection unit stores the data to be stored in the second cache, it monitors the network bandwidth in real time, and grasps the network bandwidth through real-time monitoring.
[0189] S43: When it is detected that the network bandwidth meets the data transmission condition, the encrypted data to be stored is retrieved from the second cache.
[0190] In this embodiment, when it is monitored that the network bandwidth meets the condition for data transmission, the data can be transmitted to the second site, and the continuous data protection unit takes out the encrypted data to be transmitted from the second cache.
[0191] S44: Send the encrypted data to be stored to the second site.
[0192] In this embodiment, after the encrypted data to be transmitted is taken out from the second cache, the encrypted data to be transmitted is sent to the second site, and the second storage disk in the second site receives the data to be transmitted. At this time, the bandwidth meets the data transmission conditions, and the encrypted data to be stored will be transmitted to the second site at a faster speed.
[0193] In this embodiment, when the current bandwidth cannot meet the data transmission conditions, the encrypted data to be stored is first stored in the second cache, and the bandwidth is continuously monitored after storage. After monitoring that the bandwidth meets the data transmission conditions, the encrypted data to be stored is sent to the second site, thereby ensuring the transmission speed of the data to be stored and improving the stability of the entire system and the security of the data.
[0194] In another embodiment of the present application, the method further includes:
[0195] S51: The second site receives the encrypted data to be stored.
[0196] In this embodiment, the second site receives the encrypted data to be stored.
[0197] S52: The second site stores the encrypted data to be stored in a second physical storage disk.
[0198] In this embodiment, the second physical storage disk is a physical storage device for storing data in the second site.
[0199] In this embodiment, the second site stores the received encrypted data to be stored in the second physical storage disk.
[0200] In another embodiment of the present application, the method further includes:
[0201] S53: The second site loads the encrypted data to be stored through the virtual disk.
[0202] In this embodiment, the virtual disk is a technology that uses one or more virtual disks in the memory. Like virtual memory, the speed of the memory is much faster than the hard disk. By using this, one or more virtual disks in the memory can speed up the data exchange speed of the disk, thereby improving the running speed of the computer. In the cloud computing node, the use of virtual disks can quickly read data.
[0203] In this embodiment, the encrypted data to be stored sent by the continuous data protection unit is generally stored in the second physical disk without being decrypted first. When the stored data needs to be used, the second site loads the encrypted data to be stored through the virtual disk.
[0204] S54: The second site obtains the encrypted key corresponding to the data to be stored from the server.
[0205] In this embodiment, when decrypting the data, the second site obtains the key used when encrypting the encrypted data to be stored from the server.
[0206] S55: The second site decrypts the encrypted data to be stored by using the key to obtain the unencrypted data to be stored.
[0207] In this embodiment, the second site runs the encryption algorithm used in the first site to encrypt data, and then decrypts the encrypted data to be stored in combination with the key used in the first site to encrypt data, thereby obtaining unencrypted data to be stored. In addition, when the first site fails and stops being used, the computing task can be continued based on the data sent by the continuous data protection unit.
[0208] refer to Figure 5 , Figure 5 is a schematic diagram of a dual-site data storage process proposed in an embodiment of the present application, such as Figure 5 As shown, the first virtual machine in the first site (primary site) sends data to the first virtual machine management unit, and sends the key to the continuous data protection unit. The first virtual machine management unit sends the data to be stored to the first encryption disk. The first encryption disk encrypts the data to be stored, and sends the encrypted data to be stored to the first physical storage disk. The continuous data protection unit obtains the unencrypted data to be stored, encrypts the data to be stored through the second encryption disk, determines whether the current bandwidth meets the data transmission conditions, and sends the data to the second physical storage disk of the second site (backup site) if it meets the conditions. If it does not meet the conditions, the data is cached. After receiving the encrypted data to be stored in the second site, the data is loaded through the virtual disk, and then the corresponding encryption algorithm is run by the second virtual machine management unit. The data is decrypted in combination with the obtained key, and the second virtual machine processes the data.
[0209] In the above embodiment of the present application, under the management platform based on qemu-kvm as the virtual machine, the data is encrypted using the luks encrypted disk format to ensure the security of the disk data, and each site uses the same encryption algorithm and key to encrypt and decrypt, ensuring the security of the data during dual-site data storage. By setting a shared memory, the first site and the continuous data protection unit share the same key for data encryption, ensuring the data security during caching or transmission, and ensuring the accuracy of the data, Ghana spent the storage and management of the key. Effectively improve the security of dual-site data storage.
[0210] Based on the same inventive concept, an embodiment of the present application provides a dual-site data storage device. Figure 6 , Figure 6 FIG. 6 is a schematic diagram of a dual-site data storage device 600 proposed in an embodiment of the present application. Figure 6 As shown, the device comprises:
[0211] The encryption storage module 601 is used for the first virtual machine management unit in the first site to encrypt and store the to-be-stored data corresponding to the currently executed task using a preset encryption algorithm;
[0212] A shared memory module 602, used for the first virtual machine management unit to put the unencrypted data to be stored into a shared memory;
[0213] A data acquisition module 603 is used for the continuous data protection unit to acquire the data to be stored from the shared memory;
[0214] A data encryption module 604, configured for the continuous data protection unit to encrypt the data to be stored using the encryption algorithm;
[0215] The data sending module 605 is configured to enable the continuous data protection unit to send the encrypted data to be stored to the second site when the current network bandwidth meets the data transmission condition.
[0216] Optionally, the device further comprises:
[0217] A shared memory establishment module, configured to establish the shared memory in the first site in response to the initiation of the dual-site data storage task;
[0218] The key sending module is used for the first virtual machine to send the key corresponding to the encryption algorithm to the continuous data protection unit, and the encryption algorithm encrypts the data to be stored by using the key.
[0219] Optionally, the encryption storage module includes:
[0220] A first data sending submodule, configured for the first virtual machine management unit to send the data to be stored to the first encryption disk;
[0221] A first encryption operation submodule, configured for performing an encryption operation on the data to be stored by the first encryption disk through the encryption algorithm to obtain the encrypted data to be stored;
[0222] The second data sending submodule is used for the first encryption disk to send the encrypted data to be stored to the first physical storage disk.
[0223] Optionally, the device further comprises:
[0224] A data packet receiving module, used for the first virtual machine management unit to receive the data packet to be stored corresponding to the task from the first virtual machine;
[0225] The data packet merging module is used for, when the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit to merge the data packets to be stored to obtain the data to be stored.
[0226] Optionally, the shared memory module includes:
[0227] An address determination submodule, configured for the first virtual machine management unit to determine a start address and an end address of the data to be stored in the first cache of the first site according to the task information of the task;
[0228] A to-be-stored data acquisition submodule, configured to acquire the to-be-stored data in the first cache according to the start address and the end address;
[0229] A data copy submodule, used for copying the data to be stored;
[0230] The third data sending submodule is used to send the copied data to be stored to the shared memory.
[0231] Optionally, the data acquisition module includes:
[0232] A data acquisition prompt receiving submodule, used for the continuous data protection unit to receive the data acquisition prompt sent by the first virtual machine management unit;
[0233] A storage location determination submodule, used for the continuous data protection unit to determine the storage location of the data to be stored in the shared memory according to the data acquisition prompt;
[0234] The to-be-stored data acquisition submodule is used for the continuous data protection unit to acquire the to-be-stored data from the storage location.
[0235] Optionally, the data encryption module includes:
[0236] A fourth data sending submodule, used for the continuous data protection unit to send the data to be stored to the second encryption disk;
[0237] The second encryption operation submodule is used for the second encryption disk to perform encryption operation on the data to be stored through the encryption algorithm.
[0238] Optionally, the data sending module includes:
[0239] A network address acquisition submodule, used for the continuous data protection unit to acquire the network address of the second site from the server;
[0240] A fifth data sending submodule is used for the continuous data protection unit to send the encrypted data to be stored to the second site according to the network address.
[0241] Optionally, the device further comprises:
[0242] The second cache module is used for the continuous data protection unit to store the encrypted data to be stored in the second cache when the current network bandwidth does not meet the data transmission condition.
[0243] Optionally, the device further comprises:
[0244] A network monitoring module, used for real-time monitoring of the network bandwidth;
[0245] A data fetching module, configured to fetch the encrypted data to be stored from the second cache when it is detected that the network bandwidth meets the data transmission condition;
[0246] The second site data sending module is used to send the encrypted data to be stored to the second site.
[0247] Optionally, the device further comprises:
[0248] A second site data receiving module, used for the second site to receive the encrypted data to be stored;
[0249] The second physical storage disk data receiving module is used for the second site to store the encrypted data to be stored in the second physical storage disk.
[0250] Optionally, the device further comprises:
[0251] A data loading module, used for the second site to load the encrypted data to be stored through a virtual disk;
[0252] A key acquisition module, used for the second site to obtain the key corresponding to the encrypted data to be stored from the server;
[0253] The unencrypted data acquisition module is used for the second site to decrypt the encrypted data to be stored by using the key to obtain the unencrypted data to be stored.
[0254] Based on the same inventive concept, another embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the dual-site data storage method as described in any of the above embodiments of the present application.
[0255] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the dual-site data storage method as described in any of the above embodiments of the present application.
[0256] Based on the same inventive concept, another embodiment of the present application provides an electronic device, Figure 7 It is a schematic diagram of an electronic device 700 proposed in one embodiment of the present application, including a memory 702, a processor 701 and a computer program stored in the memory and executable on the processor, wherein when the processor is executed, the steps in the dual-site data storage method described in any of the above embodiments of the present application are implemented.
[0257] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0258] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0259] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0260] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0261] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0263] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0264] Finally, it should be noted that, in this article, relational terms such as first and second, etc. 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 terminal 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 terminal 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 terminal device including the elements.
[0265] The dual-site data storage method, product, device, equipment and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A dual-site data storage method, characterized in that: The method comprises: The first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the to-be-stored data corresponding to the currently executed task, including: The first virtual machine management unit sends the data to be stored to the first encryption disk; The first encryption disk performs encryption operation on the data to be stored by using the encryption algorithm to obtain the encrypted data to be stored; The first encryption disk sends the encrypted data to be stored to the first physical storage disk; The first virtual machine management unit puts the unencrypted data to be stored into a shared memory; The continuous data protection unit obtains the data to be stored from the shared memory; The continuous data protection unit encrypts the data to be stored using the encryption algorithm, including: The continuous data protection unit sends the data to be stored to the second encryption disk; The second encryption disk performs encryption operation on the data to be stored by using the encryption algorithm, and the encryption algorithms in the first encryption disk and the second encryption disk are the same; When the current network bandwidth meets the data transmission condition, the continuous data protection unit sends the encrypted data to be stored to the second site; The first virtual machine management unit puts the unencrypted data to be stored into a shared memory, including: The first virtual machine management unit starts another process after storing the data to be stored in the physical storage disk; The process determines, according to the task information of the task, a starting address and an ending address of the data to be stored in the first cache of the first site; The process obtains the data to be stored in the first cache according to the start address and the end address; Copying the data to be stored; Generate a storage event, and send the copied data to be stored to the shared memory; The continuous data protection unit obtains the data to be stored from the shared memory, including: The continuous data protection unit receives a data acquisition prompt sent by the first virtual machine management unit; The continuous data protection unit determines a storage location of the data to be stored in the shared memory according to the data acquisition prompt; The continuous data protection unit obtains the data to be stored from the storage location.
2. The dual-site data storage method according to claim 1, characterized in that: Before the first virtual machine management unit in the first site uses a preset encryption algorithm to encrypt and store the data to be stored, the method further includes: In response to the initiation of the dual-site data storage task, establishing the shared memory in the first site; The first virtual machine sends the key corresponding to the encryption algorithm to the continuous data protection unit, and the encryption algorithm encrypts the data to be stored by using the key.
3. The dual-site data storage method according to claim 1, characterized in that: Before the first virtual machine management unit sends the data to be stored to the first encryption disk, the method further includes: The first virtual machine management unit receives a data packet to be stored corresponding to the task from the first virtual machine; When the first virtual machine has sent all the data packets to be stored corresponding to the task, the first virtual machine management unit merges the data packets to be stored to obtain the data to be stored.
4. The dual-site data storage method according to claim 1, characterized in that: The continuous data protection unit sends the encrypted data to be stored to the second site, including: The continuous data protection unit obtains the network address of the second site from the server; The continuous data protection unit sends the encrypted data to be stored to the second site according to the network address.
5. The dual-site data storage method according to claim 1, characterized in that: The method further comprises: When the current network bandwidth does not meet the data transmission condition, the continuous data protection unit stores the encrypted data to be stored in the second cache.
6. The dual-site data storage method according to claim 5, characterized in that: The method further comprises: Performing real-time monitoring on the network bandwidth; When it is monitored that the network bandwidth meets the data transmission condition, fetching the encrypted data to be stored from the second cache; The encrypted data to be stored is sent to the second site.
7. The dual-site data storage method according to claim 1, characterized in that: The method further comprises: The second site receives the encrypted data to be stored; The second site stores the encrypted data to be stored in a second physical storage disk.
8. The dual-site data storage method according to claim 7, characterized in that: The method further comprises: The second site loads the encrypted data to be stored through a virtual disk; The second site obtains the encrypted key corresponding to the data to be stored from the server; The second site decrypts the encrypted data to be stored by using the key to obtain the unencrypted data to be stored.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps in the method according to any one of claims 1 to 8 are implemented.
10. A dual-site data storage device, characterized in that: The device comprises: The encryption storage module is used for the first virtual machine management unit in the first site to encrypt and store the to-be-stored data corresponding to the currently executed task using a preset encryption algorithm, including: The first virtual machine management unit sends the data to be stored to the first encryption disk; The first encryption disk performs encryption operation on the data to be stored by using the encryption algorithm to obtain the encrypted data to be stored; The first encryption disk sends the encrypted data to be stored to the first physical storage disk; A shared memory module, used for the first virtual machine management unit to put the unencrypted data to be stored into the shared memory; A data acquisition module, used for the continuous data protection unit to acquire the data to be stored from the shared memory; A data encryption module, used for the continuous data protection unit to encrypt the data to be stored using the encryption algorithm, comprising: The continuous data protection unit sends the data to be stored to the second encryption disk; The second encryption disk performs encryption operation on the data to be stored by using the encryption algorithm, and the encryption algorithms in the first encryption disk and the second encryption disk are the same; A data sending module, configured to enable the continuous data protection unit to send the encrypted data to be stored to the second site when the current network bandwidth meets the data transmission condition; The first virtual machine management unit puts the unencrypted data to be stored into a shared memory, including: The first virtual machine management unit starts another process after storing the data to be stored in the physical storage disk; The process determines, according to the task information of the task, a starting address and an ending address of the data to be stored in the first cache of the first site; The process obtains the data to be stored in the first cache according to the start address and the end address; Copying the data to be stored; Generate a storage event, and send the copied data to be stored to the shared memory; The continuous data protection unit obtains the data to be stored from the shared memory, including: The continuous data protection unit receives a data acquisition prompt sent by the first virtual machine management unit; The continuous data protection unit determines a storage location of the data to be stored in the shared memory according to the data acquisition prompt; The continuous data protection unit obtains the data to be stored from the storage location.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the dual-site data storage method according to any one of claims 1 to 8 are implemented.
12. 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 computer program, the steps of the dual-site data storage method according to any one of claims 1 to 8 are implemented.
