Data backup method, system and device, medium and product

By calculating file importance and improving the genetic algorithm optimization model, personalized data backup strategies are generated, which solves the problem of insufficient flexibility in traditional backup solutions and improves the reliability and cost-effectiveness of data backup.

CN121743101APending Publication Date: 2026-03-27CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional data backup solutions lack flexibility and cannot adapt to the diverse needs of different users and data, resulting in insufficient reliability and cost-effectiveness of data backup.

Method used

By calculating file importance, an improved genetic algorithm and backup strategy optimization model are used to generate a personalized optimal backup strategy that meets the actual needs and usage scenarios of users. The backup decision is optimized by combining the target user's historical file usage behavior patterns, device environment parameters and file attributes.

Benefits of technology

It significantly improves the reliability and cost-effectiveness of data backup, generates optimal backup strategies that meet actual user needs and usage scenarios, and solves the problem of insufficient flexibility in traditional backup solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121743101A_ABST
    Figure CN121743101A_ABST
Patent Text Reader

Abstract

The invention discloses a data backup method, system and device, a medium and a product, and the method comprises the steps: calculating the file importance degree of each to-be-backed-up file according to a historical file use behavior mode of a target user, a device environment parameter and the file attribute of the to-be-backed-up file; inputting the file importance into a pre-constructed backup strategy optimization model; optimization objectives of the strategy optimization model include maximization of backup decision utility and minimization of resource overhead, and the backup decision utility is obtained through calculation of file importance; solving the backup strategy optimization model through an improved genetic algorithm to obtain an optimal backup strategy of each file to be backed up; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated by using a behavior pattern based on historical files. By the adoption of the data backup method and device, the optimal backup strategy meeting the actual requirement of the user and the use scene can be generated, the problem that traditional data backup lacks flexibility is solved, and the reliability and cost effectiveness of data backup are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data backup method, system, device, medium, and product. Background Technology

[0002] As data is a core asset in modern society, more and more enterprises and individual users are backing up their data through the cloud or hardware devices to prevent data loss.

[0003] Traditional data backup solutions typically employ a one-size-fits-all strategy, applying the same backup method to all data. This approach fails to adapt to the diverse needs of different users and data, lacking flexibility and intelligence. Summary of the Invention

[0004] The present invention aims to provide a data backup method, system, device, medium and product that can generate personalized optimal backup strategies that meet the actual needs and usage scenarios of users, solve the problem of lack of flexibility in traditional data backup, and significantly improve the reliability and cost-effectiveness of data backup.

[0005] In a first aspect, embodiments of the present invention provide a data backup method, comprising: Calculate the file importance of each file to be backed up based on the target user's historical file usage patterns, device environment parameters, and file attributes of the files to be backed up. The file importance is input into a pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. The optimal backup strategy for each file to be backed up is obtained by solving the backup strategy optimization model using an improved genetic algorithm; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on the historical file usage behavior pattern.

[0006] As an improvement to the above solution, the step of calculating the file importance of each file to be backed up based on the target user's historical file usage patterns, device environment parameters, and file attributes of the files to be backed up includes: Based on the target user's historical file usage behavior data, calculate the target user's preference weight under the preset behavior pattern to obtain the historical file usage behavior pattern; Obtain the file attributes of the target user's files to be backed up, and obtain the probability distribution of each file attribute; Based on the historical file usage behavior patterns and the probability distribution, calculate the importance score of the behavior patterns of each file to be backed up; The probability distribution of each file attribute is transformed in the frequency domain, and the attribute distribution importance score of each file to be backed up is calculated based on the probability distribution before and after the frequency domain transformation. Obtain the device environment parameters of the target user, and calculate the environmental importance score of each file to be backed up based on the device environment parameters; The importance scores of the behavioral patterns, the attribute distributions, and the environment are weighted and aggregated to obtain the file importance of each file to be backed up.

[0007] As an improvement to the above solution, the step of calculating the target user's preference weights under a preset behavior pattern based on the target user's historical file usage behavior data to obtain the historical file usage behavior pattern includes: Obtain the target user's historical file usage behavior data; Based on the historical file usage data, the preferences of target users under various preset behavior patterns are statistically analyzed, and preference weights are calculated; the behavior patterns include at least one of file access frequency pattern, file modification frequency pattern, file lifecycle pattern, and file security pattern. Based on the preference weights, the target user's historical file usage behavior patterns are obtained.

[0008] As an improvement to the above solution, the step of obtaining the file attributes of the target user's files to be backed up and obtaining the probability distribution of each file attribute includes: Obtain the file attributes of the target user's file to be backed up; the file attributes include at least one of the following: file size, file type, file creation time, file modification time, file owner, and file privacy level; Based on the file attributes, calculate the probability distribution of all files to be backed up for the target user under each file attribute.

[0009] As an improvement to the above scheme, the step of calculating the importance score of the behavior pattern of each file to be backed up based on the historical file usage behavior pattern and the probability distribution includes: Based on the probability distribution of each file attribute, calculate the file attribute features under each behavioral pattern; Based on the file attribute characteristics, the historical file usage behavior patterns, and their preset importance weights, calculate the importance score of the behavior pattern of each file to be backed up.

[0010] As an improvement to the above scheme, the probability distribution of each file attribute is transformed in the frequency domain, and the attribute distribution importance score of each file to be backed up is calculated based on the probability distribution before and after the frequency domain transformation, including: By taking higher-order derivatives of the probability distributions of each file attribute, higher-order distribution characteristics are obtained; The periodic distribution characteristics are obtained by convolving the probability distribution with a Bessel function; The probability distribution is orthogonally decomposed on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics; The probability distribution is transformed in the frequency domain to obtain frequency domain features; Based on the higher-order distribution features, the periodic distribution features, the multi-scale distribution features, and the frequency domain features, the attribute distribution importance score of each file to be backed up is calculated.

[0011] As an improvement to the above scheme, the step of orthogonally decomposing the probability distribution on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics includes: The probability distribution is orthogonally decomposed on each of the preset orthogonal polynomial basis functions to obtain the initial orthogonal distribution characteristics; the orthogonal polynomial basis functions include at least one of Legendre polynomial function, Chebyshev polynomial function and Hermit polynomial function; Based on all the initial orthogonal distribution characteristics, the orthogonal distribution characteristics are obtained.

[0012] As an improvement to the above scheme, the method for constructing the backup strategy optimization model includes: Based on the files to be backed up, construct decision variables; Based on the decision variables and the file importance, the backup decision utility is calculated, with maximizing the backup decision utility as the utility optimization objective for the files to be backed up. Based on the decision variables, calculate the resource overhead, and use minimizing the resource overhead as the resource overhead optimization objective for the files to be backed up; Based on the resource cost optimization objective, construct resource cost constraints; Based on the utility optimization objective, the resource overhead optimization objective, and the resource overhead constraints, a backup strategy optimization model is constructed.

[0013] As an improvement to the above scheme, the step of constructing decision variables based on the file to be backed up includes: Obtain the files to be backed up for each user, and construct a decision variable for each file to be backed up for each user; the decision variable indicates whether to back up the file to be backed up.

[0014] As an improvement to the above scheme, the step of calculating the backup decision utility based on the decision variables and the file importance, and using maximizing the backup decision utility as the utility optimization objective for the files to be backed up, includes: Multiply the decision variables and the file importance of the same file to be backed up to obtain the individual backup decision utility of each file to be backed up; The backup decision utility is obtained by adding the individual backup decision utility of each file to be backed up. Maximizing the utility of backup decisions is the goal of optimizing the utility of the files to be backed up.

[0015] As an improvement to the above solution, the resource overhead includes at least one of backup time overhead, storage space overhead, and network bandwidth overhead.

[0016] As an improvement to the above solution, when the resource overhead includes backup time overhead, the step of constructing resource overhead constraints based on the resource overhead optimization objective includes: Obtain the target user's expected backup time window and satisfactory backup time threshold; Calculate the probability that the backup time cost is not greater than the expected backup time window, and obtain the time reliability of the file to be backed up based on the probability and the decision variable; Backup time constraints are constructed based on the time reliability and the backup time satisfaction threshold.

[0017] As an improvement to the above solution, obtaining the target user's expected backup time window and backup time satisfaction threshold includes: Obtain the target user's expected backup time window; The historical backup task success rate of the target user is statistically analyzed, and the confidence lower bound of the historical backup task success rate is calculated based on the preset confidence parameters. The confidence lower bound is used as the target user's backup time satisfaction threshold.

[0018] As an improvement to the above scheme, the crossover operation of the improved genetic algorithm includes: Generate a cross mask based on the target user's historical file usage patterns; Generate a first random number, and determine whether to perform a crossover operation guided by the crossover mask based on the preset crossover probability and the first random number; If so, the gene loci of the first parent individual and the second parent individual are extracted complementaryly using the cross mask to obtain the offspring individual; If not, the first parent individual will be directly used as the child individual.

[0019] As an improvement to the above scheme, the step of generating a first random number, and determining whether to perform a crossover operation guided by the crossover mask based on a preset crossover probability and the first random number, includes: Generate a first random number; the range of values ​​for the first random number is consistent with the range of values ​​for the preset crossover probability; If the first random number is not greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will be executed. If the first random number is greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will not be performed.

[0020] As an improvement to the above scheme, the step of extracting complementary gene loci from the first and second parent individuals using the cross-mask to obtain offspring individuals includes: The cross mask is multiplied bit by bit with the first parent individual to obtain the first set of gene positions; The complement of the cross mask is multiplied bit by bit with the second parent individual to obtain the second set of gene bits; Offspring individuals are obtained based on the first set of gene loci and the second set of gene loci.

[0021] As an improvement to the above scheme, the step of solving the backup strategy optimization model using an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up includes: An initial population is randomly generated; each individual in the population corresponds to a backup strategy. If the current generation has not reached the maximum generation, then the fitness value of each individual in the current population is calculated according to the optimization objective of the backup strategy optimization model. Based on the fitness value, select N individuals from the current population to form the parent population; The offspring population is obtained by guiding individuals in the parent population to perform crossover operations using a crossover mask generated based on the behavior patterns in historical files. Perform mutation operations on the offspring population; The parent population and the offspring population after the mutation operation are merged, and the current population and the current generation number are updated. If the current generation reaches the maximum generation, the optimal backup strategy for each file to be backed up is obtained based on the non-dominated solution of the current population.

[0022] As an improvement to the above scheme, the step of selecting N individuals from the current population to form the parent population based on the fitness value includes: Based on the fitness value, perform a fast non-dominated sort on the current population and divide the individuals in the current population into different non-dominated levels; Calculate the distribution density of each individual in its stated non-dominated rank to obtain the crowding degree; Based on the non-dominance level and the crowding degree, a binary tournament is used to select N individuals from the current population to form the parent population.

[0023] As an improvement to the above scheme, the mutation operation on the offspring population includes: Obtain the preset initial mutation probability; The adaptive mutation probability of the offspring population is calculated based on the current generation number, the maximum generation number, and the initial mutation probability. A second random number is generated for each gene position of an individual in the offspring population. If the second random number is not greater than the adaptive mutation probability, a mutation operation is performed on the gene position.

[0024] As an improvement to the above scheme, the step of calculating the adaptive mutation probability of the offspring population based on the current generation number, the maximum generation number, and the initial mutation probability includes: Calculate the mutation probability decay factor based on the current generation number and the maximum generation number; Multiplying the mutation probability decay factor by the initial mutation probability yields the adaptive mutation probability of the offspring population.

[0025] As an improvement to the above solution, the data backup method further includes: Obtain data on changes in the target user's file usage behavior, and based on this data, incrementally update the optimal backup strategy using Bayesian inference.

[0026] As an improvement to the above solution, the step of acquiring file usage behavior change data of the target user, and incrementally updating the optimal backup strategy based on the file usage behavior change data through Bayesian inference, includes: Based on the optimal backup strategy output by the backup strategy optimization model, the spatial distribution of strategy parameters in Bayesian inference is defined. Update the current observation data in response to changes in the target user's file usage behavior; Based on the previous optimal backup strategy, calculate the posterior distribution of the current strategy parameters under the current observation data; Based on real-time resource overhead constraints and preset optimization target weights, calculate the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy; Based on the weighted utility expectation and the posterior distribution, the previous optimal backup strategy is incrementally updated to obtain the current optimal backup strategy.

[0027] As an improvement to the above scheme, the step of calculating the posterior distribution of the current strategy parameters under the current observation data based on the previous optimal backup strategy includes: Based on the previous optimal backup strategy and the previous observation data, calculate the prior distribution of the previous strategy parameters at the current time. Based on the current observation data and the previous optimal backup strategy, construct the likelihood function of the strategy function; Based on the prior distribution and the likelihood function, the previous policy parameters are updated using Bayesian methods to obtain the posterior distribution of the current policy parameters under the current observation data.

[0028] As an improvement to the above scheme, the step of calculating the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy based on real-time resource overhead constraints and preset optimization target weights includes: Based on real-time resource overhead constraints, calculate the target utility value and resource overhead value of each candidate backup strategy in the policy feasible domain for each optimization objective. The target utility value is obtained by weighting and summing the target utility values ​​according to the preset optimization target weights. Based on the weighted target utility value and the resource overhead value, calculate the weighted expected utility of each candidate backup strategy in the policy feasibility domain.

[0029] As an improvement to the above scheme, the step of incrementally updating the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy includes: The strategy performance of each candidate backup strategy is calculated based on the posterior distribution and the weighted expected utility of each candidate backup strategy in the policy feasible region. The candidate backup strategy with the best performance is used to incrementally update the previous optimal backup strategy to obtain the current optimal backup strategy.

[0030] As an improvement to the above scheme, after incrementally updating the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy, the data backup method further includes: Calculate the theoretical optimal utility value of the current optimal backup strategy for each optimization objective; Select a random backup strategy from the feasible strategy domain and calculate the average random utility value of the random backup strategy for each optimization objective. Based on the theoretical optimal utility value and the average random utility value, calculate the feedback value for each optimization objective; Based on the feedback value, the optimization target weights are adaptively updated using an exponentially weighted average.

[0031] Secondly, embodiments of the present invention provide a data backup system, including: The file importance calculation module is used to calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up. The model input control module is used to input the file importance into a pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. The optimal backup strategy generation module is used to solve the backup strategy optimization model through an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on the historical file usage behavior pattern.

[0032] Thirdly, embodiments of the present invention provide a data backup device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the data backup method described above.

[0033] Fourthly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the data backup method described above.

[0034] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program or computer instructions, wherein when the computer program or computer instructions are executed by a processor, the data backup method described above is performed.

[0035] Compared with existing technologies, the data backup method, system, device, medium, and product disclosed in this invention calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up. The file importance is then input into a pre-constructed backup strategy optimization model. The optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, with the backup decision utility calculated from the file importance. An improved genetic algorithm is used to solve the backup strategy optimization model to obtain the optimal backup strategy for each file to be backed up. The crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on historical file usage behavior patterns. By employing personalized data-driven decision-making based on the target user, this invention can generate optimal backup strategies that meet the user's actual needs and usage scenarios, solving the problem of inflexibility in traditional data backup and significantly improving the reliability and cost-effectiveness of data backup. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the steps of a data backup method provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the steps of a method for constructing a backup strategy optimization model according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the steps of the crossover operation in an improved genetic algorithm provided by an embodiment of the present invention; Figure 4 This is a flowchart illustrating the steps of another data backup method provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a data backup system provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a data backup device provided in an embodiment of the present invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] In the description and claims, it should be understood that the terms "first," "second," etc., used in the description and claims are only for the purpose of distinguishing the description of the same technical features, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated, nor necessarily the order of description or chronological order. The terms are interchangeable where appropriate. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature.

[0039] Currently, the mainstream data backup strategies mainly fall into three categories: rule-based, threshold-triggered, and time-window-based. Rule-based backup strategies pre-set fixed backup intervals, backup retention times, and other parameters, applying the same backup strategy to all data. Threshold-triggered backup strategies trigger backup operations based on predetermined thresholds such as storage capacity and file modification volume to reduce unnecessary backups. Time-window-based backup strategies perform backups during periods of low data access to minimize the impact of backups on business operations.

[0040] However, existing technologies actually use the same strategy for different types of data, which cannot meet the different requirements of different data types, and also ignores users' backup habits.

[0041] Based on the above considerations, this invention provides a data backup method. Please refer to [link to relevant documentation]. Figure 1 In this embodiment, the data backup method is specifically executed through steps S1 to S3: S1. Calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up; S2. Input the file importance into the pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. S3. Solve the backup strategy optimization model by improving the genetic algorithm to obtain the optimal backup strategy for each file to be backed up; the crossover operation of the improved genetic algorithm is guided by the crossover mask generated based on the historical file usage behavior pattern.

[0042] It should be clearly stated in advance that the core service entity of the data backup method provided in this embodiment of the invention is the target user. A target user can be associated with several files to be backed up, and each file to be backed up clearly belongs to a unique target user.

[0043] Based on the above relationships, this method can be implemented by focusing on a single target user to solve for the optimal backup strategy for all files to be backed up, thus achieving optimal performance of the backup strategy for a single user. This method is suitable for personal cloud storage or single-machine backup scenarios. Furthermore, this method can also be applied to complex environments with multiple users operating in parallel. It initiates and executes a complete backup strategy solution instance for each target user with the goal of achieving global optimality, making it suitable for enterprise cloud storage platforms or multi-tenant backup service scenarios.

[0044] Whether it is single-user deep optimization or multi-user parallel processing, the data backup method provided by the embodiments of the present invention is accurate to the file granularity and can adaptively take the optimal backup action based on the target user corresponding to the file to be backed up.

[0045] Historical file usage behavior patterns refer to the regular behavioral characteristics extracted by analyzing users' historical usage behavior; device environment parameters refer to the real-time status data of the device terminal or network environment used by the target user when performing the backup task; file attributes refer to the metadata characteristics of the files to be backed up. In this embodiment of the invention, file value characteristics of different dimensions are aggregated by file importance, and differentiated value scores are dynamically calculated based on the user's specific behavioral habits, device status, and file characteristics, accurately quantifying the importance of each file to be backed up to the target user.

[0046] The backup strategy optimization model formalizes backup decisions as a constrained multi-objective optimization problem. Furthermore, backup decisions are dynamically defined by file importance and resource overhead determined based on user behavior, and the optimal backup strategy varies over time.

[0047] It should be noted that the output of this embodiment of the invention is a backup strategy, which is configurable. When performing a specific backup operation, a specific, immediately executable sequence of operation instructions will be generated based on the backup strategy, serving as a backup plan. The backup plan can be adjusted as the backup strategy is adjusted. Preferably, if the optimal backup strategy is adjusted, but the current backup plan has not yet finished executing, the current backup plan will be updated after it has finished executing.

[0048] The backup strategy optimization problem is a large-scale combinatorial optimization problem. For each file to be backed up, there are two options at any given time: back it up or not. That is, for N files to be backed up, the number of possible strategy combinations is: When the number of files to be backed up is large, a huge solution space is formed. Traditional heuristic rules or dynamic programming algorithms cannot meet the real-time requirements of backup strategies. Therefore, in this embodiment of the invention, a genetic algorithm is used to solve the backup strategy optimization model. Through the selection-crossover-mutation evolutionary mechanism, multiple solutions are evaluated at once, guiding the population to rapidly approach the optimal solution region.

[0049] It is worth noting that an improved genetic algorithm is used in this embodiment of the invention. Specifically, the crossover operation in the standard genetic algorithm is improved. The crossover operation in the standard genetic algorithm is blind, achieving crossover by randomly exchanging parent gene segments.

[0050] In this embodiment of the invention, the user's historical file usage patterns are used as domain knowledge to generate a cross-mask, enabling offspring to preferentially inherit gene segments from their parents that are superior under specific behavioral patterns. This accelerates convergence, improves solution efficiency, and, more importantly, the entire evolutionary process is guided by user behavior habits, significantly enhancing the quality and personalization of the optimal backup strategy obtained.

[0051] The above solution, by adopting personalized data-driven decision-making for target users, can generate the optimal backup strategy that meets the actual needs and usage scenarios of users, solving the problem of lack of flexibility in traditional data backup and significantly improving the reliability and cost-effectiveness of data backup.

[0052] As a preferred implementation, step S1, calculating the file importance of each file to be backed up based on the target user's historical file usage patterns, device environment parameters, and file attributes of the files to be backed up, is executed through steps S11-S16: S11. Based on the target user's historical file usage behavior data, calculate the target user's preference weight under the preset behavior pattern to obtain the historical file usage behavior pattern; S12. Obtain the file attributes of the target user's files to be backed up, and obtain the probability distribution of each file attribute; S13. Calculate the importance score of the behavior pattern of each file to be backed up based on the historical file usage behavior pattern and the probability distribution. S14. Perform frequency domain transformation on the probability distribution of each file attribute, and calculate the attribute distribution importance score of each file to be backed up based on the probability distribution before and after the frequency domain transformation. S15. Obtain the device environment parameters of the target user, and calculate the environmental importance score of each file to be backed up based on the device environment parameters. S16. The importance scores of the behavior patterns, the attribute distributions, and the environment are weighted and aggregated to obtain the file importance of each file to be backed up.

[0053] It should be noted that the behavioral patterns are predefined, typical, and differentiated file usage states. In this embodiment of the invention, these patterns are not actively labeled, but rather are behavioral prototypes abstracted from a large amount of user data behavior through unsupervised learning.

[0054] Raw user behavior data is a massive and high-dimensional time series. By mapping it to a limited set of preset behavior patterns, we can extract and reduce the dimensionality of user behavior habits, thus representing the long-term behavioral tendencies of the target user.

[0055] In some preferred embodiments, through a user behavior pattern matrix This indicates that historical files use behavioral patterns, and the user behavior pattern matrix is ​​used. The system integrates the preference weights of m users under n behavioral patterns. , The preference weights of target user i under the preset behavioral pattern j. .

[0056] For example, the preset behavior pattern includes a file access frequency pattern. If the target user prefers high-frequency access under this pattern, then the corresponding... It tends to map to 1; if the target user prefers low-frequency access in the file access frequency mode, then the corresponding... It tends to map to 0.

[0057] The probability distribution of file attributes refers to analyzing the values ​​of all files in the current set of files to be backed up for a given file attribute, and describing this statistical pattern using a probability distribution function. In this embodiment of the invention, by calculating the probability distribution, file attributes are transformed into relative statistical meanings within the context of the current file set, enabling timely detection of abnormal values ​​and providing a benchmark for calculating the importance scores of behavioral patterns and attribute distributions.

[0058] In some preferred embodiments, by The tensor represents the probability distribution of all file attributes; specifically, the probability distribution... Represented as:

[0059] in, The backup file for target user i , For the number of users, The number of files to be backed up for each user. The number of dimensions for file attributes. The probability distribution across all file attribute dimensions. , Represents a file In the The probability distribution of values ​​for each file attribute.

[0060] Furthermore, the probability distribution of the values ​​is obtained through statistical analysis of data from global users or specific local users. For example, the probability distribution of the file size attribute is expressed as follows: ; The above value probability distribution representation file There is a 60% probability that it is a small file less than or equal to 1MB, a 30% probability that it is a medium-sized file between 1MB and 10MB, and a 10% probability that it is a large file greater than 10MB.

[0061] By using probability distribution and historical file usage behavior patterns, it is possible to measure the typicality and relevance of each file to be backed up to the target user. The more a file matches the user's main behavioral habits, the more likely it is to be an important work asset for the user. The behavioral pattern importance score calculated in this embodiment of the invention can identify files to be backed up that are deeply matched with the user's behavioral patterns.

[0062] In this embodiment of the invention, the probability distribution of file attributes is also transformed in the frequency domain, which can identify the distribution structure of different file attributes and highlight the contribution of important frequency components in the calculated attribute distribution importance score.

[0063] By calculating the environmental importance score based on device environmental parameters, the system can dynamically select the most suitable file for backup in the current environment, reducing the chance of task failure and user interference, and enabling data backup to be completed in the background seamlessly and efficiently.

[0064] The above solution assesses the importance of the file to be backed up from three levels: user behavior, file attributes, and device environment. The final file importance is a dynamic assessment value. The backup strategy decision based on the file importance can integrate the perception of user behavior, device environment, and the file itself, fundamentally surpassing the traditional one-size-fits-all backup solution.

[0065] Further, preferably, step S11, calculating the target user's preference weights under a preset behavior pattern based on the target user's historical file usage behavior data, to obtain the historical file usage behavior pattern, includes: Obtain the target user's historical file usage behavior data; Based on the historical file usage data, the preferences of target users under various preset behavior patterns are statistically analyzed, and preference weights are calculated; the behavior patterns include at least one of file access frequency pattern, file modification frequency pattern, file lifecycle pattern, and file security pattern. Based on the preference weights, the target user's historical file usage behavior patterns are obtained.

[0066] In some preferred embodiments, each preset behavior pattern is divided into two cases. By statistically analyzing historical file usage behavior data, it is possible to determine which case the target user prefers under each behavior pattern dimension, thereby determining the historical file usage behavior pattern under that behavior pattern.

[0067] File access frequency patterns include high-frequency access and low-frequency access. High-frequency access refers to users frequently opening, editing, or reading certain files, while low-frequency access refers to users rarely accessing or leaving certain files idle for a long time. For example, by counting the number of accesses to each historical file, if the number of accesses exceeds a preset access threshold, the file access frequency pattern is considered high-frequency access; otherwise, it is considered low-frequency access.

[0068] File modification frequency patterns include frequent modification and stable unchanged. Frequent modification refers to users frequently modifying, updating, or saving certain files, while stable unchanged refers to certain files remaining unchanged for a long period of time. For example, by counting the number of modifications to each historical file, if the number of modifications exceeds a preset threshold, the file modification frequency pattern is considered frequent modification; otherwise, it is considered stable unchanged.

[0069] File sharing collaboration modes include highly shared and personal-only. Highly shared means that users frequently share certain files with others for team collaboration; personal-only means that certain files are for personal use only and are rarely shared with others. For example, by counting the number of shares of each historical file, if the number of shares exceeds a preset sharing threshold, the file sharing collaboration mode is considered to be highly shared; otherwise, it is considered to be personal-only.

[0070] File lifecycle patterns include short-term use and long-term use. Short-term use refers to files that are used intensively only for a short period of time and are rarely accessed afterwards; long-term use refers to files that are used continuously by the user for a long period of time during work or study. For example, by statistically analyzing the access time windows of each historical file, if the access time window is not greater than a preset window threshold, the file lifecycle pattern is considered to be short-term use; otherwise, it is considered to be long-term use.

[0071] Document timeliness patterns include time-sensitive and time-insensitive types. Time-sensitive refers to documents with high timeliness requirements, such as logs and news; time-insensitive refers to documents with low timeliness requirements, such as archives and documents. For example, document timeliness patterns can be obtained by counting the number of historical documents belonging to each document type.

[0072] File security modes are categorized into high security requirements and standard security requirements. High security requirements refer to files containing sensitive information that demand high levels of security and privacy protection; standard security requirements refer to files without special security requirements that can be protected using conventional methods. For example, file security modes are determined by statistically analyzing the encryption behavior of historical files.

[0073] The above scheme quantitatively characterizes user behavior data through several behavioral patterns, laying an operational data foundation for the personalization of the entire backup scheme.

[0074] Preferably, step S12, obtaining the file attributes of the target user's files to be backed up, and obtaining the probability distribution of each file attribute, includes: Obtain the file attributes of the target user's file to be backed up; the file attributes include at least one of the following: file size, file type, file creation time, file modification time, file owner, and file privacy level; Based on the file attributes, calculate the probability distribution of all files to be backed up for the target user under each file attribute.

[0075] File size indicates the amount of storage space a file occupies; file type indicates the file format, such as document, photo, audio, address book, calendar, SMS, etc.; file creation time indicates the date and time the file was created; file modification time indicates the date and time the file was last modified; file owner indicates the owner or creator of the file; file privacy level indicates the degree of privacy of the file, such as personal privacy information, system files, general files, etc.

[0076] In the above scheme, by comprehensively scanning the file attributes of the files to be backed up under the target user, performing a group analysis on the entire file set, and then calculating the probability distribution of each file attribute dimension, the statistical distribution of each file to be backed up can be accurately identified, making the calculation of file importance more robust.

[0077] Preferably, step S13, calculating the importance score of the behavior pattern of each file to be backed up based on the historical file usage behavior pattern and the probability distribution, includes: Based on the probability distribution of each file attribute, calculate the file attribute features under each behavioral pattern; Based on the file attribute characteristics, the historical file usage behavior patterns, and their preset importance weights, calculate the importance score of the behavior pattern of each file to be backed up.

[0078] It should be noted that file attribute features refer to the degree of fit of file attribute values ​​under a specific behavioral pattern. They measure the similarity between file attributes and typical files under each behavioral pattern.

[0079] Different users have different expectations for file attributes based on their various behavioral patterns. In this embodiment of the invention, the probability distribution of file attributes is matched with behavioral patterns by calculating file attribute features, thereby enabling the identification of files that are more important to the target user.

[0080] In some preferred embodiments, the file is calculated using a Gaussian kernel function. The file attribute characteristics are represented as follows: ; in, Let the mean of file attributes be the p-th behavior pattern. Let be the standard deviation of file attributes for the p-th behavior pattern.

[0081] The Gaussian kernel function can continuously and smoothly score the similarity between the actual attribute values ​​of a file and the mean attribute values ​​of the file under various behavioral patterns. Compared with a fixed threshold, the file attribute features calculated by the Gaussian kernel function are less sensitive to noise and can better reflect the similarity situation.

[0082] In some preferred embodiments, the document The importance score of behavioral patterns is represented as follows: ; in, The preference weight for the p-th behavior pattern for target user i is obtained by using behavior patterns from historical files; The preset importance weight for the p-th behavior pattern; This represents the probability distribution of the files to be backed up on file attribute x. The file attribute feature for the p-th behavior pattern takes values ​​from the set of real numbers. It is used to extract features of file attribute distribution.

[0083] The distribution of file attributes (such as size, type, access frequency, etc.) reflects the intrinsic value of the file. In this embodiment of the invention, the file attribute feature function is used to... Probability distribution of file attributes Performing convolution integrals allows us to calculate the mathematical expectation of file attribute feature functions under a probability distribution, reflecting the degree of matching between file attribute distribution and user behavior patterns.

[0084] In the above scheme, file attributes and behavioral patterns are matched by file attribute features, enabling the data backup process to make decisions based on the target user's behavioral habits.

[0085] Preferably, step S14 involves performing a frequency domain transformation on the probability distribution of each file attribute, and calculating the attribute distribution importance score for each file to be backed up based on the probability distribution before and after the frequency domain transformation, including: By taking higher-order derivatives of the probability distributions of each file attribute, higher-order distribution characteristics are obtained; The periodic distribution characteristics are obtained by convolving the probability distribution with a Bessel function; The probability distribution is orthogonally decomposed on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics; The probability distribution is transformed in the frequency domain to obtain frequency domain features; Based on the higher-order distribution features, the periodic distribution features, the multi-scale distribution features, and the frequency domain features, the attribute distribution importance score of each file to be backed up is calculated.

[0086] In addition to the conventional first-order moments, this embodiment of the invention also considers higher-order statistics of the probability distribution of file attributes. Higher-order distribution features can capture local variation patterns in attribute distributions, providing more granular value information. For example, the higher-order distribution features are in the form of second derivatives.

[0087] In some preferred embodiments, the contribution of higher-order derivatives is further adjusted by a Gaussian attenuation factor to avoid oversensitivity to distribution edge regions.

[0088] Bessel functions exhibit oscillatory properties, enabling them to detect periodic characteristics in probability distributions. In some preferred embodiments of the present invention, the periodicity of user file operation behavior is characterized by the convolution integral of a first-type Bessel function and a probability function.

[0089] Orthogonal polynomial basis functions are used to approximate the probability distribution of file attributes. In this embodiment of the invention, the probability distribution function is projected onto orthogonal bases of different orders to capture the multi-scale characteristics of the file attribute distribution.

[0090] Preferably, the frequency domain transform is a Fourier transform, which reflects the frequency domain characteristics of the probability distribution of file attributes.

[0091] In some preferred embodiments, the document The importance score of the attribute distribution is expressed as: ; in, These are the weighting coefficients of the higher-order derivatives of the probability distribution; The second derivative of the probability distribution; These are the weights of the convolution; For order is The first type of Bessel function; These are the weighting coefficients of the probability distribution projected onto the orthogonal polynomial basis functions; Let k be the basis function of the orthogonal polynomial; These are the weighting coefficients for the frequency domain transformation; For probability distribution Fourier transform; This is a frequency domain weighting function that reflects the importance of different frequency components.

[0092] In this embodiment of the invention, the inherent structure and patterns of file attributes are deconstructed and integrated through several dimensions, including higher-order distribution features, periodic distribution features, orthogonal distribution features, and frequency domain features, to obtain an objective, profound, and multidimensional attribute distribution importance score.

[0093] Furthermore, preferably, the step of orthogonally decomposing the probability distribution on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics includes: The probability distribution is orthogonally decomposed on each of the preset orthogonal polynomial basis functions to obtain the initial orthogonal distribution characteristics; the orthogonal polynomial basis functions include at least one of Legendre polynomial function, Chebyshev polynomial function and Hermit polynomial function; Based on all the initial orthogonal distribution characteristics, the orthogonal distribution characteristics are obtained.

[0094] Orthogonal polynomial basis functions are a sequence of polynomial functions with orthogonality. The basis functions are perpendicular to each other under a certain domain and weight. By decomposing the probability distribution on each orthogonal polynomial basis function, the continuous and complex probability distribution can be transformed into a series of discrete initial orthogonal distribution features. Each initial orthogonal distribution feature represents the intensity of a specific shape pattern in the probability distribution.

[0095] Legendre polynomial functions, Chebyshev polynomial functions, and Hermit polynomial functions are basis functions of different orders. In the above scheme, by orthogonal decomposition on basis functions of different orders, multi-scale shape description from global contour to local details can be achieved.

[0096] In some preferred embodiments, step S15, obtaining the target user's device environment parameters, and calculating the environmental importance score of each file to be backed up based on the device environment parameters, includes: Obtain the target user's device environment parameters; the device environment parameters include at least one of network bandwidth, storage capacity, CPU performance, memory size, battery status, and network status; The environmental parameters of the device are weighted and summed to obtain the environmental importance score of each file to be backed up.

[0097] Network bandwidth indicates the available network transmission rate of the device, measured in Mbps; storage capacity indicates the available storage space of the device, measured in GB; CPU performance indicates the processor performance of the device, expressed in frequency (GHz) or number of cores; memory size indicates the memory capacity of the device, measured in GB; battery status indicates the battery percentage of the device, with a value range of [0,1]; network status indicates the network connection status of the device, such as Wi-Fi, 4G, offline, etc.

[0098] Preferably, the environmental parameter vector constructed from the equipment environmental parameters is represented as follows: ; in, The number of types of equipment environmental parameters. For network bandwidth, For storage capacity, For CPU performance, For memory size, Battery status. This refers to the network status.

[0099] In the above embodiments, the environmental importance score is obtained by weighted summation of the equipment environmental parameters. In other preferred embodiments, the environmental importance score is solved by constructing a polynomial function with the equipment environmental parameters as independent variables.

[0100] Preferably, the environmental importance score is expressed as: ; in, For equipment environmental parameters The first independent variable A polynomial function, The weight coefficients of this polynomial are used to flexibly design these polynomial functions based on the hardware parameters detected by the actual system, in order to characterize the impact of different combinations of environmental parameters on feature scores.

[0101] It should be noted that the polynomial function can be obtained by pre-setting domain knowledge or by machine learning training using historical data. The specific construction method of the polynomial function with device environment parameters as independent variables does not affect the beneficial effects produced by the embodiments of the present invention, and will not be elaborated here.

[0102] In some preferred embodiments, step S16 involves weighted aggregation of the importance scores of the behavior patterns, the attribute distributions, and the environment to obtain the file importance of each file to be backed up, expressed as: ; in, The weights for the importance scores of behavioral patterns The weights for the importance scores of the attribute distribution. and , This is the weight of the environmental importance score.

[0103] As a preferred embodiment, please refer to Figure 2 The construction of the backup strategy optimization model is performed through steps T1-T5: T1. Construct decision variables based on the files to be backed up; T2. Calculate the backup decision utility based on the decision variables and the file importance, and take maximizing the backup decision utility as the utility optimization goal for the file to be backed up; T3. Calculate the resource overhead based on the decision variables, and take minimizing the resource overhead as the resource overhead optimization objective for the files to be backed up. T4. Based on the resource cost optimization objective, construct resource cost constraints; T5. Based on the utility optimization objective, the resource overhead optimization objective, and the resource overhead constraints, construct a backup strategy optimization model.

[0104] Decision variables are the unknowns in the backup strategy optimization model, that is, the objects that need to be solved during the optimization process. Decision variables reflect whether to back up the files to be backed up, and when to back up the files to be backed up.

[0105] Backup decision utility is the total value obtained after executing a backup strategy. Specifically, it is calculated based on the importance of the files to be backed up. When the strategy is to back up the files to be backed up, the corresponding file importance is taken into consideration. Maximizing backup decision utility ensures that the total value of the backup file set is as high as possible.

[0106] Every file backup operation incurs a deterministic consumption of system resources. Based on decision variables, the total resource overhead can be viewed as a linear sum of the overhead of the selected files. By setting resource overhead optimization objectives, backup strategies with lower resource overhead can be proactively sought when making decisions.

[0107] Furthermore, for the target users and the overall system for backup decisions, there must be an upper limit to resources, and the feasible domain of the strategy is defined by resource overhead constraints.

[0108] In the above scheme, a solvable backup strategy optimization model is constructed through decision variables, optimization objectives and constraints, making the optimization process of the model value-driven and its output meaningful and applicable to actual data backup scenarios.

[0109] Further, preferably, step T1, constructing decision variables based on the file to be backed up, includes: Obtain the files to be backed up for each user, and construct a decision variable for each file to be backed up for each user; the decision variable indicates whether to back up the file to be backed up.

[0110] Preferably, through decision variables Indicates whether to back up the file j to be backed up for target user i.

[0111] In some preferred embodiments, the decision variable is a binary variable; when the decision is to back up the file to be backed up, ;on the contrary, .

[0112] In other preferred embodiments, the decision variables are multivariate variables, characterizing the frequency at which backup files are stored. Exemplarily, the decision variables include backup type, trigger time, and storage tier.

[0113] In the above scheme, decision variables are constructed for each file to be backed up, creating a huge solution space that includes all file decision combinations. The subsequent improved genetic algorithm is performed on the complete solution space, ensuring that the optimal backup strategy found is globally optimal or nearly globally optimal within the scope defined by the model, thus improving the effectiveness of data backup.

[0114] Preferably, step T2, calculating the backup decision utility based on the decision variables and the file importance, and using maximizing the backup decision utility as the utility optimization objective for the file to be backed up, includes: Multiply the decision variables and the file importance of the same file to be backed up to obtain the individual backup decision utility of each file to be backed up; The backup decision utility is obtained by adding the individual backup decision utility of each file to be backed up. Maximizing the utility of backup decisions is the goal of optimizing the utility of the files to be backed up.

[0115] In some preferred embodiments, the utility optimization objective is expressed as: ; in, Let k be the file importance of file j to be backed up for target user i; k be the total number of all files to be backed up for target user i; and m be the total number of users.

[0116] In a preferred embodiment of the present invention, the decision variable is binary. For a single file to be backed up, if it is chosen to be backed up, its individual backup decision utility is consistent with its file importance. If it is chosen not to be backed up, its individual backup decision utility is 0.

[0117] Backup decision utility is the total value derived from a specific combination of all decision variables, which is the sum of the individual backup decision utilities for all files. The utility optimization objective indicates the search direction of the optimization algorithm, aiming to maximize backup decision utility when searching for the optimal strategy.

[0118] In the above scheme, the backup decision utility is calculated entirely from the file importance, which is obtained by user-personalized evaluation of each file to be backed up. Therefore, maximizing the backup decision utility means fully realizing the decision-making process based on user behavior habits and hardware capabilities.

[0119] Preferably, the resource overhead includes at least one of backup time overhead, storage space overhead, and network bandwidth overhead.

[0120] Backup time overhead determines the timeliness of task completion, directly affecting user experience and the feasibility of backup strategies; storage space overhead corresponds to the space cost of local storage or cloud storage; network bandwidth overhead determines the economics of the backup process.

[0121] In some preferred embodiments, the resource overhead target is expressed as: ; in, The backup time cost for file j to be backed up for target user i; Storage space overhead for the file j to be backed up for target user i; The network bandwidth cost for the backup file j of target user i.

[0122] Furthermore, as a preferred implementation, when the resource overhead includes backup time overhead, step T4, constructing resource overhead constraints based on the resource overhead optimization objective, is executed through steps T41-T43: T41. Obtain the target user's expected backup time window and satisfactory backup time threshold; T42. Calculate the probability that the backup time cost is not greater than the expected backup time window, and obtain the time reliability of the file to be backed up based on the probability and the decision variable. T43. Based on the time reliability and the backup time satisfaction threshold, construct backup time constraints.

[0123] The expected backup time window is the preset target duration for completing the backup task, and the backup time satisfaction threshold is the minimum time reliability standard acceptable to the target user.

[0124] For a single file, the backup time is not a fixed value, but a random variable affected by factors such as network fluctuations and device load. By calculating the probability that the backup time cost is no greater than the expected backup time window, we can represent the likelihood that the backup of the file will be completed within the expected time window under the given time environment. Further combining this with decision variables, we can obtain the probability that the total backup time under the overall backup strategy will not exceed the expected time window, thus quantifying the overall time reliability.

[0125] In the above scheme, the target user's own requirements for backup time are introduced when calculating backup time constraints in order to fully capture differentiated needs.

[0126] Preferably, step T41, obtaining the target user's expected backup time window and satisfactory backup time threshold, includes: Obtain the target user's expected backup time window; The historical backup task success rate of the target user is statistically analyzed, and the confidence lower bound of the historical backup task success rate is calculated based on the preset confidence parameters. The confidence lower bound is used as the target user's backup time satisfaction threshold.

[0127] Historical backup success rate refers to the frequency with which backup tasks are completed within a predetermined expected backup time window. For example, if 92 out of the past 100 backup tasks were completed within the specified time, then the historical backup success rate is 92%.

[0128] By calculating the confidence lower bound of the success rate of historical backup tasks, it is ensured that the satisfactory backup time threshold set for the target user can match their past backup capabilities, providing a safety margin for the model and improving the robustness of backups.

[0129] In some preferred embodiments, the backup time satisfaction threshold is expressed as: ; in, Success rate of historical backup tasks for the target user; For confidence level parameters; For standard normal distribution quantiles; The number of historical backup tasks for the target user.

[0130] The above scheme sets differentiated reliability expectations that match the capabilities of users with different conditions, which helps the optimization algorithm converge to a truly meaningful solution and avoids the model having no solution or producing extreme strategies due to improper threshold settings.

[0131] In some preferred embodiments, resource overhead constraints include backup time constraints, backup space constraints, and backup bandwidth constraints, which are expressed as follows: ; in, , and These represent the time, storage space, and average network bandwidth required to back up the file j to be backed up for target user i, respectively. For the expected backup time window of target user i, Set the satisfactory backup time threshold for target user i; The storage space limit for target user i; The network bandwidth limit for target user i.

[0132] In the improved genetic algorithm proposed in this embodiment of the invention, the traditional random crossover process has been improved, enabling the improved genetic algorithm to solve the backup strategy optimization model based on users' historical behavior habits.

[0133] As a preferred embodiment, please refer to Figure 3 The crossover operation of the improved genetic algorithm is performed through steps A1-A4: A1. Generate a cross mask based on the target user's historical file usage patterns; A2. Generate a first random number, and determine whether to perform the crossover operation guided by the crossover mask based on the preset crossover probability and the first random number. If so, then execute A3, and extract complementary gene loci from the first parent individual and the second parent individual respectively using the cross mask to obtain offspring individuals; If not, then execute A4, directly treating the first parent individual as the child individual.

[0134] In this embodiment of the invention, the crossover mask is generated based on the target user's historical file usage behavior pattern, and it is a binary vector used to guide the crossover operation in the genetic algorithm. It should be noted that the length of the crossover mask corresponds to the gene length of an individual, i.e., the number of files to be backed up. Each bit in the crossover mask corresponds to a gene bit (a backup decision for a file to be backed up), indicating which parent the offspring should inherit that gene bit from during the crossover operation. For example, mask[k]=1 means "the strategy for the k-th file should be inherited from the first parent."

[0135] If gene crossover is performed every time offspring are generated, the population may converge too quickly, lose its exploratory ability, and get stuck in a local optimum. Therefore, embodiments of the present invention adjust whether directed search is performed during inheritance or whether the parent generation is allowed to pass on to the next generation as is by using a preset crossover probability and a first random number, in order to maintain gene diversity and ensure global search capability.

[0136] When performing directed search genetics, since the crossover mask is generated based on the behavior patterns of historical files, the advantageous genes of two parents can be efficiently combined through the crossover mask, which is more likely to produce offspring with better performance than traditional random crossover.

[0137] In the above scheme, the crossover operation is guided by user behavior patterns, making it more likely that offspring individuals will inherit superior gene combinations that align with user habits, significantly reducing the number of iterations and computation time required to find high-quality solutions. Simultaneously, by retaining the probabilistic direct copy branch, the algorithm avoids getting trapped in local optima or premature convergence due to over-reliance on a single guiding pattern, thus ensuring the algorithm's exploratory capabilities.

[0138] Further, preferably, step A2, generating a first random number, and determining whether to perform a crossover operation guided by the crossover mask based on a preset crossover probability and the first random number, includes: Generate a first random number; the range of values ​​for the first random number is consistent with the range of values ​​for the preset crossover probability; If the first random number is not greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will be executed. If the first random number is greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will not be performed.

[0139] In some preferred embodiments, the first random number takes values ​​in the range [0,1].

[0140] Since the first random number is uniformly distributed within its value range, the probability that the first random number is not greater than the preset crossover probability is exactly equal to the preset crossover probability. For example, if the preset crossover probability is 0.85, then on average, out of every 100 decisions, approximately 85 will enter the intelligent crossover process (execute step A3), and 15 will enter the direct replication process (execute step A4). The influence of intelligent guidance in the evolutionary process can be precisely controlled by adjusting the preset crossover probability.

[0141] In the above scheme, although the preset crossover probability is fixed, randomness is injected into each generation and each individual by determining the first random number, so that the search process always maintains the flexibility to cope with dynamic changes.

[0142] Preferably, step A3, extracting complementary gene loci from the first and second parent individuals using the cross-mask to obtain offspring individuals, includes: The cross mask is multiplied bit by bit with the first parent individual to obtain the first set of gene positions; The complement of the cross mask is multiplied bit by bit with the second parent individual to obtain the second set of gene bits; Offspring individuals are obtained based on the first set of gene loci and the second set of gene loci.

[0143] It should be noted that for a binary cross mask vector mask, its complement can be represented as (1-mask), where 0 in the original cross mask vector mask is changed to 1 and 1 is changed to 0, which realizes the logical flip.

[0144] The bitwise multiplication operation allows offspring individuals to selectively extract or mask parental gene positions based on the cross mask. Furthermore, since the vectors generated by the bitwise multiplication of the first and second parent individuals are complements of each other, the resulting first and second gene position sets can cover all gene positions, thus forming a complete offspring individual.

[0145] As a preferred implementation, it is used to guide the crossover operation of the improved genetic algorithm: ; in, The first parent individual to participate in the crossover operation; The second parent individual participating in the crossover operation; For the corresponding offspring individuals; The number of preset behavior patterns; Use the behavior pattern for the historical files of individual i under behavior pattern p; Let be the characteristic function, when random numbers (0,1) is less than or equal to The value is 1 if the condition is met, otherwise it is 0. For cross mask; This represents the bitwise multiplication operator.

[0146] In the above scheme, fine-grained gene exchange at the bit level is performed through cross-masking, allowing offspring individuals to inherit certain gene positions from the first parent individual, while inheriting complementary gene positions from the second parent individual. This is not limited by the physical location of the genes and can maximize the use of the personalized advantages of the parents.

[0147] As a preferred implementation, step S3 involves solving the backup strategy optimization model using an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up, and then executing it through steps S31-S37. S31. Randomly generate the initial population; each individual in the population corresponds to a backup strategy; S32. If the current generation has not reached the maximum generation, calculate the fitness value of each individual in the current population according to the optimization objective of the backup strategy optimization model. S33. Based on the fitness value, select N individuals from the current population to form the parent population; S34. The offspring population is obtained by guiding individuals in the parent population to perform crossover operations using a crossover mask generated based on the behavior patterns of historical files. S35. Perform mutation operation on the offspring population; S36. Merge the parent population and the offspring population after the mutation operation, and update the current population and the current generation. S37. If the current generation reaches the maximum generation, then the optimal backup strategy for each file to be backed up is obtained based on the non-dominated solution of the current population.

[0148] The population is a set of candidate solutions, and an individual is a member of the population, corresponding to a specific backup strategy. Randomly generating the initial population ensures that the algorithm starts searching from a broad region of the solution space, avoiding getting trapped in local optima.

[0149] In genetic algorithms, fitness values ​​are used to measure the quality of individuals. In this embodiment of the invention, the fitness value is calculated directly based on the optimization objective of the backup strategy optimization model, so as to integrate multiple objectives such as maximizing the utility of backup decisions and minimizing resource overhead into a single scalar value, reflecting the quality of the backup strategy.

[0150] Genetic algorithms continuously generate offspring based on parent characteristics. Offspring inherit traits from their parents, and the genetic process involves gene crossover from the parents and mutation within the offspring themselves. In this embodiment of the invention, when selecting parent individuals, N individuals are chosen from the current population based on their fitness values ​​to form the parent population. These parents will be used to generate the offspring population. The offspring population represents new, potentially better, candidate strategies.

[0151] In the feasible solution space, a solution is called a non-dominated solution if no other solution is superior to it on all objective functions. After reaching the maximum number of algebras, the algorithm terminates and selects those non-dominated solutions that perform well on all objectives from the final population as output, providing multiple high-quality alternative strategies for the final decision.

[0152] In the above scheme, by using an improved genetic algorithm, it is possible to intelligently and efficiently search for a near-optimal backup strategy that satisfies complex multi-objective constraints in a huge strategy combination space, and fully fits the user's behavior pattern.

[0153] Further, preferably, step S33, selecting N individuals from the current population to form the parent population based on the fitness value, includes: Based on the fitness value, perform a fast non-dominated sort on the current population and divide the individuals in the current population into different non-dominated levels; Calculate the distribution density of each individual in its stated non-dominated rank to obtain the crowding degree; Based on the non-dominance level and the crowding degree, a binary tournament is used to select N individuals from the current population to form the parent population.

[0154] Fast non-dominated sorting refers to ranking all individuals in the current population according to Pareto dominance. For example, non-dominated rank 1 contains all individuals not dominated by any other individual. These are the best set in the current population. Non-dominated rank 2 consists of individuals that are not dominated in the new population after removing individuals from the front rank 1. This continues, with smaller rank numbers indicating better individuals.

[0155] By performing a fast non-dominated sort on the current population, we can achieve quality stratification of individuals in the population in a multi-objective sense based on Pareto optimality, providing a primary and correct standard for parent selection.

[0156] Furthermore, in this embodiment of the invention, a diversity protection mechanism is introduced by calculating crowding degree within the same non-dominated level. Crowding degree calculation quantifies the uniqueness of each individual. By prioritizing individuals with low crowding degree, the population can be actively guided to explore and fill the unrepresented blank areas on the optimal frontier, thereby obtaining a widely distributed and highly diverse approximate Pareto front.

[0157] The binary tournament selection process involves randomly choosing two individuals from the current population to compete in a contest based on non-dominance level and crowding. The winner is selected to join the parent population, ensuring that the parent population contains high-quality genes from various cutting-edge sources while also ensuring that these genes are widely sourced.

[0158] In the above scheme, when selecting the parent population, both convergence and distribution are pursued, thereby robustly and efficiently exploring the complete boundary representing the optimal backup strategy.

[0159] Preferably, step S35, performing a mutation operation on the offspring population, includes: Obtain the preset initial mutation probability; The adaptive mutation probability of the offspring population is calculated based on the current generation number, the maximum generation number, and the initial mutation probability. A second random number is generated for each gene position of an individual in the offspring population. If the second random number is not greater than the adaptive mutation probability, a mutation operation is performed on the gene position.

[0160] The initial mutation probability sets the tone for the algorithm's exploration ability. A higher initial mutation probability means that the algorithm will explore more actively in the early stages.

[0161] Furthermore, by dynamically scheduling the mutation intensity through evolutionary generations, it is possible to maintain a high mutation probability in the early stages of evolution to promote global exploration; and gradually reduce the mutation probability in the later stages of evolution to protect the found superior genes and promote local fine-grained convergence.

[0162] By using a second random number, fine-grained and probabilistic mutations are achieved at both the individual and gene location levels, ensuring that mutations are random events. It's important to note that mutation determination for each gene location is independent, meaning that multiple gene locations within an individual may mutate simultaneously or none may mutate at all, providing a rich set of mutation patterns for improving genetic algorithms.

[0163] In some preferred embodiments, when performing a mutation operation on a gene location, the value of that gene location is flipped to introduce a completely new value for that gene location.

[0164] The above scheme introduces an adaptive mutation probability to guide the mutation operation. The adaptive mutation probability is dynamically adjusted as the current generation changes, so that the algorithm behavior is intelligently matched with the evolutionary stage.

[0165] Furthermore, preferably, the step of calculating the adaptive mutation probability of the offspring population based on the current generation number, the maximum generation number, and the initial mutation probability includes: Calculate the mutation probability decay factor based on the current generation number and the maximum generation number; Multiplying the mutation probability decay factor by the initial mutation probability yields the adaptive mutation probability of the offspring population.

[0166] In some preferred embodiments, the mutation operation of the improved genetic algorithm is represented as: ; in, Individuals awaiting mutation; The initial mutation probability; The current generation number; The maximum number of generations; For adaptive mutation probability; As an indicator function, when random numbers Less than or equal to adaptive mutation probability The value is 1 if the condition is met, otherwise it is 0. It is the XOR operator.

[0167] The aforementioned adaptive mutation probability calculation achieves an adaptive decay of mutation probability as the evolutionary process progresses, and maintains a high level of exploration capability in the early stages while focusing on local search in the later stages.

[0168] As a preferred embodiment, please refer to Figure 4 The data backup method further includes step S4 after executing steps S1-S3: obtaining file usage behavior change data of the target user, and incrementally updating the optimal backup strategy based on the file usage behavior change data through Bayesian inference.

[0169] After the initial optimal backup strategy is executed, the data backup method will continue to monitor the user's newly generated behavioral data. The changes in the target user's file usage behavior data represent the possible evolution, shift, or emergence of new patterns in user habits.

[0170] To ensure that the optimal backup strategy can adaptively evolve with user habits, data on changes in file usage behavior is used to update existing understanding of the target users, thereby updating the optimal backup strategy and ensuring that it always aligns with user behavior. Bayesian inference allows for direct and efficient adjustment and optimization of existing optimal backup measurements using only a small amount of new data.

[0171] In the above scheme, the optimal backup strategy can sense environmental changes and learn from experience to continuously improve itself, solving the rigidity problem in traditional data backup schemes and achieving sustainable and personalized data protection.

[0172] Further, preferably, step S4 involves obtaining file usage behavior change data of the target user, and incrementally updating the optimal backup strategy based on the file usage behavior change data using Bayesian inference, as executed through steps S41-S45: S41. Based on the optimal backup strategy output by the backup strategy optimization model, define the spatial distribution of strategy parameters in Bayesian inference; S42. Update the current observation data in response to changes in the target user's file usage behavior; S43. Based on the previous optimal backup strategy, calculate the posterior distribution of the current strategy parameters under the current observation data; S44. Based on real-time resource overhead constraints and preset optimization target weights, calculate the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy. S45. Based on the weighted utility expectation and the posterior distribution, the previous optimal backup strategy is incrementally updated to obtain the current optimal backup strategy.

[0173] In this embodiment of the invention, Bayesian inference sets underlying rules based on existing optimal backup strategies. The decisive unknown hidden variables behind the optimal backup strategy are defined as strategy parameters to be inferred, and a spatial distribution is set for them to define all possible values ​​and their initial probabilities. Preferably, the spatial distribution is established by initializing the prior distribution of the strategy parameters.

[0174] In some preferred embodiments, the prior distribution of the policy parameters is initialized as follows: ; in, A vector of policy parameters; This is the initial optimal backup strategy vector; is the mean vector of a Gaussian distribution; The covariance matrix is ​​a Gaussian distribution and is a symmetric positive definite matrix; For strategy parameters The dimension; For matrix The determinant of .

[0175] The current observation data is a dynamically updated dataset that contains historical data used to generate the previous optimal backup strategy and continuously incorporates new data on changes in file usage behavior.

[0176] Bayesian inference allows us to combine prior and new data after considering the latest current observations to produce an objective posterior distribution, quantifying the likelihood of various parameter values ​​after considering new evidence.

[0177] The generation of the posterior distribution depends on the likelihood function. During this process, the optimal backup strategy is not yet actually selected. In this embodiment of the invention, the expected performance of each candidate strategy is evaluated using a weighted expected utility. The utility of the strategy under all possible parameter values ​​is weighted and averaged according to its posterior probability. Simultaneously, the evaluation process in this embodiment of the invention includes satisfying the latest real-time resource overhead constraints to ensure the feasibility of the backup strategy.

[0178] In some preferred embodiments, the update to the previous optimal backup strategy is expressed as: ; in, The optimal backup strategy at time t; For the feasible domain of the backup strategy; In the state Under the following, the weighted expected utility of strategy x is... The accumulated observation data up to time t To optimize the target weight, An adaptive behavior value function incorporating dynamic weights; Given the previous optimal backup strategy and observation data Under these conditions, strategy parameters The posterior distribution of; This represents the value space for the strategy parameters.

[0179] Furthermore, the adaptive behavior value function is expressed as: ; in, For a moment The optimization objective weights are as follows; These are preset cost weighting coefficients; In the state Next, adopt a strategy For the The utility value of each optimization objective; Regarding strategy The cost function is used to quantify the resource overhead required to execute the strategy, such as backup time, network bandwidth, and energy consumption.

[0180] In the above scheme, new observation data is continuously assimilated into probabilistic cognitive updates through Bayesian inference, and on this basis, robust decision optimization is carried out based on global objectives, thereby enabling the autonomous and gradual evolution of the strategy.

[0181] Preferably, step S43, calculating the posterior distribution of the current strategy parameters under the current observation data based on the previous optimal backup strategy, includes: Based on the previous optimal backup strategy and the previous observation data, calculate the prior distribution of the previous strategy parameters at the current time. Based on the current observation data and the previous optimal backup strategy, construct the likelihood function of the strategy function; Based on the prior distribution and the likelihood function, the previous policy parameters are updated using Bayesian methods to obtain the posterior distribution of the current policy parameters under the current observation data.

[0182] It should be noted that the prior distribution of the previous policy parameters at the current moment is not reset, but is directly inherited from the posterior distribution of the previous round.

[0183] The previous optimal backup strategy reflects all the historical information and cognitive state on which it is based. By comparing the current observation data with the previous optimal backup strategy, the probability of observing the current new data under the strategy parameters and the previous optimal backup strategy is measured, and then the current observation data is incrementally encoded into the cognitive value of the strategy parameters.

[0184] In some preferred embodiments, the posterior distribution of the current policy parameters under the current observation data Represented as: ; in, For the current observation data in the policy parameters Previous optimal backup strategy The following seems to be true.

[0185] In the above scheme, the state is recursively estimated through Bayes' theorem, which enables continuous perception of environmental feedback and adjustment of its internal world model accordingly, demonstrating strong adaptability and intelligence.

[0186] Preferably, step S44, calculating the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy based on real-time resource overhead constraints and preset optimization target weights, includes: Based on real-time resource overhead constraints, calculate the target utility value and resource overhead value of each candidate backup strategy in the policy feasible domain for each optimization objective. The target utility value is obtained by weighting and summing the target utility values ​​according to the preset optimization target weights. Based on the weighted target utility value and the resource overhead value, calculate the weighted expected utility of each candidate backup strategy in the policy feasibility domain.

[0187] In this embodiment of the invention, the performance of candidate backup strategies under each optimization objective is weighted based on preset optimization objective weights to obtain a weighted objective utility value, thereby realizing the process of adaptive candidate strategy matching based on the importance of the optimization objective.

[0188] In addition, in this embodiment of the invention, a resource overhead value is further introduced as a penalty to achieve an integrated evaluation of benefits and costs, thereby driving the system to continuously evolve in the direction of maximizing personalized benefits under realistic constraints.

[0189] Preferably, step S45, incrementally updating the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy, includes: The strategy performance of each candidate backup strategy is calculated based on the posterior distribution and the weighted expected utility of each candidate backup strategy in the policy feasible region. The candidate backup strategy with the best performance is used to incrementally update the previous optimal backup strategy to obtain the current optimal backup strategy.

[0190] In a preferred embodiment of the present invention, the latest environmental information is introduced through the posterior distribution inferred by Bayesian inference, and the effect of each candidate backup strategy is quantified by weighted expected utility, which can improve the adaptability and accuracy of strategy evaluation.

[0191] The candidate backup strategy with the highest performance corresponds to the current optimal solution. Updating based on it can guarantee the local optimality of the strategy update. Furthermore, in this embodiment of the invention, the adjustment is based on the historical optimal strategy rather than a full reconstruction, which effectively improves the update efficiency of the current optimal backup strategy.

[0192] Preferably, after performing step S45, the data backup method further includes: Calculate the theoretical optimal utility value of the current optimal backup strategy for each optimization objective; Select a random backup strategy from the feasible strategy domain and calculate the average random utility value of the random backup strategy for each optimization objective. Based on the theoretical optimal utility value and the average random utility value, calculate the feedback value for each optimization objective; Based on the feedback value, the optimization target weights are adaptively updated using an exponentially weighted average.

[0193] In this embodiment of the invention, the optimization target weight is not fixed. It will be continuously iterated and optimized based on the initial optimization target weight as the observed data is updated, so as to reflect the emphasis on different optimization targets.

[0194] In some preferred embodiments, the feedback value for optimizing target i is expressed as: ; in, k represents the number of random backup strategies; k represents the number of optimization targets. For strategy For the The theoretical optimal utility value of an optimization objective.

[0195] Furthermore, the adaptive update of the optimization objective weights is expressed as: ; in, Indicates at time Next The weight values ​​of each optimization objective. For at any time The feedback value of the optimization objective i is given. The learning rate represents the strength of the impact of the reward value on weight updates.

[0196] In the above scheme, if the theoretical optimal utility value is lower than the average random utility value, it means that the current optimal backup strategy has not reached the global optimum and may be trapped in a local optimum. The search direction of the backup strategy can be driven to tilt towards the target that needs to be optimized most by optimizing the adaptive adjustment of the target weight.

[0197] The data backup method provided in the above embodiments of the present invention can continuously update the backup strategy. Through an improved Bayesian inference approach, it finds the optimal strategy that maximizes the expected value function under the posterior distribution of parameters and introduces adaptive weights to quantify strategy performance. This allows strategy optimization to comprehensively utilize prior knowledge and new data, balancing multiple backup objectives.

[0198] The data backup method provided by this invention, by adopting personalized data-driven decision-making for target users, can generate an optimal backup strategy that meets the actual needs and usage scenarios of users, solving the problem of lack of flexibility in traditional data backup and significantly improving the reliability and cost-effectiveness of data backup.

[0199] This invention provides a data backup system. Please refer to [link / reference]. Figure 5 The data backup system includes a file importance calculation module 11, a model input control module 12, and an optimal backup strategy generation module 13, wherein: The file importance calculation module 11 is used to calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up. The model input control module 12 is used to input the file importance into a pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. The optimal backup strategy generation module 13 is used to solve the backup strategy optimization model through an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on the historical file usage behavior pattern.

[0200] In a preferred embodiment, the document importance calculation module 11 includes: The preference weight calculation unit is used to calculate the preference weight of the target user under the preset behavior pattern based on the target user's historical file usage behavior data, and obtain the historical file usage behavior pattern. The probability distribution calculation unit is used to obtain the file attributes of the target user's files to be backed up and to obtain the probability distribution of each file attribute; The first scoring unit is used to calculate the importance score of the behavior pattern of each file to be backed up based on the historical file usage behavior pattern and the probability distribution. The second scoring unit is used to perform frequency domain transformation on the probability distribution of each file attribute, and calculate the attribute distribution importance score of each file to be backed up based on the probability distribution before and after the frequency domain transformation. The third scoring unit is used to obtain the target user's device environment parameters and calculate the environmental importance score of each file to be backed up based on the device environment parameters. The file importance calculation unit is used to perform weighted aggregation of the behavior pattern importance score, the attribute distribution importance score, and the environment importance score to obtain the file importance of each file to be backed up.

[0201] Further, preferably, the preference weight calculation unit is specifically used for: Obtain the target user's historical file usage behavior data; Based on the historical file usage data, the preferences of target users under various preset behavior patterns are statistically analyzed, and preference weights are calculated; the behavior patterns include at least one of file access frequency pattern, file modification frequency pattern, file lifecycle pattern, and file security pattern. Based on the preference weights, the target user's historical file usage behavior patterns are obtained.

[0202] Preferably, the probability distribution calculation unit is specifically used for: Obtain the file attributes of the target user's file to be backed up; the file attributes include at least one of the following: file size, file type, file creation time, file modification time, file owner, and file privacy level; Based on the file attributes, calculate the probability distribution of all files to be backed up for the target user under each file attribute.

[0203] Preferably, the first score calculation unit is specifically used for: Based on the probability distribution of each file attribute, calculate the file attribute features under each behavioral pattern; Based on the file attribute characteristics, the historical file usage behavior patterns, and their preset importance weights, calculate the importance score of the behavior pattern of each file to be backed up.

[0204] Preferably, the second score calculation unit is specifically used for: By taking higher-order derivatives of the probability distributions of each file attribute, higher-order distribution characteristics are obtained; The periodic distribution characteristics are obtained by convolving the probability distribution with a Bessel function; The probability distribution is orthogonally decomposed on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics; The probability distribution is transformed in the frequency domain to obtain frequency domain features; Based on the higher-order distribution features, the periodic distribution features, the multi-scale distribution features, and the frequency domain features, the attribute distribution importance score of each file to be backed up is calculated.

[0205] Furthermore, preferably, the step of orthogonally decomposing the probability distribution on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics includes: The probability distribution is orthogonally decomposed on each of the preset orthogonal polynomial basis functions to obtain the initial orthogonal distribution characteristics; the orthogonal polynomial basis functions include at least one of Legendre polynomial function, Chebyshev polynomial function and Hermit polynomial function; Based on all the initial orthogonal distribution characteristics, the orthogonal distribution characteristics are obtained.

[0206] As a preferred implementation, the method for constructing the backup strategy optimization model includes: Based on the files to be backed up, construct decision variables; Based on the decision variables and the file importance, the backup decision utility is calculated, with maximizing the backup decision utility as the utility optimization objective for the files to be backed up. Based on the decision variables, calculate the resource overhead, and use minimizing the resource overhead as the resource overhead optimization objective for the files to be backed up; Based on the resource cost optimization objective, construct resource cost constraints; Based on the utility optimization objective, the resource overhead optimization objective, and the resource overhead constraints, a backup strategy optimization model is constructed.

[0207] Further, preferably, the step of constructing decision variables based on the file to be backed up includes: Obtain the files to be backed up for each user, and construct a decision variable for each file to be backed up for each user; the decision variable indicates whether to back up the file to be backed up.

[0208] Preferably, the step of calculating the backup decision utility based on the decision variables and the file importance, and using maximizing the backup decision utility as the utility optimization objective for the file to be backed up, includes: Multiply the decision variables and the file importance of the same file to be backed up to obtain the individual backup decision utility of each file to be backed up; The backup decision utility is obtained by adding the individual backup decision utility of each file to be backed up. Maximizing the utility of backup decisions is the goal of optimizing the utility of the files to be backed up.

[0209] Preferably, the resource overhead includes at least one of backup time overhead, storage space overhead, and network bandwidth overhead.

[0210] Furthermore, as a preferred implementation, when the resource overhead includes backup time overhead, the step of constructing resource overhead constraints based on the resource overhead optimization objective includes: Obtain the target user's expected backup time window and satisfactory backup time threshold; Calculate the probability that the backup time cost is not greater than the expected backup time window, and obtain the time reliability of the file to be backed up based on the probability and the decision variable; Backup time constraints are constructed based on the time reliability and the backup time satisfaction threshold.

[0211] Preferably, obtaining the target user's expected backup time window and backup time satisfaction threshold includes: Obtain the target user's expected backup time window; The historical backup task success rate of the target user is statistically analyzed, and the confidence lower bound of the historical backup task success rate is calculated based on the preset confidence parameters. The confidence lower bound is used as the target user's backup time satisfaction threshold.

[0212] In a preferred embodiment, the crossover operation of the improved genetic algorithm includes: Generate a cross mask based on the target user's historical file usage patterns; Generate a first random number, and determine whether to perform a crossover operation guided by the crossover mask based on the preset crossover probability and the first random number; If so, the gene loci of the first parent individual and the second parent individual are extracted complementaryly using the cross mask to obtain the offspring individual; If not, the first parent individual will be directly used as the child individual.

[0213] Further, preferably, the step of generating the first random number, and determining whether to perform the crossover operation guided by the crossover mask based on the preset crossover probability and the first random number, includes: Generate a first random number; the range of values ​​for the first random number is consistent with the range of values ​​for the preset crossover probability; If the first random number is not greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will be executed. If the first random number is greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will not be performed.

[0214] Preferably, the step of extracting complementary gene loci from the first and second parent individuals using the cross-mask to obtain offspring individuals includes: The cross mask is multiplied bit by bit with the first parent individual to obtain the first set of gene positions; The complement of the cross mask is multiplied bit by bit with the second parent individual to obtain the second set of gene bits; Offspring individuals are obtained based on the first set of gene loci and the second set of gene loci.

[0215] As a preferred embodiment, the optimal backup strategy generation module 13 includes: The initial population generation unit is used to randomly generate the initial population; each individual in the population corresponds to a backup strategy. The fitness value calculation unit is used to calculate the fitness value of each individual in the current population according to the optimization objective of the backup strategy optimization model if the current evolution generation has not reached the maximum evolution generation. The parent population selection unit is used to select N individuals from the current population to form the parent population based on the fitness value. The offspring population generation unit is used to guide individuals in the parent population to perform crossover operations by using a crossover mask generated based on the behavior patterns in historical files, thereby obtaining the offspring population. A mutation control unit is used to perform mutation operations on the offspring population; The population merging unit is used to merge the parent population and the offspring population after the mutation operation, and to update the current population and the current generation number. The optimal backup strategy generation unit is used to obtain the optimal backup strategy for each file to be backed up based on the non-dominated solution of the current population if the current generation reaches the maximum generation.

[0216] Further, preferably, the parent population selection unit is specifically used for: Based on the fitness value, perform a fast non-dominated sort on the current population and divide the individuals in the current population into different non-dominated levels; Calculate the distribution density of each individual in its stated non-dominated rank to obtain the crowding degree; Based on the non-dominance level and the crowding degree, a binary tournament is used to select N individuals from the current population to form the parent population.

[0217] Preferably, the mutation control unit is specifically used for: Obtain the preset initial mutation probability; The adaptive mutation probability of the offspring population is calculated based on the current generation number, the maximum generation number, and the initial mutation probability. A second random number is generated for each gene position of an individual in the offspring population. If the second random number is not greater than the adaptive mutation probability, a mutation operation is performed on the gene position.

[0218] Furthermore, calculating the adaptive mutation probability of the offspring population based on the current generation number, the maximum generation number, and the initial mutation probability includes: Calculate the mutation probability decay factor based on the current generation number and the maximum generation number; Multiplying the mutation probability decay factor by the initial mutation probability yields the adaptive mutation probability of the offspring population.

[0219] In a preferred embodiment, the data backup system further includes a policy update module, used for: Obtain data on changes in the target user's file usage behavior, and based on this data, incrementally update the optimal backup strategy using Bayesian inference.

[0220] Further, preferably, the policy update module includes: The Bayesian inference definition unit is used to optimize the optimal backup strategy output by the model based on the backup strategy, and defines the spatial distribution of strategy parameters in Bayesian inference. The observation update unit is used to update the current observation data in response to changes in the file usage behavior of the target user; The posterior distribution calculation unit is used to calculate the posterior distribution of the current strategy parameters under the current observation data based on the previous optimal backup strategy. The weighted expected utility calculation unit is used to calculate the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy based on real-time resource overhead constraints and preset optimization target weights. The strategy update unit is used to incrementally update the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy.

[0221] Furthermore, preferably, the posterior distribution calculation unit is specifically used for: Based on the previous optimal backup strategy and the previous observation data, calculate the prior distribution of the previous strategy parameters at the current time. Based on the current observation data and the previous optimal backup strategy, construct the likelihood function of the strategy function; Based on the prior distribution and the likelihood function, the previous policy parameters are updated using Bayesian methods to obtain the posterior distribution of the current policy parameters under the current observation data.

[0222] Preferably, the weighted expected utility calculation unit is specifically used for: Based on real-time resource overhead constraints, calculate the target utility value and resource overhead value of each candidate backup strategy in the policy feasible domain for each optimization objective. The target utility value is obtained by weighting and summing the target utility values ​​according to the preset optimization target weights. Based on the weighted target utility value and the resource overhead value, calculate the weighted expected utility of each candidate backup strategy in the policy feasibility domain.

[0223] Preferably, the policy update unit is specifically used for: The strategy performance of each candidate backup strategy is calculated based on the posterior distribution and the weighted expected utility of each candidate backup strategy in the policy feasible region. The candidate backup strategy with the best performance is used to incrementally update the previous optimal backup strategy to obtain the current optimal backup strategy.

[0224] In a preferred embodiment, the policy update module is further configured to: Calculate the theoretical optimal utility value of the current optimal backup strategy for each optimization objective; Select a random backup strategy from the feasible strategy domain and calculate the average random utility value of the random backup strategy for each optimization objective. Based on the theoretical optimal utility value and the average random utility value, calculate the feedback value for each optimization objective; Based on the feedback value, the optimization target weights are adaptively updated using an exponentially weighted average.

[0225] The data backup system provided by this invention can generate the optimal backup strategy that meets the actual needs and usage scenarios of users by adopting personalized data-driven decision-making for target users. This solves the problem of the lack of flexibility in traditional data backup and significantly improves the reliability and cost-effectiveness of data backup.

[0226] Please see Figure 6 , Figure 6 This is a structural block diagram of a data backup device provided in an embodiment of the present invention. The data backup device includes a processor 31, a memory 32, and a computer program stored in the memory 32 and executable on the processor 31. When the processor 31 executes the computer program, it implements the steps in the above-described data backup method embodiments, such as steps S1 to S3.

[0227] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 32 and executed by the processor 31 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the data backup device.

[0228] The data backup device may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will understand that the schematic diagram is merely an example of a data backup device and does not constitute a limitation on the data backup device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the data backup device may also include input / output devices, network access devices, buses, etc.

[0229] The processor 31 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 31 is the control center of the data backup device, connecting various parts of the entire data backup device through various interfaces and lines.

[0230] The memory 32 can be used to store the computer programs and / or modules. The processor 31 implements various functions of the data backup device by running or executing the computer programs and / or modules stored in the memory 32 and calling the data stored in the memory 32. The memory 32 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 32 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0231] Wherein, if the modules / units integrated into the data backup device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor 31, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0232] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data backup method, characterized in that, include: Calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up. The file importance is input into a pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. The optimal backup strategy for each file to be backed up is obtained by solving the backup strategy optimization model using an improved genetic algorithm; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on the historical file usage behavior pattern.

2. The data backup method as described in claim 1, characterized in that, The step of calculating the file importance of each file to be backed up based on the target user's historical file usage patterns, device environment parameters, and file attributes of the files to be backed up includes: Based on the target user's historical file usage behavior data, calculate the target user's preference weight under the preset behavior pattern to obtain the historical file usage behavior pattern; Obtain the file attributes of the target user's files to be backed up, and obtain the probability distribution of each file attribute; Based on the historical file usage behavior patterns and the probability distribution, calculate the importance score of the behavior patterns of each file to be backed up; The probability distribution of each file attribute is transformed in the frequency domain, and the attribute distribution importance score of each file to be backed up is calculated based on the probability distribution before and after the frequency domain transformation. Obtain the device environment parameters of the target user, and calculate the environmental importance score of each file to be backed up based on the device environment parameters; The importance scores of the behavioral patterns, the attribute distributions, and the environment are weighted and aggregated to obtain the file importance of each file to be backed up.

3. The data backup method as described in claim 2, characterized in that, The step of calculating the target user's preference weights under a preset behavior pattern based on the target user's historical file usage behavior data to obtain the historical file usage behavior pattern includes: Obtain the target user's historical file usage behavior data; Based on the historical file usage data, the preferences of target users under various preset behavior patterns are statistically analyzed, and preference weights are calculated; the behavior patterns include at least one of file access frequency pattern, file modification frequency pattern, file lifecycle pattern, and file security pattern. Based on the preference weights, the target user's historical file usage behavior patterns are obtained.

4. The data backup method as described in claim 2, characterized in that, The step of obtaining the file attributes of the target user's files to be backed up, and obtaining the probability distribution of each file attribute, includes: Obtain the file attributes of the target user's file to be backed up; the file attributes include at least one of the following: file size, file type, file creation time, file modification time, file owner, and file privacy level; Based on the file attributes, calculate the probability distribution of all files to be backed up for the target user under each file attribute.

5. A data backup method as described in claim 2, characterized in that, The step of calculating the importance score of the behavior pattern of each file to be backed up based on the historical file usage behavior pattern and the probability distribution includes: Based on the probability distribution of each file attribute, calculate the file attribute features under each behavioral pattern; Based on the file attribute characteristics, the historical file usage behavior patterns, and their preset importance weights, calculate the importance score of the behavior pattern of each file to be backed up.

6. A data backup method as described in claim 2, characterized in that, The process involves performing a frequency domain transformation on the probability distribution of each file attribute, and then calculating the attribute distribution importance score for each file to be backed up based on the probability distribution before and after the frequency domain transformation. This includes: By taking higher-order derivatives of the probability distributions of each file attribute, higher-order distribution characteristics are obtained; The periodic distribution characteristics are obtained by convolving the probability distribution with a Bessel function; The probability distribution is orthogonally decomposed on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics; The probability distribution is transformed in the frequency domain to obtain frequency domain features; Based on the higher-order distribution features, the periodic distribution features, the multi-scale distribution features, and the frequency domain features, the attribute distribution importance score of each file to be backed up is calculated.

7. The data backup method as described in claim 6, characterized in that, The step of orthogonally decomposing the probability distribution on orthogonal polynomial basis functions to obtain orthogonal distribution characteristics includes: The probability distribution is orthogonally decomposed on each of the preset orthogonal polynomial basis functions to obtain the initial orthogonal distribution characteristics; the orthogonal polynomial basis functions include at least one of Legendre polynomial function, Chebyshev polynomial function and Hermit polynomial function; Based on all the initial orthogonal distribution characteristics, the orthogonal distribution characteristics are obtained.

8. The data backup method as described in claim 1, characterized in that, The method for constructing the backup strategy optimization model includes: Based on the files to be backed up, construct decision variables; Based on the decision variables and the file importance, the backup decision utility is calculated, with maximizing the backup decision utility as the utility optimization objective for the files to be backed up. Based on the decision variables, calculate the resource overhead, and use minimizing the resource overhead as the resource overhead optimization objective for the files to be backed up; Based on the resource cost optimization objective, construct resource cost constraints; Based on the utility optimization objective, the resource overhead optimization objective, and the resource overhead constraints, a backup strategy optimization model is constructed.

9. A data backup method as described in claim 8, characterized in that, The step of constructing decision variables based on the file to be backed up includes: Obtain the files to be backed up for each user, and construct a decision variable for each file to be backed up for each user; the decision variable indicates whether to back up the file to be backed up.

10. A data backup method as described in claim 8, characterized in that, The step of calculating the backup decision utility based on the decision variables and the file importance, with maximizing the backup decision utility as the utility optimization objective for the files to be backed up, includes: Multiply the decision variables and the file importance of the same file to be backed up to obtain the individual backup decision utility of each file to be backed up; The backup decision utility is obtained by adding the individual backup decision utility of each file to be backed up. Maximizing the utility of backup decisions is the goal of optimizing the utility of the files to be backed up.

11. A data backup method as described in claim 8, characterized in that, The resource overhead includes at least one of backup time overhead, storage space overhead, and network bandwidth overhead.

12. The data backup method as described in claim 11, characterized in that, When the resource overhead includes backup time overhead, the step of constructing resource overhead constraints based on the resource overhead optimization objective includes: Obtain the target user's expected backup time window and satisfactory backup time threshold; Calculate the probability that the backup time cost is not greater than the expected backup time window, and obtain the time reliability of the file to be backed up based on the probability and the decision variable; Backup time constraints are constructed based on the time reliability and the backup time satisfaction threshold.

13. A data backup method as described in claim 12, characterized in that, The process of obtaining the target user's expected backup time window and satisfactory backup time threshold includes: Obtain the target user's expected backup time window; The historical backup task success rate of the target user is statistically analyzed, and the confidence lower bound of the historical backup task success rate is calculated based on the preset confidence parameters. The confidence lower bound is used as the target user's backup time satisfaction threshold.

14. The data backup method as described in claim 1, characterized in that, The crossover operation of the improved genetic algorithm includes: Generate a cross mask based on the target user's historical file usage patterns; Generate a first random number, and determine whether to perform a crossover operation guided by the crossover mask based on the preset crossover probability and the first random number; If so, the gene loci of the first parent individual and the second parent individual are extracted complementaryly using the cross mask to obtain the offspring individual; If not, the first parent individual will be directly used as the child individual.

15. A data backup method as described in claim 14, characterized in that, The process of generating a first random number, and determining whether to perform a crossover operation guided by the crossover mask based on a preset crossover probability and the first random number, includes: Generate a first random number; the range of values ​​for the first random number is consistent with the range of values ​​for the preset crossover probability; If the first random number is not greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will be executed. If the first random number is greater than the preset crossover probability, it is determined that the crossover operation guided by the crossover mask will not be performed.

16. A data backup method as described in claim 14, characterized in that, The step of extracting complementary gene loci from the first and second parent individuals using the cross-mask to obtain offspring individuals includes: The cross mask is multiplied bit by bit with the first parent individual to obtain the first set of gene positions; The complement of the cross mask is multiplied bit by bit with the second parent individual to obtain the second set of gene bits; Offspring individuals are obtained based on the first set of gene loci and the second set of gene loci.

17. A data backup method as described in claim 1, characterized in that, The step of solving the backup strategy optimization model using an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up includes: An initial population is randomly generated; each individual in the population corresponds to a backup strategy. If the current generation has not reached the maximum generation, then the fitness value of each individual in the current population is calculated according to the optimization objective of the backup strategy optimization model. Based on the fitness value, select N individuals from the current population to form the parent population; The offspring population is obtained by guiding individuals in the parent population to perform crossover operations using a crossover mask generated based on the behavior patterns in historical files. Perform mutation operations on the offspring population; The parent population and the offspring population after mutation are merged, and the current population and the current generation number are updated. If the current generation reaches the maximum generation, the optimal backup strategy for each file to be backed up is obtained based on the non-dominated solution of the current population.

18. A data backup method as described in claim 17, characterized in that, The step of selecting N individuals from the current population to form the parent population based on the fitness value includes: Based on the fitness value, perform a fast non-dominated sort on the current population and divide the individuals in the current population into different non-dominated levels; Calculate the distribution density of each individual in its stated non-dominated rank to obtain the crowding degree; Based on the non-dominance level and the crowding degree, a binary tournament is used to select N individuals from the current population to form the parent population.

19. A data backup method as described in claim 17, characterized in that, The mutation operation on the offspring population includes: Obtain the preset initial mutation probability; The adaptive mutation probability of the offspring population is calculated based on the current generation number, the maximum generation number, and the initial mutation probability. A second random number is generated for each gene position of an individual in the offspring population. If the second random number is not greater than the adaptive mutation probability, a mutation operation is performed on the gene position.

20. A data backup method as described in claim 19, characterized in that, The step of calculating the adaptive mutation probability of the offspring population based on the current generation number, the maximum generation number, and the initial mutation probability includes: Calculate the mutation probability decay factor based on the current generation number and the maximum generation number; Multiplying the mutation probability decay factor by the initial mutation probability yields the adaptive mutation probability of the offspring population.

21. A data backup method as described in claim 1, characterized in that, The data backup method further includes: Obtain data on changes in the target user's file usage behavior, and based on this data, incrementally update the optimal backup strategy using Bayesian inference.

22. The data backup method as described in claim 21, characterized in that, The process of acquiring file usage behavior change data of the target user, and incrementally updating the optimal backup strategy based on the file usage behavior change data using Bayesian inference, includes: Based on the optimal backup strategy output by the backup strategy optimization model, the spatial distribution of strategy parameters in Bayesian inference is defined. Update the current observation data in response to changes in the target user's file usage behavior; Based on the previous optimal backup strategy, calculate the posterior distribution of the current strategy parameters under the current observation data; Based on real-time resource overhead constraints and preset optimization target weights, calculate the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy; Based on the weighted utility expectation and the posterior distribution, the previous optimal backup strategy is incrementally updated to obtain the current optimal backup strategy.

23. A data backup method as described in claim 22, characterized in that, The step of calculating the posterior distribution of the current strategy parameters under the current observation data based on the previous optimal backup strategy includes: Based on the previous optimal backup strategy and the previous observation data, calculate the prior distribution of the previous strategy parameters at the current time. Based on the current observation data and the previous optimal backup strategy, construct the likelihood function of the strategy function; Based on the prior distribution and the likelihood function, the previous policy parameters are updated using Bayesian methods to obtain the posterior distribution of the current policy parameters under the current observation data.

24. A data backup method as described in claim 22, characterized in that, The step of calculating the weighted expected utility of each candidate backup strategy in the feasible domain of the strategy, based on real-time resource overhead constraints and preset optimization target weights, includes: Based on real-time resource overhead constraints, calculate the target utility value and resource overhead value of each candidate backup strategy in the policy feasible domain for each optimization objective. The target utility value is obtained by weighting and summing the target utility values ​​according to the preset optimization target weights. Based on the weighted target utility value and the resource overhead value, calculate the weighted expected utility of each candidate backup strategy in the policy feasibility domain.

25. A data backup method as described in claim 22, characterized in that, The step of incrementally updating the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy includes: The strategy performance of each candidate backup strategy is calculated based on the posterior distribution and the weighted expected utility of each candidate backup strategy in the policy feasible region. The candidate backup strategy with the best performance is used to incrementally update the previous optimal backup strategy to obtain the current optimal backup strategy.

26. A data backup method as described in claim 22, characterized in that, After incrementally updating the previous optimal backup strategy based on the weighted utility expectation and the posterior distribution to obtain the current optimal backup strategy, the data backup method further includes: Calculate the theoretical optimal utility value of the current optimal backup strategy for each optimization objective; Select a random backup strategy from the feasible strategy domain and calculate the average random utility value of the random backup strategy for each optimization objective. Based on the theoretical optimal utility value and the average random utility value, calculate the feedback value for each optimization objective; Based on the feedback value, the optimization target weights are adaptively updated using an exponentially weighted average.

27. A data backup system, characterized in that, include: The file importance calculation module is used to calculate the file importance of each file to be backed up based on the target user's historical file usage behavior patterns, device environment parameters, and file attributes of the files to be backed up. The model input control module is used to input the file importance into a pre-built backup strategy optimization model; the optimization objectives of the strategy optimization model include maximizing backup decision utility and minimizing resource overhead, and the backup decision utility is calculated from the file importance. The optimal backup strategy generation module is used to solve the backup strategy optimization model through an improved genetic algorithm to obtain the optimal backup strategy for each file to be backed up; the crossover operation of the improved genetic algorithm is guided by a crossover mask generated based on the historical file usage behavior pattern.

28. A data backup device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the data backup method as described in any one of claims 1 to 26.

29. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the data backup method as described in any one of claims 1 to 26.

30. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which, when executed by a processor, perform the data backup method as described in any one of claims 1 to 26.