Function optimization method based on improved cuckoo search algorithm

By improving the cuckoo search algorithm, it solves the problem of slow convergence speed, low precision and easy to fall into local optimality in function optimization, and achieves more efficient function optimization effects.

CN119886198APending Publication Date: 2025-04-25JINGGANGSHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411760810.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing cuckoo search algorithm has problems such as slow convergence speed, low solution accuracy and easy to fall into local optimality in function optimization.

Method used

By improving the cuckoo search algorithm, it includes defining the objective function, initializing the bird's nest position, selecting the fitness function, and using the cuckoo search algorithm formula to update the bird's nest position, combining the Lévy random search path for position update.

Benefits of technology

The accuracy and convergence speed of function optimization are improved, and the global optimal solution can be found more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886198A_ABST
    Figure CN119886198A_ABST
Patent Text Reader

Abstract

The invention discloses a function optimization method based on an improved cuckoo search algorithm, and the method comprises the steps: S1, determining a system boundary: determining which parts belong to a system range and which parts do not belong to the system range, and facilitating the subsequent formulation of a corresponding strategy in the system range; s2, determining the role of an attacker: according to the attack mode, means and angle of the attacker, preliminarily determining the type of the attacker, such as hackers, internal employees and the like; s3, constructing an attack tree: generally, determining a final target of an attacker, dividing the final target into sub-targets and constructing a tree diagram of the attack tree; wherein the final target is a tree root, the sub-target is a branch, and the means for completing the sub-target is a leaf; s4, analyzing an attack tree: identifying heavy vulnerabilities and weaknesses of the system, and formulating a corresponding defense strategy; and S5, actively setting the trapping vulnerabilities: actively setting the trapping vulnerabilities on the final target and the sub-target so as to obtain the information of an attacker or capture the attacker when the attacker attacks the trapping vulnerabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of function optimization methods, and in particular to a function optimization method based on an improved cuckoo search algorithm. Background Art

[0002] Improved Cuckoo Search Algorithm (Improved Cuckoo Search Algorithm) is a method to improve the performance of Cuckoo Search (CS) by optimizing certain aspects of it. Cuckoo Search Algorithm is a meta-heuristic swarm intelligence optimization algorithm that simulates the breeding behavior of cuckoo chicks. It has the characteristics of simple logic and easy implementation, but it has problems such as slow convergence speed, low solution accuracy and easy to fall into local optimality. In order to solve these problems, researchers have proposed a variety of improvement methods.

[0003] By improving the cuckoo search algorithm, local optimal solutions and global optimal solutions can be found more easily, which can improve accuracy and convergence speed in practical problems. Summary of the invention

[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0005] In view of the above problems and / or the problems existing in an existing function optimization method based on an improved cuckoo search algorithm, the present invention is proposed.

[0006] Therefore, the purpose of the present invention is to provide a function optimization method based on an improved cuckoo search algorithm. When using this system, step 1: define the objective function f(X), X = (x1, ..., xd)T; initialize the function, and randomly generate the initial positions Xi (i = 1, 2, ..., n) of n bird nests, set the population size, problem dimension, maximum discovery probability P and maximum number of iterations and other parameters; step 2: select the fitness function and calculate the objective function value of each bird nest position to obtain the current optimal function value; step 3: record the optimal function value of the previous generation, and use the cuckoo search algorithm formula to update the position and state of other bird nests; step 4: compare the current position function value with the optimal function value of the previous generation, if it is better, change the current optimal value; step 5: after the position is updated, use a random number r∈[0,1] to compare with P, if r>P, then x t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1is the optimal position of the i-th bird's nest in the t+1th generation; Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, continue to the next step; Step 7: Output the global optimal position.

[0007] To solve the above technical problems, according to one aspect of the present invention, the present invention provides the following technical solutions:

[0008] A function optimization method based on an improved cuckoo search algorithm, comprising:

[0009] Step 1: Define the objective function f(X), X = (x1, ..., xd)T; initialize the function and randomly generate the initial positions Xi (i = 1, 2, ..., n) of n bird nests, and set parameters such as population size, problem dimension, maximum discovery probability P and maximum number of iterations;

[0010] Step 2: Select the fitness function and calculate the objective function value of each bird nest location to obtain the current optimal function value;

[0011] Step 3: Record the optimal function value of the previous generation and use the cuckoo search algorithm formula to update the position and status of other bird nests;

[0012] Step 4: Compare the current position function value with the previous generation optimal function value. If it is better, change the current optimal value;

[0013] Step 5: After the position is updated, compare the random number r∈[0,1] with P. If r>P, then t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1 is the optimal position of the ith bird nest in the t+1 generation;

[0014] Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, proceed to the next step;

[0015] Step 7: Output the global optimal position.

[0016] As a preferred solution of the function optimization method based on the improved cuckoo search algorithm described in the present invention, the cuckoo search algorithm formula in step 3 is: X(i) t+1 =X(i) t +α⊕L( λ ),i=1,2,..,n; the position of the ith bird nest in the tth generation, ⊕ is the point-to-point multiplication, α is the step length control, which is used to control the search range of the step length, and its value obeys the normal distribution; L(λ) is the Lévy random search path, and the random step length is the Lévy distribution; L(s, λ)s -λ ,(1< λ ≤3); s is the random step length obtained by Levy flight.

[0017] As a preferred solution of the function optimization method based on the improved cuckoo search algorithm described in the present invention, the optimization method assumes the following three ideal conditions: (1) Each cuckoo lays only one egg at a time and randomly selects a nest to store it; (2) In the process of nest searching, the nest with the best eggs will be retained for the next generation; (3) The number of available nests is fixed, and the probability of finding an alien egg in the nest is P, P∈[0,1]. If an alien bird egg is found, the owner of the nest will build a new nest.

[0018] As a preferred solution of the function optimization method based on the improved cuckoo search algorithm described in the present invention, it includes: a determination unit, which is used to determine the objective function and decision variables corresponding to the actual application scenario;

[0019] A construction unit, used to construct a system model of a matching improved cuckoo search algorithm based on an objective function and decision variables corresponding to the actual application scenario;

[0020] An optimization unit, used for performing a function optimization operation on the system model of the improved cuckoo search algorithm to obtain an optimal solution of the decision variables that optimizes the objective function: wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase of the number of iterations;

[0021] The output unit is used to output the optimal solution of the decision variable for use in the actual application scenario.

[0022] As a preferred solution of the function optimization method based on the improved cuckoo search algorithm described in the present invention, it includes: an automated application unit for operating according to actual application scenarios;

[0023] A processing device is used to determine an objective function and decision variables corresponding to an actual application scenario in the automated application unit; based on the objective function and decision variables corresponding to the actual application scenario, a system model of a matching improved cuckoo search algorithm is constructed; a function optimization operation is performed on the system model of the improved cuckoo search algorithm to obtain an optimal solution for the decision variables that optimizes the objective function; wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase in the number of iterations; and the optimal solution for the decision variables is obtained for use in the actual application scenario.

[0024] Compared with the prior art, the present invention has the following beneficial effects: when using the system, step 1: define the objective function f(X), X = (x 1, ..., xd) T; initialize the function, and randomly generate the initial positions Xi (i = 1, 2, ..., n) of n bird nests, set the population size, problem dimension, maximum discovery probability P and maximum number of iterations and other parameters; step 2: select the fitness function and calculate the objective function value of each bird nest position to obtain the current optimal function value; step 3: record the optimal function value of the previous generation, and use the cuckoo search algorithm formula to update the position and state of other bird nests; step 4: compare the current position function value with the optimal function value of the previous generation, if it is better, change the current optimal value; step 5: after the position is updated, use a random number r∈[0,1] to compare with P, if r>P, then x t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1 is the optimal position of the i-th bird's nest in the t+1th generation; Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, continue to the next step; Step 7: Output the global optimal position. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below in combination with the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0026] Figure 1 A method diagram of a function optimization method based on an improved cuckoo search algorithm of the present invention;

[0027] Figure 2 The present invention is a flow chart for constructing a function optimization method based on an improved cuckoo search algorithm. DETAILED DESCRIPTION

[0028] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0029] Secondly, the present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0030] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0031] The invention provides a function optimization method based on an improved cuckoo search algorithm. When using the system, step 1: define an objective function f(X), X=(x1,...,xd)T; initialize the function, and randomly generate initial positions Xi (i=1,2,...,n) of n bird nests, and set parameters such as population size, problem dimension, maximum discovery probability P and maximum number of iterations; step 2: select a fitness function and calculate the objective function value of each bird nest position to obtain the current optimal function value; step 3: record the optimal function value of the previous generation, and use the cuckoo search algorithm formula to update the positions and states of other bird nests; step 4: compare the current position function value with the optimal function value of the previous generation, and if it is better, change the current optimal value; step 5: after the position is updated, use a random number r∈[0,1] to compare with P, and if r>P, then update x t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1 is the optimal position of the i-th bird's nest in the t+1th generation; Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, continue to the next step; Step 7: Output the global optimal position.

[0032] Figure 1-Figure 2 FIG. 1 is a schematic diagram showing the overall structure of an embodiment of a function optimization method based on an improved cuckoo search algorithm of the present invention. Figure 1-Figure 2 , a function optimization method based on an improved cuckoo search algorithm in this embodiment, the main part of which includes:

[0033] Step 1: Define the objective function f(X), X = (x1, ..., xd)T; initialize the function and randomly generate the initial positions Xi (i = 1, 2, ..., n) of n bird nests, and set parameters such as population size, problem dimension, maximum discovery probability P and maximum number of iterations;

[0034] Step 2: Select the fitness function and calculate the objective function value of each bird nest location to obtain the current optimal function value;

[0035] Step 3: Record the optimal function value of the previous generation and use the cuckoo search algorithm formula to update the position and status of other bird nests;

[0036] Step 4: Compare the current position function value with the previous generation optimal function value. If it is better, change the current optimal value;

[0037] Step 5: After the position is updated, compare the random number r∈[0,1] with P. If r>P, then t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1 is the optimal position of the ith bird nest in the t+1 generation;

[0038] Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, proceed to the next step;

[0039] Step 7: Output the global optimal position;

[0040] Wherein: the cuckoo search algorithm formula in step 3 is: X(i) t+1 =X(i) t +α⊕L( λ ),i=1,2,..,n; the position of the ith bird nest in the tth generation, ⊕ is the point-to-point multiplication, α is the step length control, which is used to control the search range of the step length, and its value obeys the normal distribution; L(λ) is the Lévy random search path, and the random step length is the Lévy distribution; L(s, λ )s -λ ,(1< λ ≤3); s is the random step length obtained by Levy flight. ;

[0041] Furthermore, the method further comprises: a determination unit, used to determine an objective function and decision variables corresponding to an actual application scenario;

[0042] A construction unit, used to construct a system model of a matching improved cuckoo search algorithm based on an objective function and decision variables corresponding to the actual application scenario;

[0043] An optimization unit, used for performing a function optimization operation on the system model of the improved cuckoo search algorithm to obtain an optimal solution of the decision variables that optimizes the objective function: wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase of the number of iterations;

[0044] The output unit is used to output the optimal solution of the decision variable for use in the actual application scenario.

[0045] Furthermore, the method also includes: an automated application unit for operating according to an actual application scenario;

[0046] A processing device is used to determine an objective function and decision variables corresponding to an actual application scenario in the automated application unit; based on the objective function and decision variables corresponding to the actual application scenario, a system model of a matching improved cuckoo search algorithm is constructed; a function optimization operation is performed on the system model of the improved cuckoo search algorithm to obtain an optimal solution for the decision variables that optimizes the objective function; wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase in the number of iterations; and the optimal solution for the decision variables is obtained for use in the actual application scenario.

[0047] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced by equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed in the present invention may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A function optimization method based on an improved cuckoo search algorithm, characterized in that: include: Step 1: Define the objective function f(X), X = (x1, ..., xd)T; initialize the function and randomly generate the initial positions Xi (i = 1, 2, ..., n) of n bird nests, and set parameters such as population size, problem dimension, maximum discovery probability P and maximum number of iterations; Step 2: Select the fitness function and calculate the objective function value of each bird nest location to obtain the current optimal function value; Step 3: Record the optimal function value of the previous generation and use the cuckoo search algorithm formula to update the position and status of other bird nests; Step 4: Compare the current position function value with the previous generation optimal function value. If it is better, change the current optimal value; Step 5: After the position is updated, compare the random number r∈[0,1] with P. If r>P, then t+1 Randomly change, otherwise keep unchanged. Finally, keep the best set of bird nest positions Y(i) t+1 ; Y(i) t+1 is the optimal position of the ith bird nest in the t+1 generation; Step 6: If the maximum number of iterations or the minimum error requirement is not reached, return to step 2, otherwise, proceed to the next step; Step 7: Output the global optimal position.

2. The function optimization method based on the improved cuckoo search algorithm according to claim 1, characterized in that: The cuckoo search algorithm formula in step 3 is: X(i) t+1 =X(i) t +α⊕L( λ ),i=1,2,..,n; the position of the ith bird nest in the tth generation, ⊕ is the point-to-point multiplication, α is the step length control, which is used to control the search range of the step length, and its value obeys the normal distribution; L(λ) is the Lévy random search path, and the random step length is the Lévy distribution; L(s, λ )s -λ ,(1< λ ≤3); s is the random step length obtained by Levy flight.

3. The function optimization method based on the improved cuckoo search algorithm according to claim 1, characterized in that: This optimization method assumes the following three ideal states: (1) Each cuckoo lays only one egg at a time and randomly selects a nest to store it; (2) During the nest search process, the nest with the best eggs will be retained for the next generation; (3) The number of available nests is fixed, and the probability of finding a foreign egg in the nest is P, P∈[0,1]. If a foreign egg is found, the owner of the nest will build a new nest.

4. The function optimization method based on the improved cuckoo search algorithm according to claim 1, characterized in that: include: A determination unit, used to determine an objective function and decision variables corresponding to an actual application scenario; A construction unit, used to construct a system model of a matching improved cuckoo search algorithm based on an objective function and decision variables corresponding to the actual application scenario; An optimization unit, used for performing a function optimization operation on the system model of the improved cuckoo search algorithm to obtain an optimal solution of the decision variables that optimizes the objective function: wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase of the number of iterations; The output unit is used to output the optimal solution of the decision variable for use in the actual application scenario.

5. The function optimization method based on the improved cuckoo search algorithm according to claim 1, characterized in that: include: Automated application unit, used to operate according to actual application scenarios; A processing device is used to determine an objective function and decision variables corresponding to an actual application scenario in the automated application unit; based on the objective function and decision variables corresponding to the actual application scenario, a system model of a matching improved cuckoo search algorithm is constructed; a function optimization operation is performed on the system model of the improved cuckoo search algorithm to obtain an optimal solution for the decision variables that optimizes the objective function; wherein the moving step length of the decision variables in the function optimization operation tends to decrease with the increase in the number of iterations; and the optimal solution for the decision variables is obtained for use in the actual application scenario.