Method for obtaining light intensity and scattering angle of LED light source after passing through collimation TIR lens

By constructing and optimizing the random forest model and combining the crown porcupine optimization algorithm, the problem of obtaining the light intensity and scattering angle steps in the existing technology of LED light sources through different structures is solved, and fast and accurate acquisition of light intensity and scattering angles is achieved, improving design efficiency and accuracy.

CN119623276APending Publication Date: 2025-03-14BEIJING ZHONG CHUANG HU LIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411700355.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art is cumbersome, time-consuming and labor-intensive, and inefficient when obtaining the light intensity and scattering angle of the LED light source after passing through the collimated TIR lens of different structures.

Method used

By obtaining the data set of the collimated TIR lens, outlier processing and division of the training set and test set, the initial random forest model is constructed, and the model is optimized using the crown porcupine optimization algorithm, the number of leaf nodes and tree depth is iteratively optimized. Finally, the optimized model is used to import the collimated TIR lens parameters of different structures, load the LED light source, and obtain the corresponding light intensity and scattering angle.

Benefits of technology

It achieves rapid, accurate and reliable acquisition of the light intensity and scattering angle of the LED light source after passing through the collimated TIR lens of different structures, saving time and design costs, avoiding the blindness of the TIR lens design, and improving the solution accuracy of the crown porcupine optimization algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623276A_ABST
    Figure CN119623276A_ABST
Patent Text Reader

Abstract

The invention provides a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimation TIR lens, and belongs to the technical field of optical technology and illumination, and the method comprises the steps: obtaining a data set of the collimation TIR lens, carrying out the abnormal value processing, and dividing the data set into a training set and a test set according to a preset proportion; constructing an initial random forest model, optimizing the initial random model based on a crown porcupine optimization algorithm, performing parameter setting on the crown porcupine optimization algorithm according to the leaf node number and the number depth of the random forest model, and performing iterative optimization; comprising the steps of initializing a crown porcupine optimization algorithm, updating a visual defense strategy, updating an auditory defense strategy, updating a smell attack defense strategy and updating a physical attack defense strategy. And testing the light intensity and the scattering angle of the LED light source after passing through the collimation TIR lens by using the optimized random forest model. According to the scheme, the speed and accuracy of obtaining the light intensity and the scattering angle are improved, and time and design cost are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of optical technology and lighting technology, and in particular to a method for obtaining the light intensity and scattering angle of an LED light source after the light source passes through a collimating TIR lens. Background Art

[0002] With the continuous development of lighting technology, LED light sources are increasingly being used in many fields due to their significant advantages such as high efficiency, energy saving, environmental protection, and long life. However, LED light sources have divergent light and low light intensity when they leave the factory, making it difficult to meet specific lighting needs. Therefore, it is necessary to optimize the light distribution of LED light sources through secondary optical design. As an optical lens based on the principle of total internal reflection (TIR), TIR lenses can efficiently collect, process, and distribute light, thereby minimizing light loss and improving lighting efficiency.

[0003] Generally, the steps to obtain the light intensity and scattering angle of an LED light source after it passes through a collimating TIR lens are mainly divided into the following three steps: ① Construct a mathematical model for the contour of a collimating TIR lens for secondary optical design; ② Import the mathematical model of the contour into a three-dimensional design software to obtain a three-dimensional solid model of the collimating TIR lens; ③ Import the three-dimensional solid model of the collimating TIR lens into an optical simulation software (Tracepro, LightTools, Speos, etc.), set the properties of the LED light source such as the luminous flux, material properties, size and position of the detector, and obtain the corresponding light intensity and scattering angle. The applicant has found that the above-mentioned design steps for obtaining the light intensity and scattering angle of an LED light source through collimating TIR lenses of different structures are relatively cumbersome, time-consuming, labor-intensive, and inefficient. Therefore, there is an urgent need for an efficient, accurate, and reliable method for obtaining the light intensity and scattering angle of an LED light source after it passes through collimating TIR lenses of different structures. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens, which is used in TIR lens design to quickly, accurately and reliably obtain the light intensity and scattering angle of an LED light source after passing through collimating TIR lenses of different structures.

[0005] The embodiment of the present application provides a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens, the method comprising:

[0006] Acquire a data set of a collimating TIR lens, the data set including structural parameter data of the collimating TIR lens as an input sample data set and optical test data as an output sample data set, and perform outlier processing on the acquired data set;

[0007] The data set after outlier processing is divided into a training set and a test set according to a preset ratio;

[0008] Construct an initial random forest model and use the training set to train the initial random model;

[0009] During the training process, the initial random model is optimized based on the crested porcupine optimization algorithm, and the crested porcupine optimization algorithm is parameterized according to the number of leaf nodes and depth of the random forest model;

[0010] Calling the crown porcupine optimization algorithm to iteratively optimize the number of leaf nodes and the number depth of the initial random forest model, the iterative optimization process includes initializing the crown porcupine optimization algorithm, updating the visual defense strategy, updating the auditory defense strategy, updating the odor attack defense strategy, and updating the physical attack defense strategy;

[0011] Use the test set to test the optimized random forest model;

[0012] Using the tested random forest model, the parameters of collimated TIR lenses with different structures are imported, and the LED light source is loaded to obtain the corresponding light intensity and scattering angle.

[0013] According to a specific implementation method of an embodiment of the present application, the structural parameter data of the collimating TIR lens includes the inner lens height, refraction angle and draft angle of collimating TIR lenses of different structures, and the light test data includes the corresponding light intensity and scattering angle after an LED light source with a certain luminous flux passes through collimating TIR lenses of different structures.

[0014] According to a specific implementation of the embodiment of the present application, the method further includes: normalizing the acquired data set, and the normalization equation is:

[0015]

[0016] Among them, y max is the expected maximum value; y min is the expected minimum value; x max is the maximum value of the data; x min is the minimum value of the data.

[0017] According to a specific implementation method of an embodiment of the present application, the parameter settings include: population size, maximum number of iterations, upper and lower limits of variables, and problem latitude.

[0018] According to a specific implementation of the embodiment of the present application, the initialization of the crown porcupine optimization algorithm includes:

[0019] Population initialization of the crested porcupine optimization algorithm based on the Hammersley sequence.

[0020] According to a specific implementation of the embodiment of the present application, the expression of the Hammersley sequence is:

[0021] s(i,:)=lb+(mb-lb)×H(i,:)

[0022] s(i+j,:)=mb+(ub-mb)×H(i,:),

[0023] Among them, s is the initial position of the two populations generated according to the Hammersley sequence, i is the i-th population, j is the j-th dimension of the problem, ub is the upper limit of the variable, lb is the lower limit of the variable, mb is the middle value of the variable, and H is the generated sequence value.

[0024] According to a specific implementation of the embodiment of the present application, the updating of the visual defense strategy includes:

[0025] The visual defense strategy of the crown porcupine optimization algorithm is improved based on the ellipse movement strategy. The improved visual defense strategy is expressed as follows:

[0026] A 0 =Levy(d)×(X avg (j)-X(i,j))+lb+r 1 ×(ub-lb) / 2

[0027]

[0028] W 2 =e-(2t / T max ) 3

[0029]

[0030] Among them, A 0 is the complex coefficient of the ellipse, X avg is the average position, X is the position of the individual, d is the latitude of the problem, t is the current number of iterations, is the position of the ith individual at the t+1th iteration, T max is the maximum number of iterations, W 1 and W 2 is the weight value, r 1 and r 2 is a random integer between [1, N], where N is the population size.

[0031] According to a specific implementation of the embodiment of the present application, the expression of the auditory defense strategy is:

[0032]

[0033] Where y represents the position of the predator, is the position of the i-th individual at the t-th iteration, U 1 and τ 3 is a random value between [0,1].

[0034] According to a specific implementation of the embodiment of the present application, the mathematical expression of the odor attack defense strategy is:

[0035]

[0036]

[0037] Among them, r 3 is a random number between [1, N], δ is a parameter used to control the search direction, and γ t It is a defense factor. is the odor diffusion factor, represents the objective function value of the i-th individual at the t-th iteration, ε is a small value that avoids division by zero, and rand is a random value generated between [0,1].

[0038] According to a specific implementation of the embodiment of the present application, the physical attack defense strategy is improved by using an adaptive T distribution, and the expression of the improved physical attack defense strategy is:

[0039]

[0040] Where T is the T distribution function, a is the base of the exponential function, and t represents the current number of iterations. is the best individual, τ 4 and τ 5 is a random value in the interval [0, 1], α is the convergence speed factor, m is the scale factor, It is the fitness evaluation index.

[0041] Beneficial effects:

[0042] Compared with the existing design technology, the method for obtaining the light intensity and scattering angle of the LED light source after passing through the collimating TIR lens in the embodiment of the present application has the following beneficial effects:

[0043] 1. A method is provided for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens of different structures. The present invention can quickly, accurately and reliably obtain the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens of different structures, thereby saving a lot of time and design costs and avoiding the blindness of TIR lens design;

[0044] 2. The optimization ability and solution accuracy of the original crown porcupine algorithm have been improved, the ability of the crown porcupine optimization algorithm to jump out of the local optimum has been improved, and the global exploration and local development capabilities of the algorithm have been balanced;

[0045] 3. Through the present invention, the light source corresponding to the light intensity and scattering angle can be split into different sub-light sources and applied to the corresponding collimating TIR lens, so as to quickly design the optical system of the landing lights and taxiing lights on the aircraft, saving the design cost of the designers and improving the work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments 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 these drawings without creative work.

[0047] Figure 1 A flow chart of a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to an embodiment of the present invention;

[0048] Figure 2 is a schematic structural diagram of a collimating TIR lens according to an embodiment of the present invention;

[0049] Figure 3 is a distribution diagram of sample data according to an embodiment of the present invention;

[0050] Figure 4 is an iterative curve of an improved crested porcupine optimization algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0052] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0053] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.

[0054] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0055] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0056] The present application embodiment provides a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens. Figures 1 to 4 Describe in detail.

[0057] In one embodiment, referring to Figure 1 The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens comprises the following steps:

[0058] Acquire a data set of a collimating TIR lens, the data set including structural parameter data of the collimating TIR lens as an input sample data set and optical test data as an output sample data set, and perform outlier processing on the acquired data set;

[0059] The data set after outlier processing is divided into a training set and a test set according to a preset ratio;

[0060] Construct an initial random forest model and use the training set to train the initial random model;

[0061] During the training process, the initial random model is optimized based on the crested porcupine optimization algorithm, and the crested porcupine optimization algorithm is parameterized according to the number of leaf nodes and depth of the random forest model;

[0062] Calling the crown porcupine optimization algorithm to iteratively optimize the number of leaf nodes and the number depth of the initial random forest model, the iterative optimization process includes initializing the crown porcupine optimization algorithm, updating the visual defense strategy, updating the auditory defense strategy, updating the odor attack defense strategy, and updating the physical attack defense strategy;

[0063] Use the test set to test the optimized random forest model;

[0064] Using the tested random forest model, the parameters of collimated TIR lenses with different structures are imported, and the LED light source is loaded to obtain the corresponding light intensity and scattering angle.

[0065] In specific implementation, the structure of the collimating TIR lens refers to Figure 2 , the TIR lens profile model can be defined by the height H, refraction half angle φ, and draft angle θ of the inner lens.

[0066] Furthermore, the structural parameter data of the collimating TIR lens includes inner lens height, refraction angle and draft angle of collimating TIR lenses of different structures, and the light test data includes the corresponding light intensity and scattering angle after an LED light source with a certain luminous flux passes through collimating TIR lenses of different structures.

[0067] Furthermore, the method further comprises: performing normalization processing on the acquired data set, and the normalization equation is:

[0068]

[0069] Among them, y max is the expected maximum value; y min is the expected minimum value; x max is the maximum value of the data; x min is the minimum value of the data.

[0070] Furthermore, the parameter settings include: population size, maximum number of iterations, upper and lower limits of variables and problem latitude.

[0071] In one embodiment, the initialization of the crested porcupine optimization algorithm includes:

[0072] Population initialization of the crested porcupine optimization algorithm based on the Hammersley sequence.

[0073] According to a specific implementation of the embodiment of the present application, the expression of the Hammersley sequence is:

[0074] s(i,:)=lb+(mb-lb)×H(i,:)

[0075] s(i+j,:)=mb+(ub-mb)×H(i,:),

[0076] Among them, s is the initial position of the two populations generated according to the Hammersley sequence, i is the i-th population, j is the j-th dimension of the problem, ub is the upper limit of the variable, lb is the lower limit of the variable, mb is the middle value of the variable, and H is the generated sequence value.

[0077] In one embodiment, updating the visual defense strategy includes:

[0078] The visual defense strategy of the crown porcupine optimization algorithm is improved based on the ellipse movement strategy. The improved visual defense strategy is expressed as follows:

[0079] A 0 =Levy(d)×(X avg (j)-X(i,j))+lb+r 1 ×(ub-lb) / 2

[0080]

[0081] W 2 =e-(2t / T max ) 3

[0082]

[0083] Among them, A 0 is the complex coefficient of the ellipse, X avg is the average position, X is the position of the individual, d is the latitude of the problem, t is the current number of iterations, is the position of the ith individual at the t+1th iteration, T max is the maximum number of iterations, W 1 and W 2 is the weight value, r 1 and r 2 is a random integer between [1, N], where N is the population size.

[0084] In one embodiment, the expression of the auditory defense strategy is:

[0085]

[0086] Where y represents the position of the predator, is the position of the i-th individual at the t-th iteration, U 1 and τ 3 is a random value between [0,1].

[0087] In one embodiment, the mathematical expression of the odor attack defense strategy is:

[0088]

[0089] Among them, r 3 is a random number between [1, N], δ is a parameter used to control the search direction, and γ t It is a defense factor. is the odor diffusion factor, represents the objective function value of the i-th individual at the t-th iteration, ε is a small value that avoids division by zero, and rand is a random value generated between [0,1].

[0090] In one embodiment, the physical attack defense strategy is improved by using adaptive T distribution, and the expression of the improved physical attack defense strategy is:

[0091]

[0092] Where T is the T distribution function, a is the base of the exponential function, and t represents the current number of iterations. is the best individual, τ 4 and τ 5 is a random value in the interval [0, 1], α is the convergence speed factor, m is the scale factor, It is the fitness evaluation index.

[0093] The method of the present application is described below with a specific example, comprising the following steps:

[0094] Step 1. Considering the processing difficulty, the draft angle θ is set to 5°, and the light intensity and scattering angle corresponding to the lens height H, refraction half angle φ and LED light source luminous flux of 10000lm in 37 groups are collected as sample data. The data distribution is as follows: Figure 3 As shown, the sample data is divided into training set and test set according to 8:2 and normalized.

[0095] The normalized equation is:

[0096]

[0097] Among them, y max is the expected maximum value; y min is the expected minimum value; x max is the maximum value of the data; x min is the minimum value of the data.

[0098] Step 2: Use the inner lens height H and the refraction half angle φ as the input of the random forest model, and use the light intensity and scattering angle of the LED light source after passing through the collimating TIR lens as the output of the random forest model to construct an initial random forest model.

[0099] Step 3: The lower limits of the number of leaf nodes and the depth of the random forest are 1 and 2, respectively, and the upper limits are 4 and 10, respectively. The population size of the crested porcupine optimization algorithm is set to 30, and the maximum number of iterations is set to 50.

[0100] Step 4: Call the improved crown porcupine optimization algorithm to iteratively optimize the number of leaf nodes and depth of the initial random forest model, refer to Figure 4 The specific process includes initializing the crown porcupine optimization algorithm, updating the visual defense strategy, updating the auditory defense strategy, updating the odor attack defense strategy, and updating the physical attack defense strategy.

[0101] Step 4.1: The population initialization of the original crown porcupine optimization algorithm is randomly generated in the solution space, so the uniformity of individual distribution cannot be guaranteed, which has a certain impact on the optimization accuracy and convergence speed of the algorithm. Therefore, the Hammersley sequence is used to initialize the population to improve the uniformity of individual distribution in the solution space. Set the initialization lower limit lb and upper limit ub of the crown porcupine optimization algorithm, and the Hammersley sequence initialization expression is as follows:

[0102] s(i,:)=lb+(mb-lb)×H(i,:)

[0103] s(i+j,:)=mb+(ub-mb)×H(i,:),

[0104] Among them, s is the initial position of the two populations generated according to the Hammersley sequence, i is the i-th population, j is the j-th dimension of the problem, ub is the upper limit of the variable, lb is the lower limit of the variable, mb is the middle value of the variable, and H is the generated sequence value.

[0105] Step 4.2: Call the visual defense strategy of the crested porcupine. When the crested porcupine finds a predator, if the predator chooses to approach the crested porcupine, the area between the two can be explored; if the predator chooses to move away from the crested porcupine, it can explore farther areas. However, in reality, the predator will not really choose to leave immediately, but will first move to a certain position to wait and see, and then choose whether to approach the crested porcupine again. The changes in these two behaviors can be represented by elliptical movement. Therefore, in order to balance the global exploration and local development of the crested porcupine optimization algorithm, and thus improve the solution accuracy of the algorithm. The elliptical movement strategy is introduced to improve the visual defense strategy of the crested porcupine optimization algorithm. The mathematical expression of the improved visual defense strategy is as follows:

[0106] A 0 =Levy(d)×(X avg (j)-X(i,j))+lb+r 1 ×(ub-lb) / 2

[0107]

[0108] W 2 =e-(2t / T max ) 3

[0109]

[0110] Among them, A 0 is the complex coefficient of the ellipse, X avg is the average position, X is the position of the individual, d is the latitude of the problem, t is the current number of iterations, is the position of the ith individual at the t+1th iteration, T max is the maximum number of iterations, W 1 and W 2 is the weight value, r 1 and r 2 is a random integer between [1, N], where N is the population size.

[0111] Step 4.3: Invoke the crested porcupine's auditory defense strategy. The crested porcupine makes noise and threatens the predator. The closer the predator gets, the louder the crested porcupine's voice becomes. The mathematical expression of the auditory defense strategy is as follows:

[0112]

[0113] Where y represents the position of the predator, is the position of the i-th individual at the t-th iteration, U 1 and τ 3 is a random value between [0,1].

[0114] Step 4.4: Invoke the crested porcupine's odor attack defense strategy. The crested porcupine secretes a foul odor that spreads in the area around it to prevent predators from approaching it. The mathematical expression of the odor attack defense strategy is as follows:

[0115]

[0116] Among them, r 3 is a random number between [1, N], δ is a parameter used to control the search direction, and γ t It is a defense factor. is the odor diffusion factor, represents the objective function value of the i-th individual at the t-th iteration, ε is a small value that avoids division by zero, and rand is a random value generated between [0,1].

[0117] Step 4.5: Call the crested porcupine's physical attack defense strategy. When the predator is very close, the crested porcupine will attack the predator with short and thick feathers. As the crested porcupine optimization algorithm iterates, the population shifts from global exploration to local development, and the algorithm is prone to fall into local optimality. Therefore, the crested porcupine optimization algorithm is prone to fall into local optimality when the crested porcupine adopts physical attack behavior to resist the invasion of predators. The T distribution is widely used because it can combine the advantages of Gaussian mutation and Cauchy mutation. The adaptive T distribution is introduced to improve the physical attack defense behavior of the crested porcupine. The mathematical expression of the improved physical attack defense strategy is as follows:

[0118]

[0119]

[0120] Among them, t represents the current number of iterations, is the best individual, τ 4 and τ 5 is a random value in the interval [0, 1], α is the convergence speed factor, m is the scale factor, It is the fitness evaluation index.

[0121] Step 5: After the iteration is completed, the best individual is obtained, that is, the optimal number of leaves and tree depth of the random forest under the mapping relationship between the collimating TIR lenses of different structures and the corresponding light intensity and scattering angle. At this time, the parameters of the collimating TIR lenses of different structures are imported, the LED light source is loaded, and the corresponding light intensity and scattering angle are obtained.

[0122] Step 6: Import the predicted data and normalize it according to the same normalization criteria. Use the optimized random forest model for simulation and denormalize to obtain the corresponding light intensity and scattering angle.

[0123] The embodiment provided by the present invention provides a method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens of different structures. The present invention can quickly, accurately and reliably obtain the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens of different structures, thereby saving a lot of time and design costs and avoiding the blindness of TIR lens design; by introducing an elliptical movement strategy and an adaptive T distribution, the optimization ability and solution accuracy of the original crown porcupine algorithm are improved, the ability of the crown porcupine optimization algorithm to jump out of the local optimum is improved, and the global exploration and local development capabilities of the algorithm are balanced; through the present invention, the light source corresponding to the light intensity and scattering angle can be split into different sub-light sources and applied to the corresponding collimating TIR lens, thereby quickly designing the optical system of the landing light and taxiing light on the aircraft, saving the design cost of the designer and improving the work efficiency; the present invention is not limited to Figure 2The collimating TIR lens shown is also applicable to collimating TIR lenses of other structures, which provides a theoretical basis for the design of TIR lenses and expands new design ideas.

[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens, characterized in that: The method comprises: Acquire a data set of a collimating TIR lens, the data set including structural parameter data of the collimating TIR lens as an input sample data set and optical test data as an output sample data set, and perform outlier processing on the acquired data set; The data set after outlier processing is divided into a training set and a test set according to a preset ratio; Construct an initial random forest model and use the training set to train the initial random model; During the training process, the initial random model is optimized based on the crested porcupine optimization algorithm, and the crested porcupine optimization algorithm is parameterized according to the number of leaf nodes and depth of the random forest model; Calling the crown porcupine optimization algorithm to iteratively optimize the number of leaf nodes and the number depth of the initial random forest model, the iterative optimization process includes initializing the crown porcupine optimization algorithm, updating the visual defense strategy, updating the auditory defense strategy, updating the odor attack defense strategy, and updating the physical attack defense strategy; Use the test set to test the optimized random forest model; Using the tested random forest model, the parameters of collimated TIR lenses with different structures are imported, and the LED light source is loaded to obtain the corresponding light intensity and scattering angle.

2. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 1, characterized in that: The structural parameter data of the collimating TIR lens include the inner lens height, refraction angle and draft angle of collimating TIR lenses of different structures, and the light test data include the corresponding light intensity and scattering angle of an LED light source with a certain luminous flux after passing through collimating TIR lenses of different structures.

3. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 1, characterized in that: The method further includes: performing normalization processing on the acquired data set, and the normalization equation is: Among them, y max is the expected maximum value; y min is the expected minimum value; x max is the maximum value of the data; x min is the minimum value of the data.

4. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 1, characterized in that: The parameter settings include: population size, maximum number of iterations, upper and lower limits of variables and problem latitude.

5. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 1, characterized in that: The initialization of the crested porcupine optimization algorithm includes: Population initialization of the crested porcupine optimization algorithm based on the Hammersley sequence.

6. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 5, characterized in that: The expression of the Hammersley sequence is: s(i,:)=lb+(mb-lb)×H(i,:) s(i+j,:)=mb+(ub-mb)×H(i,:), Among them, s is the initial position of the two populations generated according to the Hammersley sequence, i is the i-th population, j is the j-th dimension of the problem, ub is the upper limit of the variable, lb is the lower limit of the variable, mb is the middle value of the variable, and H is the generated sequence value.

7. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 6, characterized in that: The updated visual defense strategy includes: The visual defense strategy of the crown porcupine optimization algorithm is improved based on the ellipse movement strategy. The improved visual defense strategy is expressed as follows: A0=Levy(d)×(X avg (j)-X(i,j))+lb+r1×(ub-lb) / 2 Among them, A0 is the complex coefficient of the ellipse, X avg is the average position, X is the position of the individual, d is the latitude of the problem, t is the current number of iterations, is the position of the ith individual at the t+1th iteration, T max is the maximum number of iterations, W1 and W2 are weight values, r1 and r2 are random integers between [1, N], and N is the population size.

8. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 7, characterized in that: The expression of the auditory defense strategy is: Where y represents the position of the predator, is the position of the i-th individual at the t-th iteration, and U1 and τ3 are random values ​​between [0,1].

9. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 8, characterized in that: The mathematical expression of the odor attack defense strategy is: Among them, r3 is a random number between [1, N], δ is a parameter used to control the search direction, and γ t It is a defense factor. is the odor diffusion factor, represents the objective function value of the i-th individual at the t-th iteration, ε is a small value that avoids division by zero, and rand is a random value generated between [0,1].

10. The method for obtaining the light intensity and scattering angle of an LED light source after passing through a collimating TIR lens according to claim 9, characterized in that: The physical attack defense strategy is improved by using adaptive T distribution. The expression of the improved physical attack defense strategy is: Where T is the T distribution function, a is the base of the exponential function, and t represents the current number of iterations. is the best individual, τ4 and τ5 are random values ​​in the interval [0, 1], α is the convergence speed factor, m is the scale factor, It is the fitness evaluation index.