Computer resource dynamic allocation method and device, terminal equipment and medium

By combining static optimization algorithms and incremental LSTM models, the nonlinear and linear trends of dynamic environments are captured, and new initial populations are generated. This solves the problem of inaccurate resource allocation in dynamic multi-objective optimization problems and achieves efficient computer resource allocation.

CN120872608APending Publication Date: 2025-10-31NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511043310.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing technologies struggle to adapt quickly to environmental changes in dynamic multi-objective optimization problems, leading to inaccurate allocation of computer resources, especially slow convergence speed and insufficient solution set diversity when the environment changes drastically.

Method used

A static optimization algorithm is used in conjunction with a pre-built multi-objective optimization function. An incremental LSTM model is used to capture the nonlinear long-term and linear short-term trends of the network environment. A new initial population is generated through a fusion module to adapt to the dynamic environment.

Benefits of technology

It improves the accuracy and adaptability of computer resource allocation, can capture long-term dependencies of historical Pareto optimal solution sets, quickly responds to changes in the network environment, and enhances robustness in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120872608A_ABST
    Figure CN120872608A_ABST
Patent Text Reader

Abstract

The invention provides a computer resource dynamic allocation method and device, terminal equipment and a medium, and the method comprises the steps: solving a current optimal allocation scheme of a distributed computing network at a current time step through employing a static optimization algorithm and a pre-constructed multi-objective optimization function; detecting network environment data fluctuation of the distributed computing network at the current time step; and when the fluctuation of the network environment data is greater than a preset threshold value, generating a new initial population by using a pre-constructed resource dynamic allocation model and a historical allocation scheme set, entering a next time step, and replacing the initial population of the static optimization algorithm with the new initial population. According to the invention, the accuracy of computer resource allocation in a dynamic environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of dynamic multi-objective optimization, specifically relating to a method, apparatus, terminal device, and medium for dynamic allocation of computer resources. Background Technology

[0002] Dynamic multi-objective optimization problems (DMOPs) are widely found in real-world applications, such as cloud computing resource allocation, supply chain management, and intelligent traffic scheduling. These problems are characterized by objective functions, constraints, or environmental parameters that change dynamically over time, requiring optimization algorithms to quickly adapt to environmental changes and generate high-quality Pareto optimal sets (POS). Traditional methods typically treat DMOPs as a combination of static multi-objective optimization problems (SMOPs), solving them one by one using static evolutionary algorithms (such as NSGA-II and MOEA / D). However, this approach suffers from slow convergence speed and insufficient solution set diversity when the environment changes drastically.

[0003] In recent years, prediction-based response mechanisms have become a research hotspot. Existing technologies mainly include the following categories: Diversity-based methods: Increase population diversity through random initialization or Gaussian mutation (such as DNSGA-II), but the solution set may deviate from the true Pareto front (POF) due to drastic environmental changes.

[0004] Memory-based methods utilize non-dominated solution reuse information stored in the historical environment (such as SGEA and TCA transfer learning), but require a large amount of storage space and have poor adaptability to non-periodic changes.

[0005] Prediction-based methods: (1) Linear prediction: such as the PPS algorithm, which predicts the centroid position through an autoregressive model, but only uses historical information from the previous one or two time steps and cannot cope with nonlinear changes. (2) Kalman filtering: MOEA / D-KF uses linear discrete Kalman filtering to predict the population position, but assumes that environmental changes are linear and is difficult to handle complex dynamics. (3) Transfer learning: Tr-DMOEA maps historical solutions to the latent space through transfer component analysis (TCA), but it relies on stored non-dominated solutions and has a large computational cost.

[0006] Multi-population methods: These methods utilize subpopulations for division of labor and cooperation (such as MGPSO and DPb-MOPSO), but they are prone to getting trapped in local optima and have complex parameter tuning.

[0007] In addition, some methods attempt to introduce deep learning models (such as RNN and LSTM) for sequence prediction, but they lack online incremental learning capabilities and are difficult to adapt to real-time changing environments. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a method, apparatus, terminal device and medium for dynamic allocation of computer resources, so as to improve the accuracy of computer resource allocation in dynamic environments.

[0009] In a first aspect, the present invention provides a method for dynamically allocating computer resources, the method comprising the following steps: Step 1: Using a static optimization algorithm and a pre-built multi-objective optimization function, solve for the current optimal allocation scheme of the distributed computing network at the current time step, and allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme; the initial population of the static optimization algorithm in the current time step is generated iteratively from the population of the previous time step, the individuals in the population are computer resource allocation schemes, and the current optimal allocation scheme is the Pareto optimal solution of the static optimization algorithm in the current time step; Step 2: Detect network environment data fluctuations in the distributed computing network at the current time step; Step 3: When the fluctuation of network environment data is less than or equal to the preset threshold, after storing the current optimal allocation scheme and the network environment data of the current time step into the preset historical allocation scheme set, proceed to the next time step and return to execute Step 1; the historical allocation scheme set includes the historical optimal allocation schemes corresponding to multiple historical time steps. Step 4: When the fluctuation of network environment data exceeds a preset threshold, a new initial population is generated using the pre-built resource dynamic allocation model and the set of historical allocation schemes. The process then proceeds to the next time step, returns to Step 1, and replaces the initial population of the static optimization algorithm in Step 1 with the new initial population. The resource dynamic allocation model includes Branch 1, which is used to capture the nonlinear long-term change trend of network environment data based on the set of historical allocation schemes to predict the distribution trend of the optimal allocation scheme in future time steps; Branch 2, which is used to capture the linear short-term change trend of network environment data based on historical allocation schemes to predict multiple candidate allocation schemes in future time steps; and a fusion module, which is used to fuse the prediction results of Branch 1 and Branch 2 to generate a new initial population.

[0010] Optionally, multi-objective optimization functions include latency optimization, load balancing optimization, and node task queue length optimization.

[0011] Optionally, the static optimization algorithm is the NSGA-II algorithm.

[0012] Optionally, detect network environment data fluctuations in the distributed computing network at the current time step, including: Monitor network environment data at the current time step; network environment data includes node task queue length, node load, and service response latency. The network environment data of the previous time step is obtained from the preset historical allocation scheme set. The difference between the network environment data of the current time step and the network environment data of the previous time step is calculated to obtain the network environment data fluctuation.

[0013] Optionally, based on a set of historical allocation schemes, the nonlinear long-term trend of network environment data is captured to predict the distribution trend of the optimal allocation scheme in future time steps, including: Initialize the incremental LSTM model; The historical optimal allocation scheme in the historical allocation scheme set is used as the training sample. The training samples are sequentially input into the incremental LSTM model for training in the order from the oldest to the newest time step until the training termination condition is met, and the trained incremental LSTM model is obtained. During training, the historical optimal allocation scheme of the previous time step of the current training sample is used as the training label of the current training sample. The initial population of the static optimization algorithm in the current time step is input into the trained incremental LSTM model, and the trained incremental LSTM model outputs the first initial population for the next time step; the first initial population represents the distribution trend of the optimal allocation scheme in future time steps.

[0014] Optionally, based on historical allocation schemes, the linear short-term changing trend of network environment data is captured to predict multiple candidate allocation schemes in future time steps, including: Construct the Pareto front of the initial population of the static optimization algorithm in the current time step based on the multi-objective optimization function; Knee point detection is performed on the Pareto front, and a neighborhood solution set is constructed based on the K nearest neighbor solutions of the knee point; Extract the decision variable matrix and objective function matrix for constructing the neighborhood solution set, and solve the inverse model coefficient matrix based on the decision variable matrix and objective function matrix; Using the objective function value at the knee point as the center, a Gaussian distribution is used for sampling to obtain the target variable; A second initial population is generated based on the inverse model coefficient matrix and the target variable; the second initial population represents multiple candidate assignment schemes in future time steps.

[0015] Optionally, the prediction results from branch one and branch two are merged to generate a new initial population, including: The first and second initial populations are merged to obtain the third initial population; The KMeans clustering algorithm was used to cluster the third initial population, resulting in multiple clusters. After merging the population individuals closest to the cluster center in each cluster with the cluster center of that cluster, the resulting population is used as the new initial population.

[0016] In a second aspect, the present invention provides a computer resource dynamic allocation device, comprising: The current resource allocation module is used to solve the current optimal allocation scheme of the distributed computing network at the current time step using a static optimization algorithm and a pre-built multi-objective optimization function, and allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme. The initial population of the static optimization algorithm in the current time step is generated iteratively from the population of the previous time step, and the individuals in the population are computer resource allocation schemes. The current optimal allocation scheme is the Pareto optimal solution of the static optimization algorithm in the current time step. The environmental fluctuation detection module is used to detect fluctuations in the network environment data of the distributed computing network at the current time step. The data storage module is used to store the current optimal allocation scheme and the network environment data of the current time step into a preset historical allocation scheme set when the network environment data fluctuation is less than or equal to a preset threshold. Then, it enters the next time step and returns to execute the current resource allocation module. The historical allocation scheme set includes the historical optimal allocation schemes corresponding to multiple historical time steps. The resource dynamic optimization module is used to generate a new initial population when network environment data fluctuations exceed a preset threshold. This is achieved by using a pre-built resource dynamic allocation model and a set of historical allocation schemes. The module then proceeds to the next time step, returns to the current resource allocation module, and replaces the initial population of the static optimization algorithm in the current resource allocation module with the new initial population. The resource dynamic allocation model includes a branch one for capturing the nonlinear long-term trend of network environment data based on the set of historical allocation schemes to predict the distribution trend of the optimal allocation scheme in future time steps; a branch two for capturing the linear short-term trend of network environment data based on historical allocation schemes to predict multiple candidate allocation schemes in future time steps; and a fusion module for integrating the prediction results of branch one and branch two to generate a new initial population.

[0017] Thirdly, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0018] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0019] The beneficial effects of this invention are: The computer resource dynamic allocation method provided by this invention has a resource dynamic allocation model. One branch captures the nonlinear long-term variation trend of network environment data based on a set of historical allocation schemes, thereby predicting the distribution trend of the optimal allocation scheme in future time steps. This method can capture the long-term dependency relationship of historical POS, adapt to changes in the dynamic network environment, and provide a basis for computer resource allocation in future time steps, thus improving the accuracy of computer resource allocation in dynamic environments. The other branch captures the linear short-term variation trend of network environment data based on historical allocation schemes, thereby predicting multiple candidate allocation schemes in future time steps, enabling rapid response to linear changes in the network environment. The fusion module can balance the robustness of nonlinear and linear changes in the dynamic environment, improving the accuracy of computer resource allocation in dynamic environments. Attached Figure Description

[0020] Figure 1 This is a flowchart of a method for dynamically allocating computer resources in one embodiment of this application; Figure 2 This is a structural diagram of the dynamic resource allocation model in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of branch one of the resource dynamic allocation model in one embodiment of this application; Figure 4 This is one of the comparative results diagrams in one embodiment of this application; Figure 5 This is the second comparative result diagram of one embodiment of this application; Figure 6 This is a structural diagram of a computer resource dynamic allocation device according to one embodiment of this application; Figure 7 This is a structural diagram of a terminal device in one embodiment of this application. Detailed Implementation

[0021] To address the problem of inaccurate computer resource allocation due to the inability of traditional methods to adapt to real-time changing environments, this invention provides a method, apparatus, terminal device, and medium for dynamic computer resource allocation. One branch of its dynamic resource allocation model captures the nonlinear long-term trend of network environment data based on a set of historical allocation schemes, thereby predicting the distribution trend of the optimal allocation scheme in future time steps. This captures the long-term dependency of historical position values ​​(POS), adapts to changes in the dynamic network environment, and provides a basis for computer resource allocation in future time steps, thus improving the accuracy of computer resource allocation in dynamic environments. The second branch captures the linear short-term trend of network environment data based on historical allocation schemes, thereby predicting multiple candidate allocation schemes in future time steps, enabling rapid response to linear changes in the network environment. The fusion module balances the robustness to both nonlinear and linear changes in the dynamic environment, further improving the accuracy of computer resource allocation in dynamic environments.

[0022] The method for dynamic allocation of computer resources provided by the present invention will be described below with reference to specific embodiments.

[0023] Example 1 like Figure 1 As shown, the computer resource dynamic allocation method provided by the present invention includes the following steps: Step 1: Using a static optimization algorithm and a pre-built multi-objective optimization function, solve for the current optimal allocation scheme of the distributed computing network at the current time step, and allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme.

[0024] It should be understood that a distributed computing network is a computing architecture that uses multiple independent nodes (typically physical servers or virtual machines) to work collaboratively to complete computational tasks. These nodes are connected via a network, collaboratively process data, and share the computational burden. Unlike traditional centralized computing systems, distributed computing networks distribute computational tasks across multiple nodes, thereby achieving efficient resource utilization, load balancing, and fault tolerance. In distributed computing, each node is typically independent and can be a server located in a different geographical location, communicating with each other via network protocols (such as TCP / IP). In this way, the system can scale computing power, improve performance, and tolerate the failure of some nodes or components. Distributed computing is widely used in fields such as big data processing, cloud computing, blockchain, and machine learning.

[0025] It should be noted that, in this embodiment of the invention, the initial population of the static optimization algorithm in the current time step is iteratively generated from the population of the previous time step. On the one hand, the population of the previous time step already contains solutions close to the Pareto optimal front (POF) of the current environment, and using it as the initial population can avoid starting the search from random solutions, significantly shortening the convergence time; on the other hand, the population of the previous time step retains multimodal distribution characteristics through co-evolution (such as KMeans clustering), avoiding the bias of a single prediction model and maintaining the diversity of solutions; furthermore, the population of the previous time step implicitly contains local characteristics of environmental changes (such as linear or nonlinear trends), and through the co-prediction of the inverse model and LSTM, it can simultaneously cope with complex environmental changes.

[0026] The following describes the process of using static optimization algorithms and pre-constructed multi-objective optimization functions to find the current optimal allocation scheme of the distributed computing network at the current time step, and then allocating computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme.

[0027] In one feasible implementation, the static optimization algorithm described above is the NSGA-II algorithm. The multi-objective optimization functions include delay optimization, load balancing optimization, and node task queue length optimization.

[0028] For example, suppose there are N nodes and M tasks to be assigned in a distributed computing network. Define the decision variable as the resource allocation matrix. ,in, Indicates task Assigned to node Resources (including CPU cores, memory size, and bandwidth). , The total resource constraint is as follows: for each task ,satisfy The node capacity constraint is as follows: for each node Its total resource usage does not exceed the maximum capacity. ,Right now ,in, For the task The computer resource requirements.

[0029] Multi-objective optimization includes minimizing the average execution latency of all tasks, minimizing the variance of the load on each node, and minimizing the total length of the task queues on all nodes.

[0030] The expression for the multi-objective optimization function is:

[0031] in, Represents a node The computing speed (e.g., the amount of data processed per second). Indicates task To the node Communication delay, Indicates average node load. Represents a node The current length of the task queue (e.g., the number of tasks to be processed).

[0032] When the set of historical allocation schemes is empty, an initial population P is randomly generated, and each individual in the population is a resource allocation matrix that satisfies the constraints. (Corresponding to computer resource allocation schemes). When the set of historical allocation schemes is not empty, the initial population of the static optimization algorithm is generated iteratively from the population of the previous time step (which can be obtained by retaining the population elites).

[0033] The multi-objective optimization function is used as the population fitness function, and the fitness of individuals in each population is calculated separately. The population P is non-dominated and sorted according to fitness, and divided into different levels (Pareto front); within the same level, it is sorted according to crowding (density of solutions around an individual) to ensure diversity. Population P is subjected to selection, crossover, and mutation operations to obtain offspring population O. Population P and offspring population O are merged to form a new population R. Non-dominated sorting and crowding calculation are performed on R again, and the top 40% of individuals are selected as the new generation population. Repeat this step until the maximum number of iterations is reached to obtain the final Pareto front (composed of the objective function values ​​corresponding to the final population individuals). The resource allocation matrix corresponding to the knee solution (the solution with the most balanced trade-offs among all objectives) in the final Pareto front is selected as the current optimal allocation scheme.

[0034] Computer resources are allocated to nodes participating in task execution in the distributed computing network based on the resource allocation matrix corresponding to the knee solutions.

[0035] Step 2: Detect network environment data fluctuations in the distributed computing network at the current time step.

[0036] In this embodiment of the invention, network environment data includes node task queue length, node load, and service response latency.

[0037] Step 3: When the network environment data fluctuation is less than or equal to the preset threshold, after storing the current optimal allocation scheme and the network environment data of the current time step into the preset historical allocation scheme set, proceed to the next time step and return to execute Step 1.

[0038] The aforementioned set of historical allocation schemes includes the historically optimal allocation schemes corresponding to multiple historical time steps.

[0039] Step 4: When the fluctuation of network environment data exceeds the preset threshold, a new initial population is generated using the pre-built resource dynamic allocation model and historical allocation scheme set. The process then proceeds to the next time step, returns to step 1, and replaces the initial population of the static optimization algorithm in step 1 with the new initial population.

[0040] like Figure 2 As shown, the resource dynamic allocation model includes a branch 201 for capturing the nonlinear long-term trend of network environment data based on the set of historical allocation schemes, thereby predicting the distribution trend of the optimal allocation scheme in the future time step; a branch 202 for capturing the linear short-term trend of network environment data based on the historical allocation schemes, thereby predicting multiple candidate allocation schemes in the future time step; and a fusion module 203 for fusing the prediction results of branch 1 and branch 2 to generate a new initial population.

[0041] Example 2 This embodiment is an explanation of Embodiment 1. Specifically, step 2 includes steps 21 to 22.

[0042] Step 21: Monitor the network environment data at the current time step.

[0043] Step 22: Obtain the network environment data of the previous time step from the preset historical allocation scheme set, calculate the difference between the network environment data of the current time step and the previous time step, and obtain the network environment data fluctuation.

[0044] During the implementation process, before executing step 22, the network environment data is preprocessed, including but not limited to data completion and normalization.

[0045] Example 3 This embodiment is an explanation of Embodiment 1. Specifically, it captures the nonlinear long-term variation trend of network environment data based on the historical allocation scheme set, and predicts the distribution trend of the optimal allocation scheme in future time steps, including steps 31 to 33.

[0046] Step 31: Initialize the incremental LSTM model.

[0047] It should be understood that LSTM is a variant of Recurrent Neural Network (RNN) specifically designed to address the limitations of standard RNNs in handling long-term dependencies. RNNs have a unique advantage in processing sequential data because they can capture and utilize the sequential information of the input data. However, RNNs face the problem of "vanishing gradients" or "exploding gradients" when processing long sequences, making it difficult for them to extract useful information from the distant past. The core of an LSTM network consists of a series of LSTM cells, each containing an input gate, a forget gate, an output gate, and a cell state to achieve efficient storage and updating of contextual information.

[0048] Incremental learning is a method that continuously learns new knowledge from continuously arriving new data by progressively updating model parameters, while retaining the key features already learned. Unlike traditional offline batch learning, incremental learning models can dynamically adjust as they process data streams, eliminating the need to retrain the entire model each time.

[0049] Applying incremental learning to LSTM can effectively overcome the limitations of traditional LSTM in handling dynamic and rapidly changing data. Traditional LSTM models are typically trained offline in batches by inputting all data at once, resulting in fixed model parameters that are difficult to adapt to changes in new data. This makes traditional LSTM unsuitable for scenarios with dynamically changing environments. Through incremental learning, LSTM models can gradually update their parameters to adapt to new environments without having to repeat training on all samples.

[0050] Specifically, in this embodiment of the invention, the LSTM network structure includes an input layer, a hidden layer, and an output layer; wherein, the input layer is used to receive computer resource allocation schemes from the set of historical allocation schemes; the hidden layer is used to capture the nonlinear long-term change trend of network environment data (such as periodic task peaks) according to the historical allocation schemes, and uses the linear short-term change trend as the hidden state to provide guidance for the output layer; the output layer is used to map the hidden state to the decision space to form the distribution trend of the optimal allocation scheme.

[0051] In one feasible embodiment, the processing flow of branch one is as follows: Figure 3 As shown.

[0052] Step 32: Use the historical best allocation scheme in the historical allocation scheme set as training samples, and input each training sample into the incremental LSTM model in the order of the oldest to the newest time step for training until the training termination condition is met, and obtain the trained incremental LSTM model.

[0053] During training, the historical optimal allocation scheme of the current training sample in the previous time step is used as the training label for the current training sample.

[0054] In one feasible implementation, the training termination condition is that the number of model updates reaches a preset maximum number.

[0055] Step 33: Input the initial population of the static optimization algorithm in the current time step into the trained incremental LSTM model, and output the first initial population for the next time step from the trained incremental LSTM model.

[0056] The first initial population represents the distribution trend of the optimal allocation scheme in future time steps.

[0057] Example 4 This embodiment is an explanation of Embodiment 1. Specifically, it captures the nonlinear long-term variation trend of network environment data based on the historical allocation scheme set, and predicts the distribution trend of the optimal allocation scheme in future time steps, including steps 41 to 45.

[0058] Step 41: Construct the Pareto front of the initial population of the static optimization algorithm in the current time step based on the multi-objective optimization function.

[0059] Step 42: Perform knee point detection on the Pareto front and construct a neighborhood solution set based on the K nearest neighbor solutions of the knee points.

[0060] Specifically, the knee detection process is as follows: for the current Pareto front (POF), extract two boundary solutions. and These correspond to the minimum and maximum values ​​of each objective, respectively; based on the boundary solution... and Constructing a hyperplane ;in, For each solution Calculate its distance to the hyperplane Find the vertical distance and select the solution with the largest vertical distance as the knee point.

[0061] Step 43: Extract the decision variable matrix and objective function matrix for constructing the neighborhood solution set, and solve the inverse model coefficient matrix based on the decision variable matrix and objective function matrix.

[0062] Step 44: Using the objective function value at the knee point as the center, sample using a Gaussian distribution to obtain the target variable.

[0063] Step 45: Generate the second initial population based on the inverse model coefficient matrix and the target variable.

[0064] The second initial population represents multiple candidate allocation schemes in future time steps.

[0065] Example 5 This embodiment is an explanation of Embodiment 1. Specifically, the prediction results of branch 1 and branch 2 are merged to generate a new initial population, including: The first and second initial populations are merged to obtain the third initial population; The KMeans clustering algorithm was used to cluster the third initial population, resulting in multiple clusters. After merging the population individuals closest to the cluster center in each cluster with the cluster center of that cluster, the resulting population is used as the new initial population.

[0066] The main advantage of using a KMeans-based co-evolutionary algorithm lies in its ability to effectively maintain population diversity through clustering, avoiding redundant selection of too many similar individuals. The KMeans method helps to evenly distribute individuals within the search space, ensuring the population can explore different regions and thus cover a wider range of solutions in different environments. This is crucial for dealing with uncertainties in dynamic environments. When the network environment changes, population diversity allows for faster adaptation of computer resource allocation to new changes, preventing the population from getting trapped in local optima. Therefore, population co-evolutionary methods help maintain the flexibility and adaptability of a population in dynamic environments.

[0067] Example 6 This embodiment demonstrates the effectiveness of the dynamic allocation method for computer resources provided by this invention. Specifically, the dynamic allocation method for computer resources provided by this invention is compared with representative existing methods: DNSGA-II-A [Deb, 2007]: By introducing a dynamic detection mechanism and a random solution generation strategy, 30% of the population is randomly restarted when the environment changes to help the algorithm quickly adapt to the new problem frontier; PPS [Zhou, 2014]: By establishing a time series model of the centroid to predict the centroid at the next time step and estimating the manifold at the next time step, a population close to the new Pareto front is initialized when environmental changes are detected. Tr [Muruganantham, 2018]: In different environments, the solution to the problem is mapped to a latent space so that the distribution of solutions in different environments is as similar as possible, thereby improving optimization efficiency and search capability; KGB [Ye, 2022]: When environmental changes are detected, the algorithm divides historical optimal solutions into two categories of samples: useful and useless. These samples are used to train a Naive Bayes classifier, thereby quickly locating the Pareto optimal solution in the new environment. *MPA[Wang,2024]: Predicts PS using a pre-trained LSTM model and combines it with archived solutions to form the next generation initial population.

[0068] The parameter settings in the test environment and algorithm are as follows.

[0069] 1) Overall size and number of decision variables: The overall size of the bi-objective problems (DF1-DF9) is set to 100, and the overall size of the tri-objective problems (DF10-DF14) is set to 150. For all test problems, the number of decision variables is set to 10.

[0070] 2) Parameter settings: For each problem, by... and Four pairs of dynamic characteristics are set in different combinations, among which, Represents the intensity of change. The frequencies of change are represented as follows: (1) , =5; (2) , =5; (3) , =10; (4) , =10; in, The value is fixed at 30, ensuring 30 variations per run, with 10% of individuals randomly selected for variation detection each time. Each method runs independently 20 times on each test instance. NSGA-II uses simulated binary crossover (SBX) [Deb, 1995] as the crossover operator, with its crossover distribution exponent and crossover probability set to 20 and 0.8, respectively. It uses multinomial mutation (PM) [Deb, 1996] as the mutation operator, with its mutation distribution exponent and mutation probability set to 20 and 1 / D, respectively, where D represents the dimension of the decision variable.

[0071] For the computer resource dynamic allocation method (IncLSTM) provided by this invention, the hidden layer dimension d=50, the number of LSTM layers is set to 2, dropout=0.5, and epoch=100.

[0072] The statistical results of MIGD and MHV obtained by IncLSTM-IM and the contrast algorithm are as follows: Figure 4 and Figure 5As shown. For intuitive comparison, the best value for each group of instances is highlighted in gray. All results were first subjected to a Friedman test to verify that the data from each group were significantly different, and then a Wilcoxon rank-sum test at a significance level of 0.05 was performed to verify whether IncLSTM was significantly better than, worse than, or equal to the comparison algorithm, indicated by '+', '-', and '=' respectively. From Figure 4 As can be seen, in 56 test problems, the dynamic resource allocation method provided by this invention achieved the best MIGD (Mean Inverted Generational Distance) results on 39 problems. This result indicates that the dynamic resource allocation method provided by this invention exhibits superior dynamic Pareto front (POF) tracking capability in most cases. This performance demonstrates that the dynamic resource allocation method provided by this invention can effectively respond to environmental changes and adjust its prediction strategy in real time, thereby providing a high-quality solution set for multi-objective optimization.

[0073] However, in two-objective problems, the dynamic resource allocation method provided by this invention performs worse than KGB in C1 and C3 of DF1, but better than other algorithms. DF1 has simple dynamics on PS, with its PF geometry changing from concave to convex, indicating that when the changes are drastic, the dynamic resource allocation method provided by this invention is slightly weaker in tracking concave-convex changes. Meanwhile, the dynamic resource allocation method provided by this invention is weaker than PPS and KGB in C2 and C3 of DF2, but outperforms other algorithms in C1 and C4. Since DF2 is a type I dynamic change, i.e., PS changes but PF remains unchanged, it indicates that the dynamic resource allocation method provided by this invention has a certain adaptability to type I problems, but further analysis is needed. On DF6, the dynamic resource allocation method provided by this invention performs poorly in C1-C3. Compared with other DF suites, DF6 has multimodality characteristics, and all algorithms perform poorly on DF6, which may be related to the compatibility of the problem itself with the static optimizer. In the three-objective DF problem, the dynamic allocation method for computer resources provided in this invention performs poorly in DF14. In DF14, the size and dimensions of the power field (PF) change dynamically, and the PF can degenerate into a one-dimensional manifold. When the PF does not degenerate, the number of knee regions changes accordingly. Similarly, KGB also performs poorly in DF14, but the other three algorithms perform well. This may be because IncLSTM and KGB use complex machine learning models to train and predict on historical data, leading to overfitting and difficulty in handling the dynamic changes in the PF dimension, thus resulting in inferior performance compared to other relatively simpler methods.

[0074] In addition, the dynamic allocation method for computer resources provided by this invention significantly outperforms other algorithms in other test problems, demonstrating its strong adaptability and robustness. Different nt and τt configurations further verify the flexibility of the dynamic allocation method for computer resources provided by this invention in changing environments, indicating that it can maintain stable performance when dealing with complex dynamic problems.

[0075] In summary, the dynamic resource allocation method provided by this invention has a resource allocation model that, in one branch, captures the nonlinear long-term trend of network environment data based on a set of historical allocation schemes, thereby predicting the distribution trend of the optimal allocation scheme in future time steps. This allows it to capture the long-term dependency of historical POS, adapt to changes in the dynamic network environment, and provide a basis for computer resource allocation in future time steps, thus improving the accuracy of computer resource allocation in dynamic environments. The other branch captures the linear short-term trend of network environment data based on historical allocation schemes, thereby predicting multiple candidate allocation schemes in future time steps, enabling rapid response to linear changes in the network environment. The fusion module balances the robustness of nonlinear and linear changes in the dynamic environment, further improving the accuracy of computer resource allocation in dynamic environments.

[0076] The following describes the computer resource dynamic allocation device provided by the present invention.

[0077] like Figure 6 As shown, the computer resource dynamic allocation device 600 includes: The current resource allocation module 601 is used to solve the current optimal allocation scheme of the distributed computing network at the current time step using a static optimization algorithm and a pre-built multi-objective optimization function, and allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme. The initial population of the static optimization algorithm in the current time step is generated iteratively from the population of the previous time step, and the individuals in the population are computer resource allocation schemes. The current optimal allocation scheme is the Pareto optimal solution of the static optimization algorithm in the current time step. The environmental fluctuation detection module 602 is used to detect network environment data fluctuations in the distributed computing network at the current time step. The data storage module 603 is used to, when the network environment data fluctuation is less than or equal to a preset threshold, store the current optimal allocation scheme and the network environment data of the current time step into a preset historical allocation scheme set, proceed to the next time step, and return to execute the current resource allocation module; the historical allocation scheme set includes the historical optimal allocation scheme corresponding to multiple historical time steps; The resource dynamic optimization module 604 is used to generate a new initial population by utilizing a pre-built resource dynamic allocation model and a set of historical allocation schemes when the fluctuation of network environment data exceeds a preset threshold. It then proceeds to the next time step, returns to the current resource allocation module, and replaces the initial population of the static optimization algorithm in the current resource allocation module with the new initial population. The resource dynamic allocation model includes: Branch 1, which captures the nonlinear long-term trend of network environment data based on the set of historical allocation schemes to predict the distribution trend of the optimal allocation scheme in future time steps; Branch 2, which captures the linear short-term trend of network environment data based on historical allocation schemes to predict multiple candidate allocation schemes in future time steps; and a fusion module, which integrates the prediction results of Branch 1 and Branch 2 to generate a new initial population.

[0078] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that, for the sake of convenience and brevity, the division of the above-mentioned functional units and modules is only used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0079] like Figure 7 As shown, embodiments of the present invention provide a terminal device, such as... Figure 7 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 7 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 executes the computer program D102 to implement the steps in any of the above method embodiments.

[0080] Specifically, when the processor D100 executes the computer program D102, it performs steps 1 to 4 above. Branch one of its designed dynamic resource allocation model captures the nonlinear long-term trend of network environment data based on a set of historical allocation schemes, thereby predicting the distribution trend of the optimal allocation scheme in future time steps. This captures the long-term dependency relationship of historical POS, adapts to changes in the dynamic network environment, and provides a basis for computer resource allocation in future time steps, thus improving the accuracy of computer resource allocation in dynamic environments. The other branch captures the linear short-term trend of network environment data based on historical allocation schemes, thereby predicting multiple candidate allocation schemes in future time steps, enabling rapid response to linear changes in the network environment. The fusion module balances the robustness of nonlinear and linear changes in the dynamic environment, improving the accuracy of computer resource allocation in dynamic environments.

[0081] The processor D100 can be a central processing unit (CPU), or it can be 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. A general-purpose processor can be a microprocessor or any conventional processor.

[0082] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0083] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0084] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0085] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.

[0086] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.

Claims

1. A method for dynamically allocating computer resources, characterized in that, include: Step 1: Using a static optimization algorithm and a pre-constructed multi-objective optimization function, solve for the current optimal allocation scheme of the distributed computing network at the current time step, and allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme; the initial population of the static optimization algorithm in the current time step is generated iteratively from the population of the previous time step, the individuals in the population are computer resource allocation schemes, and the current optimal allocation scheme is the Pareto optimal solution of the static optimization algorithm in the current time step; Step 2: Detect network environment data fluctuations in the distributed computing network at the current time step; Step 3: When the network environment data fluctuation is less than or equal to a preset threshold, after storing the current optimal allocation scheme and the network environment data of the current time step into a preset historical allocation scheme set, proceed to the next time step and return to execute Step 1; the historical allocation scheme set includes the historical optimal allocation schemes corresponding to multiple historical time steps. Step 4: When the fluctuation of the network environment data exceeds a preset threshold, a new initial population is generated using the pre-constructed dynamic resource allocation model and the set of historical allocation schemes. The process then proceeds to the next time step, returns to Step 1, and replaces the initial population from the static optimization algorithm in Step 1 with the new initial population. The dynamic resource allocation model includes a branch one for capturing the nonlinear long-term trend of network environment data based on the set of historical allocation schemes to predict the distribution trend of the optimal allocation scheme in future time steps; a branch two for capturing the linear short-term trend of network environment data based on the historical allocation schemes to predict multiple candidate allocation schemes in future time steps; and a fusion module for integrating the prediction results of branch one and branch two to generate the new initial population.

2. The method for dynamic allocation of computer resources according to claim 1, characterized in that, The multi-objective optimization function includes delay optimization, load balancing optimization, and node task queue length optimization.

3. The method for dynamic allocation of computer resources according to claim 2, characterized in that, The static optimization algorithm is the NSGA-II algorithm.

4. The method for dynamic allocation of computer resources according to claim 3, characterized in that, The detection of network environment data fluctuations in the distributed computing network at the current time step includes: Monitor network environment data at the current time step; the network environment data includes node task queue length, node load, and service response latency. The network environment data of the previous time step is obtained from the preset historical allocation scheme set, and the difference between the network environment data of the current time step and the network environment data of the previous time step is calculated to obtain the network environment data fluctuation.

5. The method for dynamic allocation of computer resources according to claim 4, characterized in that, The step of capturing the nonlinear long-term variation trend of network environment data based on the historical allocation scheme set, and thereby predicting the distribution trend of the optimal allocation scheme in future time steps, includes: Initialize the incremental LSTM model; The historical optimal allocation scheme in the set of historical allocation schemes is used as the training sample. The training samples are sequentially input into the incremental LSTM model for training in the order from the oldest to the newest time step until the training termination condition is met, and the trained incremental LSTM model is obtained. During training, the historical optimal allocation scheme of the previous time step of the current training sample is used as the training label of the current training sample. The initial population of the static optimization algorithm in the current time step is input into the trained incremental LSTM model, and the trained incremental LSTM model outputs the first initial population for the next time step; the first initial population represents the distribution trend of the optimal allocation scheme in future time steps.

6. The method for dynamic allocation of computer resources according to claim 5, characterized in that, The step of capturing the linear short-term trend of network environment data based on the historical allocation scheme to predict multiple candidate allocation schemes in future time steps includes: Construct the Pareto front of the initial population of the static optimization algorithm in the current time step based on the multi-objective optimization function; Knee point detection is performed on the Pareto front, and a neighborhood solution set is constructed based on the K nearest neighbor solution of the knee point; Extract the decision variable matrix and objective function matrix of the constructed neighborhood solution set, and solve the inverse model coefficient matrix based on the decision variable matrix and objective function matrix; Using the objective function value at the knee point as the center, a Gaussian distribution is used for sampling to obtain the target variable; A second initial population is generated based on the inverse model coefficient matrix and the target variable; the second initial population represents multiple candidate allocation schemes in future time steps.

7. The method for dynamic allocation of computer resources according to claim 6, characterized in that, The process of fusing the prediction results of branch one and branch two to generate the new initial population includes: The first initial population and the second initial population are merged to obtain a third initial population; The third initial population was clustered using the KMeans clustering algorithm to obtain multiple clusters. After merging the population individuals closest to the cluster center in each cluster with the cluster center of that cluster, the resulting population is used as the new initial population.

8. A computer resource dynamic allocation device, characterized in that, include: The current resource allocation module is used to solve the current optimal allocation scheme of the distributed computing network at the current time step using a static optimization algorithm and a pre-built multi-objective optimization function, and to allocate computer resources to the nodes participating in task execution in the distributed computing network according to the current optimal allocation scheme. The initial population of the static optimization algorithm in the current time step is generated iteratively from the population of the previous time step, and the individuals in the population are computer resource allocation schemes. The current optimal allocation scheme is the Pareto optimal solution of the static optimization algorithm in the current time step. The environmental fluctuation detection module is used to detect network environment data fluctuations in the distributed computing network at the current time step; The data storage module is used to, when the network environment data fluctuation is less than or equal to a preset threshold, store the current optimal allocation scheme and the network environment data of the current time step into a preset historical allocation scheme set, proceed to the next time step, and return to execute the current resource allocation module; the historical allocation scheme set includes multiple historical optimal allocation schemes corresponding to historical time steps; The resource dynamic optimization module is used to generate a new initial population by utilizing a pre-constructed resource dynamic allocation model and the set of historical allocation schemes when the fluctuation of the network environment data exceeds a preset threshold. It then proceeds to the next time step, returns to the execution of the current resource allocation module, and replaces the initial population of the static optimization algorithm in the current resource allocation module with the new initial population. The resource dynamic allocation model includes a branch one for capturing the nonlinear long-term trend of network environment data based on the set of historical allocation schemes to predict the distribution trend of the optimal allocation scheme in future time steps; a branch two for capturing the linear short-term trend of network environment data based on the historical allocation schemes to predict multiple candidate allocation schemes in future time steps; and a fusion module for fusing the prediction results of branch one and branch two to generate the new initial population.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.