Data backup method of cloud server, cloud server and electronic device
By calculating the historical data weights of PCs and cloud servers, the backup order is automatically adjusted, solving the problem of requiring a large amount of manpower for cloud server data backup and achieving a highly efficient automated backup process.
Patent Information
- Application Number
- CN202311108156.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-08-30
AI Technical Summary
Cloud servers require significant manpower for optimization during data backup, resulting in high resource consumption.
By acquiring historical data and weights from PCs and cloud servers, the utilization rate of each PC and the load rate of the cloud server are calculated, and the backup order is automatically adjusted according to priority to achieve dynamic balanced backup.
It automatically optimizes the data backup process, reduces manpower, improves backup efficiency, and reduces network and load pressure on cloud servers.
Smart Images

Figure CN117112303B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of servers, and more specifically, to a data backup method for a cloud server, a cloud server, a computer-readable storage medium, and an electronic device. Background Technology
[0002] With the increasing localization of personal computers (PCs) in China, more and more domestically produced PCs are appearing on the market. These domestically produced PCs are generally equipped with domestically developed operating systems, such as Kylin and UOS. Due to data installation considerations, data backup is becoming increasingly urgent and important for domestically produced PC users. Cloud data backup is also a commonly used backup method in the industry. Generally, PCs connected to the network can back up their system data to a cloud server. When a PC malfunctions or experiences an error, the previously backed-up data can be restored from the cloud server. Cloud servers often passively receive backup data uploaded from PCs. When a large amount of PC backup data is uploaded to the cloud, it places high demands on the cloud server's network, system performance, and storage performance. Therefore, cloud server maintenance personnel often need to invest significant resources in upgrading network bandwidth and improving the number and performance of servers, often requiring substantial human and material resources.
[0003] Therefore, a method is needed to address the significant manpower required for data backup on cloud servers. Summary of the Invention
[0004] This application provides a data backup method for a cloud server, a cloud server, a computer-readable storage medium, and an electronic device, to at least solve the problem of excessive manpower caused by the need for manual optimization of the data backup process in related technologies.
[0005] According to one embodiment of this application, a data backup method for a cloud server is provided, comprising: the cloud server acquiring first historical data and a first weight for each of the first historical data on each PC, and acquiring second historical data and a second weight for each of the second historical data, wherein the first historical data includes at least the serial number of the PC, the network speed of the PC, the CPU utilization of the PC, and the memory utilization of the PC; the second historical data is historical data of the cloud server and includes at least the serial number of the cloud server, the network speed of the cloud server, the CPU utilization of the cloud server, the memory utilization of the cloud server, and the disk read / write speed of the cloud server; the cloud server... The utilization rate of each PC is calculated based on the first historical data and the first weight, and the load rate of the cloud server is calculated based on the second historical data and the second weight. The cloud server obtains the third weight and the fourth weight of each PC, calculates the product of the utilization rate of each PC and the third weight to obtain the first product, and calculates the product of the load rate of the cloud server and the fourth weight to obtain the second product. The cloud server calculates the sum of each first product and the second product to obtain the priority of each PC, and backs up the data of each PC in descending order of priority, wherein the priority is the order in which the PC data is backed up.
[0006] In an exemplary embodiment, the cloud server calculates the utilization rate of each PC based on the first historical data and the first weight, including: calculating the sum of the products of each first historical data and the first weight corresponding to each first historical data to obtain the usage time of the PC; dividing the usage time of the PC by a predetermined duration to obtain the utilization rate of the PC; and calculating the load rate of the cloud server based on the second historical data and the second weight, including: calculating the sum of the products of each second historical data and the second weight corresponding to each second historical data to obtain the load rate of the cloud server.
[0007] In an exemplary embodiment, backing up the data of each PC in descending order of priority includes: a first backup step, in which the cloud server stores the identifier of each PC in a predetermined order to a backup queue, and simultaneously backs up the data of a predetermined number of PCs in descending order of priority in the backup queue, wherein the predetermined order is an order of increasing or decreasing priority, the identifier is a unique code representing the PC, and the predetermined number is less than the length of the backup queue; a calculation step, in which the cloud server recalculates the priority of the remaining PCs in the backup queue after the data backup of the predetermined number of PCs is completed; and a second backup step, in which the cloud server stores the recalculated priority of the PCs in the predetermined order to the backup queue, and simultaneously backs up the data of the predetermined number of PCs in descending order of priority in the backup queue.
[0008] In one exemplary embodiment, simultaneously backing up data from a predetermined number of PCs in descending order of priority in the backup queue includes: the cloud server generating a backup signal and sending the backup signal to the predetermined number of PCs in descending order of priority, causing the PCs to perform data backup, obtain backup data, and send the backup data to the cloud server; the cloud server receiving the backup data sent by the PCs.
[0009] In an exemplary embodiment, after the cloud server receives the backup data sent by the PC, the method further includes: the cloud server recording the backup result of the backup data; if the backup result indicates that the backup data backup was successful, deleting the identifier code of the PC from the backup queue; if the backup result indicates that the backup data backup failed, deleting the identifier code of the PC from the backup queue, re-entering the identifier code of the PC into the dataset to be backed up, recalculating the priority of the PC, and repeating the first backup step, the calculation step, and the second backup step until the backup result indicates that the data backup of the PC was successful.
[0010] In an exemplary embodiment, after acquiring the first historical data of each PC and the second historical data of the cloud server, the method further includes: the cloud server generating a PC database based on the first historical data and the name of each first historical data to store the first historical data; and the cloud server generating a cloud server database based on the second historical data and the name of each second historical data to store the second historical data.
[0011] In one exemplary embodiment, the method further includes: the cloud server obtaining log files from multiple PCs, and obtaining the backup status of the PCs through the log files, wherein the backup status includes at least pending backup, backup in progress, backup successful, and backup failed; the cloud server outputting the backup status to a user interface, so that the user interface displays the backup status of multiple PCs.
[0012] According to another embodiment of this application, a cloud server is provided, the cloud server being configured to: acquire first historical data and a first weight for each PC, acquire second historical data and a second weight for each of the second historical data, wherein the first historical data includes at least the serial number of the PC, the network speed of the PC, the CPU utilization of the PC, and the memory utilization of the PC, and the second historical data is historical data of the cloud server and includes at least the serial number of the cloud server, the network speed of the cloud server, the CPU utilization of the cloud server, the memory utilization of the cloud server, and the weight of the first historical data. The disk read / write speed of the terminal server is calculated; the utilization rate of each PC is calculated based on the first historical data and the first weight, and the load rate of the cloud server is calculated based on the second historical data and the second weight; the third weight of each PC and the fourth weight of the cloud server are obtained, the product of the utilization rate of each PC and the third weight is calculated to obtain the first product, and the product of the load rate of the cloud server and the fourth weight is calculated to obtain the second product; the sum of each first product and the second product is calculated to obtain the priority of each PC, and the data of each PC is backed up in descending order of priority.
[0013] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0014] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0015] This application describes a cloud server that acquires first historical data from PCs and a first weight for each piece of the first historical data, and calculates the utilization rate of each PC based on the first historical data and the first weight. It then acquires second historical data and a second weight for each piece of the second historical data, and calculates the load rate of the cloud server based on the second historical data and the second weight. Furthermore, it acquires a third weight and a fourth weight, and calculates the priority of each PC. The cloud server then backs up the data from multiple PCs according to the priority. Compared to existing technologies where cloud server data backup requires maintenance personnel and is labor-intensive, this application automatically calculates the priority based on the PC utilization rate (first historical data) and the cloud server's transmission performance (second historical data), and selects the backup order of the PCs according to the priority. This automatically optimizes the backup process, eliminating the need for extensive manual maintenance. Therefore, it solves the problem of labor-intensive optimization of the data backup process in existing technologies, achieving automatic optimization and maintenance of the cloud data backup process. Attached Figure Description
[0016] Figure 1 This is a hardware structure block diagram of a mobile terminal for a cloud server data backup method according to an embodiment of this application;
[0017] Figure 2 This is a flowchart of a cloud server data backup method according to an embodiment of this application;
[0018] Figure 3 This is a structural block diagram of a specific cloud server data backup device according to an embodiment of this application;
[0019] Figure 4 This is a structural block diagram of a cloud server according to an embodiment of this application.
[0020] The above figures include the following reference numerals:
[0021] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0022] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0024] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a cloud server data backup method according to an embodiment of this application. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0025] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the cloud server data backup method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0027] For ease of description, the following explanations are provided for the terms or nouns used in this application:
[0028] Ping latency: Used to determine whether a local host can successfully exchange (send and receive) data packets with another host. Based on the returned information, it can be inferred whether the TCP / IP parameters are set correctly, whether the operation is normal, and whether the network is smooth.
[0029] This embodiment provides a data backup method for a cloud server running on the aforementioned mobile terminal. Figure 2 This is a flowchart illustrating data backup on a cloud server according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0030] In step S202, the cloud server obtains first historical data and a first weight for each PC, and obtains second historical data and a second weight for each of the second historical data. The first historical data includes at least the PC's serial number, network speed, CPU utilization, and memory utilization. The second historical data is the cloud server's historical data and includes at least the cloud server's serial number, network speed, CPU utilization, memory utilization, and disk read / write speed.
[0031] Specifically, the cloud server collects its own load performance data and PC usage data to create a model to optimize the batch PC backup data upload process. Therefore, data collection is the first step to analyze user behavior and rationally plan PC backup data uploads. Collecting usage data for each PC device over a period of time serves as raw data accumulation; the longer the collection period, the more accurate the results of subsequent model analysis based on the data. Minute-level collection can be used to summarize hourly idle rates. For example, statistically analyzing PC usage every five minutes within an hour, and then taking the average value as the current hourly PC usage. The first historical data includes the PC's serial number, network speed, CPU usage, memory usage, PC ID (primary key), device model, time sequence number, network latency, and system load. A weight is assigned to each of these first historical data points, with each corresponding to a weight. Taking a five-minute data collection interval within an hour as an example, the number of time sequences would be 60 / 5 = 12. Data also needs to be collected from the cloud server. The usage data, or second historical data, includes the cloud server's serial number, network speed, CPU utilization, memory utilization, and disk read / write speed. It also includes the ID (primary key), network latency, system load, system I / O (input / output), CPU utilization, and ping latency between the cloud server and multiple PCs. This data is used to analyze the optimal usage of the cloud server and to obtain the weight of each piece of second historical data. Each piece of second historical data corresponds to a second weight, and the values of each first and second weight can be set and adjusted according to the actual situation.
[0032] Step S204: The cloud server calculates the utilization rate of each PC based on the first historical data and the first weight, and calculates the load rate of the cloud server based on the second historical data and the second weight.
[0033] Specifically, after obtaining the data from the cloud server, the PC, and the weight of each data point, the PC utilization rate can be calculated using the first historical data and the first weight corresponding to each first historical data point. The PC utilization rate reflects the usage and idle rate of the PC, allowing data backup to be performed when the PC is idle, thus avoiding impacting other application processes on the PC. The cloud server load rate can be calculated based on the second historical data and the second weight corresponding to each second historical data point. The load rate reflects the load performance of the cloud server, allowing backup data from the PC to be uploaded to the cloud server when the load performance of the cloud server is optimal.
[0034] Step S206: The cloud server obtains the third weight of each PC and the fourth weight of the cloud server, calculates the product of the utilization rate of each PC and the third weight to obtain the first product, and calculates the product of the load rate of the cloud server and the fourth weight to obtain the second product.
[0035] Specifically, considering both the load rate of the cloud server and the utilization rate of each PC, the priority (order) of data backup for multiple PCs is calculated. Since the cloud server and each PC are two different data endpoints, weights need to be assigned to the cloud server and PCs when calculating the final priority. These weights are designated as a third weight for each PC and a fourth weight for the cloud server. Generally, a default setting of 50% for each is acceptable, and the weight ratios can be dynamically adjusted based on actual performance. The third weight is represented by W. m This indicates that the fourth weight is represented by W. n It indicates that it is necessary to ensure W m +W n =1. The usage rate of the PC is represented by U(i), and the load rate of the cloud server is represented by S(i). The basic rule is: the higher the usage rate of the PC U(i), the lower the priority; the higher the load rate of the cloud server S(i), the higher the priority.
[0036] In step S208, the cloud server calculates the sum of each of the first and second products to obtain the priority of each PC, and backs up the data of each PC in descending order of priority, wherein the priority is the order in which the PC data is backed up.
[0037] Specifically, the sum of the two products mentioned above is calculated to obtain the final priority. Each PC corresponds to a priority value. The higher the priority value, the higher the priority for backup. Therefore, the data of each PC is backed up in descending order of priority. This achieves dynamic adjustment of the backup data uploaded to the cloud server, realizes dynamic balanced backup, effectively improves user backup satisfaction, and minimizes the network and load pressure on the cloud server, achieving effective utilization of the cloud server and reducing operational pressure.
[0038] Through the above steps, the cloud server obtains first historical data from the PCs and a first weight for each of the first historical data points. Based on the first historical data and the first weight, it calculates the utilization rate of each PC. Next, it obtains second historical data and a second weight for each of the second historical data points. Based on the second historical data and the second weight, it calculates the load rate of the cloud server. Further, it obtains a third weight and a fourth weight, and calculates the priority of each PC. The cloud server then backs up the data from multiple PCs according to the priority. Compared to existing technologies where cloud server data backup requires maintenance personnel and is labor-intensive, this application automatically calculates the priority based on the PC's utilization rate (first historical data) and the cloud server's transmission performance (second historical data), and selects the backup order of the PCs according to the priority. This automatically optimizes the backup process, eliminating the need for extensive manual maintenance. Therefore, it solves the problem of labor-intensive optimization of the data backup process in existing technologies, achieving the effect of automatically optimizing and maintaining the cloud data backup process.
[0039] The entities that perform the above steps can be servers, terminals, etc., but are not limited to these.
[0040] In some optional embodiments, step S204 can be implemented through the following steps: calculating the sum of the products of each of the first historical data points and the corresponding first weight to obtain the PC usage time; dividing the PC usage time by a predetermined duration to obtain the PC usage rate; and calculating the cloud server load rate based on the second historical data and the second weight, including: calculating the sum of the products of each of the second historical data points and the corresponding second weight to obtain the cloud server load rate. This method multiplies the first historical data point by its corresponding first weight, multiplies the second historical data point by its corresponding second weight, and adds the resulting products together. This allows for accurate calculation of the PC usage rate and the cloud device load rate based on actual application conditions.
[0041] Specifically, the usage rate of the PC terminal can be expressed using the formula... Calculate, where W a W b W c W d W e W f These represent the proportion of network latency, network speed, system load, CPU utilization, memory utilization, and system I / O in the calculation on the PC, respectively, i.e., the first weight. N ns The recorded numerical value representing network speed, N nd The recorded value N represents the network latency.sl N represents the recorded value of system load. cu N represents the recorded value of CPU utilization. mu N represents the recorded numerical value indicating memory usage. si This represents the recorded system I / O value, where t is the predetermined duration. If the usage rate is calculated per hour, then t is 60 minutes. The load rate of a cloud server can be expressed by the formula S(i) = W. sa *N ys +W sb *N yd +W sc *N yl +W sd *N yu +W se *N ym +W sf *N yg +W sg *N yi +W sh *N yd Calculate, where W sa W sb W sc W sd W se W sf W sg W sh The second weight represents the proportion of network latency, network speed, system load, system I / O, CPU utilization, memory utilization, disk I / O, and ping latency with the PC in the calculation. ys The recorded value representing network latency, N yd N represents the recorded network speed of the cloud server. yl N represents the recorded value of system load. yu N represents the recorded value of system I / O. ym N represents the recorded value of CPU utilization. yg N represents the recorded numerical value indicating memory usage. yi N represents the recorded values of disk I / O on the cloud server. yd This represents the recorded ping latency between the cloud server and the PC. System I / O refers to the system's read / write speed, and disk I / O refers to the disk's read / write speed.
[0042] To achieve batch backup and dynamically back up data based on the actual situation of the PCs and cloud servers, in some optional embodiments, step S208 can be implemented through the following steps: Step S2081: First backup step, the cloud server stores the identifier of each PC in a predetermined order to a backup queue, and simultaneously backs up the data of a predetermined number of PCs in descending order of priority in the backup queue, wherein the predetermined order is an increasing or decreasing order of priority, the identifier is a unique code representing the PC, and the predetermined number is less than the length of the backup queue; Step S2082: Calculation step, after the backup of the predetermined number of PCs is completed, the cloud server recalculates the priority of the remaining PCs in the backup queue; Step S2083: Second backup step, the cloud server stores the recalculated priority of the PCs in the predetermined order to the backup queue, and simultaneously backs up the data of the predetermined number of PCs in descending order of priority in the backup queue. This method simultaneously backs up a predetermined number of PCs' data in descending order of priority, enabling multi-threaded batch backup. After the predetermined number of PCs' data backups are completed, the priority of the remaining PCs is recalculated, and the next round of backups of the predetermined number of PCs' data is performed in priority order. This allows for real-time priority calculation based on the actual situation of the PCs and cloud servers, dynamically adjusting the backup order to achieve a dynamically balanced backup solution. This improves user backup satisfaction while ensuring effective utilization of cloud servers and reducing operational pressure.
[0043] Specifically, after calculating the priority of multiple PCs to be backed up, they are sorted according to their priority. The top n PCs are then placed in the backup queue. The backup queue is arranged in a predetermined order, either from largest to smallest or smallest to largest, where m is the queue size. Initially, it can be preset to 500, but can be dynamically adjusted based on server configuration and performance. Higher server configuration and performance allow for a larger value for m. Backup files from m PCs are uploaded in batches, each batch. The number of PCs to be backed up in the backup queue is dynamically added or removed based on the priority calculation results. Each time a PC completes its backup, the priority of the PCs in the current backup queue is recalculated, and the backup queue is dynamically updated, i.e., re-sorted according to the predetermined priority order. If a PC device 'a' added to the backup queue at a certain time is excluded from the top n priority levels in the next calculation and has not yet started uploading, it can be removed from the dynamic queue and dynamically added back in according to subsequent calculations.
[0044] In some optional embodiments, step S2081 can be implemented through the following steps: the cloud server generates a backup signal and sends the backup signal to a predetermined number of PCs in descending order of priority, so that the PCs perform data backup, obtain backup data, and send the backup data to the cloud server; the cloud server receives the backup data sent by the PCs. This method, after determining the priority order, involves the cloud server generating a backup signal and sending it to the PCs, the PCs backing up their data, and uploading the incremental data obtained after backup to the cloud server. This allows PCs to perform batch backups based on the backup signal, avoiding backup errors.
[0045] Specifically, the cloud server sends backup signals to the PCs to be backed up according to priority. After the PCs receive the backup signals, they start their own incremental backup process and upload the backup data to the cloud server. The cloud server receives the backup data sent by the PCs and completes the backup of the PC data.
[0046] To update the backup queue in a timely manner and achieve dynamic backup process, in some optional embodiments, after the cloud server receives the backup data sent by the PC, the method further includes the following steps: the cloud server records the backup result of the backup data; if the backup result indicates that the backup data backup was successful, the identifier code of the PC is deleted from the backup queue; if the backup result indicates that the backup data backup failed, the identifier code of the PC is deleted from the backup queue, and the identifier code of the PC is put back into the dataset to be backed up, the priority of the PC is recalculated, and the first backup step, the calculation step, and the second backup step are repeated until the backup result indicates that the data backup of the PC was successful. This method deletes the identifier code of the PC from the backup queue after backup, and recalculates the priority of PCs that fail to back up and performs data backup, to avoid omissions.
[0047] Specifically, the cloud server records the upload results of backup data in the backup queue in real time. The identifier of the PC that successfully uploads backup data is removed from the backup queue. If backup data fails, or if the backup data upload is interrupted or abnormal, the device is removed from the backup queue and added to the dataset to be backed up. The first backup step, the calculation step, and the second backup step described above are repeated until all the data on the PCs to be backed up has been backed up.
[0048] In some optional embodiments, after acquiring the first historical data for each PC and the second historical data for each cloud server, the method further includes the following steps: the cloud server generates a PC-side database based on the first historical data and the name of each first historical data piece to store the first historical data; the cloud server generates a cloud server database based on the second historical data and the name of each second historical data piece to store the second historical data. This method generates databases based on the first and second historical data, which facilitates data recording and subsequent priority calculation.
[0049] Specifically, the database can be in the form of a table or other forms. For example, the column values of a PC database are column name, meaning, and corresponding value: the column name is "ID", the meaning is "primary key", and the corresponding value is the PC ID; the column name is "PC_SN", the meaning is PC serial number, and the corresponding value is the serial number of a certain PC. The same applies to cloud server databases.
[0050] To visualize the backup results, in some optional embodiments, the method further includes the following steps: the cloud server obtains log files from multiple PCs, and uses these log files to obtain the backup status of the PCs, wherein the backup status includes at least "to be backed up," "backing up in progress," "backing up successful," and "backing up failed"; the cloud server outputs the backup status to a user interface, so that the user interface displays the backup status of multiple PCs. This method outputs the backup status to the user interface, thus visualizing the backup results and facilitating maintenance personnel to track backup dynamics.
[0051] In practice, the cloud-based PC client obtains operation log files and operation results of the PC client to be backed up, the PC client in the process of being backed up, and the PC client that has been successfully backed up in real time, and displays them dynamically in the UI user interface, so that maintenance personnel can track the dynamics in real time.
[0052] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0053] This embodiment also provides a specific method for data backup on a cloud server, such as... Figure 3 As shown, it includes the following steps:
[0054] Step S1: The cloud server begins creating the model (priority calculation model);
[0055] Step S2: Data collection, which involves collecting PC data (first historical data from the PC) and second historical data from the cloud server, as well as the first weight of each PC data point (first historical data from the PC), the second weight of each second historical data point, the third weight from the PC, and the fourth weight from the cloud server. A database is then created, as shown in Tables 1 and 2. Table 1 shows the PC database, including column names and meanings: ID: primary key, PC_SN: PC device serial number, PC_MODEL: PC device model, time: time sequence number, net_delay: network latency, net_speed: network speed, sysload: ... The system load, cpu_usage (CPU utilization), and memory_usage (memory utilization) are listed in Table 2, which is the database of the cloud server. The column names and meanings are as follows: ID (primary key), SERVER_SN (cloud server serial number), net_delay (network latency), net_speed (network speed), sysload (system load), SystemIo (system I / O), cpu_usage (CPU utilization), memory_usage (memory utilization), disk_io (disk read / write speed), and ping_delay (ping latency between the cloud server and the PC).
[0056] Table 1
[0057] Column Name meaning ID Primary key PC_SN PC device serial number PC_MODEL PC device model time Time sequence number net_delay Network latency net_speed Internet speed sysload System load cpu_usage CPU utilization memory_usage Memory usage
[0058] Table 2
[0059]
[0060] Step S3: Calculation and analysis, that is, calculate the sum of the products of the first historical data and the corresponding first weight, and then divide by the predetermined duration to obtain the utilization rate of the PC device (PC end), calculate the sum of the second historical data and the corresponding second weight to obtain the load rate of the cloud server, and then calculate the sum of the product of the utilization rate and the third weight and the product of the load rate and the fourth weight to obtain the priority.
[0061] Step S4: Recommend backups in descending order of priority. The cloud server generates a backup signal and sends it to the PC. The PC starts the backup and uploads the backup data to the cloud server.
[0062] Step S5: If the backup is successful, the cloud server displays the result on the user interface and ends. If the backup fails, continue to execute step S2 until the backup is successful.
[0063] This embodiment also provides a cloud server for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0064] Figure 4 This is a structural block diagram of a cloud server according to an embodiment of this application, such as... Figure 4 As shown, the cloud server is used for:
[0065] The acquisition module 22 is used to acquire first historical data and a first weight of each of the first historical data of each PC, and to acquire second historical data and a second weight of each of the second historical data. The first historical data includes at least the serial number of the PC, the network speed of the PC, the CPU utilization of the PC, and the memory utilization of the PC. The second historical data is the historical data of the cloud server and includes at least the serial number of the cloud server, the network speed of the cloud server, the CPU utilization of the cloud server, the memory utilization of the cloud server, and the disk read / write speed of the cloud server.
[0066] Specifically, the cloud server collects its own load performance data and PC usage data to create a model to optimize the batch PC backup data upload process. Therefore, data collection is the first step to analyze user behavior and rationally plan PC backup data uploads. Collecting usage data for each PC device over a period of time serves as raw data accumulation; the longer the collection period, the more accurate the results of subsequent model analysis based on the data. Minute-level collection can be used to summarize hourly idle rates. For example, statistically analyzing PC usage every five minutes within an hour, and then taking the average value as the current hourly PC usage. The first historical data includes the PC's serial number, network speed, CPU usage, memory usage, PC ID (primary key), device model, time sequence number, network latency, and system load. A weight is assigned to each of these first historical data points, with each corresponding to a weight. Taking a five-minute data collection interval within an hour as an example, the number of time sequences would be 60 / 5 = 12. Data also needs to be collected from the cloud server. The usage data, or second historical data, includes the cloud server's serial number, network speed, CPU utilization, memory utilization, and disk read / write speed. It also includes the ID (primary key), network latency, system load, system I / O (input / output), CPU utilization, and ping latency between the cloud server and multiple PCs. This data is used to analyze the optimal usage of the cloud server and to obtain the weight of each piece of second historical data. Each piece of second historical data corresponds to a second weight, and the values of each first and second weight can be set and adjusted according to the actual situation.
[0067] The first calculation module 24 is used to calculate the usage rate of each of the PC terminals based on the first historical data and the first weight, and to calculate the load rate of the cloud server based on the second historical data and the second weight.
[0068] Specifically, after obtaining the data from the cloud server, the PC, and the weight of each data point, the PC utilization rate can be calculated using the first historical data and the first weight corresponding to each first historical data point. The PC utilization rate reflects the usage and idle rate of the PC, allowing data backup to be performed when the PC is idle, thus avoiding impacting other application processes on the PC. The cloud server load rate can be calculated based on the second historical data and the second weight corresponding to each second historical data point. The load rate reflects the load performance of the cloud server, allowing backup data from the PC to be uploaded to the cloud server when the load performance of the cloud server is optimal.
[0069] The second calculation module 26 is used to obtain the third weight of each of the above-mentioned PCs and the fourth weight of the above-mentioned cloud servers, calculate the product of the utilization rate of each of the above-mentioned PCs and the third weight to obtain the first product, and calculate the product of the load rate of the above-mentioned cloud servers and the fourth weight to obtain the second product.
[0070] Specifically, considering both the load rate of the cloud server and the utilization rate of each PC, the priority (order) of data backup for multiple PCs is calculated. Since the cloud server and each PC are two different data endpoints, weights need to be assigned to the cloud server and PCs when calculating the final priority. These weights are designated as a third weight for each PC and a fourth weight for the cloud server. Generally, a default setting of 50% for each is acceptable, and the weight ratios can be dynamically adjusted based on actual performance. The third weight is represented by W. m This indicates that the fourth weight is represented by W. n It indicates that it is necessary to ensure W m +W n =1. The usage rate of the PC is represented by U(i), and the load rate of the cloud server is represented by S(i). The basic rule is: the higher the usage rate of the PC U(i), the lower the priority; the higher the load rate of the cloud server S(i), the higher the priority.
[0071] Backup module 28 is used to calculate the sum of each of the first product and the second product to obtain the priority of each of the PCs, and to back up the data of each of the PCs in descending order of priority, wherein the priority is the order in which the data of the PCs are backed up.
[0072] Specifically, the sum of the two products mentioned above is calculated to obtain the final priority. Each PC corresponds to a priority value. The higher the priority value, the higher the priority for backup. Therefore, the data of each PC is backed up in descending order of priority. This achieves dynamic adjustment of the backup data uploaded to the cloud server, realizes dynamic balanced backup, effectively improves user backup satisfaction, and minimizes the network and load pressure on the cloud server, achieving effective utilization of the cloud server and reducing operational pressure.
[0073] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0074] Through the above embodiments, the cloud server obtains first historical data from PCs and a first weight for each of the first historical data points, and calculates the utilization rate of each PC based on the first historical data and the first weight. It then obtains second historical data and a second weight for each of the second historical data points, and calculates the load rate of the cloud server based on the second historical data and the second weight. Furthermore, it obtains a third weight and a fourth weight, and calculates the priority of each PC. The cloud server then backs up the data from multiple PCs according to the priority. Compared to existing technologies where cloud server data backup requires maintenance personnel and is labor-intensive, this application automatically calculates the priority based on the PC's utilization rate (i.e., the first historical data) and the cloud server's transmission performance (i.e., the second historical data), and selects the PC backup order according to the priority. This automatically optimizes the backup process, eliminating the need for extensive manual maintenance. Therefore, it solves the problem of labor-intensive optimization of the data backup process in existing technologies, achieving the effect of automatically optimizing and maintaining the cloud data backup process.
[0075] In some optional embodiments, the first calculation module includes a first calculation submodule, a second calculation submodule, and a third calculation submodule. The first calculation submodule calculates the sum of the products of each first historical data point and its corresponding first weight to obtain the PC usage time. The second calculation submodule divides the PC usage time by a predetermined duration to obtain the PC utilization rate. The third calculation submodule calculates the sum of the products of each second historical data point and its corresponding second weight to obtain the cloud server load rate. This device multiplies the first historical data point by its corresponding first weight, and the second historical data point by its corresponding second weight, then adds the products together. This allows for accurate calculation of the PC utilization rate and the cloud device load rate based on actual application conditions.
[0076] Specifically, the usage rate of the PC terminal can be expressed using the formula... Calculate, where W a W b W c W d W e W f These represent the proportion of network latency, network speed, system load, CPU utilization, memory utilization, and system I / O in the calculation on the PC, respectively, i.e., the first weight. N ns The recorded numerical value representing network speed, N nd The recorded value N represents the network latency. sl N represents the recorded value of system load. cuN represents the recorded value of CPU utilization. mu N represents the recorded numerical value indicating memory usage. si This represents the recorded system I / O value, where t is the predetermined duration. If the usage rate is calculated per hour, then t is 60 minutes. The load rate of a cloud server can be expressed by the formula S(i) = W. sa *N ys +W sb *N yd +W sc *N yl +W sd *N yu +W se *N ym +W sf *N yg +W sg *N yi +W sh *N yd Calculate, where W sa W sb W sc W sd W se W sf W sg W sh The second weight represents the proportion of network latency, network speed, system load, system I / O, CPU utilization, memory utilization, disk I / O, and ping latency with the PC in the calculation. ys The recorded value N represents the network latency. yd N represents the recorded network speed of the cloud server. yl N represents the recorded value of system load. yu N represents the recorded value of system I / O. ym N represents the recorded value of CPU utilization. yg N represents the recorded numerical value indicating memory usage. yi N represents the recorded values of disk I / O on the cloud server. yd This represents the recorded ping latency between the cloud server and the PC. System I / O refers to the system's read / write speed, and disk I / O refers to the disk's read / write speed.
[0077] To achieve batch backup and dynamically back up data based on priority calculated according to the actual situation of the PCs and cloud servers, in some optional embodiments, the backup module includes a first backup submodule, a fourth calculation submodule, and a second backup submodule. The first backup submodule stores the identifier of each PC in a predetermined order to a backup queue, and simultaneously backs up a predetermined number of PCs' data in descending order of priority in the backup queue. The predetermined order is an increasing or decreasing priority order, the identifier is a unique code representing the PC, and the predetermined number is less than the length of the backup queue. The fourth calculation submodule recalculates the priority of the remaining PCs in the backup queue after the backup of the predetermined number of PCs is completed. The second backup submodule stores the recalculated priorities of the PCs in the backup queue in the predetermined order, and simultaneously backs up the predetermined number of PCs' data in descending order of priority in the backup queue. This device simultaneously backs up a predetermined number of PCs' data in descending order of priority, enabling multi-threaded batch backup. After the predetermined number of PCs' data backups are completed, the priority of the remaining PCs is recalculated, and the next round of backups of the predetermined number of PCs' data is performed in priority order. This allows for real-time priority calculation based on the actual situation of the PCs and cloud servers, dynamically adjusting the backup order to achieve a dynamically balanced backup solution. This improves user backup satisfaction while ensuring effective utilization of the cloud server and reducing operational and maintenance pressure.
[0078] Specifically, after calculating the priority of multiple PCs to be backed up, they are sorted according to their priority. The top n PCs are then placed in the backup queue. The backup queue is arranged in a predetermined order, either from largest to smallest or smallest to largest, where m is the queue size. Initially, it can be preset to 500, but can be dynamically adjusted based on server configuration and performance. Higher server configuration and performance allow for a larger value for m. Backup files from m PCs are uploaded in batches, each batch. The number of PCs to be backed up in the backup queue is dynamically added or removed based on the priority calculation results. Each time a PC completes its backup, the priority of the PCs in the current backup queue is recalculated, and the backup queue is dynamically updated, i.e., re-sorted according to the predetermined priority order. If a PC device 'a' added to the backup queue at a certain time is excluded from the top n priority levels in the next calculation and has not yet started uploading, it can be removed from the dynamic queue and dynamically added back in according to subsequent calculations.
[0079] In some optional embodiments, the first backup submodule includes a sending submodule and a receiving submodule. The sending submodule generates backup signals and sends these backup signals to a predetermined number of PCs in descending order of priority, enabling the PCs to perform data backup, obtain backup data, and send the backup data to the cloud server. The receiving submodule receives the backup data sent by the PCs. After determining the priority order, the cloud server generates backup signals and sends them to the PCs. The PCs then back up their data and upload the incremental data obtained after the backup to the cloud server. This allows PCs to perform batch backups based on backup signals, avoiding backup errors.
[0080] Specifically, the cloud server sends backup signals to the PCs to be backed up according to priority. After the PCs receive the backup signals, they start their own incremental backup process and upload the backup data to the cloud server. The cloud server receives the backup data sent by the PCs and completes the backup of the PC data.
[0081] To update the backup queue in a timely manner and enable dynamic backup, the cloud server also includes a deletion module and a duplication module. The deletion module records the backup results of the backup data. If the backup result indicates successful backup, the identifier code of the PC is deleted from the backup queue. The duplication module, if the backup result indicates failed backup, deletes the identifier code of the PC from the backup queue, re-inserts the identifier code into the dataset to be backed up, recalculates the priority of the PC, and repeats the first backup step, the calculation step, and the second backup step until the backup result indicates successful backup of the PC. This device deletes the PC's identifier code from the backup queue after backup, and recalculates the priority of failed backups and performs data backups on the PCs to avoid omissions.
[0082] Specifically, the cloud server records the upload results of backup data in the backup queue in real time. The identifier of the PC that successfully uploads backup data is removed from the backup queue. If backup data fails, or if the backup data upload is interrupted or abnormal, the device is removed from the backup queue and added to the dataset to be backed up. The first backup step, the calculation step, and the second backup step described above are repeated until all the data on the PCs to be backed up has been backed up.
[0083] In some optional embodiments, the cloud server further includes a first generation module and a second generation module. The first generation module is used to generate a PC-side database based on the first historical data and the name of each piece of the first historical data to store the first historical data. The second generation module is used to generate a cloud server database based on the second historical data and the name of each piece of the second historical data to store the second historical data. This device generates a database based on the first and second historical data, which facilitates data recording and subsequent priority calculation.
[0084] Specifically, the database can be in the form of a table or other forms. For example, the column values of a PC database are column name, meaning, and corresponding value: the column name is "ID", the meaning is "primary key", and the corresponding value is the PC ID; the column name is "PC_SN", the meaning is PC serial number, and the corresponding value is the serial number of a certain PC. The same applies to cloud server databases.
[0085] To visualize the backup results, in some optional embodiments, the cloud server further includes an acquisition submodule and an output submodule. The acquisition submodule acquires log files from multiple PCs and uses these log files to obtain the backup status of the PCs. This backup status includes at least four states: pending backup, backup in progress, backup successful, and backup failed. The output submodule outputs the backup status to a user interface, allowing the user interface to display the backup status of multiple PCs. This device outputs the backup status to the user interface, making the backup results visible and facilitating maintenance personnel to track backup progress.
[0086] In practice, the cloud-based PC client obtains operation log files and operation results of the PC client to be backed up, the PC client in the process of being backed up, and the PC client that has been successfully backed up in real time, and displays them dynamically in the UI user interface, so that maintenance personnel can track the dynamics in real time.
[0087] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when it is run.
[0088] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0089] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0090] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0091] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0092] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0093] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A data backup method for a cloud server, characterized in that, include: The cloud server obtains first historical data and a first weight for each PC, and obtains second historical data and a second weight for each of the second historical data. The first historical data includes at least the PC's serial number, the PC's network speed, the PC's CPU utilization, and the PC's memory utilization. The second historical data is the cloud server's historical data and includes at least the cloud server's serial number, the cloud server's network speed, the cloud server's CPU utilization, the cloud server's memory utilization, and the cloud server's disk read / write speed. The cloud server calculates the utilization rate of each PC based on the first historical data and the first weight, and calculates the load rate of the cloud server based on the second historical data and the second weight. The cloud server obtains the third weight of each PC and the fourth weight of the cloud server, calculates the product of the utilization rate of each PC and the third weight to obtain the first product, and calculates the product of the load rate of the cloud server and the fourth weight to obtain the second product. The cloud server calculates the sum of each first product and the second product to obtain the priority of each PC, and backs up the data of each PC in descending order of priority, wherein the priority is the order in which the PC data is backed up.
2. The method according to claim 1, characterized in that, The cloud server calculates the usage rate of each PC based on the first historical data and the first weight, including: The sum of the products of each first historical data point and the first weight corresponding to each first historical data point is calculated to obtain the usage time of the PC. Divide the PC usage time by the predetermined duration to obtain the PC usage rate. The load rate of the cloud server is calculated based on the second historical data and the second weight, including: The load rate of the cloud server is obtained by summing the products of each second historical data point and the second weight corresponding to each second historical data point.
3. The method according to claim 1, characterized in that, Data on each PC is backed up in descending order of priority, including: In the first backup step, the cloud server stores the identification code of each PC in a predetermined order to a backup queue, and simultaneously backs up the data of a predetermined number of PCs in descending order of priority in the backup queue. The predetermined order is an order of increasing or decreasing priority, the identification code is a unique code that represents the PC, and the predetermined number is less than the length of the backup queue. The calculation step involves the cloud server recalculating the priority of the remaining PCs in the backup queue after the data backup of a predetermined number of PCs is completed. In the second backup step, the cloud server stores the recalculated priorities of the multiple PCs in the backup queue in the predetermined order, and simultaneously backs up the data of a predetermined number of PCs in the backup queue in descending order of priority.
4. The method according to claim 3, characterized in that, Data from a predetermined number of PCs is simultaneously backed up in descending order of priority in the backup queue, including: The cloud server generates a backup signal and sends the backup signal to a predetermined number of PCs in descending order of priority, so that the PCs perform data backup, obtain backup data, and send the backup data to the cloud server. The cloud server receives the backup data sent by the PC.
5. The method according to claim 4, characterized in that, After the cloud server receives the backup data sent by the PC, the method further includes: The cloud server records the backup results of the backup data. If the backup results indicate that the backup data was successfully backed up, the identification code on the PC is deleted from the backup queue. If the backup result indicates that the backup data backup has failed, the identifier code of the PC is deleted from the backup queue, and the identifier code of the PC is put back into the dataset to be backed up. The priority of the PC is recalculated, and the first backup step, the calculation step, and the second backup step are repeated until the backup result indicates that the data backup of the PC has been successful.
6. The method according to claim 1, characterized in that, After acquiring the first historical data from each of the PCs and the second historical data from the cloud server, the method further includes: The cloud server generates a PC-side database based on the first historical data and the name of each piece of the first historical data to store the first historical data; The cloud server generates a cloud server database based on the second historical data and the name of each piece of the second historical data to store the second historical data.
7. The method according to claim 1, characterized in that, The method further includes: The cloud server obtains log files from multiple PCs and uses these log files to obtain the backup status of the PCs. The backup status includes at least the following: pending backup, backup in progress, backup successful, and backup failed. The cloud server outputs the backup information to the user interface, so that the user interface displays the backup information of multiple PCs.
8. A cloud server, characterized in that, The cloud server includes: The acquisition module is used to acquire first historical data and a first weight of each first historical data for each PC, and to acquire second historical data and a second weight of each second historical data. The first historical data includes at least the serial number of the PC, the network speed of the PC, the CPU utilization of the PC, and the memory utilization of the PC. The second historical data is the historical data of the cloud server and includes at least the serial number of the cloud server, the network speed of the cloud server, the CPU utilization of the cloud server, the memory utilization of the cloud server, and the disk read / write speed of the cloud server. The first calculation module is used to calculate the usage rate of each PC based on the first historical data and the first weight, and to calculate the load rate of the cloud server based on the second historical data and the second weight. The second calculation module is used to obtain the third weight of each PC and the fourth weight of the cloud server, calculate the product of the utilization rate of each PC and the third weight to obtain the first product, and calculate the product of the load rate of the cloud server and the fourth weight to obtain the second product. The backup module is used to calculate the sum of each first product and the second product to obtain the priority of each PC, and to back up the data of each PC in descending order of priority, wherein the priority is the order in which the PC data is backed up.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for contents backup and an electronic device thereof
CN103455389A
Data backup method, device and system
CN106502837A
