Engine Valve Recognition Method and System Integrating Artificial Fish School and Firefly Algorithm

By integrating artificial fish and firefly algorithms to optimize the clustering of anchor frame feature sizes, and improving the target detection model, the problem of low engine valve recognition accuracy is solved, and high-precision automatic valve installation equipment is realized.

CN116486329BActive Publication Date: 2025-07-25SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310344006.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2025-07-25
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

In the existing engine valve recognition methods, the recognition accuracy and real-time nature are greatly affected by the size of the sample set anchor frame, resulting in low recognition accuracy.

Method used

Fusion of artificial fish and firefly algorithms, improve cluster analysis algorithms, improve firefly algorithms through artificial fishfly algorithms, combine foraging, clustering and rear-end collision behaviors, optimize the clustering center of anchor frame feature sizes, and train the target detection model for engine valve recognition.

Benefits of technology

The accuracy of engine valve recognition is improved, the problem of accuracy and real-time impact of anchor frame size in existing methods is solved, and a high-precision automatic valve installation equipment foundation is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486329B_ABST
    Figure CN116486329B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of intelligent engine assembly, and provides an engine valve recognition method and system integrating artificial fish swarm and firefly algorithm. Aiming at the problem that the accuracy and real-time performance of the existing engine valve recognition method are affected by the anchor box size of the sample set, resulting in low recognition accuracy, this solution is to obtain the image data of the engine valve to be detected; obtain engine valve data including multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm; and obtain the engine valve recognition result based on the engine valve data including multiple groups of different anchor box feature sizes and the trained target detection model, which greatly improves the detection and recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent engine assembly, and particularly relates to a method and system for identifying engine valves by integrating artificial fish swarm and firefly algorithm. Background Technique

[0002] The statements in this part only provide background technical information related to the present invention, and do not necessarily constitute prior art.

[0003] In recent years, with the rise of artificial intelligence technology and the continuous increase of labor costs, relying solely on manual labor can no longer meet the current development of enterprises and social needs. In traditional engine assembly lines, valves are generally installed on cylinder heads manually. Scientific research workers have begun to try to replace manual assembly by further improving the accuracy and efficiency of automatic valve installation equipment. Automatic valve installation equipment has emerged. Among them, the most crucial technology is how to effectively identify different types of valves using machine vision.

[0004] The convolutional neural network based on the deep learning object detection algorithm has the characteristics of low complexity and high accuracy, and is widely used in machine vision. However, its accuracy and real-time performance are greatly affected by the anchor box size of the sample set. Therefore, the accurate selection of the anchor box size of the engine valve sample set is one of the key factors to improve the recognition and detection performance of engine valves. In the current object detection algorithms in machine vision, the initial anchor box is generally selected using the standard K-means clustering algorithm, but this method is prone to falling into local optimal values and has low accuracy. Summary of the Invention

[0005] In order to solve at least one of the technical problems in the above background technique, the present invention provides a method and system for identifying engine valves by integrating artificial fish swarm and firefly algorithm. It integrates artificial fish swarm and firefly algorithm into the clustering analysis of the anchor box feature size of the engine valve data set, improves the setting of the image standard box in the object detection algorithm process, and then uses the clustered engine valve data set to train the object detection model for engine valve recognition.

[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0007] The first aspect of the present invention provides a method for identifying engine valves by integrating artificial fish swarm and firefly algorithm, including the following steps:

[0008] Obtain the image data of the engine valve to be detected;

[0009] Obtain engine valve data containing multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm;

[0010] Among them, the improved clustering analysis algorithm is as follows: the artificial fish swarm algorithm is used to improve the firefly algorithm, specifically including: introducing the foraging behavior, aggregation behavior, and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, updating the positions of the fireflies, so as to complete the fusion of the artificial fish swarm and the firefly algorithm, optimize the clustering center, and obtain the improved clustering algorithm;

[0011] Based on the engine valve data containing multiple groups of different anchor box feature sizes and the trained object detection model, the engine valve recognition result is obtained.

[0012] The second aspect of the present invention provides an engine valve recognition system that fuses the artificial fish swarm and the firefly algorithm, including:

[0013] A valve data acquisition module, which is used to acquire the image data of the engine valve to be detected;

[0014] An anchor box feature size clustering module, which is used to obtain the engine valve data containing multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm;

[0015] Among them, the improved clustering analysis algorithm is as follows: the artificial fish swarm algorithm is used to improve the firefly algorithm, specifically including: introducing the foraging behavior, aggregation behavior, and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, updating the positions of the fireflies, so as to complete the fusion of the artificial fish swarm and the firefly algorithm, optimize the clustering center, and obtain the improved clustering algorithm;

[0016] A valve recognition module, which is used to obtain the engine valve recognition result based on the engine valve data containing multiple groups of different anchor box feature sizes and the trained object detection model.

[0017] The third aspect of the present invention provides a computer-readable storage medium.

[0018] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the engine valve recognition method that fuses the artificial fish swarm and the firefly algorithm as described above.

[0019] The fourth aspect of the present invention provides a computer device.

[0020] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps in the engine valve recognition method that combines the artificial fish swarm and firefly algorithm as described above are implemented.

[0021] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0022] 1. The present invention combines the artificial fish swarm and firefly algorithm and applies it to the clustering analysis of the anchor box feature sizes of the engine valve data set, improves the setting of the image standard box in the target detection algorithm process, and then uses the clustered engine valve data set to train the target detection model for engine valve recognition, solving the defect that the accuracy and real-time performance of the existing recognition algorithm are affected by the anchor box sizes of the sample set, improving the accuracy of engine valve recognition, and thus providing a technical basis for the research and development of high-precision automatic valve installation equipment.

[0023] 2. The present invention integrates the three behaviors of foraging, clustering, and following of the artificial fish swarm into the firefly algorithm and sets different weights, and the specific magnitudes of the weights are determined by different degrees of crowding. The advantage lies in comprehensively considering the balance between global optimum and local optimum.

[0024] The advantages of the additional aspects of the present invention will be partly given in the following description, partly will become obvious from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings forming a part of this invention are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention.

[0026] Figure 1 It is a flowchart of the engine valve recognition method that combines the artificial fish swarm and firefly algorithm in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] The present invention will be further described below in conjunction with the drawings and embodiments.

[0028] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0029] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should also be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0030] As mentioned in the background art, the accuracy and real-time performance of the existing engine valve recognition method are affected by the anchor box size of the sample set, resulting in the problem of low recognition accuracy. In the engine valve recognition method of the present invention, firstly, the artificial fish swarm algorithm is used to improve the firefly algorithm to cluster the anchor box feature sizes of the engine valve data set, and then the clustering results are used to train the object detection model to identify the types of engine valves, avoiding the influence of the anchor box size of the sample set and greatly improving the detection and recognition accuracy.

[0031] Embodiment 1

[0032] As Figure 1 shown, this embodiment provides an engine valve recognition method that combines the artificial fish swarm and firefly algorithms, including the following steps:

[0033] Step 1: Obtain the image data of the engine valve to be detected;

[0034] The image data of the engine valve to be detected includes gasoline engine valves, diesel engine valves, engine valves of different cylinder diameters of the same type of engine, etc.; the engine valves of the same type and the same cylinder diameter include intake valves and exhaust valves.

[0035] The specific valve features should include five types of objects to be recognized, namely, the valve top in the valve head, the valve cone surface, the valve cone angle, the valve lock groove on the valve stem, and the valve tail end face.

[0036] Step 2: Cluster the image data of the engine valve to be detected according to the improved clustering analysis algorithm to obtain multiple groups of engine valve clustering results with different anchor box feature sizes;

[0037] Among them, the improved clustering analysis algorithm is: using the artificial fish swarm algorithm to improve the firefly algorithm, specifically including: introducing the foraging behavior, aggregation behavior, and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, and updating the position of the firefly to complete the fusion of the artificial fish swarm and firefly algorithms, optimizing the clustering center, and obtaining the improved clustering algorithm;

[0038] In Step 2, introducing the foraging behavior, swarming behavior, and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm specifically includes:

[0039] Assume that the objective function to be optimized is m-dimensional, and the number of fireflies randomly initialized in the solution space is n. Then, an n-dimensional vector x i =(x i1 ,x i2 ,...,x im ) can be used, where i = 1, 2,..., n represents a potential solution to this optimization problem. Among them, x i represents the position of firefly i in the solution space, and x im represents the value of firefly i in the m-th dimensional space. Use x i to represent the position of the current firefly, and its brightness is y i .

[0040] (1) Update the positions of fireflies based on the foraging behavior, swarming behavior, and following behavior with assigned weights. Among them, the position update formula for firefly j attracting firefly i is as follows:

[0041]

[0042] where t is the iteration number of the algorithm, β j is the maximum attractiveness, that is, the attractiveness of firefly j at r = 0, γ is the light absorption coefficient, which can be set as a constant, r ij is the Cartesian distance from firefly i to firefly j, rand() is a random number in (0, 1), step is the step length of firefly movement, ω1 is the weight of foraging behavior, ω2 is the weight of swarming behavior, ω3 is the weight of following behavior; x c (t) represents the position of the center of the fish swarm within the field of vision, x max (t) represents the position of the individual with the highest fitness within the field of vision, x j (t) represents the position of firefly j, which represents the position of the artificial fish at this time.

[0043] (2) By analogy with the foraging behavior, swarming behavior, and following behavior of the artificial fish swarm algorithm, introduce them into the firefly algorithm, and combine the parameters in the firefly algorithm to assign corresponding weights to each behavior.

[0044] The specific process of combining the parameters in the firefly algorithm to assign corresponding weights to each behavior includes:

[0045] If y c / n f -δ·y i >0, then the weight coefficient ω2 of swarming behavior takes a larger value;

[0046] At this time, the value of ω2 can be ω2≥0.5, and at this time ω1 = ω3 = (1 - ω2) / 2.

[0047] If y max / n f -δ·y i >0, then the weight coefficient ω3 of the chasing behavior takes a larger value; otherwise, the weight coefficient ω1 of the foraging behavior takes a larger value.

[0048] At this time, the weight values in the foraging behavior and the chasing behavior are assigned in the same way as the clustering behavior, and will not be elaborated here.

[0049] In the formula, n f represents the number of fireflies within the decision domain radius r s , δ is the crowding factor, y c represents the brightness of the partner center, and y max represents the brightest brightness within the decision domain radius r s .

[0050] The purpose of this design is that within the decision domain radius r s of the firefly algorithm, in addition to its own optimization behavior, the firefly algorithm also has three behaviors of the artificial fish swarm, namely foraging, clustering, and chasing; this algorithm integrates the three behaviors of foraging, clustering, and chasing of the artificial fish swarm into the firefly algorithm, and sets different weights, and the specific magnitudes of the weights are determined by different degrees of crowding. Its advantage lies in comprehensively considering the balance between global optimum and local optimum.

[0051] In step 2, obtaining the optimal firefly decision domain radius by fusing the artificial fish swarm algorithm through the fitness of the firefly adaptation algorithm specifically includes:

[0052] (1) Calculate the fitness l h for each fusion of the artificial fish swarm and the firefly algorithm;

[0053] (2) Based on the ratio of the difference between the fitness values of the previous and current times and the current fitness , continuously adjust the decision domain radius of the firefly until the set threshold is met to obtain the optimal firefly decision domain radius.

[0054] Among them, based on the ratio of the difference between the fitness values of the previous and current times and the current fitness, continuously adjusting the decision domain radius of the firefly until the set threshold is met to obtain the optimal firefly decision domain radius specifically includes:

[0055] If the ratio of the difference between the fitness values of the previous and current times and the current fitness is less than the set threshold, then reduce the decision domain radius of the firefly to enhance the local optimization ability;

[0056] After performing optimization for a set number of consecutive times, if the ratio of the difference in fitness between the previous and current times to the current fitness is still less than the set threshold, the algorithm is perturbed to increase the decision domain radius of the fireflies to

[0057] Calculate the positions of the fireflies again. At this time, if the distance between the firefly and the maximum brightness is better than the distance between the original position and the maximum brightness, update the position of the firefly; otherwise, do not update the position of the firefly.

[0058] If the ratio of the difference in fitness between the previous and current times to the current fitness is greater than the set threshold, then increase the decision domain radius of the fireflies to Enhance the global optimization ability.

[0059] Among them, represents the brightest brightness within the decision domain radius of the firefly after the h - th fusion, and y i h represents the brightness corresponding to the current position of the firefly after the h - th fusion.

[0060] Preferably, in this embodiment, the value of the set threshold is 5‰, and the set number of optimization times is 5 times.

[0061] The fitness of the integrated artificial fish - swarm and firefly algorithm is calculated according to the Euclidean distance from all data to the nearest clustering center, and the calculation formula is:

[0062]

[0063] Among them, N is the total number of clusters, n is the number of data, m is the data dimension, s jo is the feature size of each anchor box, and c ko is the center of the cluster, that is, the optimal position of the particle - swarm optimization.

[0064] The advantage of the above - mentioned scheme is that the particles find the clustering center that minimizes the fitness function by finding the shortest path from the initial position to the final position, thereby obtaining N different clustering division results for the entire data set.

[0065] Before training the object - detection model, it is necessary to set the width and height of the initial anchor box. During training, the network outputs a prediction box based on the initial anchor box, and then compares it with the feature size of the labeled ground - truth box, calculates the difference between the two, and then updates the network parameters iteratively in the reverse direction. Therefore, the selection of the initial anchor box has a great impact on the accuracy and speed of model training.

[0066] To improve the initial value of the anchor box, the improved clustering algorithm clusters the width and height of the standard boxes in the data set to obtain the feature sizes of N groups of anchor boxes.

[0067] In this embodiment, the value of N can be 9, 16, 25... etc. according to different target detection algorithms.

[0068] Step 3: Preprocess the engine valve data with multiple groups of different anchor box feature sizes as the training data set;

[0069] The preprocessing specifically includes: annotating the category and position of the standard box of the target with a rectangular box, and preprocessing the annotated valve image data set by data augmentation, adaptive scale scaling and rectangular training to obtain a data set that can clearly identify the engine valve.

[0070] Step 4: Obtain the engine valve recognition result based on the clustering results of the engine valves with multiple groups of different anchor box feature sizes and the trained target detection model.

[0071] After completing the initialization work of the anchor box feature size of the data set, use the convolutional neural network to train the engine valve training set with the improved anchor box feature size to obtain the target detection model, and use the test set for testing.

[0072] When the target detection model is trained, the clustering results of the engine valves with multiple groups of different anchor box feature sizes obtained by clustering with the improved clustering analysis algorithm are divided into a training set and a test set;

[0073] Train the target detection model based on the training set to obtain the trained target detection model, and use the test set to test its recognition accuracy.

[0074] The target detection model adopted in this embodiment is a convolutional neural network.

[0075] The advantage of the above solution is that the present invention combines the artificial fish swarm and the firefly algorithm and applies them to the clustering analysis of the anchor box feature size of the engine valve data set, improves the setting of the image standard box in the target detection algorithm process, and then uses the clustered engine valve data set to train the target detection model for engine valve recognition, solving the defect that the accuracy and real-time performance of the existing recognition algorithm are affected by the anchor box size of the sample set, and improving the accuracy of engine valve recognition.

[0076] Embodiment 2

[0077] This embodiment provides an engine valve recognition system that combines the artificial fish swarm and the firefly algorithm, including:

[0078] A valve data acquisition module, which is used to acquire the image data of the engine valve to be detected;

[0079] An anchor box feature size clustering module, which is used to obtain engine valve data containing multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm;

[0080] Among them, the improved clustering analysis algorithm is: using the artificial fish swarm algorithm to improve the firefly algorithm, specifically including: introducing the foraging behavior, swarming behavior and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, updating the positions of the fireflies, so as to complete the integration of the artificial fish swarm and the firefly algorithm, optimize the clustering center, and obtain the improved clustering algorithm;

[0081] The valve recognition module is used to obtain the engine valve recognition result based on the engine valve data including multiple groups of different anchor box feature sizes and the trained object detection model.

[0082] Embodiment III

[0083] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the engine valve recognition method that fuses the artificial fish swarm and the firefly algorithm as described above.

[0084] Embodiment IV

[0085] This embodiment provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the engine valve recognition method that fuses the artificial fish swarm and the firefly algorithm as described above.

[0086] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program codes.

[0087] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0088] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 or a plurality of processes and / or blocks Figure 1 or a plurality of blocks.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 or a plurality of processes and / or blocks Figure 1 or a plurality of blocks.

[0090] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0091] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An engine valve recognition method integrating artificial fish swarm and firefly algorithm, characterized in that It includes the following steps: Obtain the image data of the engine valve to be detected; Obtain engine valve data including multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm; Among them, the improved clustering analysis algorithm is: improving the firefly algorithm with the artificial fish swarm algorithm, specifically including: introducing the foraging behavior, aggregation behavior and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, updating the position of the firefly, so as to complete the fusion of the artificial fish swarm and the firefly algorithm, optimize the clustering center, and obtain the improved clustering algorithm; Obtain the engine valve recognition result based on the engine valve data including multiple groups of different anchor box feature sizes and the trained object detection model.

2. The engine valve recognition method integrating the artificial fish swarm and firefly algorithm according to claim 1, characterized in that, When updating the position of the firefly, the firefly j attracting the firefly i The position update formula is as follows: Among them, t is the number of iterations of the algorithm, is the maximum attractiveness, that is, the attractiveness of the firefly j at r = 0, is the light absorption coefficient, set as a constant, is the firefly i to the firefly j Cartesian distance, is a random number in (0, 1), step is the step size of the firefly movement, is the foraging behavior weight, is the aggregation behavior weight, is the following behavior weight; represents the position of the center of the fish school within the field of vision, represents the position of the individual with the highest fitness within the field of vision, represents the firefly j position, which represents the position of the artificial fish at this time.

3. The engine valve recognition method integrating artificial fish swarm and firefly algorithm according to claim 1, characterized in that, The specific process of combining the parameters in the firefly algorithm and assigning corresponding weights to each behavior includes: If , then ; If , then ; otherwise, ; wherein, is the foraging behavior weight, is the aggregation behavior weight, is the following behavior weight, represents the number of fireflies within the decision domain radius, is the crowding factor, represents the brightness of the partner center, represents the brightest brightness within the decision domain radius; represents the brightness corresponding to the position of the current firefly.

4. The engine valve recognition method integrating artificial fish swarm and firefly algorithm according to claim 1, characterized in that, The specific process of obtaining the optimal firefly decision domain radius through the change of the fitness function includes: Calculate the fitness of each fusion of the artificial fish swarm and the firefly algorithm; Continuously adjust the decision domain radius of the firefly based on the ratio of the fitness difference between the previous and current times and the current fitness until the set threshold is met to obtain the optimal firefly decision domain radius.

5. The method for identifying engine valves by integrating artificial fish swarm and firefly algorithm according to claim 4, characterized in that, The fitness of the fusion of the artificial fish swarm and the firefly algorithm is calculated according to the Euclidean distance from all data to the nearest clustering center.

6. The engine valve recognition method integrating artificial fish swarm and firefly algorithm according to claim 4, wherein, The process of continuously adjusting the decision domain radius of the firefly based on the ratio of the fitness difference between the previous and current times and the current fitness until the set threshold is met to obtain the optimal firefly decision domain radius includes: If the ratio of the difference in fitness between the previous and current times to the current fitness is less than the set threshold, then reduce the decision domain radius of the firefly to max{0.5, } ; After continuously performing optimization for a set number of times, if the ratio of the difference in fitness between the previous and current times to the current fitness is still less than the set threshold, the algorithm is then perturbed to increase the decision domain radius of the fireflies to ; Calculate the position of the firefly again. If the distance between the firefly and the maximum brightness is better than the distance between the original position and the maximum brightness, update the position of the firefly; otherwise, do not update the position of the firefly; If the ratio of the difference in fitness between the previous and current times to the current fitness is greater than the set threshold, then increase the decision domain radius of the firefly to ; Among them, represents the number of fireflies within the decision domain radius, is the crowding factor, represents the brightest brightness within the decision domain radius of the firefly after the h -th fusion, represents the brightness corresponding to the current position of the firefly after the h -th fusion, is the decision domain radius of the firefly algorithm.

7. The engine valve recognition method integrating artificial fish swarm and firefly algorithm according to claim 1, characterized in that, The engine valve recognition result includes five categories, namely the valve top, valve cone surface, valve cone angle in the valve head, and the valve lock groove and valve tail end face on the valve stem.

8. An engine valve recognition system integrating an artificial fish swarm and a firefly algorithm, characterized in that, It includes: A valve data acquisition module, which is used to obtain the image data of the engine valve to be detected; An anchor box feature size clustering module, which is used to obtain engine valve data including multiple groups of different anchor box feature sizes according to the image data of the engine valve to be detected and the improved clustering analysis algorithm; Among them, the improved clustering analysis algorithm is: improving the firefly algorithm with the artificial fish swarm algorithm, specifically including: introducing the foraging behavior, aggregation behavior and following behavior of the artificial fish swarm algorithm into the firefly optimization algorithm, combining the parameters in the firefly algorithm, assigning corresponding weights to each behavior, obtaining the optimal firefly decision domain radius through the change of the fitness function, updating the position of the firefly, so as to complete the fusion of the artificial fish swarm and the firefly algorithm, optimize the clustering center, and obtain the improved clustering algorithm; A valve recognition module, which is used to obtain the engine valve recognition result based on the engine valve data including multiple groups of different anchor box feature sizes and the trained object detection model.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in the engine valve identification method that combines the artificial fish swarm algorithm and the firefly algorithm as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the engine valve identification method that combines the artificial fish swarm algorithm and the firefly algorithm as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Traffic flow prediction method based on firefly algorithm and RBF neural network

    CN106910337A

  • Novel chaotic self-adaptive firework optimization method

    CN110334812A