Method, system and medium for selecting near infrared spectrum in predicting cellulose content of bagasse

The pheromone update rules and heuristic factors of the ant path are adjusted through the segmented ant colony algorithm, which solves the local optimal problem of the ant colony algorithm in the selection of near-infrared spectral wavelengths, and improves the accuracy and complexity of the prediction of bagasse cellulose content.

CN117825325BActive Publication Date: 2024-11-29SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311678905.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2024-11-29
Estimated Expiration
2043-12-07

AI Technical Summary

Technical Problem

Existing ant colony algorithms are prone to fall into local optimality in the process of selecting near-infrared spectral wavelengths, making it difficult to find the optimal solution or approximate optimal solution, resulting in high prediction complexity and low accuracy.

Method used

The segmented ant colony algorithm is used to divide the spectral wavelength interval into sub-intervals, set the pheromone update rules and heuristic factors of the ant path, limit the pheromone range, and adjust the heuristic factors and pheromone update rules at different stages to improve the path Diversity and efficiency of searches.

Benefits of technology

It effectively reduces the prediction complexity, improves the accuracy of near-infrared spectral selection, and obtains a better final solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117825325B_ABST
    Figure CN117825325B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system and medium for selecting near infrared spectrum in bagasse cellulose content prediction, which includes: determining the spectral wavelength interval; dividing the spectral wavelength interval into X sub-intervals, setting a number of ant path nodes for each sub-interval, wherein N sub-intervals selected by ants through the path correspond to one bagasse cellulose content, X>N; setting the basic probability of ant transfer; setting the heuristic factor of the ant path; setting the pheromone update rule of the ant path; limiting the pheromone range of the ant path; setting parameters and executing the ant colony algorithm to obtain the optimal near infrared spectrum wavelength. The method is suitable for predicting the cellulose content of bagasse with surface diffuse reflectance near infrared spectrum, which can reduce the complexity of prediction and improve the accuracy of near infrared spectrum selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a near-infrared spectrum selection method, system and medium for predicting the cellulose content of bagasse, and belongs to the field of intelligent data selection. Background Art

[0002] Near infrared spectroscopy can detect the internal quality of various fruits by using the spectral absorption characteristics. It is a non-destructive and rapid detection method with a wide range of applications. Near infrared spectroscopy has wavelength overlap and there is useless information in the spectrum, so it is necessary to accurately select the wavelength of the spectrum and eliminate invalid wavelengths.

[0003] The ant colony algorithm is a typical bionic intelligent algorithm that obtains the final solution by simulating the foraging behavior of ants in nature. The ant colony algorithm has the advantages of self-organization, positive feedback, strong robustness, and simple implementation. It has good results in solving the traveling salesman problem and other fields, and has been applied to infrared spectroscopy analysis. For example, the wavelength selection of the near-infrared spectrum is converted into the optimal path problem of ants in a directed graph to establish a bagasse cellulose content analysis model.

[0004] However, the existing ant colony algorithm has a difficult problem in the wavelength selection process of near-infrared spectroscopy - it is easy to fall into the local optimum, so it is usually difficult to find the optimal solution or the approximate optimal solution. On the one hand, in the early stage of the ant colony algorithm, there are certain differences in the pheromones of each path, so that the ants have never experienced certain paths, resulting in the possibility of missing some excellent solutions. On the other hand, at the end of the ant colony algorithm, the pheromones of each path are quite different, and the algorithm has long fallen into the local optimum, so it is difficult to find a new path. Summary of the invention

[0005] In view of this, the present application provides a method for selecting near-infrared spectra in predicting the cellulose content of bagasse, a system electronic device and a readable storage medium, which adopts an ant colony algorithm to select appropriate near-infrared spectrum wavelengths for predicting the cellulose content of bagasse. It is suitable for predicting the cellulose content of bagasse with surface diffuse reflectance near-infrared spectrum, can reduce the complexity of prediction and improve the accuracy of near-infrared spectrum selection.

[0006] In a first aspect, an embodiment of the present application discloses a method for selecting near infrared spectra in predicting the cellulose content of bagasse, the method comprising:

[0007] Determine the wavelength range of the spectrum;

[0008] The spectral wavelength interval is divided into X sub-intervals, and a number of ant path nodes are set for each sub-interval, wherein the N sub-intervals selected by the ants through the path correspond to a bagasse cellulose content, X>N;

[0009] Set the basic probability of ant migration;

[0010] Set the heuristic factor of the ant path;

[0011] Set the pheromone update rules for ant paths;

[0012] The range of pheromones that limit ants’ paths;

[0013] Set parameters and execute the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength.

[0014] As a preferred implementation, the sub-interval includes a first ant path node and a second ant path node, the first ant path node indicates that an ant passes through the sub-interval, and the second ant path node indicates that an ant does not pass through the sub-interval.

[0015] As a preferred implementation, the basic probability of ant migration is set as follows:

[0016]

[0017] Among them, τ i,j (t) represents the pheromone on the path (i, j) at the tth iteration, η ij (t) represents the inspiration factor on the path (i, j) at the t-th iteration, α represents the importance of pheromone, β represents the importance of the inspiration factor, l represents the candidate node identifier of the ant at the first node i, M represents the number of candidate nodes of the ant at the first node i, j represents the second node, and the subinterval where the first node is located is adjacent to the subinterval where the second node is located.

[0018] As a preferred implementation, the heuristic factor for setting the ant path includes:

[0019] The first stage is when the execution round t of the ant colony algorithm is less than half of the total rounds T, and the heuristic factor of the ant path (i, j) is set to:

[0020]

[0021] The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the heuristic factor of the ant path (i, j) is set to:

[0022]

[0023] Here, i represents a first node, j represents a second node, and the subinterval where the first node is located is adjacent to the subinterval where the second node is located.

[0024] As a preferred implementation, the pheromone update rule for setting the ant path is as follows:

[0025] τ i,j (t+1)=ρτi,j (t)+Δτ ij (t)

[0026] Where ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t, expressed as:

[0027]

[0028]

[0029] Among them, Q k (t) represents the bagasse cellulose content corresponding to the wavelength of the path selected by the k-th ant in the t-th round, Q s (t) represents the bagasse cellulose content corresponding to the wavelength selected by the s-th ant in the t-th round, and m is the number of ants.

[0030] As a preferred embodiment, the pheromone range for limiting the ant path includes:

[0031] The first stage is when the execution round t of the ant colony algorithm is less than half of the total round T, and the pheromone range of the ant path (i, j) is set to:

[0032]

[0033] The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the pheromone range of the ant path (i, j) is set to:

[0034]

[0035] Where i represents the first node, j represents the second node, the subinterval where the first node is located is adjacent to the subinterval where the second node is located, ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t.

[0036] As a preferred embodiment, the setting of parameters and execution of the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength includes:

[0037] Setting multiple parameters of the ant colony algorithm and executing the ant colony algorithm, the multiple parameters including the number of wavelength intervals, the initial pheromone, the importance of the pheromone, the importance of the heuristic factor, and the total number of iterations;

[0038] When the ant colony algorithm reaches the total number of iterations, the path of bagasse cellulose content is selected as the optimal solution, and the path corresponds to the optimal near-infrared spectrum wavelength.

[0039] A second aspect of the present application discloses a near-infrared spectrum selection system for predicting bagasse cellulose content, the system comprising:

[0040] A determination unit, used for determining a spectral wavelength range;

[0041] A division and first setting unit is used to divide the spectral wavelength interval into X sub-intervals, and set a number of ant path nodes for each sub-interval, wherein N sub-intervals selected by the ants through the path correspond to a bagasse cellulose content, X>N;

[0042] A first setting unit, used to set the basic probability of ant migration;

[0043] The second setting unit is used to set the heuristic factor of the ant path;

[0044] A third setting unit is used to set the pheromone update rule of the ant path;

[0045] Restriction unit, used to limit the pheromone range of ant paths;

[0046] The second setting and execution unit is used to set parameters and execute the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength.

[0047] A third aspect of an embodiment of the present application discloses an electronic device, comprising a processor and a memory for storing programs executable by the processor. When the processor executes the program stored in the memory, any near-infrared spectrum selection method for predicting bagasse cellulose content disclosed in the embodiments of the present application is implemented.

[0048] A fourth aspect of an embodiment of the present application discloses a readable storage medium storing a program, which, when executed by a processor, implements any of the near-infrared spectrum selection methods for predicting bagasse cellulose content disclosed in the embodiments of the present application.

[0049] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0050] 1. The ant colony algorithm used in the embodiment of the present application is divided into two stages, each stage adopts different pheromone update rules and heuristic factors, and each stage completes different path search goals. The ant colony algorithm designed in the embodiment of the present application considers more comprehensive factors, the search path is more diverse, and the final solution obtained is better.

[0051] 2. The embodiment of the present application sets a heuristic factor to allow ants to give priority to paths that have not been visited before, so that more paths can be visited and the diversity of paths is increased.

[0052] 3. The embodiment of the present application divides the entire spectral wavelength range into multiple sub-ranges on average, and uses the wavelength range to represent the wavelength, which can reduce the complexity of wavelength selection and save calculation overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] 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, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0054] Figure 1 A schematic flow chart of a near-infrared spectrum selection method for predicting bagasse cellulose content provided in an embodiment of the present application.

[0055] Figure 2 A schematic diagram of the division of wavelength ranges of the near-infrared spectrum provided in an embodiment of the present application.

[0056] Figure 3 This is an example diagram of the movement routes of ants in the ant colony algorithm provided in an embodiment of the present application.

[0057] Figure 4 This is an example diagram of the steps of the ant colony algorithm provided in the embodiment of the present application.

[0058] Figure 5 This is a graph of bagasse cellulose content corresponding to the optimal path obtained after each iteration of the ant colony algorithm provided in the embodiment of the present application.

[0059] Figure 6 A schematic diagram of the structure of a near-infrared spectrum selection system for predicting the cellulose content in bagasse provided in an embodiment of the present application.

[0060] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions 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.

[0062] In the specification and claims of the present application, the objects distinguished by "first" and "second" are usually of one category, and the number of objects is not limited. For example, the first object can be one or more.

[0063] like Figure 1 As shown, Figure 1 A schematic flow chart of a method for selecting near-infrared spectra in predicting the cellulose content of bagasse provided in an embodiment of the present application, wherein the method for selecting near-infrared spectra in predicting the cellulose content of bagasse may include the following steps:

[0064] S1. Determine the wavelength interval and ant path nodes.

[0065] The step S1 is specifically described as follows:

[0066] like Figure 2 As shown, the entire spectrum wavelength range is evenly divided into X sub-ranges, denoted as W1, W2, ..., W X , for any subinterval W i There are two results: selection and non-selection, that is, the ants in the ant colony algorithm pass through and do not pass through the interval. Each subinterval W x , contains two nodes G x and G x ′, respectively indicating that the ant passes through or does not pass through the interval, that is, the ant has two choices for any sub-interval.

[0067] The number of sub-intervals divided by wavelength is determined according to the actual situation. Usually, the number ranges from 35 to 65.

[0068] S2. Set the basic probability of ant migration.

[0069] The step S2 is specifically described as follows:

[0070] like Figure 3 As shown, the ant traverses all subintervals W1, W2, ..., W according to the probability x For the tth round, the ants start from the subinterval W x From node i to adjacent subinterval W x+1 During the transfer process of node j, the transfer probability is

[0071]

[0072] where τ i,j (t) represents the pheromone on the path (i, j) at the tth iteration, η ij(t) represents the heuristic factor on the path (i, j) at the tth iteration, α represents the importance of pheromone, β represents the importance of the heuristic factor, l represents the candidate node identifier of the ant at node i, and M represents the number of candidate nodes of the ant at node i. Ants have two ways to choose any subinterval, so M = 2 in the above formula.

[0073] The above is the basic probability formula of the ant colony algorithm. Ants select the next hop path according to the above formula and complete the traversal of the entire wavelength sub-interval.

[0074] S3. Set the heuristic factor of the ant path.

[0075] The step S3 is specifically described as follows:

[0076] The heuristic factor of the ant path is set in two stages. The first stage is when the execution round t of the ant colony algorithm is less than half of the total round T, that is, t<T / 2. The goal of this stage is to increase the diversity of the path, and the heuristic factor on the path (i, j) is set to

[0077]

[0078] The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, that is, t ≥ T / 2. The goal of this stage is to quickly find an excellent path and set the heuristic factor on the path (i, j) to

[0079]

[0080] From the above, we can see that in the first stage, ants give priority to paths that have not been visited before, so that they can visit more paths, that is, increase the diversity of paths. In the second stage, ants give priority to paths included in the optimal path, which can speed up the search for the global optimal solution or the global approximate optimal solution.

[0081] S4. Set the pheromone update rules for the ant path.

[0082] The step S4 is specifically described as follows:

[0083] The pheromone update rule of ants on any path (i, j) is set as

[0084] τ i,j (t+1)=ρτ i,j (t)+Δτ ij (t)

[0085] Where ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t, expressed as:

[0086]

[0087]

[0088] Where Q k (t) represents the mango sugar content corresponding to the wavelength selected by the k-th ant in the t-th round, Q s (t) represents the mango sugar content corresponding to the wavelength selected by the s-th ant in the t-th round, and m is the number of ants.

[0089] From the above, we can see that the higher the cellulose content of bagasse, the more pheromones there are on the corresponding path, and the stronger the ability to guide the ants behind. In addition, the more ants pass through the path, the more pheromones are left on the path, and the stronger the ability to guide the ants behind.

[0090] S5. Limit the range of pheromones on ant paths.

[0091] The step S5 is specifically described as follows:

[0092] In order to increase the diversity of path selection and prevent the algorithm from falling into local optimality, it is necessary to limit the pheromone range of the ant path. The pheromone setting of the ant path is divided into two stages. The first stage is when the execution round t of the ant colony algorithm is less than half of the total round T, that is, t<T / 2. In this stage, in order to increase the diversity of path selection, it is necessary to strictly limit the pheromone range. For any round t, the pheromone range of any path (i, j) is set to

[0093]

[0094] The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, that is, t ≥ T / 2. In this stage, to prevent the algorithm from falling into a local optimum, it is necessary to loosely restrict the pheromone range. For any round t, the pheromone range of any path (i, j) is set to

[0095]

[0096] From the above, we can see that in the first stage, the range of pheromone is 0.8-1.6, which is a relatively strict range, which can increase the diversity of path selection. In the second stage, the range of pheromone is 0.2-2.2, which is a relatively loose range, which can increase the diversity of path selection and prevent path selection from falling into local optimality.

[0097] S6. Set parameters and execute the ant colony algorithm.

[0098] like Figure 4 As shown, various parameters of the ant colony algorithm are set and the ant colony algorithm is executed. Set the number of wavelength intervals X = 50, the initial pheromone τ i,j(0) = 1.0, pheromone importance α = 1.2, heuristic factor importance β = 1.0, total number of iterations T = 200. After the algorithm reaches the total number of iterations, the path with the highest mango sugar content is selected as the optimal solution, which corresponds to the optimal near-infrared spectrum wavelength. Figure 5 is the bagasse cellulose content corresponding to the optimal path obtained after each iteration of the ant colony algorithm. The above is just an example of setting various parameter values, but it is not limited to this.

[0099] Those skilled in the art will appreciate that all or part of the steps in the method for implementing the above embodiments may be completed by instructing related hardware through a program, and the corresponding program may be stored in a computer-readable storage medium.

[0100] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0101] like Figure 6 As shown, Figure 6 1 is a schematic diagram of a near infrared spectrum selection system for predicting the cellulose content of bagasse provided in an embodiment of the present application. The near infrared spectrum selection system for predicting the cellulose content of bagasse may include:

[0102] A determination unit 601 is used to determine a spectral wavelength range;

[0103] A division and first setting unit 602 is used to divide the spectral wavelength interval into X sub-intervals, and set a number of ant path nodes for each sub-interval, wherein N sub-intervals selected by the ants through the path correspond to a bagasse cellulose content, X>N;

[0104] A first setting unit 603, used to set a basic probability of ant migration;

[0105] A second setting unit 604, used to set the heuristic factor of the ant path;

[0106] The third setting unit 605 is used to set the pheromone update rule of the ant path;

[0107] A restriction unit 606, used to restrict the pheromone range of the ant path;

[0108] The second setting and executing unit 607 is used to set parameters and execute the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength.

[0109] like Figure 7As shown, Figure 7 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 702, a memory, an input device 703, an output device 704, and a network interface 705 connected via a system bus 701. Among them, the processor 702 is used to provide computing and control capabilities, the memory includes a non-volatile storage medium 706 and an internal memory 707, the non-volatile storage medium 706 stores an operating system, a computer program, and a database, the internal memory 707 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 706, and when the computer program is executed by the processor 702, any one of the near-infrared spectrum selection methods for predicting the cellulose content of bagasse disclosed in the embodiment of the present application is implemented.

[0110] The present application embodiment discloses a storage medium. The storage medium is a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, any near-infrared spectrum selection method for predicting bagasse cellulose content disclosed in the present application embodiment is implemented.

[0111] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0112] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In this embodiment, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device, or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0113] The computer readable storage medium can be written in one or more programming languages ​​or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0114] In summary, the embodiment of the present application adopts a segmented ant colony algorithm to select a suitable near-infrared spectrum wavelength for predicting the cellulose content of bagasse, which is suitable for predicting the cellulose content of bagasse with a surface diffuse reflectance near-infrared spectrum, can reduce the complexity of prediction, and improve the accuracy of near-infrared spectrum selection.

[0115] The above is only a preferred embodiment of the present embodiment patent, but the protection scope of the present embodiment patent is not limited thereto. Any technician familiar with the technical field can make equivalent substitutions or changes within the scope disclosed by the present embodiment patent according to the technical solution and inventive concept of the present embodiment patent, which are all within the protection scope of the present embodiment patent.

Claims

1. A near infrared spectrum selection method for predicting bagasse cellulose content, characterized in that: The method comprises: Determine the wavelength range of the spectrum; Divide the spectral wavelength interval into X sub-intervals, and set a number of ant path nodes for each sub-interval, wherein the N sub-intervals selected by the ants through the path correspond to a bagasse cellulose content, X>N, and the sub-interval includes the first ant path node and the second ant path node, the first node indicates that the ants pass through the sub-interval, and the second node indicates that the ants do not pass through the sub-interval; Set the basic probability of ant migration; Set the heuristic factor of the ant path; Set the pheromone update rules for ant paths; The range of pheromones that limit ants’ paths; Set parameters and execute the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength; The heuristic factors for setting the ant path include: The first stage is when the execution round t of the ant colony algorithm is less than half of the total rounds T, and the heuristic factor of the ant path (i, j) is set to: The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the heuristic factor of the ant path (i, j) is set to: Wherein, i represents a first node, j represents a second node, and the subinterval where the first node is located is adjacent to the subinterval where the second node is located; The pheromone update rule for setting the ant path is as follows: t i,j (t+1)=rt i,j (t)+Δτ ij (t) Where ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t, expressed as: Among them, Q k (t) represents the bagasse cellulose content corresponding to the wavelength of the path selected by the k-th ant in the t-th round, Q s (t) represents the bagasse cellulose content corresponding to the wavelength selected by the sth ant in the tth round, and m is the number of ants; The pheromone range that restricts the ant path includes: The first stage is when the execution round t of the ant colony algorithm is less than half of the total round T, and the pheromone range of the ant path (i, j) is set to: The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the pheromone range of the ant path (i, j) is set to: Where i represents the first node, j represents the second node, the subinterval where the first node is located is adjacent to the subinterval where the second node is located, ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t.

2. The method according to claim 1, characterized in that The basic probability of setting ant transfer is as follows: Among them, τ i,j (t) represents the pheromone on the path (i, j) at the tth iteration, η ij (t) represents the heuristic factor on the path (i, j) at the tth iteration, α represents the importance of pheromone, β represents the importance of heuristic factor, l represents the candidate node identifier of ant at the first node i, M represents the number of candidate nodes of ant at the first node i, j represents the second node, and the subinterval where the first node is located is adjacent to the subinterval where the second node is located.

3. The method according to claim 1, characterized in that: The setting of parameters and execution of the ant colony algorithm to obtain the optimal near-infrared spectrum wavelength includes: Setting multiple parameters of the ant colony algorithm and executing the ant colony algorithm, the multiple parameters including the number of wavelength intervals, the initial pheromone, the importance of the pheromone, the importance of the heuristic factor, and the total number of iterations; When the ant colony algorithm reaches the total number of iterations, the path of bagasse cellulose content is selected as the optimal solution, and the path corresponds to the optimal near-infrared spectrum wavelength.

4. A near infrared spectrum selection system for predicting bagasse cellulose content, characterized in that: The system comprises: A determination unit, used for determining a spectral wavelength range; A division and first setting unit, used for dividing the spectral wavelength interval into X sub-intervals, and setting a number of ant path nodes for each sub-interval, wherein N sub-intervals selected by the ants through the path correspond to a bagasse cellulose content, X>N, and the sub-interval includes an ant path first node and an ant path second node, the first node indicates that the ants pass through the sub-interval, and the second node indicates that the ants do not pass through the sub-interval; A first setting unit, used to set the basic probability of ant migration; The second setting unit is used to set the heuristic factor of the ant path; A third setting unit is used to set the pheromone update rule of the ant path; Restriction unit, used to limit the pheromone range of ant paths; A second setting and execution unit, used for setting parameters and executing an ant colony algorithm to obtain an optimal near-infrared spectrum wavelength; The heuristic factors for setting the ant path include: The first stage is when the execution round t of the ant colony algorithm is less than half of the total rounds T, and the heuristic factor of the ant path (i, j) is set to: The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the heuristic factor of the ant path (i, j) is set to: Wherein, i represents a first node, j represents a second node, and the subinterval where the first node is located is adjacent to the subinterval where the second node is located; The pheromone update rule for setting the ant path is as follows: t i,j (t+1)=rt i,j (t)+Δτ ij (t) Where ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t, expressed as: Among them, Q k (t) represents the bagasse cellulose content corresponding to the wavelength of the path selected by the k-th ant in the t-th round, Q s (t) represents the bagasse cellulose content corresponding to the wavelength selected by the sth ant in the tth round, and m is the number of ants; The pheromone range that restricts the ant path includes: The first stage is when the execution round t of the ant colony algorithm is less than half of the total round T, and the pheromone range of the ant path (i, j) is set to: The second stage is when the execution round t of the ant colony algorithm reaches half of the total round T, and the pheromone range of the ant path (i, j) is set to: Where i represents the first node, j represents the second node, the subinterval where the first node is located is adjacent to the subinterval where the second node is located, ρ is the pheromone evaporation coefficient, Δτ i,j (t) is the pheromone increment of path (i, j) in round t.

5. An electronic device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the method according to any one of claims 1 to 3 is implemented.

6. A readable storage medium storing a program, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Characteristic spectrum area selection method for near infrared spectrum

    CN103308463A

  • Using optical remote sensors and machine learning models to predict agronomic field property data

    US20210209490A1