Particle swarm optimization method and device, electronic equipment and storage medium

By introducing the preset repository and annealing simulation algorithm in the particle group algorithm, the problem of lack of diversity of traditional particle group algorithms and local optimal traps has been solved, and the effect of better diversity and delaying precocious algorithm is achieved.

CN119378593APending Publication Date: 2025-01-28CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310925102.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Traditional particle swarm algorithms have the problem of lack of diversity and are prone to falling into local optimality, resulting in premature maturity of the algorithm.

Method used

By introducing the preset repository in the particle group algorithm to determine the global optimal solution, and combine the annealing simulation algorithm, the iteration parameters of the particles are adjusted to receive the diversity non -dominant solution.

Benefits of technology

Improving the diversity of particle group algorithms and avoiding local optimal traps, delaying the problem of puberty of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378593A_ABST
    Figure CN119378593A_ABST
Patent Text Reader

Abstract

The invention relates to a particle swarm optimization method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a corresponding global optimal solution in a preset storage library for each iteration process of all particles, and enabling the preset storage library to store a non-dominated solution of a local optimal solution of each particle in a previous iteration period; for each particle, determining a local optimal solution corresponding to the particle in the previous iteration period as a reference local optimal solution, and determining a current solution based on the global optimal solution and iteration parameters of the particle in the current iteration period; based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula, determining a current local optimal solution corresponding to the particles in the current iteration period; non-dominated solutions are determined in the current local optimal solutions corresponding to all the particles; and taking the non-dominated solution as an iteration result of the current iteration period, and storing the iteration result in the preset storage library. Therefore, the algorithm premature problem is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile driving technology, and in particular to a particle swarm algorithm optimization method, device, electronic equipment and storage medium. Background Art

[0002] Particle swarm optimization (PSO) is a swarm intelligence algorithm based on biological intelligence proposed by Kennedy, which is developed by simulating the behavior of individual birds searching and cooperating with each other when foraging. Due to the characteristics of the PSO algorithm such as fast speed and simplified parameters, it has been widely used in solving problems with multiple objectives. In the particle swarm algorithm, by calculating the objective function of each particle, the high-quality particles in the particle swarm are selected as the local optimal solution and the global optimal solution. Among them, the local optimal solution refers to: selecting the particle with the best fitness value from all the generations of particles generated by each particle in its own iteration process; the global optimal solution refers to: selecting the particle with the best fitness value from all the generations of particles generated by all particles in the iteration process.

[0003] However, the traditional particle swarm algorithm has the disadvantages of lack of diversity and easy to fall into local optimality, which leads to the problem of premature algorithm due to insufficient learning diversity. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a particle swarm algorithm optimization method, device, electronic device and storage medium.

[0005] In a first aspect, the present application provides a particle swarm algorithm optimization method, comprising:

[0006] For each iteration process of all particles, the corresponding global optimal solution is determined in a preset storage repository, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles;

[0007] For each particle, determining the local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and determining a current solution based on the global optimal solution and the iteration parameter of the particle in the current iteration cycle;

[0008] Based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula, determining a current local optimal solution corresponding to the particle in the current iteration cycle;

[0009] Determine the non-dominated solution among the current local optimal solutions corresponding to all particles;

[0010] The non-dominated solution is taken as the iteration result of the current iteration cycle and stored in the preset storage memory.

[0011] In a possible implementation, determining the current local optimal solution corresponding to the particle in the current iteration period based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula includes:

[0012] Determining a dominance relationship between the reference local optimal solution and the current solution;

[0013] In the case where the dominance relationship is that the current solution dominates the reference local optimal solution, determining the current solution as the current local optimal solution corresponding to the particle in the current iteration period;

[0014] In the case where the dominance relationship is that the reference local optimal solution dominates the current solution, determining the reference local optimal solution as the current local optimal solution corresponding to the particle;

[0015] In the case where the dominance relationship is that the reference local optimal solution and the current solution do not dominate each other, determining a fitness value corresponding to the current solution, substituting the fitness value into a preset annealing simulation algorithm formula for calculation to obtain a corresponding probability value, if it is determined based on the probability value that the current solution meets a preset condition, then determining the current solution as the current local optimal solution corresponding to the particle in the current iteration cycle, if it is determined based on the probability value that the current solution does not meet the preset condition, then determining the reference local optimal solution as the current local optimal solution corresponding to the particle;

[0016] The preset conditions are: the probability value is within a preset range, and the temperature parameter in the annealing simulation algorithm formula is not less than the termination temperature.

[0017] In a possible implementation manner, determining the dominance relationship between the reference local optimal solution and the current solution includes:

[0018] Determine at least one first optimization target value corresponding to the reference local optimal solution, and determine at least one second optimization target value corresponding to the current solution;

[0019] In the case where each of the first optimization target values ​​is less than the corresponding second optimization target value, determining that the dominance relationship is that the reference local optimal solution dominates the current solution;

[0020] In the case where each of the first optimization target values ​​is greater than the corresponding second optimization target value, determining that the dominance relationship is that the current solution dominates the reference local optimal solution;

[0021] In the case where there is both a first optimization target value that is smaller than the corresponding second optimization target value and a first optimization target value that is larger than the corresponding second optimization target value, the dominance relationship is determined to be that the reference local optimal solution and the current solution do not dominate each other.

[0022] In a possible implementation, determining the fitness value corresponding to the current solution includes:

[0023] Determine at least one first optimization target value corresponding to the reference local optimal solution, and determine at least one second optimization target value corresponding to the current solution;

[0024] For each first optimization target value, calculating the absolute value of the difference between the first optimization target value and the corresponding second optimization target value;

[0025] The average value of all the absolute values ​​of the differences is determined as the fitness value corresponding to the current solution.

[0026] In a possible implementation, determining the current solution based on the global optimal solution and the iteration parameters of the particles in the current iteration cycle includes:

[0027] Constructing a corresponding iterative parameter calculation formula based on the global optimal solution, wherein the iterative parameter calculation formula is applicable to discrete application scenarios;

[0028] For each particle, the iteration parameter of the particle in the current iteration cycle is updated based on the iteration parameter calculation formula to obtain the corresponding updated iteration parameter;

[0029] Based on the update iteration parameter, a current solution corresponding to the particle in the current iteration cycle is determined.

[0030] In a possible implementation, determining the corresponding global optimal solution in a preset storage repository includes:

[0031] For each non-dominated solution in the preset storage library, using an adaptive grid method to calculate a grid density corresponding to the non-dominated solution;

[0032] The non-dominated solution with the minimum corresponding grid density is determined as the corresponding global optimal solution.

[0033] In a possible implementation manner, after storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage repository, the method further includes:

[0034] Determining whether the capacity of the preset storage repository reaches a preset capacity threshold;

[0035] When the capacity of the preset storage memory reaches a preset capacity threshold, determining the number of grids of at least one grid corresponding to the preset storage memory and the number of non-dominated solutions contained in each of the grids;

[0036] Based on the number of grids and the number of non-dominated solutions contained in each grid, calculating a deletion probability corresponding to each grid;

[0037] A grid whose corresponding deletion probability is greater than a probability threshold is determined as a target grid, and a non-dominated solution in the target grid is deleted from the preset storage library.

[0038] In a possible implementation, the calculating the deletion probability corresponding to each grid based on the number of grids and the number of non-dominated solutions contained in each grid includes:

[0039] For each grid, the number of grids and the number of non-dominated solutions contained in the grid are substituted into a preset formula to obtain the deletion probability corresponding to the grid, wherein the preset formula is as follows:

[0040]

[0041] Among them, γ is the repository cutoff coefficient, Ni is the number of particles in the i-th grid, k is the total number of grids with particles in the repository, and Pi' is the probability of deleting particles in the grid.

[0042] In a possible implementation manner, after storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage repository, the method further includes:

[0043] For each non-dominated solution in the preset storage library, identical solutions that are repeated with the non-dominated solution are determined in the preset storage library, and the identical solutions are deleted.

[0044] In a possible implementation manner, after storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage repository, the method further includes:

[0045] For each non-dominated solution in the preset storage library, determining a dominance relationship between the non-dominated solution and each other non-dominated solution;

[0046] When the dominance relationship between the non-dominated solution and each of the other non-dominated solutions is that the non-dominated solution dominates the other non-dominated solutions, retaining the non-dominated solution;

[0047] If the dominance relationship between the non-dominated solution and any of the other non-dominated solutions is that the other non-dominated solution dominates the non-dominated solution, the non-dominated solution is deleted.

[0048] In a second aspect, the present application provides a particle swarm algorithm optimization device, comprising:

[0049] A first determination module is used to determine the corresponding global optimal solution in a preset storage repository for each iteration process of all particles, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles;

[0050] A second determination module is used to determine, for each particle, a local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and to determine a current solution based on the global optimal solution and an iteration parameter of the particle in the current iteration cycle;

[0051] A third determination module is used to determine the current local optimal solution corresponding to the particle in the current iteration period based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula;

[0052] A fourth determination module is used to determine a non-dominated solution among the current local optimal solutions corresponding to all particles;

[0053] The storage module is used to store the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory.

[0054] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0055] Memory, used to store computer programs;

[0056] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0057] In a fourth aspect, a computer-readable storage medium is provided, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0058] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0059] In the particle swarm algorithm optimization method, device, electronic device and storage medium provided in the embodiment of the present application, in the embodiment of the present application, first, for each iteration process of all particles, the corresponding global optimal solution is determined in the preset storage library, wherein the preset storage library stores the non-dominated solutions of the local optimal solutions of each particle in the previous iteration cycles, then, for each particle, the local optimal solution corresponding to the particle in the previous iteration cycle is determined as the reference local optimal solution, and the current solution is determined based on the global optimal solution and the iteration parameters of the particle in the current iteration cycle; then, based on the reference local optimal solution, the current solution and the preset annealing simulation algorithm formula, the current local optimal solution corresponding to the particle in the current iteration cycle is determined, and the non-dominated solution is determined in the current local optimal solutions corresponding to all particles, and finally, the non-dominated solution is used as the iteration result of the current iteration cycle and stored in the preset storage library. In this way, by combining the annealing simulation algorithm with the traditional particle swarm algorithm, the group particles have the probability of accepting diverse non-dominated solutions, thereby improving the shortcomings of the traditional particle swarm algorithm such as lack of diversity and easy to fall into local optimality, and avoiding the problem of premature algorithm due to insufficient learning diversity. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0062] Figure 1 A flow chart of a particle swarm algorithm optimization method provided in an embodiment of the present application;

[0063] Figure 2 This is an example diagram of a two-dimensional multi-objective optimization problem;

[0064] Figure 3 It is a box plot of the evaluation indicators of a 400*400 grid map in a discrete environment;

[0065] Figure 4 A flowchart of another particle swarm algorithm optimization method provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of the structure of a particle swarm algorithm optimization device provided in an embodiment of the present application;

[0067] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0069] To facilitate understanding of the embodiments of the present application, further explanation will be given below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present application.

[0070] See also Figure 1 , is a flow chart of an embodiment of a particle swarm algorithm optimization method provided in an embodiment of the present application. Figure 1 As shown, the process may include the following steps:

[0071] S101, for each iteration process of all particles, determining the corresponding global optimal solution in a preset storage repository, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles.

[0072] The particle swarm algorithm optimization method provided in the embodiment of the present application is used to improve and optimize the traditional particle swarm algorithm based on the annealing simulation algorithm. In practical applications, the particle swarm algorithm includes two stages, the first stage is the initialization stage, and the second stage is the iteration stage. The present application is used to improve the iteration stage.

[0073] The preset repository refers to a Pareto repository, which is used to store the non-dominated solutions of the local optimal solutions of each particle calculated by the improved particle swarm algorithm in previous iteration cycles.

[0074] First, set the basic optimization parameters of the traditional particle swarm algorithm, the basic parameters of the annealing simulation algorithm, and the Pareto repository parameters:

[0075] The basic optimization parameters of the traditional particle swarm algorithm include: learning factors c1, c2, particle population size n, maximum number of iterations ger, decay coefficient β, and single step size d.

[0076] The basic parameters of the annealing simulation algorithm include: initial temperature T, termination temperature EPS, and temperature decay rate δ.

[0077] The Pareto repository parameters include: repository size nRep, application scenario scale (for example, when the application scenario is to determine a target path on a map, the scale may be the size of the map), particle velocity limit velBound, and particle position limit posBound.

[0078] In the initialization phase, first, the initial particle position is randomly selected in the search space. In the application, the function pos=randperm(posBound(1,2),1) can be used to perform random selection. Then, the optimization target value of each particle is calculated by the preset objective function and agreed conditions. The optimization objective function can use any formula according to actual needs.

[0079] Each particle in the initialization phase is regarded as its own local optimal solution, and the optimization target value corresponding to each local optimal solution is recorded. Then, the Pareto frontier method is used to calculate whether each local optimal solution is dominated, and the non-dominated solutions are stored in the preset repository.

[0080] In the embodiment of the present application, in each iteration process of all particles, the corresponding global optimal solution is determined in the preset storage library, specifically including the following steps: for each non-dominated solution in the preset storage library, the grid density corresponding to the non-dominated solution is calculated using the adaptive grid method, and the non-dominated solution with the smallest corresponding grid density is determined as the corresponding global optimal solution. The grid density is the number of particles of the non-dominated solution in the equally divided grid. In this way, the calculation accuracy and efficiency can be effectively improved.

[0081] S102, for each particle, determining the local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and determining a current solution based on the global optimal solution and the iteration parameters of the particle in the current iteration cycle.

[0082] In the embodiment of the present application, the implementation of determining the current solution based on the global optimal solution and the iteration parameters of the particles in the current iteration cycle may include the following steps:

[0083] Step A1, constructing a corresponding iterative parameter calculation formula based on the global optimal solution, wherein the iterative parameter calculation formula is applicable to discrete application scenarios;

[0084] Step A2, for each particle, updating the iteration parameter of the particle in the current iteration cycle based on the iteration parameter calculation formula to obtain the corresponding updated iteration parameter;

[0085] Step A3: determining the current solution corresponding to the particle in the current iteration cycle based on the updated iteration parameter.

[0086] The iterative parameter calculation formula refers to the position formula and the speed formula, and each solution includes the position, speed and the corresponding optimization target value.

[0087] Specifically, since the traditional particle swarm algorithm is often used in continuous environments, in order to make the algorithm adapt to discrete environments, the speed and position update formulas of the traditional particle swarm algorithm are changed in this embodiment to make it suitable for discrete environment models (such as map models) at the same time.

[0088] Among them, the original speed formula is:

[0089] v i (t+1)=x i (t)+c1·rand()·(p best (t)-x i (t))+c2·rand()·(g best (t)-x i (t))

[0090] The original position update formula is: i (t+1)=x i (t)+ω·v i (t+1)

[0091] The speed formula after the change is:

[0092] v i (t+1)=c1·rand()·(p best (t)-x i (t))

[0093] v i (t+1)=c2·rand()·(g best (t)-x i (t))

[0094] The position formula after the change is: i (t+1)=x i (t)+v i (t+1)

[0095] Among them, g best (t) is the global optimal solution, p best (t) is the local optimal solution, x i (t) is the current position of the particle, x i (t+1) is the updated position of the particle, v i (t) is the current velocity of the particle, v i (t+1) is the updated velocity of the particle.

[0096] The changes to the formula here mainly include two aspects: one is to remove the inertia coefficient ω; the other is to generate a random number for the speed formula and then compare it with a preset threshold (such as 0.5) to determine the order of learning the global optimal solution and the local optimal solution.

[0097] In this way, the updated speed and position can be obtained according to the updated speed formula and position formula, and then the corresponding optimization target value can be calculated according to the updated speed and position. The updated speed and position and the corresponding optimization target value calculated according to the two are determined as the current solution corresponding to the particle in the current iteration cycle.

[0098] S103, determining a current local optimal solution corresponding to the particle in a current iteration period based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula.

[0099] Specifically, the following steps are included:

[0100] Step B1, determining the dominant relationship between the reference local optimal solution and the current solution;

[0101] Step B2, when the dominance relationship is that the current solution dominates the reference local optimal solution, determining the current solution as the current local optimal solution corresponding to the particle in the current iteration period;

[0102] Step B3, when the dominance relationship is that the reference local optimal solution dominates the current solution, determining the reference local optimal solution as the current local optimal solution corresponding to the particle;

[0103] Step B4, when the dominance relationship is that the reference local optimal solution and the current solution do not dominate each other, determine the fitness value corresponding to the current solution, substitute the fitness value into a preset annealing simulation algorithm formula for calculation, and obtain a corresponding probability value; if it is determined based on the probability value that the current solution meets the preset conditions, then the current solution is determined as the current local optimal solution corresponding to the particle in the current iteration cycle; if it is determined based on the probability value that the current solution does not meet the preset conditions, then the reference local optimal solution is determined as the current local optimal solution corresponding to the particle;

[0104] The preset conditions are: the probability value is within a preset range (eg, rand() random number < probability value < integer 1), and the temperature parameter in the annealing simulation algorithm formula is not less than the termination temperature.

[0105] In this embodiment, when the dominance relationship is that the reference local optimal solution and the current solution do not dominate each other, the fitness value is substituted as the dF value into the annealing simulation algorithm formula Calculation is performed. If the calculated pro value satisfies the requirement that it is greater than the random number of rand() and less than the integer 1, the current local optimal solution is updated to the information of the current solution, and the temperature is updated (T=T*δ), where δ is the temperature attenuation rate. At the same time, the temperature T is guaranteed to be not less than the termination temperature EPS. If the above two conditions cannot be met at the same time, the local optimal solution information will not be updated.

[0106] As a possible implementation manner, the specific implementation of determining the dominance relationship between the reference local optimal solution and the current solution may include: determining at least one first optimization target value corresponding to the reference local optimal solution, and determining at least one second optimization target value corresponding to the current solution. When each of the first optimization target values ​​is less than the corresponding second optimization target value, the dominance relationship is determined to be that the reference local optimal solution dominates the current solution. When each of the first optimization target values ​​is greater than the corresponding second optimization target value, the dominance relationship is determined to be that the current solution dominates the reference local optimal solution. When there is both a first optimization target value less than the corresponding second optimization target value and a first optimization target value greater than the corresponding second optimization target value, the dominance relationship is determined to be that the reference local optimal solution and the current solution do not dominate each other.

[0107] For example, the first optimization target value is f1, and the second optimization target value is f2. In an application scenario, the solution with a smaller first optimization target value and a smaller second optimization target value can be regarded as a non-dominated solution, that is, the solution that satisfies both Formula 1 and Formula 2 is a non-dominated solution.

[0108]

[0109]

[0110] Among them, when the application scenario is to determine a path from a map, d can represent the distance and e can represent the energy consumption.

[0111] As a possible implementation, the specific implementation of determining the fitness value corresponding to the current solution may include:

[0112] Determine at least one first optimization target value corresponding to the reference local optimal solution, and determine at least one second optimization target value corresponding to the current solution, calculate the absolute value of the difference between the first optimization target value and the corresponding second optimization target value for each first optimization target value, and determine the average value of all the absolute values ​​of the difference as the fitness value corresponding to the current solution. In this way, the fitness value can be calculated based on all the optimization target values.

[0113] S104, determining a non-dominated solution among the current local optimal solutions corresponding to all particles.

[0114] S105: storing the non-dominated solution as an iteration result of the current iteration cycle in the preset storage memory.

[0115] The following is a unified description of S104 and S105:

[0116] In the embodiment of the present application, for the current local optimal solution corresponding to each particle, the dominance relationship between the current local optimal solution and the current local optimal solution of each other particle is determined in turn. When the dominance relationship between the current local optimal solution and the current local optimal solution of any other particle is that the current local optimal solution dominates the current local optimal solution of other particles, the current local optimal solution is determined to be a non-dominated solution, and when the dominance relationship between the current local optimal solution and the current local optimal solution of any other particle is that the current local optimal solution of other particles dominates the current local optimal solution, the current local optimal solution is considered to be a dominated solution. Then, the non-dominated solution is stored in the preset storage library as the iteration result of the current iteration cycle.

[0117] For example, for the local optimal solutions a, b, and c, first compare a and b to obtain the dominance relationship between the two: a dominates b; then compare a and c to obtain the dominance relationship between the two: a dominates c; then, a is a non-dominated solution, and b and c are both dominated solutions.

[0118] The process of determining the dominance relationship between two local optimal solutions (taking a and b as an example) is as follows: first, determine at least one third optimization target value corresponding to a, and determine at least one fourth optimization target value corresponding to b. When each third optimization target value is less than the corresponding fourth optimization target value, the dominance relationship is determined to be a dominating b. When each third optimization target value is greater than the corresponding fourth optimization target value, the dominance relationship is determined to be b dominating a. When there are both third optimization target values ​​less than the corresponding fourth optimization target value and third optimization target values ​​greater than the corresponding fourth optimization target value, it is determined that a and b do not dominate each other.

[0119] To facilitate the understanding of non-dominated solutions, a multi-objective optimization problem, i.e., a problem with multiple optimization objective values, is described in detail here, which can be expressed as follows:

[0120] Where x is the decision variable, y is the m-dimensional objective function, that is, the problem has m objective functions, fi(x) is the i-th objective function, g(x) is the p-term inequality constraint, and h(x) is the q-term equality constraint. The optimization between multiple objectives in multi-objective optimization problems is often not carried out in the same direction at the same time. When solving such problems, it is often impossible to obtain a single solution, and we can only try to find a solution that has better performance on multiple objective functions. In the embodiment of the present application, the Pareto frontier method is used to solve this problem to obtain a non-dominated solution.

[0121] Pareto frontier: If a solution set contains all the solutions in the Pareto optimal solution set, it is the Pareto frontier, expressed as PF = {y = (f1 (x * ),f2(x * ),···,f m (x * ))|x * ∈P}. Figure 2 As shown in the figure, it is an example diagram of a two-dimensional multi-objective optimization problem. In the figure, the two optimization target values ​​​​f1 and f2 are set to smaller values, the better. Arc ABC is the Pareto frontier surface, and the points A, B, and C on it are all solutions in the Pareto optimal solution set (that is, non-dominated solutions). The gray area is the feasible solution set, and the points D and E are dominated solutions.

[0122] In practice, three common multi-objective optimization algorithm evaluation indicators are used to compare the advantages and disadvantages of the solution sets obtained by the improved particle swarm algorithm of this application and the traditional particle swarm algorithm through the values ​​calculated by the indicators. The three indicators are defined as follows:

[0123] 1. Generation distance (GD): Where m is the number of solutions in the non-dominated solution set obtained by the algorithm, and di is the Euclidean distance between the i-th non-dominated solution in the non-dominated solution set and its corresponding solution in the true Pareto frontier. The smaller the GD value, the better the convergence of the algorithm.

[0124] 2. Δ(Spread): Among them, di is the Euclidean distance between two adjacent solutions in the non-dominated solution set obtained by the algorithm, is the average value of N di, df and dl are the Euclidean distances between the boundary solutions in the non-dominated solution set and the boundary solutions in the true Pareto frontier. The optimal case is And df=dl=0, then Δ=0, the non-dominated solution set is evenly distributed in the space. For any other case, Δ>0, so the smaller the Δ value, the better the algorithm diversity.

[0125] 3. Inverse Generational Distance (IGD): di is the minimum Euclidean distance from the solution in the true Pareto front P to the Pareto non-dominated solution set Q obtained by the algorithm. The smaller the IGD value, the higher the approximation and the more uniform the distribution in space.

[0126] Figure 3 It is a box plot of the evaluation indicators of a 400*400 grid map in a discrete environment, where the horizontal axis I-MOPSO is the particle swarm algorithm improved by this application, and A is the traditional standard particle swarm algorithm. From the values ​​of GD and IGD, it can be seen that the improved algorithm has improved in diversity and comprehensiveness.

[0127] In the embodiment of the present application, first, for each iteration process of all particles, the corresponding global optimal solution is determined in the preset storage library, wherein the preset storage library stores the non-dominated solutions of the local optimal solutions of each particle in the previous iteration cycles, then, for each particle, the local optimal solution corresponding to the particle in the previous iteration cycle is determined as the reference local optimal solution, and the current solution is determined based on the global optimal solution and the iteration parameters of the particle in the current iteration cycle; then, based on the reference local optimal solution, the current solution and the preset annealing simulation algorithm formula, the current local optimal solution corresponding to the particle in the current iteration cycle is determined, and the non-dominated solution is determined in the current local optimal solutions corresponding to all particles, and finally, the non-dominated solution is stored in the preset storage library as the iteration result of the current iteration cycle. In this way, by combining the annealing simulation algorithm with the traditional particle swarm algorithm, the group particles have the probability of accepting diverse non-dominated solutions, thereby improving the shortcomings of the traditional particle swarm algorithm such as lack of diversity and easy to fall into local optimality, and avoiding the problem of premature algorithm due to insufficient learning diversity.

[0128] See also Figure 4 , which is a flow chart of another particle swarm algorithm optimization method provided in the present application embodiment. Figure 3 As shown, the process may include the following steps:

[0129] S401, determining whether the capacity of the preset storage repository reaches a preset capacity threshold;

[0130] S402, when the capacity of the preset storage library reaches a preset capacity threshold, determining the number of grids of at least one grid corresponding to the preset storage library and the number of non-dominated solutions contained in each of the grids;

[0131] S403, calculating a deletion probability corresponding to each of the grids based on the number of grids and the number of non-dominated solutions contained in each of the grids;

[0132] S404, determining a grid whose corresponding deletion probability is greater than a probability threshold as a target grid, and deleting a non-dominated solution in the target grid from the preset storage library.

[0133] The following is a unified description of S401-S404:

[0134] In an embodiment of the present application, after S105, it can be determined whether the preset storage repository has reached a preset capacity threshold. When the capacity of the preset storage repository reaches the preset capacity threshold, it means that the capacity of the preset storage repository has reached an upper limit or exceeded the upper limit. At this time, the adaptive grid method can be used for calculation to obtain the number of grids of at least one grid corresponding to the preset storage repository and the number of non-dominated solutions contained in each grid. Then, based on the number of grids and the number of non-dominated solutions contained in each grid, the deletion probability corresponding to each grid is calculated. Finally, the grid whose corresponding deletion probability is greater than a probability threshold (the probability threshold can be determined by a random function rand(), and the threshold range is generally 0-1) is determined as a target grid, and the non-dominated solutions in the target grid are deleted from the preset storage repository.

[0135] Specifically, S403 may include the following steps: for each grid, substituting the number of grids and the number of non-dominated solutions contained in the grid into a preset formula to obtain a deletion probability corresponding to the grid, wherein the preset formula is as follows:

[0136] Among them, γ is the repository cutoff coefficient, Ni is the number of particles in the i-th grid, k is the total number of grids with particles in the repository, and Pi' is the probability of deleting particles in the grid.

[0137] Through this scheme, when the capacity of the preset storage library reaches the preset capacity threshold, the deletion probability corresponding to each grid can be calculated based on the number of non-dominated solutions contained in each grid in the preset storage library, and then the non-dominated solutions in the grids with larger corresponding deletion probabilities can be deleted, thereby controlling the number of particles in the preset database.

[0138] In another embodiment of the present application, after S105, the following steps may be further included: for each non-dominated solution in the preset storage library, identical solutions that are repeated with the non-dominated solution are determined in the preset storage library, and the identical solutions are deleted. In this way, identical solutions that are repeated in the preset database can be deleted, reducing the waste of storage resources.

[0139] In another embodiment of the present application, after S105, the following steps may be further included: for each non-dominated solution in the preset storage library, determining the dominance relationship between the non-dominated solution and each other non-dominated solution; retaining the non-dominated solution when the dominance relationship between the non-dominated solution and each other non-dominated solution is that the non-dominated solution dominates the other non-dominated solutions; deleting the non-dominated solution when the dominance relationship between the non-dominated solution and any other non-dominated solution is that the other non-dominated solution dominates the non-dominated solution. In this way, only non-dominated solutions can be retained in the preset database, thereby ensuring that the particles in the preset database are all excellent particles.

[0140] Based on the same technical concept, the present application embodiment also provides a particle swarm algorithm optimization device, such as Figure 5 As shown, the device comprises:

[0141] A first determination module 501 is used to determine the corresponding global optimal solution in a preset storage repository for each iteration process of all particles, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles;

[0142] A second determination module 502 is used to determine, for each particle, a local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and determine a current solution based on the global optimal solution and an iteration parameter of the particle in the current iteration cycle;

[0143] A third determination module 503 is used to determine the current local optimal solution corresponding to the particle in the current iteration period based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula;

[0144] A fourth determination module 504 is used to determine a non-dominated solution from the current local optimal solutions corresponding to all particles;

[0145] The storage module 505 is used to store the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory.

[0146] In the embodiment of the present application, first, for each iteration process of all particles, the corresponding global optimal solution is determined in the preset storage library, wherein the preset storage library stores the non-dominated solutions of the local optimal solutions of each particle in the previous iteration cycles, then, for each particle, the local optimal solution corresponding to the particle in the previous iteration cycle is determined as the reference local optimal solution, and the current solution is determined based on the global optimal solution and the iteration parameters of the particle in the current iteration cycle; then, based on the reference local optimal solution, the current solution and the preset annealing simulation algorithm formula, the current local optimal solution corresponding to the particle in the current iteration cycle is determined, and the non-dominated solution is determined in the current local optimal solutions corresponding to all particles, and finally, the non-dominated solution is stored in the preset storage library as the iteration result of the current iteration cycle. In this way, by combining the annealing simulation algorithm with the traditional particle swarm algorithm, the group particles have the probability of accepting diverse non-dominated solutions, thereby improving the shortcomings of the traditional particle swarm algorithm such as lack of diversity and easy to fall into local optimality, and avoiding the problem of premature algorithm due to insufficient learning diversity.

[0147] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0148] Memory 113, used for storing computer programs;

[0149] The processor 111 is used to execute the program stored in the memory 113 to implement the following steps:

[0150] For each iteration process of all particles, the corresponding global optimal solution is determined in a preset storage repository, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles;

[0151] For each particle, determining the local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and determining a current solution based on the global optimal solution and the iteration parameter of the particle in the current iteration cycle;

[0152] Based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula, determining a current local optimal solution corresponding to the particle in the current iteration cycle;

[0153] Determine the non-dominated solution among the current local optimal solutions corresponding to all particles;

[0154] The non-dominated solution is taken as the iteration result of the current iteration cycle and stored in the preset storage memory.

[0155] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0156] The communication interface is used for communication between the above electronic device and other devices.

[0157] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0158] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0159] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned particle swarm algorithm optimization methods are implemented.

[0160] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any particle swarm algorithm optimization method in the above embodiments.

[0161] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0162] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A particle swarm algorithm optimization method, characterized in that: The method comprises: For each iteration process of all particles, the corresponding global optimal solution is determined in a preset storage repository, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles; For each particle, determining the local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and determining a current solution based on the global optimal solution and the iteration parameter of the particle in the current iteration cycle; Based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula, determining a current local optimal solution corresponding to the particle in the current iteration cycle; Determine the non-dominated solution among the current local optimal solutions corresponding to all particles; The non-dominated solution is taken as the iteration result of the current iteration cycle and stored in the preset storage memory.

2. The method according to claim 1, characterized in that The determining, based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula, a current local optimal solution corresponding to the particle in the current iteration cycle comprises: Determining a dominance relationship between the reference local optimal solution and the current solution; In the case where the dominance relationship is that the current solution dominates the reference local optimal solution, determining the current solution as the current local optimal solution corresponding to the particle in the current iteration period; In the case where the dominance relationship is that the reference local optimal solution dominates the current solution, determining the reference local optimal solution as the current local optimal solution corresponding to the particle; In the case where the dominance relationship is that the reference local optimal solution and the current solution do not dominate each other, determining a fitness value corresponding to the current solution, substituting the fitness value into a preset annealing simulation algorithm formula for calculation to obtain a corresponding probability value, if it is determined based on the probability value that the current solution meets a preset condition, then determining the current solution as the current local optimal solution corresponding to the particle in the current iteration cycle, if it is determined based on the probability value that the current solution does not meet the preset condition, then determining the reference local optimal solution as the current local optimal solution corresponding to the particle; The preset conditions are: the probability value is within a preset range, and the temperature parameter in the annealing simulation algorithm formula is not less than the termination temperature.

3. The method according to claim 2, characterized in that The determining of the dominance relationship between the reference local optimal solution and the current solution includes: Determine at least one first optimization target value corresponding to the reference local optimal solution, and determine at least one second optimization target value corresponding to the current solution; In the case where each of the first optimization target values ​​is less than the corresponding second optimization target value, determining that the dominance relationship is that the reference local optimal solution dominates the current solution; In the case where each of the first optimization target values ​​is greater than the corresponding second optimization target value, determining that the dominance relationship is that the current solution dominates the reference local optimal solution; In the case where there is both a first optimization target value that is smaller than the corresponding second optimization target value and a first optimization target value that is larger than the corresponding second optimization target value, the dominance relationship is determined to be that the reference local optimal solution and the current solution do not dominate each other.

4. The method according to claim 2, characterized in that: The determining of the fitness value corresponding to the current solution includes: Determine at least one first optimization target value corresponding to the reference local optimal solution, and determine at least one second optimization target value corresponding to the current solution; For each first optimization target value, calculating the absolute value of the difference between the first optimization target value and the corresponding second optimization target value; The average value of all the absolute values ​​of the differences is determined as the fitness value corresponding to the current solution.

5. The method according to claim 1, characterized in that The determining of the current solution based on the global optimal solution and the iteration parameters of the particles in the current iteration cycle includes: Constructing a corresponding iterative parameter calculation formula based on the global optimal solution, wherein the iterative parameter calculation formula is applicable to discrete application scenarios; For each particle, the iteration parameter of the particle in the current iteration cycle is updated based on the iteration parameter calculation formula to obtain the corresponding updated iteration parameter; Based on the update iteration parameter, a current solution corresponding to the particle in the current iteration cycle is determined.

6. The method according to claim 1, characterized in that Determining the corresponding global optimal solution in the preset storage repository includes: For each non-dominated solution in the preset storage library, using an adaptive grid method to calculate a grid density corresponding to the non-dominated solution; The non-dominated solution with the minimum corresponding grid density is determined as the corresponding global optimal solution.

7. The method according to claim 1, characterized in that After storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory, the method further includes: Determining whether the capacity of the preset storage repository reaches a preset capacity threshold; When the capacity of the preset storage memory reaches a preset capacity threshold, determining the number of grids of at least one grid corresponding to the preset storage memory and the number of non-dominated solutions contained in each of the grids; Based on the number of grids and the number of non-dominated solutions contained in each grid, calculating a deletion probability corresponding to each grid; A grid whose corresponding deletion probability is greater than a probability threshold is determined as a target grid, and a non-dominated solution in the target grid is deleted from the preset storage library.

8. The method according to claim 7, characterized in that The calculating the deletion probability corresponding to each of the grids based on the number of grids and the number of non-dominated solutions contained in each of the grids includes: For each grid, the number of grids and the number of non-dominated solutions contained in the grid are substituted into a preset formula to obtain the deletion probability corresponding to the grid, wherein the preset formula is as follows: Among them, γ is the repository cutoff coefficient, Ni is the number of particles in the i-th grid, k is the total number of grids with particles in the repository, and Pi' is the probability of deleting particles in the grid.

9. The method according to claim 1, characterized in that: After storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory, the method further includes: For each non-dominated solution in the preset storage library, identical solutions that are repeated with the non-dominated solution are determined in the preset storage library, and the identical solutions are deleted.

10. The method according to claim 1, characterized in that After storing the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory, the method further includes: For each non-dominated solution in the preset storage library, determining a dominance relationship between the non-dominated solution and each other non-dominated solution; When the dominance relationship between the non-dominated solution and each of the other non-dominated solutions is that the non-dominated solution dominates the other non-dominated solutions, retaining the non-dominated solution; If the dominance relationship between the non-dominated solution and any of the other non-dominated solutions is that the other non-dominated solution dominates the non-dominated solution, the non-dominated solution is deleted.

11. A particle swarm algorithm optimization device, characterized in that: The device comprises: A first determination module is used to determine the corresponding global optimal solution in a preset storage repository for each iteration process of all particles, wherein the preset storage repository stores non-dominated solutions of the local optimal solutions of each particle in previous iteration cycles; A second determination module is used to determine, for each particle, a local optimal solution corresponding to the particle in the previous iteration cycle as a reference local optimal solution, and to determine a current solution based on the global optimal solution and an iteration parameter of the particle in the current iteration cycle; A third determination module is used to determine the current local optimal solution corresponding to the particle in the current iteration period based on the reference local optimal solution, the current solution and a preset annealing simulation algorithm formula; A fourth determination module is used to determine a non-dominated solution among the current local optimal solutions corresponding to all particles; The storage module is used to store the non-dominated solution as the iteration result of the current iteration cycle in the preset storage memory.

12. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the particle swarm algorithm optimization method described in any one of claims 1-10 when executing the program stored in the memory.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a particle swarm algorithm optimization method program, and when the particle swarm algorithm optimization method program is executed by the processor, the steps of the particle swarm algorithm optimization method described in any one of claims 1-10 are implemented.