Research on Optimal Matching Scheme of Public Resource Management Based on the Computational Intelligence Model

*emanagement of public resources means that people’s governments at all levels and other public administrative subjects should use certain means and methods, follow certain principles, rationally allocate and utilize public resources, and maximize their functions and benefits. Under the background of limited human resources, this study adheres to the principle of maximizing the benefits of human resources and rationally allocates the use of human resources. In this study, this kind of resource allocation problem is regarded as a linear programming problem by specifying the benefit function, and then, genetic algorithm, ant colony algorithm, and hybrid genetic-ant colony algorithm are used to solve the problem; the cost and time consumption of different algorithms under different scales are evaluated. Finally, it is found that genetic algorithm is superior to ant colony algorithm when the task scale is small and the effect of genetic algorithm is lower than ant colony algorithm with the expansion of task scale, whereas the improved hybrid genetic-ant colony algorithm is better than ordinary algorithm in general.


Introduction
With the development of the times and the progress of society, the current situation of unreasonable resource allocation has become more and more serious. e distribution of public resources has also become an issue that cannot be ignored in today's society. From the perspective of computational intelligence, resource allocation is, in the final analysis, a linear programming problem, which generally refers to the allocation of a limited amount of resources to all types of activities. Wu et al. [1] used an adaptive ant colony algorithm to solve the optimization problem of multiresource allocation. After a series of verification experiments, the final results show that the ant colony algorithm has the ability to solve large-scale and multiresource problems, and the comparison results show that the adaptive ant colony algorithm has more advantages than the genetic algorithm. Xu et al. [2] aimed at specific medical resource allocation problems, combined with computational intelligence to establish a customized medical resource allocation model, and combined the model with genetic algorithm to solve the model. e final experimental results showed that the model has excellent practical value. In order to solve the UAV assignment problem [3], it is transformed into an optimization problem under multiple constraints, and then, genetic algorithm and several other computational intelligence algorithms are used. Because the actual size of UAVs is large, it is a big problem in assigning tasks. e simulation experiment on the scale of the assigned task in this document shows that the genetic algorithm has better performance in smaller-scale problems, but when the problem scale becomes larger, its average calculation time far surpasses other algorithms. Nezhad and Shahbazian [4] converted the orthogonal frequency division multiple access technology (OFGMA) resource allocation problem into a function optimization problem and obtained the optimal solution to the objective function after mixing the traditional genetic algorithm and the particle swarm algorithm. e research results showed that the hybrid algorithm has an effective improvement in system fairness and throughput compared with ordinary algorithms. Zhang and Chen [5] resourced the logistics personnel in the medical system for allocating various tasks in the hospital, in order to obtain the highest operating efficiency of the hospital and used genetic algorithms to build an automatic task allocation system. Among them, the selection operator adopts the championship mode, and some parent genes with low fitness are also involved in the parent selection to make the offspring more diversified while ensuring the speed of its operation. According to the comparison with the simulated annealing algorithm, its performance is better than that of the simulated annealing algorithm, but it performs poorly in terms of overall computing speed. Some researchers [6,7] studied the ant colony algorithm to solve the multiobjective resource allocation problem. e literature optimized the pheromone update system and the probability selection form of the ant colony algorithm and finally compared it with the genetic algorithm in solving the employee assignment problem. e results show that the optimized ant colony algorithm is better than the genetic algorithm. Bublitz et al. [8] compared the four important branches of neural network, evolutionary computing (genetic algorithm), swarm intelligence (particle swarm algorithm), and artificial immune system through the research of the current branch algorithms of computational intelligence. Although the genetic algorithm can achieve the global optimal effect, it cannot effectively use the feed forward information, which results in the low efficiency of the algorithm. e particle swarm algorithm is also easy to fall into the local optimum. Li et al. [9] solved the problem of TSP. When optimizing the problem, the genetic algorithm is compared with the ant colony algorithm. e results show that the genetic algorithm is better than the ant colony algorithm when the problem is small, but as the scale increases, the effect is lower than the ant colony algorithm. Forootani et al. [10] studied the use of optimal strategies to solve the problem of resource allocation, combined with the company's dynamic allocation of project funds and processing resources under actual conditions, using the principle of optimization and multistage decision making while combining the chart method to maximize the company's profits. e study shows that the planning problem has practical feasibility in dynamic resource allocation. Tan et al. [11] cited genetic algorithm in the financial field and transformed the problem of project fund allocation into a planning problem. e article mentioned that the income function can be obtained by fitting actual data by neural network. Finally, combined with examples, it proves that genetic algorithm is solving the problem. When solving the problem optimally, it is possible to achieve the global optimum. Ikeda et al. [12] proposed a genetic algorithm based on fuzzy logic in order to optimize the multimedia communication problem. e simulation results show that the proposed framework has good performance and is a promising decision-making method. Lin and Lin [13] uses genetic algorithm for multiobjective optimization and solved some sample optimization problems involving two and three objective functions. It is suitable for both the operation of existing factories and the design of new factories. A set of nondominated Pareto solutions is obtained for the research problem. Marler and Arora [14] introduced the current investigation of continuous, nonlinear, multiobjective, optimization concepts and methods. It integrated and correlated with seemingly different terms and methods. e characteristics of these methods are summarized. e conclusion reached depends on the type of information provided in the question, user preferences, solution requirements, and software availability. Vrugt et al. [15] introduced a hydrological model. rough the practical experience of research and calibration, an efficient Markov chain Monte Carlo sampler called a multiobjective, shuffled, complex, evolution urban algorithm was proposed, which can solve the problem of hydrological models. Hai [16] mentioned that the current cloud computing used in various fields also requires optimization of resource scheduling and allocation. e ant colony algorithm is introduced to apply to the resource scheduling problem of cloud computing. In order to make the ant colony algorithm better, it is mentioned that constraints can be added. e conditions also give a series of starting points for changing and adding constraints, and it also mentions the use of other algorithms combined with ant colony algorithm to achieve complementarity. Bai et al. [17] analyzed the current research status of cloud computing resource scheduling algorithm, genetic algorithm, and ant colony algorithm. Genetic algorithm has high search efficiency in the early stage, and it is easy to produce local optimal solutions in the later stage. However, the search efficiency of ant colony algorithm is low in the early stage and the later stage. Because of its positive feedback and other characteristics, it is easy to obtain the optimal solution. rough experiments, the improved genetic algorithm and the improved ant colony algorithm are compared, and the effectiveness of the algorithm in the cloud computing resource scheduling process is proved.
rough the research on the management of public resources in China, it shows that there are still a series of major problems in the management of public resources [18], including the problem of resource allocation, and the unreasonable resource allocation directly leads to the excess of resources and the lack of resources, thus making society inefficient.
is study first uses genetic algorithm to solve the problem in the second part and uses the ant colony algorithm to solve the problem in the third part. After that, the two algorithms are merged, combining the advantages and disadvantages of the two algorithms to solve the problem again.
e final result shows that the genetic-ant colony hybrid algorithm has the ability to solve large-scale and multiresource problems, and the comparison result shows that the adaptive ant colony algorithm has more advantages than the genetic algorithm.

Overview of the Problem
e solution of resource allocation problem mainly includes two aspects, namely, problem modeling and solving. Scientific Programming

Modeling of Resource Allocation Problems.
From the perspective of the problem itself, as one of the common types of linear programming problems, resource allocation problems are widely used in real life. erefore, a large number of computational intelligence methods are also widely used in the analysis and solution of such problems, such as genetic algorithm, ant colony optimization algorithm [19], particle optimization algorithm [20], dynamic programming [21], branch and bound, and decision tree methods.
In real-life public resource management problems, there are many types of resource allocation problems, and the constraints are also different, but the ideas for solving the problems are roughly the same. For the allocation of multiple public resources to different activities, under the premise of limited resources, seek the optimal allocation plan with the greatest benefit. Given decision variables, where i(i ∈ 1, 2, 3, . . . , n { }) represents the task index, j(j ∈ 1, 2, 3, . . . , n { }) represents the number of resources, n represents the total number of tasks, m represents the total number of resources, cij represents the cost of resource j occupied by task i, and e ij represents the benefit generated by resource j occupied by task i. e objective function (2) and the objective function (3) indicate that the maximum benefit should be generated, and the least resources should be consumed. Constraint N i�1 M j�0 X ij , j ≤ M, ensures that the total number of resources does not overflow; constraint M j�1 X ij � 1 ensures that each task i can only get one resource allocation. Pareto optimal solution is usually the solution of multiobjective programming problem. e ij represents the cost required to allocate resource j to task i, whereas c ij represents the benefit generated by allocating resource j to task i. e purpose of this constraint condition is to maximize the benefit under the minimum cost and conditions. Although there are some changes in e ij and c ij under different problems, their ideas are still practical.

Solving the Problem of Resource Allocation.
In the current background of rapid development of artificial intelligence [22], more and more intelligent algorithms are used to solve such problems. For example, the common dynamic programming, branch and bound, and decision tree methods are used in the study of this article. However, when such algorithms deal with np-hard problems, such as resource allocation, as the scale of the problem becomes larger, the computational difficulty and computational cost also increase exponentially.
On this basis, this article calculates some control methods in the process of artificial intelligence immune system, such as genetic algorithm, ant colony control algorithm, artificial intelligence immune control algorithm, and so on. Such algorithms do not have the characteristics of polynomial time when solving resource allocation problems, so they are often widely used in the process of solving such problems. But for specific problems, it is necessary to separately describe and model the problem of resource allocation.

Genetic Algorithm.
In the genetic algorithm, a population of size n is initialized, and the parental fitness value of each individual in the population is adjusted. Larger individuals are more likely to choose fitness values as individuals with parents. rough crossbreeding, n parents will produce n offspring, the offspring of n parents will mutate with a certain probability, and they will all survive and form a new next generation. In the genetic algorithm, the crossover operator is considered to be a major genetic operator, and the individual is mutated with a low probability.
Adaptive genetic algorithm [23] can be used as a kind of genetic algorithm, and the general way of realization is similar to that of genetic algorithm. First, analyze various variables for initial and evolution and then determine the scale of occurrence of each biological population, the probability of crossover, the probability of occurrence of mutation, and a series of parameters. en, generate the initial population, take the initial population as the parent, and take the individuals with higher fitness to perform crossmutation and other operations. After the offspring are produced, the qualified offspring are screened out, and the accompanying individuals with higher fitness are used to replace the fitness of the offspring. en, it is judged whether there is an individual in the offspring that meets the termination condition of the algorithm. If it cannot be terminated, the offspring will be used as the new parent to repeat the above steps until the termination condition is met, and the optimal solution is found.

Implementation Steps of Genetic Algorithm.
e optimization model that defines its two-dimensional resource allocation problem is as follows: e resources A and B are allocated to N activities, and the allocation schemes are denoted by y i and x i , respectively. e total resource of A is P 1 , and the total resource of B is P 2 . en, stipulate the benefit function F(y, x) according to the actual situation. For the multidimensional resource allocation problem, it can also be solved in the above-mentioned way, with only a little improvement. e meaning expressed in formula (2) is to ensure that the number of allocated resources does not exceed the total number of resources, and x ij is a decision variable. If resource j is allocated to task i, it means that the value of resource j in formula (2) is 1 and the sum of allocated resources cannot be greater than the total number M. e two resource allocations are independent and the total amount is fixed.
Step 1: generate the initial population Use binary encoding to generate a set of chromosomes G k (k � 1, 2, . . . , N), where N is the size of the group. Because this article is mainly based on the two-dimensional resource allocation problem as an example, the length of the variable code string is 2N, so the length value of one of the chromosomes is 2N * l, and the code string length for the variable is l digits, and each l digit. e length of the code string is equivalent to a decimal integer b i (i � 1,2,3, n). What is different is that G k is the first-generation population.
Step 2: feasibility process e chromosome code is mapped to the position to meet the feasibility of the problem. Normalize b i to b i ′ , let x i � ab i ′ , at this time all the vectors Z p (p � 1, 2, 3 . . . , n) composed of x i can satisfy the constraints. at is a vector corresponding to the same chromosome produces a feasible solution.
Step 3: calculate fitness Take a new objective fitness function as an optimal fitness function. For each chromosome in different population pedigrees of the same generation of chromosome G k , combine all the corresponding optimal feasible solutions Z k that we require above substituting an objective fitness function, you can directly and accurately find their optimal fitness function value.
e higher the fitness value, which shows that their corresponding optimal feasible solutions are closer to the optimal solutions.
Step 4: chromosome selection Copy the chromosomes with the highest fitness in each generation population to the next generation population. For the cumulative population up to the next generation, first, the system will automatically generate a random probability number between 0 and f k ′ , and count each random value, starting from the first chromosome G 1 for random accumulation. When the value of accumulation and random adaptability is greater than the random probability number generated by the second-generation accumulation, the system will automatically suspend the accumulation and finally add the accumulated chromosomes that have been replaced. is may also be each chromosome that needs to be randomly selected as described in this article. Finally, the random probability of each cumulative chromosome being selected and the cumulative fitness value are kept in direct proportion, and then, the unselected chromosomes are maintained. Each chromosome is eliminated.
Step 5: chromosome hybridization After the new population reproduces, select "individual pairs" according to the probabilities P C of various crosses and perform a single-point cross (a total of n/2 times). In this study, P C is 0.7. Singlepoint cross hybridization is adopted, and the method of cross-exchange points is randomly selected, and the feasibility optimization of all the obtained chromosome progeny data can effectively ensure that the chromosomes after cross hybridization in the population correspond to each other and the feasibility optimization. Calculate the fitness value that the offspring needs and then enter the new population by replacing other fathers and sons.
Step 6: chromosome variation In order to effectively maintain the evolutionary diversity of various groups on biological chromosomes and maintain the "evolution" of populations on biological chromosomes, this article randomly selected individual populations on some biological chromosomes for adaptive mutation, considering that these are some of the biological variant chromosomes, i.e., the basic feature, the probability of mutation is not very large.
is article first uses random P m � 0.05 and randomly selects some sites that adapt to mutation as e adaptive mutation and infeasibility of these mutated biological chromosome populations can be effectively done to ensure that the solutions corresponding to these mutated chromosomes are feasible solutions and then sequentially calculate the values, and values that are adapted on these chromosomes may enter the varieties.
Step 7: judging the conditions for stopping evolution If during the evolution process from m − s generation to m + s generation, the highest fitness value in the chromosomes of each generation remains unchanged, you can stop its evolution; otherwise, return to Step 4. Scientific Programming

Adaptive Ant Colony Algorithm.
e resource allocation problem can be regarded as a boxing problem. e public resource v to be allocated is regarded as an item, and each activity p is regarded as a box. is article will be analogous to the idea of solving the boxing problem to deal with the optimization and matching problem of public resource management. Ant colony algorithm has the characteristics of distributed calculation and positive feedback of information and heuristic search, so it has become one of the most classic algorithms for solving box packing problems. Based on the above characteristics, compared with other algorithms, it can more effectively converge to the optimal solution when solving the packing problem. erefore, this article will select the ant colony algorithm to deal with the optimization matching problem of public resource management. is algorithm is completed by simulating the entire process of ant foraging. First, the ant-bee randomly selects a feasible path. When the ant-bee reaches the expected planned path, it stops and starts to calculate the adaptability of this path. e ant-bee establishes a corresponding information on the path according to its own adaptability. Finally, in order to concentrate the entire ant clustering on a higher fitness approach and find the best solution as quickly as possible, it is necessary to update the pheromone and select actions. For example, the use of honeycomb swarm algorithm for task scheduling. First, the initialized pheromone and heuristic information and other related parameters. Second, each ant receives the assigned task, and when the assigned task is successfully assigned to each ant's resource, it will be recorded in its own taboo list. ird, for the following tasks that have not been accessed, repeat the above steps until the task is no longer added to table, and all tasks are considered to be completely scheduled. e goal of adaptive ant colony algorithm is to find the optimal solution of optimization problem. Ants often choose a path with a large amount of information in the process of traveling, However, when many ants choose the same path, the amount of information in the path will suddenly increase, which makes many ants concentrate on a certain path, resulting in a blockage and stagnation phenomenon, which is easy to lead to prematurity and local convergence when using ant colony algorithm to solve problems.
is is the root cause of the shortcomings of ant colony algorithm. erefore, we modify the selection strategy, adopt the combination of deterministic selection and random selection, and dynamically adjust the probability of deterministic selection in the search process. When the evolution direction has been basically determined after a certain algebra, the information amount on the path is dynamically adjusted. e shortcoming of the basic ant colony algorithm can be effectively overcome by narrowing the information gap between the best path and the worst path and appropriately increasing the probability of random selection so as to search more completely less than one pair of solution spaces.

Pheromone Function Definition.
e whole process of simulating a path in which ants form a path is to allocate resources to each task reasonably. erefore, the selection of each task and the update of pheromone in the heuristic information and algorithms are greatly interconnected. t(T i , R j ), which means that a task is allocated to the information element required by a certain resource. In the initialization phase, the pheromone is calculated by the following formula: where n represents the number of activities, the solution S 0 obtained using the descending first adaptation algorithm to solve the boxing problem is marked as S 0 , and W(S 0 ) the amount of waste of resources generated by this solution of S 0 . p ′ (S 0 ) is the result of normalizing the energy consumption of this solution of S 0 . It can be calculated by the following formula: where p max j represents the amount of resources consumed by task j.

Transition Probability of Behavioral Choice.
e following methods are used to select its behavior so that we can obtain the optimal solution: A hypothesis is that in the process of the k-th replacement, the resource set marked by the deadline and budget constraints required by this task will be able to be met into g k (T i , R j ).
erefore, in the k-th iteration, the resource R j that task T i needs to select is the probability of completing the scheduling work, which is given by the following formula: In equation (7), t(T i , R j ) indicates that the task T i is allocated to a pheromone of the resource R j in a certain path and η(T i , R j ) indicates the heuristic information corresponding to the path. It can be set as the reciprocal of the starting time of a task assigned to the resource. e parameters α and β are, respectively, regarded as the weighting factors occupied by heuristic information and other pheromones. ey both represent the relative importance of heuristic information and other pheromones, and they play an important regulatory role.

Fitness Function.
For example, when an ant passes through all active tasks, a path has been formed, and this path is a feasible solution to the problem. In order to effectively avoid falling into a local optimal state, to ensure the accuracy and quality of the obtained solution, and to ensure that the obtained solution is the global optimal solution as much as possible and in order to accurately evaluate the accuracy and pros and cons of the obtained solution, we need to choose a function of fitness.
is article mainly adopts the research method of defining the fitness function Scientific Programming 5 based on the theoretical basis of the optimization model problem. Taking the scheduling optimization model established in the article as the theoretical basis, two scheduling goals are analyzed and designed, and the cost is reduced to a minimum. erefore, the fitness function of the following formula is the evaluation value.
where c and δ in represent the two weighting factors of operating cost and resource waste, respectively. e two conditional formulas are c < δ, c and δ ∈ (0, 1), and F (x) and B (x) are the objective functions used to represent operating cost and resource waste, respectively. It can be concluded from the above summary that the lower the value of the fitness function, the less waste caused by operating costs and human resources.

Pheromone Update.
Ants cruise the path according to the pheromone concentration on the path. If a path is highly adaptable, the pheromone concentration of this path should be strengthened so that more ants can find this path. erefore, it is necessary to update the pheromone at each point on the path. e update rule is as follows: In formula (9), ρ represents the speed and degree of pheromone disappearing in the air, that is, the evaporation factor, and t(T i , R j ) represents the number and increment of pheromone in the air. e higher the adaptability of the path, the more the corresponding increase in diffusion, which is a positive feedback adjustment mechanism.
Q in equation (10) is a constant, and its initial value is 10. Among them, the lower the value of f (x) and b (x), the higher the value increment of the pheromone. Based on the positive feedback mechanism, the better solution in the path may gradually increase with the further update of the pheromone, whereas the worse solution may also gradually weaken with the further update of the pheromone and finally be discarded. After several consecutive years of iteration, more and more ants will move towards an optimal path. In order to prevent the solution, we can only be optimized in one part; the evaporative factor of pheromone can play an important regulatory role.

Ant Colony Algorithm Process.
e flow chart of the ant colony algorithm is shown in Figure 1.

Improved Genetic-Ant Colony Algorithm Fusion
At present, most scholars [24] optimize the ant colony algorithm mainly in two aspects: one is to add constraints to the ant colony algorithm to overcome the shortcomings of the original algorithm; secondly, to integrate other algorithms with the ant colony algorithm. Complementary, use the advantages of other algorithms to improve the shortcomings of the ant colony algorithm. In order to effectively avoid the shortcomings of the two algorithms, this study adopts the second method of algorithm optimization, which is to combine the two algorithms to form complementary advantages. Hybrid algorithm not only synthesizes the advantages of the two algorithms but also inherits the shortcomings of the two algorithms to a certain extent, so we still need to adapt to local conditions and choose the appropriate algorithm in the actual production process. When the amount of data is small, a single genetic algorithm can be directly used to solve it.

Improved Dynamic Fusion Strategy of Genetic-Ant Colony
Algorithm. In this study, the optimal solution obtained by the genetic algorithm is transformed into the initial value allocation strategy of the ant colony algorithm, and the specific operations are as follows: (1) First, use the characteristics of genetic algorithm to generate a series of optimized solutions for resource scheduling problems. In this evolution process, the evolution speed of each generation of population in the genetic algorithm is calculated. Within the range of satisfying the maximum number of runs, if the evolution speed of the population for n consecutive generations is less than the preset minimum value, the genetic algorithm is terminated. (2) Enter the ant colony algorithm after meeting the fusion conditions. First, the first 10% of the optimized solution of genetic algorithm is converted into the pheromone value of the initial path of the ant colony algorithm, and then, the optimal scheduling plan is calculated according to the characteristics of the ant colony algorithm. According to the above operation process, it can be seen that the main difficulty of fusion is to determine the conditions for terminating the genetic algorithm. After reading a large number of documents, the evolution speed of the two algorithms over time is summarized. e evolution speed of genetic-ant colony algorithm changes with time as shown in Figure 2.
It can be seen from the figure that the evolution rate of the genetic algorithm in the initial stage, that is, from the beginning to the t b stage, is very high, but after the time point t b , its evolution rate decreases with the increase in time, until the time point t c drops to a certain level degree, which is relatively stable. e evolution rate of the ant colony algorithm from the beginning to the t b stage is very low, but after the time point t b , its evolution rate increases with the increase in time, until the time point t c , where the evolution rate has risen to a certain degree and is relatively stable. In the evolution rate-time curve, the most special time point is t a . Before this time point, the evolution rate of genetic algorithm is higher than that of ant colony algorithm. At this time, the evolution rate of the two algorithms is the same. After that, the evolution rate of ant colony algorithm is higher than that of genetic algorithm. erefore, the dynamic fusion of genetic algorithm and ant colony algorithm at time t a is the most ideal, that is, the best results can be obtained in all aspects of time and efficiency. But in the execution process, it is difficult to accurately determine the time point t a .
erefore, when we are improving the algorithm, as long as we determine that the evolution rate is switched during the t b ∼t c time period, the algorithm has been improved to a large extent.

Improved Genetic-Ant Colony Algorithm Fusion
Parameter Setting. It can be seen from the above that the evolutionary speed of genetic algorithm and ant colony algorithm change over time completely opposite. erefore, the combination of these two algorithms does not jump to the ant colony algorithm after the genetic algorithm is fully executed but enters the ant colony algorithm when the combination conditions are met. In order to switch the evolution rate of the algorithm within t b ∼t c , the parameters of the two algorithms need to be set as follows: Step 1: suppose that the maximum number of iterations of the genetic algorithm is g max , the current number of iterations is g num , the minimum number of iterations is g min , the minimum evolution rate is g rate , and the population of offspring evolves rate is g pop .
Step 2: if g num is less than g max , then compare g pop and g rate ; if the evolution rate of successive generations and the evolution rate of the progeny population g pop is less than g rate , the genetic algorithm is ended, and the ant colony algorithm is run.
Step 3: as a key parameter of algorithm fusion, the main significance of evolution rate is to obtain the current tb ta tc te td Genetic algorithm Ant Colony Algorithm erefore, evolution rate is the comparison between the fitness value of the latest individual and the previous evolution value, as shown in the following equation: e optimal solution of the genetic algorithm is transformed into the path pheromone value t G of the ant colony algorithm, so that the pheromone constant is t C . In this article, the constant t G is represented by the path value in MMAS as t min , and t G is the path value passed plus 2, then the initial pheromone value of the ant colony algorithm is given as Step 4: the method of conversion between algorithms is as follows: First, each individual in the top 10% of the genetic algorithm can be represented as a task T i executed on the resource node P j , which is equivalent to selecting P j for the task T i of the ant and then changing the resource P j . e pheromone value can save 70% of the time wasted by the ant colony algorithm at the beginning due to the lack of pheromone.

Implementation Steps of the Improved Genetic-Ant Colony
Algorithm. Genetic algorithm stage: Step 1: corresponding parameter settings are minimum number of iterations g min , maximum number of iterations g max , minimum evolution rate g gate , progeny population evolution rate g pop , and population iteration number g num . e initial population size is the initial population G of Popsize.
Step 2: at the beginning of the algorithm, the chromosome is encoded with decimal real numbers.
Step 3: the fitness function is defined as the average completion time of the task and the average load weighted sum function f(j) of the virtual machine, and the genetic operation is started.
Step 4: use the fitness value ratio selection method (the selection strategy of the selection operator p(i) to filter out the high fitness value. e parent individual waits to perform the crossover operation.
Step 5: calculate the adaptive crossover probability P c , select the parental individuals for single-point crosses to produce a given number of new individuals.
Step 6: calculate the adaptive mutation probability P c and use the method of randomly generating mutation positions to perform mutation operations on the new individuals obtained. e group G(g) is genetically operated to obtain the next generation group G(g + 1).
Step 7: compare the new generation with the parents and select outstanding individuals as the final offspring.

(13)
Step 9: determine whether the fusion condition is met: If g num > g max , or the evolution rate of consecutive g die generations is less than g rate , then end the genetic algorithm, run the ant colony algorithm, and go to Step 10. Otherwise, go to Step 3. Ant colony algorithm stage: Step 10: convert the top 10% individuals with the best optimization solution in the genetic algorithm into the path value t G of the ant colony algorithm, get the value of t S , set the ant colony algorithm parameters, and set the number of ants to the number of tasks m and the current iteration number NC � 0, the maximum number of iterations NC max , and the taboo table tabu k is empty.
Step 11: m ants are randomly placed in n resource nodes. For each ant, use the probability P k ij (t) to select the resource node to perform the next task.
Step12: when an ant completes this task, add the node to tabu k , m minus 1, and record the current score. Configure the strategy and update the pheromone value of the resource node locally.
Step 13: when all the ants complete the task, the number of iterations NC increases by 1, the optimal allocation strategy is screened out, and the pheromone value of the resource node is updated globally.
Step 14: (NC > NC max ) break the cycle else go to Step 11.

Comparative Analysis of Simulation Experiments
After understanding the specific implementation steps of the three algorithms, this article applies the three algorithms to the actual problem solving and uses experiments to verify the efficiency of the three algorithms in solving the resource allocation problem.

Problem Description.
is example is used to deal with the problem of hospital medical resource allocation. For example, what kind of medical activities should be allocated, what kind of medical resources, and what kind of deployment methods can maximize the efficiency of medical activities. e medical resources here mainly refer to medical personnel. After instantiating the problem, this article assumes that there are ten medical personnel and four medical activities at the same time. Aiming at these four medical activities, this article needs to obtain the optimal medical personnel deployment plan.
A large number of experimental research results show that different parameter values have a great impact on the accuracy of the algorithm. In this study, a large number of experimental results are used to select the more accurate parameter value configuration as follows: 8 Scientific Programming Genetic algorithm: P C � 0.7, P m � 0.05. Ant colony algorithm: α � 0.5, ρ � 0.3, t 0 � 0.01 Hybrid algorithm: g num > 1, g num > g max , NC > NC max . Figures 3 and 4 show the work cost and work efficiency of four different medical activities corresponding to different numbers of medical personnel. e cost and efficiency here are an estimate. . Tables 1-3 show the solutions of the three algorithms to solve the problem, respectively. Figures 5 and 6 show the comparison of the cost and time consumed by the three algorithms to solve the problem when the computational scale increases.

Conclusion
Both genetic algorithm and ant colony algorithm are more efficient optimization search algorithms. In solving resource      Solution  1  2  3  4  Cost  Efficiency  1  3  2  1  4  101  115  2  0  2  6  2  99  106  3  3  2  5  0  87  92  4  3  1  6  0  83  88  5  1  1  6  2  107  121  6  0  1  6  3  96  105   20  30  40  50  60  70  10 Task Size    Solution  1  2  3  4  Cost  Efficiency  1  3  2  1  3  88  112  2  1  2  6  0  77  91  3  3  2  0  0  76  53  4  1  1  6 1 102 118   Scientific Programming allocation problems, they have their own strengths and their own shortcomings. In this deployment problem, when the task size is below 45, the genetic algorithm can have better computing power; when the task size gradually becomes larger, the genetic algorithm appears to be a little bit powerless. At this time, the ant colony algorithm needs to be used to solve the problem. As the task size increases, the genetic algorithm is more affected than the ant colony algorithm. e hybrid algorithm can take into account the advantages of both and achieve better results overall.

Data Availability
e experimental data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest regarding this work.