Data backup method, data backup device and electronic equipment

By adjusting the number of concurrent threads and data splitting according to the running load, combining concurrent processing and local storage, the backup speed problem caused by streaming is solved, and efficient data backup is achieved.

CN119271462AInactive Publication Date: 2025-01-07XIAN TONGXING HENGYAO INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411367944.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Streaming data backup methods lead to serialization of the backup process, affecting the backup speed, and being unable to keep up with the speed of user data writing, especially when processing large amounts of data, which may lead to backup failure.

Method used

Determine the number of concurrent threads based on the running load situation, split the data into multiple sets of data, and use concurrent threads to perform backup pre-processing and concurrent storage separately, simplifying the storage process by mounting cloud storage to the local system.

Benefits of technology

It improves data backup speed, can meet the backup needs of large data volume and high pressure, improves backup efficiency and scalability, and avoids the bottleneck limitation of streaming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271462A_ABST
    Figure CN119271462A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data backup method, a data backup device and electronic equipment. A specific embodiment of the method comprises the following steps: in response to a received data backup task, determining the number of concurrent threads for processing the data backup task according to a running load condition, and splitting backup data indicated by the data backup task into multiple groups of data; a concurrent thread is adopted to carry out backup pre-processing on the multiple sets of data; and concurrently storing the processed multiple groups of data in a target directory to realize data backup of writing backup data into cloud storage, and the target directory is a directory corresponding to the cloud storage mounted in a local system. The implementation mode is related to a data backup technology, parallel processing and storage of backup data can be achieved, and therefore the backup speed is increased. And meanwhile, the cloud storage is mounted to the local system, so that the storage process can be simplified, and data writing is more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of data backup, and in particular to a data backup method, a data backup device, and an electronic device. Background Art

[0002] The database backup system is a key measure to ensure data security and business continuity. In related technologies, the backup process of the database backup system is usually as follows: Figure 1 As shown in the figure. First, the data files are read concurrently; then the backup data is encrypted and compressed through concurrent encryption and compression tools; finally, the encrypted and compressed backup data is uploaded to the cloud storage in a stream. This can achieve a backup process without disk storage, while ensuring the security and reliability of the backup data.

[0003] However, the inventors have found that the streaming backup method usually requires real-time data generation and transmission during the backup process. Therefore, after encryption and compression, each data block must wait for the previous data block to be uploaded before it can continue to be uploaded. This makes the backup process serialized, thereby affecting the overall backup speed.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose a data backup method, a data backup device, an electronic device, a computer-readable medium, and a computer program product to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a data backup method, including: in response to receiving a data backup task, determining the number of concurrent threads for processing the data backup task according to the running load conditions, and splitting the backup data indicated by the data backup task into multiple groups of data; using concurrent threads to perform pre-backup processing on the multiple groups of data respectively; and concurrently storing the processed multiple groups of data to a target directory to implement data backup by writing the backup data to cloud storage, wherein the target directory is the directory corresponding to mounting the cloud storage in the local system.

[0008] In some embodiments, the method further includes: creating a mount directory for the cloud storage on the local system; and mounting the cloud storage to the mount directory using a mount tool according to the attribute information of the cloud storage.

[0009] In some embodiments, based on the attribute information of the cloud storage, a mounting tool is used to mount the cloud storage to a mounting directory, including: obtaining verification information for accessing the cloud storage; based on the verification information, setting the configuration data of the mounting tool for the cloud storage, wherein the configuration data includes the attribute information of the cloud storage; and using the mounting tool to mount the cloud storage to the mounting directory.

[0010] In some embodiments, storing the processed multiple sets of data concurrently in the target directory includes: treating each set of data in the processed multiple sets of data as a file to obtain multiple files, and storing the multiple files concurrently in the target directory.

[0011] In some embodiments, storing the processed multiple sets of data concurrently in the target directory includes: calling a backup tool program in a database where the backup data is located, and storing the processed multiple sets of data concurrently in the target directory.

[0012] In some embodiments, the number of concurrent threads for processing the data backup task is determined based on the operating load, and the backup data indicated by the data backup task is split into multiple groups of data, including: determining an upper limit on the number of concurrent threads based on the configuration data of the device; determining the number of concurrent threads for processing the data backup task based on the upper limit on the number of concurrent threads and the current operating load of the device; and splitting the backup data indicated by the data backup task into multiple groups of data based on the number of concurrent threads, wherein each thread in the concurrent threads processes a group of data.

[0013] In a second aspect, some embodiments of the present disclosure provide a data backup device, including: a concurrent thread determination unit, configured to determine the number of concurrent threads for processing the data backup task in response to receiving the data backup task and according to the running load conditions, and to split the backup data indicated by the data backup task into multiple groups of data; a data processing unit, configured to use concurrent threads to perform pre-backup processing on the multiple groups of data respectively; and a data backup storage unit, configured to concurrently store the processed multiple groups of data to a target directory to realize data backup of writing the backup data to cloud storage, wherein the target directory is the directory corresponding to mounting the cloud storage in the local system.

[0014] In some embodiments, the data backup device further includes a mounting unit configured to create a mounting directory of the cloud storage on the local system; and mount the cloud storage to the mounting directory using a mounting tool according to the attribute information of the cloud storage.

[0015] In some embodiments, the mounting unit is further configured to obtain verification information for accessing cloud storage; according to the verification information, set the configuration data of the mounting tool for the cloud storage, wherein the configuration data includes attribute information of the cloud storage; and use the mounting tool to mount the cloud storage to the mounting directory.

[0016] In some embodiments, the data backup storage unit is further configured to treat each of the processed multiple sets of data as a file to obtain multiple files, and store the multiple files concurrently in the target directory.

[0017] In some embodiments, the data backup storage unit is further configured to call a backup tool program in a database where the backup data is located, and concurrently store the processed multiple groups of data in a target directory.

[0018] In some embodiments, the concurrent thread determination unit is further configured to determine an upper limit on the number of concurrent threads based on configuration data of the device; determine the number of concurrent threads for processing the data backup task based on the upper limit on the number of concurrent threads and the current operating load of the device; and split the backup data indicated by the data backup task into multiple groups of data based on the number of concurrent threads, wherein each thread in the concurrent threads processes a group of data.

[0019] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the data backup method described in any implementation method in the above-mentioned first aspect.

[0020] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the data backup method described in any implementation manner in the above-mentioned first aspect is implemented.

[0021] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, implements the data backup method described in any implementation manner in the first aspect above.

[0022] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the data backup method of some embodiments of the present disclosure can improve the data backup speed and meet the user's usage needs. Specifically, the relevant backup method uploads the encrypted and compressed backup data to the cloud storage in a streaming manner. However, this method has a significant disadvantage, that is, independent files are created using a streaming method, which makes it impossible to process data blocks in parallel. This serial backup method means that no matter how we increase the parallelism of reading, encryption, and compression, the overall backup speed cannot be improved. When processing large amounts of data, the backup may fail because the backup speed cannot keep up with the speed at which user data is written. The root cause of this problem is that the streaming backup method needs to generate and transmit data in real time during the backup process. Therefore, each data block must wait for the previous data block to be uploaded after encryption and compression before it can be uploaded, which makes the backup process serialized.

[0023] Based on this, the data backup method of some embodiments of the present disclosure, when receiving a data backup task, can first determine the number of concurrent threads for processing the data backup task based on its own operating load. And the backup data indicated by the task can be split into multiple groups of data. Afterwards, concurrent threads can be used to perform pre-backup processing on the multiple groups of data respectively. In this way, while meeting its own load capacity, the backup data can be processed in parallel, thereby improving the data backup speed. And for the processed multiple groups of data, parallel storage can also be performed. This can further improve the data backup speed. In addition, by mounting cloud storage to the local system, the storage process can be simplified, making data writing more efficient. This method of the present disclosure can greatly improve the backup speed and can meet the backup needs of large data volumes and high pressure. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0025] Figure 1 are flow charts of some embodiments of data backup methods in related technologies;

[0026] Figure 2 is a flow chart of some embodiments of the data backup method disclosed herein;

[0027] Figure 3A is a flow chart of other embodiments of the data backup method disclosed herein;

[0028] Figure 3B are schematic diagrams of some application scenarios of the data backup method disclosed in the present invention;

[0029] Figure 4 is a schematic diagram of the structure of some embodiments of the data backup device disclosed in the present invention;

[0030] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0032] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0034] In addition, the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0035] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0036] Figure 2 A process 200 of some embodiments of the data backup method according to the present disclosure is shown. The method may include the following steps:

[0037] Step 201, in response to receiving a data backup task, determining the number of concurrent threads for processing the data backup task according to the running load, and splitting the backup data indicated by the data backup task into multiple groups of data.

[0038] In some embodiments, the execution subject (such as a database server) of the data backup method of some embodiments of the present disclosure can be connected to other electronic devices (such as a terminal or the cloud, etc.) through a wired connection or a wireless connection. Here, various data can be stored on the execution subject. The user can send a data backup task to the execution subject through the terminal to back up some data stored on the execution subject. Among them, the method of generating the data backup task is not limited here. As an example, the user can generate a data backup task and send it to the execution subject by selecting, setting, and other operations on the data to be backed up on the page displayed on the terminal display. For another example, the user can configure the execution subject through the terminal so that it regularly performs data backup tasks on the stored data.

[0039] In some embodiments, if the execution subject receives an instruction sent by the terminal indicating a data backup task, or the current time reaches the data backup cycle, it can be determined that the data backup task has been received. In this case, the execution subject can determine the number of concurrent threads for processing the data backup task based on its own operating load, and can split the backup data indicated by the data backup task into multiple groups of data.

[0040] As an example, the execution subject can determine the upper limit of the number of concurrent operations based on the configuration data of its own device. For example, the maximum number of concurrent operations that can be tolerated, i.e., the upper limit of the number of concurrent operations, can be determined based on its own hardware configuration, such as the number of CPUs (central processing units). Alternatively, the upper limit of the number of concurrent operations can also be determined based on the maximum number of concurrent operations in the configuration data set by the user. Next, the number of concurrent threads for processing the data backup task can be determined based on the determined upper limit of the number of concurrent operations and the current operating load of the device. For example, the number of concurrent threads can be equal to the difference between the upper limit of the number of concurrent operations and the running threads. Or, in order to avoid excessive pressure on the device, the number of concurrent threads can be less than the above difference. Afterwards, the execution subject can split the backup data indicated by the data backup task into multiple groups of data based on the number of concurrent threads. Here, the number of groups of data can be equal to the number of concurrent threads. In this way, each thread in the concurrent thread can process one of the groups of data. Alternatively, the number of groups of data can also be an integer multiple of the number of concurrent threads.

[0041] Optionally, the execution entity can also determine the number of concurrent threads for processing the data backup task through a load balancer according to the current operating load. In addition, when the amount of backup data is large, the execution entity can also group the backup data according to the data upper limit set by the user. The amount of data in each group of data is not greater than the data upper limit. This can avoid a large amount of data processed at a time, which affects the processing speed, or a large amount of data that needs to be reprocessed due to abnormalities in the middle, which affects the overall processing efficiency. Afterwards, each group of data in the multiple groups of data can be allocated to each thread in the concurrent thread for processing in turn according to the number of concurrent threads.

[0042] Step 202: Use concurrent threads to perform pre-backup processing on multiple groups of data respectively.

[0043] In some embodiments, after determining the concurrent threads for processing the data backup task and splitting to obtain multiple groups of data, the execution subject can determine the correspondence between each thread and each group of data, that is, determine the data group that each thread is responsible for processing, so as to use concurrent threads to perform pre-backup processing on the multiple groups of data respectively.

[0044] It should be noted that the above backup pre-processing can be set according to actual needs. For example, Figure 3B As shown in the figure, multiple concurrent threads are used to read data simultaneously to increase the reading speed. Each thread is responsible for reading a part of the data in the database. The read data can then be encrypted and compressed concurrently. As can be seen from the figure, each thread performs encryption processing independently. This can improve the efficiency of encryption and reduce the impact of the encryption process on the overall backup speed. And each thread performs compression operations independently. The simultaneous compression operations can make full use of system resources and increase the compression speed.

[0045] Step 203, the processed multiple sets of data are concurrently stored in the target directory to implement data backup by writing the backup data into the cloud storage.

[0046] In some embodiments, the execution subject may concurrently store the multiple sets of data processed in step 202 to a target directory. The target directory is usually a directory corresponding to mounting the cloud storage in the local system. In this way, by storing the data in the target directory, data backup of writing the backup data to the cloud storage can be achieved, such as Figure 3B shown.

[0047] Here, the concurrent storage method is also not limited. As an example, the execution subject can store data from different groups in parallel in the target directory. And the data of the same group can be stored in the target directory in sequence. That is, different groups of data are stored in parallel, and the same group of data are stored serially.

[0048] Optionally, the execution subject can treat each of the processed multiple sets of data as a file, thereby obtaining multiple files. Then, the multiple files can be stored concurrently in the target directory. That is, the process of concurrent backup of multiple files can be adopted. In this way, parallel upload can also be achieved when uploading the backup data to the cloud storage. Not only can the local system resources be fully utilized, but also the backup speed can be improved.

[0049] It should be noted that the traditional backup method uses streaming to create independent files, and its disadvantage is that it cannot process data in parallel. We want to improve the backup speed of this method, but we have reached the streaming bottleneck and can no longer improve the overall backup speed by increasing the parallelism of reading, encryption, and compression. However, in order to meet user data security needs, it is usually necessary to perform at least one complete full backup every day. However, as the user business volume grows, the data capacity of the database will continue to increase, and the pressure on the database will also increase accordingly. Since the backup speed of the traditional method can no longer be improved, when processing large amounts of data, the backup speed is not as fast as the write speed, resulting in the backup not being completed at the user-specified time and failing to meet user needs.

[0050] Based on this, the data backup method of some embodiments of the present disclosure, when receiving a data backup task, can first determine the number of concurrent threads for processing the data backup task based on its own operating load. And the backup data indicated by the task can be split into multiple groups of data. Afterwards, concurrent threads can be used to perform pre-backup processing on the multiple groups of data respectively. In this way, while meeting its own load capacity, the backup data can be processed in parallel, thereby improving the data backup speed. And for the processed multiple groups of data, parallel storage can also be performed. This can further improve the data backup speed. In addition, by mounting cloud storage to the local system, the storage process can be simplified, making data writing more efficient. This method of the present disclosure can greatly improve the backup speed and can meet the backup needs of large data volumes and high pressure.

[0051] It is understandable that before performing data backup, it is usually necessary to mount the cloud storage used to store the backup data on the local system as a local disk, such as Figure 3A As shown. That is to say, by mounting the cloud storage to the local system, it can be used as a local directory to facilitate file reading and writing operations. Here, the execution subject can first create a mount directory for the cloud storage on the local system, that is, a mount point. Then, the execution subject can use a mount tool to mount the cloud storage to the mount directory based on the attribute information of the cloud storage. Among them, the mount tool can be selected according to actual needs, such as s3fs (Simple Storage Service File System) or rclone (open source command line program).

[0052] Specifically, first, you can obtain the verification information for accessing the cloud storage. The verification information here can be identity authentication credentials, such as an access key and a secret key. Then, based on the verification information, you can set the configuration data of the cloud storage for the mount tool. Among them, the configuration data may include attribute information of the cloud storage. The attribute information may include, but is not limited to: the name or identifier of the cloud storage, the address of the cloud storage (such as URL, uniform resource locator, uniform resource location system). Then, use the mount tool to mount the cloud storage to the mount directory.

[0053] As an example, you can create a .passwd-s3fs file locally and enter the cloud storage authentication information to prepare the .passwd-s3fs configuration file. After that, you can use the s3fs command to mount the cloud storage to the above local mount directory. For another example, you can install rclone on the execution subject and run rclone config to add remote cloud storage configuration according to the prompts. After that, you can use the rclone mount command to achieve local mounting of cloud storage.

[0054] It should be noted that the operating program instructions of different databases are often different. Therefore, when storing the above multiple sets of data in the target directory, the execution subject can first determine the database where the backup data is located. Then, according to the database where the backup data is located, the corresponding backup tool program in the database can be called, so that the processed multiple sets of data can be concurrently stored in the target directory.

[0055] As an example, for a relational database (such as MySQL), you can use the xtrabackup command to back up the database and store the backup data in the target directory. For an object-relational database (such as PostgreSQL), you can use the pg_dump command to back up the data. For another example, for SQL Server (a relational database system), you can use SQLServer Management Studio or the backup tool that comes with SQL Server to back up the data.

[0056] In addition, through actual test comparison, it can be found that the improved data backup method of this application can shorten the backup time by 33 minutes and increase the backup speed by 131%.

[0057] plan Data volume Backup duration Backup speed Traditional backup methods 150G 58m 44M / s Improved method scheme 150G 25m 102M / s

[0058] The data backup method of the embodiment of the present disclosure can achieve the following technical effects:

[0059] Parallel backup: With parallel backup, multiple backup tasks can be performed simultaneously, making full use of system resources and improving backup efficiency. Each backup task performs read, encrypt and compress operations independently, and no longer depends on the completion of the previous task.

[0060] Multi-file storage: Backup data is divided into multiple files for storage instead of using only a single file. This allows multiple files to be written at the same time, improving storage speed and concurrent processing capabilities.

[0061] Eliminate streaming bottlenecks: Through true parallel backup and multi-file storage, the bottleneck limitation in the original streaming backup is avoided. It is no longer necessary to wait for the previous file backup to be completed before backing up the next file, which greatly improves the backup speed.

[0062] Improve scalability: Parallel backup and multi-file storage solutions have good scalability. You can increase parallel backup tasks and expand the storage system as needed to adapt to growing backup needs and data volumes.

[0063] From the above description, it can be seen that the reading, encryption, compression and storage operations in the backup process of the disclosed method can be performed in parallel. Data can be stored in multiple files in a dispersed manner, giving full play to the concurrent processing capability of the system and improving the backup speed and efficiency. At the same time, the solution also has good scalability and can adapt to the growth of future backup needs.

[0064] Further references Figure 4 , as a response to the above Figures 2 to 3B The present disclosure provides some embodiments of a data backup device. Figures 2 to 3B The device can be specifically applied to various electronic devices.

[0065] like Figure 4 As shown, the data backup device 400 of some embodiments may include: a concurrent thread determination unit 401, configured to determine the number of concurrent threads for processing the data backup task in response to receiving the data backup task and according to the running load, and to split the backup data indicated by the data backup task into multiple groups of data; a data processing unit 402, configured to use concurrent threads to perform pre-backup processing on the multiple groups of data respectively; and a data backup storage unit 403, configured to concurrently store the processed multiple groups of data to a target directory to realize data backup of writing the backup data to the cloud storage, wherein the target directory is the directory corresponding to mounting the cloud storage in the local system.

[0066] In some embodiments, the data backup device 400 may also include a mounting unit (not shown in the figure), which is configured to create a mounting directory for cloud storage on the local system; and mount the cloud storage to the mounting directory using a mounting tool according to the attribute information of the cloud storage.

[0067] In some embodiments, the mounting unit can be further configured to obtain verification information for accessing cloud storage; according to the verification information, set the configuration data of the mounting tool for the cloud storage, wherein the configuration data includes attribute information of the cloud storage; and use the mounting tool to mount the cloud storage to the mounting directory.

[0068] In some embodiments, the data backup storage unit 403 may be further configured to treat each of the processed multiple sets of data as a file to obtain multiple files, and store the multiple files concurrently in the target directory.

[0069] In some embodiments, the data backup storage unit 403 may be further configured to call a backup tool program in a database where the backup data is located, and concurrently store the processed multiple sets of data in a target directory.

[0070] In some embodiments, the concurrent thread determination unit 401 can be further configured to determine an upper limit on the number of concurrent threads based on the configuration data of the device; determine the number of concurrent threads for processing data backup tasks based on the upper limit on the number of concurrent threads and the current operating load of the device; and split the backup data indicated by the data backup task into multiple groups of data based on the number of concurrent threads, wherein each thread in the concurrent threads processes a group of data.

[0071] It is understandable that the units recorded in the data backup device 400 are similar to those in the reference Figures 2 to 3B Therefore, the operations, features and beneficial effects described above for the method are also applicable to the data backup device 400 and the units included therein, and will not be described in detail here.

[0072] Reference below Figure 5 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0073] like Figure 5As shown, the electronic device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0074] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a speaker, a vibrator, etc.; storage devices 508 including, for example, a disk, a hard disk, a memory card, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0075] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0076] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0077] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0078] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving a data backup task, determines the number of concurrent threads for processing the data backup task according to the running load, and splits the backup data indicated by the data backup task into multiple groups of data; uses concurrent threads to perform pre-backup processing on the multiple groups of data respectively; and concurrently stores the processed multiple groups of data to the target directory to implement data backup of writing the backup data to the cloud storage, wherein the target directory is the directory corresponding to mounting the cloud storage in the local system.

[0079] In addition, computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0080] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0081] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be provided in a processor, for example, may be described as: a processor including a concurrent thread determination unit, a data processing unit, and a data backup storage unit. The names of these units do not, in certain cases, constitute limitations on the units themselves, for example, the concurrent thread determination unit may also be described as "a unit that determines the number of concurrent threads for processing data backup tasks according to the operating load conditions".

[0082] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0083] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned data backup methods when executed by a processor.

[0084] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A data backup method, comprising: In response to receiving a data backup task, determining the number of concurrent threads for processing the data backup task according to a running load condition, and splitting the backup data indicated by the data backup task into multiple groups of data; Using the concurrent threads to perform pre-backup processing on the multiple groups of data respectively; as well as The processed multiple groups of data are concurrently stored in a target directory to implement data backup of writing the backup data into the cloud storage, wherein the target directory is a directory corresponding to mounting the cloud storage in the local system.

2. The data backup method according to claim 1, wherein: The method further comprises: Create a mount directory for the cloud storage on the local system; According to the attribute information of the cloud storage, a mounting tool is used to mount the cloud storage to the mounting directory.

3. The data backup method according to claim 2, wherein: The step of mounting the cloud storage to the mounting directory using a mounting tool according to the attribute information of the cloud storage includes: Obtaining authentication information for accessing the cloud storage; According to the verification information, setting configuration data of the mounting tool for the cloud storage, wherein the configuration data includes attribute information of the cloud storage; The cloud storage is mounted to the mount directory using the mount tool.

4. The data backup method according to claim 1, wherein: The step of concurrently storing the processed multiple sets of data in a target directory includes: Each group of the processed data is taken as a file to obtain multiple files, and the multiple files are concurrently stored in the target directory.

5. The data backup method according to claim 1, wherein: The step of concurrently storing the processed multiple sets of data in a target directory includes: According to the database where the backup data is located, the backup tool program in the database is called to concurrently store the processed multiple groups of data in the target directory.

6. The data backup method according to any one of claims 1 to 5, wherein: The step of determining the number of concurrent threads for processing the data backup task according to the running load condition, and splitting the backup data indicated by the data backup task into multiple groups of data, includes: Determine the upper limit of concurrent number based on the configuration data of the device; Determine the number of concurrent threads for processing the data backup task according to the upper limit of the concurrent number and the current operating load of the device; and The backup data indicated by the data backup task is divided into a plurality of groups of data according to the number of the concurrent threads, wherein each of the concurrent threads processes a group of data.

7. A data backup device, comprising: a concurrent thread determination unit configured to, in response to receiving a data backup task, split the backup data indicated by the data backup task into multiple groups of data according to configuration data, and determine concurrent threads for processing the multiple groups of data; A data processing unit is configured to respectively perform pre-backup processing on the multiple groups of data using the concurrent threads; as well as The data backup storage unit is configured to concurrently store the processed multiple sets of data into a target directory to implement data backup by writing the backup data into the cloud storage, wherein the target directory is a directory corresponding to mounting the cloud storage in a local system.

8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the data backup method as described in any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the data backup method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data backup method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A method and a device for backing up data

    CN109885431A

  • Business processing method, device and equipment and storage medium

    CN111371891A

  • Cloud platform remote data backup method, cloud platform remote data recovery method and electronic equipment

    CN116432199A