Diffractive optical element design method, electronic device and storage medium

By constructing a comprehensive evaluation index function and using soft quantization models for gradient optimization, the problems of difficulty in balancing diffraction efficiency, non-uniformity performance and background noise levels in the prior art are solved, and efficient design optimization of diffraction optical components is achieved, which significantly improves performance.

CN119830370APending Publication Date: 2025-04-15GOERTEK OPTICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to achieve an ideal balance between diffraction efficiency, non-uniformity performance and background noise levels, limiting the performance of diffraction optical elements.

Method used

By constructing a comprehensive evaluation index function, the initial phase solution of the diffraction optical element is determined, and the gradient optimization is used to optimize the phase by using a preset soft quantization model to obtain the final phase solution, thereby building a step-by-step optimization structure.

Benefits of technology

The comprehensive design optimization of diffraction optical components has been achieved, which significantly improves its performance in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830370A_ABST
    Figure CN119830370A_ABST
Patent Text Reader

Abstract

The invention discloses a diffractive optical element design method, electronic equipment and a storage medium, and relates to the technical field of diffractive optical element design, and the method comprises the steps: constructing an evaluation index function according to the test amplitude of a diffractive optical element to be designed, and determining a continuous phase initial solution of the diffractive optical element according to the evaluation index function; and determining a final phase solution of the diffractive optical element according to a preset soft quantization model and the initial phase solution, and constructing the diffractive optical element with a step-type optimized structure according to the final phase solution. The invention aims to optimize the design of the diffractive optical element so as to improve the performance of the diffractive optical element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of diffractive optical element design, and in particular to a diffractive optical element design method, electronic equipment and storage medium. Background Art

[0002] With the continuous development of diffractive optical element design technology, DOE (Diffractive Optical Elements) as an important part of modern optical technology is widely used in imaging, spectral analysis, optical communication, laser processing and other fields. The design quality of diffractive optical elements is directly related to the performance of diffractive optical elements, and the core standards for measuring the quality of their design mainly focus on three key performance indicators: diffraction efficiency, non-uniformity performance and background noise level.

[0003] At present, the design of diffractive optical elements widely relies on the GS (Gerchberg-Saxton) algorithm for preliminary design. However, although the GS algorithm has shown certain effects in the iterative optimization process, it is often difficult to achieve an ideal balance when pursuing the comprehensive optimization of high diffraction efficiency, low non-uniformity performance and low background noise level, which limits the performance of diffractive optical elements in practical applications.

[0004] Therefore, how to optimize the design of diffractive optical elements to improve their performance is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present application is to provide a diffractive optical element design method, an electronic device and a storage medium, aiming to optimize the design of the diffractive optical element to improve the performance of the diffractive optical element.

[0006] To achieve the above object, the present application provides a diffractive optical element design method, the diffractive optical element design method comprising:

[0007] constructing an evaluation index function according to a test amplitude of the diffractive optical element to be designed, and determining an initial phase solution of the diffractive optical element according to the evaluation index function;

[0008] The final phase solution of the diffractive optical element is determined according to the preset soft quantization model and the initial phase solution, and the diffractive optical element with a step-type optimized structure is constructed according to the final phase solution.

[0009] In one embodiment, the preset soft quantization model includes a first gradient optimization model and a second gradient optimization model, and the step of determining the final phase solution of the diffractive optical element according to the preset soft quantization model and the initial phase solution includes:

[0010] An intermediate phase solution of the diffractive optical element is determined based on the first gradient optimization model and the initial phase solution, and a final phase solution of the diffractive optical element is determined based on the second gradient optimization model and the intermediate phase solution.

[0011] In one embodiment, the step of determining the intermediate phase solution of the diffractive optical element according to the first gradient optimization model and the initial phase solution comprises:

[0012] Determine a step-by-step judgment threshold corresponding to the first gradient optimization model, and compare the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step-by-step judgment threshold to obtain a comparison result;

[0013] Determining a phase prediction solution of the diffractive optical element according to the comparison result, and detecting whether an actual comparison number indicated by the comparison result exceeds a preset ideal comparison number;

[0014] If the actual number of comparisons does not exceed the ideal number of comparisons, the phase prediction solution is used as the next phase initial solution, and the process returns to the step of comparing the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step determination threshold, and the number of comparisons returned is accumulated until the number of comparisons returned exceeds the ideal number of comparisons, and the phase prediction solution is used as the phase intermediate solution.

[0015] In one embodiment, the step of determining the phase prediction solution of the diffractive optical element according to the comparison result comprises:

[0016] When the comparison result is that the phase Euclidean distance is less than the step determination threshold, a sequence phase corresponding to the qualified Euclidean distance is found from the plurality of sequence phases as a sequence qualified phase, and the sequence qualified phase is used as a phase prediction solution; wherein,

[0017] The qualified Euclidean distance is a phase Euclidean distance that is smaller than the step determination threshold among the multiple phase Euclidean distances.

[0018] In one embodiment, the step of determining the phase prediction solution of the diffractive optical element according to the comparison result comprises:

[0019] When the comparison result is that the phase Euclidean distance is greater than or equal to the step determination threshold, sorting each unsatisfactory Euclidean distance in order from near to far to obtain a distance sorting sequence, wherein the unsatisfactory Euclidean distance is a phase Euclidean distance greater than or equal to the step determination threshold among the multiple phase Euclidean distances;

[0020] Obtaining a preset proportion of unsatisfactory Euclidean distances from the distance sorting sequence in order from near to far, and taking the sequence phases pointed to by the preset proportion of unsatisfactory Euclidean distances as phase prediction solutions; or / and,

[0021] Each of the non-standard Euclidean distances in the distance sorting sequence except for the preset proportion of non-standard Euclidean distances is taken as a remaining Euclidean distance set, and each of the non-standard Euclidean distances corresponding to the preset random proportion found from the remaining Euclidean distance set is taken as a random Euclidean distance set, and a gradient descent update operation is performed on the sequence phases pointed to by each of the non-standard Euclidean distances in the random Euclidean distance set in turn to obtain an updated random Euclidean distance set, and the number of gradient updates corresponding to the gradient descent update operation is accumulated. When the number of gradient updates does not exceed the preset number of update iterations, the step of performing the gradient descent update operation on the sequence phases pointed to by each of the non-standard Euclidean distances in the random Euclidean distance set in turn is returned according to the updated random Euclidean distance set, until the number of gradient updates reaches the preset number of update iterations, and each sequence phase in the updated random Euclidean distance set is taken as a phase prediction solution.

[0022] In one embodiment, the step of determining the final phase solution of the diffractive optical element according to the preset second gradient optimization model and the phase intermediate solution comprises:

[0023] Determine a step standard threshold value corresponding to the second gradient optimization model, and compare the absolute difference between the phase intermediate solution and a preset phase condition threshold value with the step standard threshold value to obtain a phase optimal solution of the diffractive optical element;

[0024] When the cumulative number of comparisons corresponding to the phase optimal solution does not exceed the preset ideal number of comparisons, the cumulative number of comparisons is added to the stepped standard threshold to obtain an updated stepped standard threshold, and the phase optimal solution is used as the next phase intermediate solution, and the step of comparing the absolute difference between the phase intermediate solution and the preset phase condition threshold with the stepped standard threshold is returned according to the updated stepped standard threshold;

[0025] When the accumulated comparison times exceeds the ideal comparison times, the optimal phase solution is used as the final phase solution of the diffractive optical element.

[0026] In one embodiment, the step of determining the initial phase solution of the diffractive optical element according to the evaluation index function comprises:

[0027] When the function iteration number of the evaluation index function does not exceed the preset ideal iteration number, determining an inter-sequence phase difference between a current test phase and a previous test phase of the diffractive optical element, wherein the previous test phase is a test phase before the current test phase;

[0028] The test phase difference between the current test phase and the inter-sequence phase difference is used as the next current test phase, the test amplitude is updated according to the current test phase and the test light field of the diffractive optical element, and the step of constructing an evaluation index function according to the test amplitude of the diffractive optical element to be designed is returned to execute until the number of iterations of the function exceeds the ideal number of iterations, and the current test phase is used as the initial phase solution of the diffractive optical element.

[0029] In one embodiment, the diffractive optical element design method includes:

[0030] Determine the background noise matrix of the diffractive optical element during the function iteration process, and add the adjustable weight coefficient corresponding to the background noise matrix to the evaluation index function; wherein,

[0031] The adjustable weight coefficient is a value corresponding to when the target noise in the evaluation function value is minimized when the evaluation index function iterates the function iteration times, and the target noise is the background noise with the largest noise value in the background noise matrix.

[0032] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes a memory, a processor, and a diffractive optical element design program stored in the memory and executable on the processor, and the diffractive optical element design program implements the steps of the above-mentioned diffractive optical element design method when executed by the processor.

[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a diffractive optical element design program is stored on the computer-readable storage medium. When the diffractive optical element design program is executed by a processor, the steps of the above-mentioned diffractive optical element design method are implemented.

[0034] In view of the problem that it is difficult to achieve an ideal balance between diffraction efficiency, non-uniformity performance and background noise level in the design of diffractive optical elements, the present application provides a diffractive optical element design method, electronic device and storage medium, optimizes the design of traditional diffractive optical elements, and significantly improves the performance of diffractive optical elements. Specifically, the present application constructs a comprehensive evaluation index function based on the test amplitude of the diffractive optical element to be designed. Since the evaluation index function can fully reflect the key performance indicators of the diffractive optical element, the initial phase solution of the diffractive optical element can be accurately determined based on the evaluation index function, thereby providing scientific and reliable data support for subsequent gradient optimization processing; next, the initial phase solution is gradient optimized multiple times using a preset soft quantization model, and the final phase solution can be accurately obtained, thereby achieving comprehensive design optimization of the diffractive optical element in terms of diffraction efficiency, non-uniformity performance and background noise level; then, an effective step-type optimization structure can be formed based on the final phase solution to approach the light effect formed by the ideal continuous phase value, thereby significantly improving the performance of the diffractive optical element in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0037] Figure 1 It is a schematic diagram of the process involved in the first embodiment of the present application;

[0038] Figure 2 It is a flow chart of constructing the evaluation index function involved in the embodiment of the present application;

[0039] Figure 3 is a noise suppression flow chart involved in the embodiment of the present application;

[0040] Figure 4 It is a schematic diagram of the soft quantization process corresponding to the first gradient optimization model involved in the embodiment of the present application;

[0041] Figure 5 It is a schematic diagram of the soft quantization process corresponding to the second gradient optimization model involved in the embodiment of the present application;

[0042] Figure 6This is a schematic diagram of a vertical line scalar light effect distribution involved in the embodiment of the present application;

[0043] Figure 7 is a schematic diagram of tangent energy distribution involved in the embodiment of the present application;

[0044] Figure 8 It is a schematic diagram of the structure of an electronic device involved in the embodiment of the present application.

[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 creative work are within the scope of protection of this application.

[0047] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0048] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0049] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0050] In the field of DOE (Diffractive Optical Elements) design, the core criteria for measuring the quality of its design focus on diffraction efficiency, non-uniformity performance and background noise level. In response to the optimization challenges of DOE, the GS (Gerchberg-Saxton) algorithm is traditionally widely used for preliminary design. However, the GS (Gerchberg-Saxton) algorithm often finds it difficult to achieve an ideal balance when optimizing the above three key performance indicators at the same time.

[0051] In order to solve the problem that it is difficult to achieve an ideal balance between diffraction efficiency, non-uniformity performance and background noise level in the above-mentioned traditional diffractive optical element design, the present application provides a diffractive optical element design method, electronic device and storage medium.

[0052] The present application embodiment provides a diffractive optical element design method, referring to Figure 1 As shown, Figure 1 The first embodiment of the present invention is a flowchart of the present invention. The diffractive optical element design method provided in the present invention includes steps S10 to S30.

[0053] Step S10: constructing an evaluation index function according to the test amplitude of the diffractive optical element to be designed, and determining an initial phase solution of the diffractive optical element according to the evaluation index function.

[0054] In this embodiment, the test amplitude of the diffractive optical element to be designed is determined according to a preset amplitude calculation algorithm. Next, an evaluation index function that can reflect the performance of the element is constructed according to the test amplitude, thereby ensuring the scientificity and accuracy of the optimization design of the diffractive optical element. Next, the initial phase solution of the diffractive optical element can be accurately determined according to the evaluation index function, thereby providing scientific and reliable data support for subsequent gradient optimization processing, and realizing effective optimization of the design of the diffractive optical element.

[0055] It should be noted that the preset amplitude calculation algorithm is: Wherein, U is the test light field of the diffractive optical element; A is the test amplitude of the diffractive optical element; is the current test phase of the diffractive optical element; i is the imaginary unit, i 2 =-1.

[0056] The phase initial solution may be a continuous phase initial solution of a diffractive optical element or a discrete phase initial solution of a diffractive optical element.

[0057] In a specific embodiment, refer to Figure 2 , Figure 2It is a flow chart for constructing the evaluation index function involved in the embodiment scheme of the present application. Figure 2 The A shown is the test amplitude of the diffractive optical element, that is, the near-field amplitude of the diffractive optical element. Figure 2 The U shown is the test light field of the diffractive optical element, that is, the near-field light field of the diffractive optical element. Figure 2 shown is the current test phase of the diffractive optical element, that is, the near-field phase of the diffractive optical element. Exemplarily, the test amplitude obtained by the preset amplitude calculation algorithm is Fourier transformed to obtain the far-field amplitude A' corresponding to the test amplitude A, and the far-field amplitude A' is obtained based on the preset far-field amplitude calculation algorithm, and the far-field amplitude calculation algorithm is Among them, U' is the far-field light field corresponding to the test light field U, Current test phase The corresponding far-field phase; Next, the optimization function is constructed according to the far-field amplitude A' to obtain a comprehensive evaluation index function that can reflect the key performance indicators of the diffractive optical element; Then, it is detected whether the function iteration number of the evaluation index function exceeds the preset ideal iteration number. If the function iteration number exceeds the ideal iteration number, the current test phase As the initial phase solution X of the diffractive optical element; if the number of function iterations does not exceed the ideal number of iterations, the current test phase is updated according to the preset phase variable algorithm, and the updated test phase is used as the next current test phase. After updating the test amplitude A with the test light field U, return to the step of constructing an evaluation index function according to the test amplitude of the diffractive optical element to be designed, until the number of function iterations corresponding to the constructed evaluation index function exceeds the ideal number of iterations, and then use the current test phase as the initial phase solution of the diffractive optical element.

[0058] It should be noted that the preset phase variable algorithm is: Among them, the right side of the equation Indicates the current test phase; It represents the inter-sequence phase difference between the current test phase and the previous test phase, where the previous test phase is the previous test phase of the current test phase, that is, represents the inter-sequence phase difference calculated by the gradient descent method; the left side of the equation Indicates updating the test phase.

[0059] Step S20: determining a final phase solution of the diffractive optical element according to a preset soft quantization model and the initial phase solution, and constructing a diffractive optical element with a step-type optimized structure according to the final phase solution.

[0060] In this embodiment, since the preset soft quantization model includes a first gradient optimization model and a second gradient optimization model, exemplarily, the first model output value (i.e., the phase intermediate solution of the diffractive optical element) obtained by inputting the initial phase solution into the first gradient optimization model for model training is used as the model input of the second gradient optimization model, and the second model output value (i.e., the phase final solution of the diffractive optical element) is obtained by model training the first model output value in combination with the second gradient optimization model. That is, the final phase solution obtained by the combined use of the two gradient optimization models (i.e., the first gradient optimization model and the second gradient optimization model) can effectively form a step-type optimization structure to approach the optical effect formed by the ideal continuous phase value. Specifically, etching is performed on the optical substrate corresponding to the diffractive optical element to be designed according to the final phase solution through a micro-nano etching process, thereby generating a diffractive optical element with a step-type optimization structure (or a continuous relief structure), and the diffractive optical element with the step-type optimization structure can finely control the laser wavefront phase distribution, so that the laser wavefront phase distribution is close to the optical effect formed by the ideal continuous phase value, thereby significantly improving the performance of the diffractive optical element in practical applications.

[0061] It should be noted that the order of operations and the combination of operations involved in the first gradient optimization model and the second gradient optimization model are not limited in this application. Exemplarily, the second model output value (i.e., the intermediate phase solution of the diffractive optical element) obtained by inputting the initial phase solution into the second gradient optimization model for model training is used as the model input of the first gradient optimization model, and the first model output value (i.e., the final phase solution of the diffractive optical element) is obtained by model training the second model output value in combination with the first gradient optimization model; or, the initial phase solution is model trained according to the first gradient optimization model / the second gradient optimization model, and the final phase solution of the diffractive optical element is obtained. That is, when the first gradient optimization model is used to model train the initial phase solution, the final phase solution of the diffractive optical element is the first model output value; when the second gradient optimization model is used to model train the initial phase solution, the final phase solution of the diffractive optical element is the second model output value.

[0062] In summary, in order to address the problem of difficulty in achieving an ideal balance between diffraction efficiency, non-uniformity performance and background noise level in the design of diffractive optical elements, the present application provides a diffractive optical element design method, electronic device and storage medium, which optimize the design of traditional diffractive optical elements and significantly improve the performance of diffractive optical elements. Specifically, the present application constructs a comprehensive evaluation index function based on the test amplitude of the diffractive optical element to be designed. Since the evaluation index function can comprehensively reflect the key performance indicators of the diffractive optical element, the initial phase solution of the diffractive optical element can be accurately determined based on the evaluation index function, thereby providing scientific and reliable data support for the subsequent gradient optimization processing; next, the initial phase solution is preliminarily gradient optimized using the first gradient optimization model in the preset soft quantization model to obtain an intermediate phase solution; the intermediate phase solution is further gradient optimized using the second gradient optimization model in the preset soft quantization model, and the final phase solution can be accurately obtained, thereby achieving comprehensive design optimization of the diffractive optical element in terms of diffraction efficiency, non-uniformity performance and background noise level; subsequently, an effective step-type optimization structure can be formed based on the final phase solution to approach the optical efficiency formed by the ideal continuous phase value, thereby significantly improving the performance of the diffractive optical element in practical applications.

[0063] Furthermore, based on the above-mentioned first embodiment of the present application, a second embodiment of the present application based on a design method of a diffractive optical element is proposed. In this embodiment, the above-mentioned step S10: determining the initial phase solution of the diffractive optical element according to the evaluation index function may also include the following implementation steps S101 to S102.

[0064] Step S101: When the function iteration number of the evaluation index function does not exceed the preset ideal iteration number, determine the inter-sequence phase difference between the current test phase and the previous test phase of the diffractive optical element, and the previous test phase is a test phase before the current test phase.

[0065] In this embodiment, in the design process of the diffractive optical element, in order to ensure that the evaluation index function can gradually approach the optimal solution, a preset ideal number of iterations is used as the termination condition of the iteration process. Exemplarily, in each function iteration process, it is first determined whether the function iteration number of the evaluation index function exceeds the ideal number of iterations. If the function iteration number does not exceed the ideal number of iterations, the inter-sequence phase difference between the current test phase and the previous test phase is calculated, so that the change trend of the current test phase in the continuous iteration process can be accurately reflected, providing key information for subsequent phase adjustment operations, ensuring that the direction and amplitude of the phase adjustment are more accurate, thereby accelerating the iteration process and improving the quality of the initial phase solution.

[0066] Step S102: taking the test phase difference between the current test phase and the inter-sequence phase difference as the next current test phase, updating the test amplitude according to the current test phase and the test light field of the diffractive optical element, returning to execute the step of constructing an evaluation index function according to the test amplitude of the diffractive optical element to be designed, until the number of iterations of the function exceeds the ideal number of iterations, and taking the current test phase as the initial phase solution of the diffractive optical element.

[0067] In this embodiment, after determining the inter-sequence phase difference value, the test phase difference value can be accurately calculated based on the difference between the current test phase and the inter-sequence phase difference value, and the test phase difference value is used as the next current test phase; next, after updating the test amplitude based on the amplitude calculation algorithm, the current test phase and the test light field, return to execute the step of constructing an evaluation index function based on the test amplitude of the diffractive optical element to be designed, so as to gradually approach the optimal solution of the evaluation index function, until the number of function iterations corresponding to the reconstructed evaluation index function exceeds the ideal number of iterations, it can be determined that the reconstructed evaluation index function has reached the optimal solution, and the current test phase at this time is used as the initial phase solution of the diffractive optical element, thereby providing scientific and reliable data support for subsequent gradient optimization processing.

[0068] Furthermore, in some other feasible embodiments, the diffractive optical element design method further includes the following implementation step A10.

[0069] Step A10: determining the background noise matrix of the diffractive optical element during the function iteration process, and adding an adjustable weight coefficient corresponding to the background noise matrix to the evaluation index function; wherein,

[0070] The adjustable weight coefficient is a value corresponding to when the target noise in the evaluation function value is minimized when the evaluation index function iterates the function iteration times, and the target noise is the background noise with the largest noise value in the background noise matrix.

[0071] In this embodiment, when determining the background noise matrix of the function iteration in the design process of the diffractive optical element, the background noise matrix is ​​incorporated into the evaluation index function, and an adjustable weight coefficient corresponding to the background noise matrix is ​​introduced. The adjustable weight coefficient is the value corresponding to the minimum target noise in the evaluation function value when the evaluation index function is iterated for the number of function iterations corresponding to the evaluation index function iteration, thereby effectively suppressing the influence of background noise while ensuring the diffraction efficiency and non-uniformity performance.

[0072] It should be noted that the background noise matrix can be understood as a plurality of background noises generated by the evaluation index function during each function iteration process, and the target noise can be understood as the background noise with the largest noise value in the background noise matrix.

[0073] In a specific embodiment, refer to Figure 3 , Figure 3 is a noise suppression flow chart involved in the embodiment of the present application, Figure 3 The background noise I(i,j) shown here refers to the target noise, and the background noise I(i,j) can be understood as the measure I of the background noise in the i-th row and j-th column. Exemplarily, the background noise I(i,j) is incorporated into the evaluation index function, and an adjustable weight coefficient W corresponding to the background noise I(i,j) is introduced. K (i, j) modifies the noise weight W(i, j) of each point in the Q value (i.e., the evaluation function value) of the evaluation index function, so that the target noise in the evaluation function value is minimized when the evaluation index function iterates the corresponding number of function iterations, thereby effectively suppressing the influence of background noise.

[0074] It should be noted that the weight calculation algorithm corresponding to the adjustable weight coefficient is:

[0075] W K (i,j)=W K-1 (i,j)+I(i,j)*0.01

[0076] Among them, W K (i,j) is the adjustable weight coefficient, W K-1 (i, j) is the previous adjustable weight coefficient of the adjustable weight coefficient, and I(i, j) is the background noise.

[0077] Furthermore, in some feasible embodiments, the preset soft quantization model includes a first gradient optimization model and a second gradient optimization model, and the above step S20: determining the final phase solution of the diffractive optical element based on the preset soft quantization model and the initial phase solution may also include the following implementation step 201.

[0078] Step 201: determining an intermediate phase solution of the diffractive optical element according to the first gradient optimization model and the initial phase solution, and determining a final phase solution of the diffractive optical element according to the second gradient optimization model and the intermediate phase solution.

[0079] In this embodiment, the phase distribution of the diffractive optical element is initially gradient optimized by adopting the first gradient optimization model in combination with the initial phase solution, so that the intermediate phase solution can be accurately obtained, thereby providing a scientific and reliable intermediate phase solution for the subsequent second gradient optimization model, and achieving the accuracy and rationality of regulating the phase distribution of the diffractive optical element; next, the intermediate phase solution is deeply optimized according to the second gradient optimization model, so that the phase distribution of the diffractive optical element is finely regulated and optimized, and the final phase solution can be accurately obtained, so that the performance of the diffractive optical element in terms of diffraction efficiency, reduction of non-uniformity and suppression of background noise level is comprehensively improved and optimized, and the comprehensive design optimization of the diffractive optical element is achieved.

[0080] Furthermore, in some other feasible embodiments, the above step 201: determining the intermediate phase solution of the diffractive optical element according to the first gradient optimization model and the initial phase solution, may also include the following implementation steps S2011 to S2013.

[0081] Step S2011: determining a step-by-step decision threshold corresponding to the first gradient optimization model, and comparing the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step-by-step decision threshold to obtain a comparison result.

[0082] In this embodiment, the step-by-step judgment threshold corresponding to the first gradient optimization model is determined, and the phase Euclidean distance corresponding to each sequence phase in the initial phase solution is compared with the step-by-step judgment threshold. The comparison result can be accurately obtained, providing an accurate and reliable judgment basis for determining the subsequent phase prediction solution.

[0083] In a specific embodiment, refer to Figure 4 , Figure 4 1 is a schematic diagram of the soft quantization process corresponding to the first gradient optimization model involved in the embodiment of the present application. The initial phase solution X includes at least i sequence phases X i , and the sequence phase X i The corresponding phase Euclidean distance can be |X i -0|、|X i -0.5|or|X i -1|, where 0.5 corresponds to π and 1 corresponds to 2π; after determining the step judgment threshold d1=0.11, the phase Euclidean distance is compared with the step judgment threshold, and the comparison result can be accurately obtained, providing an accurate and reliable judgment basis for the determination of the subsequent phase prediction solution.

[0084] It should be noted that the step determination threshold d1=0.11 is a feasible implementation of the present application. The step determination threshold can be customized according to application requirements, and the present application does not impose any limitation thereto.

[0085] Step S2012: determining a phase prediction solution of the diffractive optical element according to the comparison result, and detecting whether an actual comparison number indicated by the comparison result exceeds a preset ideal comparison number.

[0086] In this embodiment, the phase prediction solution of the diffractive optical element can be accurately obtained according to the comparison result, which not only ensures the accuracy of the phase prediction solution, but also improves the design efficiency of the diffractive optical element; next, by detecting whether the actual number of comparisons pointed to by the comparison result exceeds the preset ideal number of comparisons, the optimization iteration process of the first gradient optimization model can be effectively monitored to prevent the waste of computing resources caused by excessive iterations, thereby ensuring the quality of the phase prediction solution while achieving the high efficiency and economy of the diffractive optical element design process.

[0087] It should be noted that the phase prediction solution can be used Figure 4 The X0 shown in FIG. 14 shows that the actual number of comparisons pointed to by the comparison result can be represented by e.

[0088] Step S2013: If the actual number of comparisons does not exceed the ideal number of comparisons, the phase prediction solution is used as the next phase initial solution, and the step of comparing the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step determination threshold is returned to be executed, and the number of comparisons returned is accumulated until the number of comparisons returned exceeds the ideal number of comparisons, and the phase prediction solution is used as the phase intermediate solution.

[0089] In this embodiment, refer to Figure 4 If the actual number of comparisons e does not exceed the preset ideal number of comparisons, the phase prediction solution is returned as the next phase initial solution to perform the step of comparing the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step determination threshold, and the number of comparisons returned is accumulated until the number of comparisons returned exceeds the ideal number of comparisons, and the phase prediction solution is output as the phase intermediate solution to the preset second gradient optimization model, thereby providing accurate data support for the determination of the subsequent phase final solution.

[0090] In another embodiment, after determining the phase intermediate solution output by the first gradient optimization model, the phase intermediate solution can also be used as the current test phase. Figure 2 The evaluation index function shown in FIG. 1 converges until the convergence degree corresponding to the evaluation function value of the evaluation index function reaches the preset convergence threshold condition, and the current test phase (i.e. Figure 2 The left side of the equation ) is output as a phase intermediate solution to the preset second gradient optimization model, which significantly improves the accuracy in the design process of diffractive optical elements and ensures the quality of the phase intermediate solution, thereby providing accurate data support for the subsequent determination of the final phase solution.

[0091] Furthermore, in some other feasible embodiments, the above step S2012: determining the phase prediction solution of the diffractive optical element according to the comparison result may include the following implementation step B10.

[0092] Step B10: When the comparison result is that the phase Euclidean distance is less than the step determination threshold, a sequence phase corresponding to a qualified Euclidean distance is found from the multiple sequence phases as a sequence qualified phase, and the sequence qualified phase is used as a phase prediction solution; wherein the qualified Euclidean distance is a phase Euclidean distance among the multiple phase Euclidean distances that is less than the step determination threshold.

[0093] In this embodiment, when the comparison result is that the phase Euclidean distance is less than the step determination threshold, a sequence phase corresponding to the qualified Euclidean distance is found from multiple sequence phases as a sequence qualified phase, and the sequence qualified phase is used as a phase prediction solution, thereby ensuring the accuracy and reliability of the phase prediction solution.

[0094] It should be noted that the phase prediction solution can be used Figure 4 The "X0 = X i "express.

[0095] In a specific embodiment, refer to Figure 4 , with sequence phase X i For example, assuming that the sequence phase X i is 0.1, the sequence phase X i The corresponding phase Euclidean distance can be |X i -0|=0.1、|X i -0.5|=0.4or|X i -1|=0.9; Next, the phase Euclidean distance is detected to be |X i -0|=0.1 is less than the step determination threshold d1=0.11, then the sequence phase X is determined i is the sequence qualified phase; next, the sequence phase X i A value of 0.1 is used as the phase prediction solution, thereby ensuring the accuracy and reliability of the phase prediction solution.

[0096] Furthermore, in some feasible embodiments, the above step S2012: determining the phase prediction solution of the diffractive optical element according to the comparison result, may also include the following implementation steps C10 to C20.

[0097] Step C10: When the comparison result is that the phase Euclidean distance is greater than or equal to the step determination threshold, each Euclidean distance that does not meet the standard is sorted in order from near to far to obtain a distance sorting sequence, and the Euclidean distance that does not meet the standard is the phase Euclidean distance that is greater than or equal to the step determination threshold among the multiple phase Euclidean distances.

[0098] In this embodiment, when the comparison result is that the phase Euclidean distance is greater than or equal to the step judgment threshold, each Euclidean distance that does not meet the standard (i.e., the phase Euclidean distance greater than or equal to the judgment threshold) is sorted in order from near to far to obtain a distance sorting sequence, which helps to quickly identify the sequence phase that does not need to be updated using the gradient descent method, thereby improving the design efficiency of the diffractive optical element.

[0099] In a specific embodiment, with i sequence phases X i For example, if the sequence phase X i The corresponding phase Euclidean distance |X i -0|、|X i -0.5| and |X i -1| are greater than or equal to the step determination threshold, then the i sequence phase X i The corresponding phase Euclidean distances are all taken as the unqualified Euclidean distances; next, the i sequence phases X are sorted in order from near to far. i The corresponding phase Euclidean distances are sorted to obtain a distance sorting sequence, which helps to quickly identify the sequence phases that do not need to be updated using the gradient descent method, thereby improving the design efficiency of the diffractive optical element.

[0100] It should be noted that the distance sorting sequence can be used to represent the sequence phase X after being sorted in order from near to far. i , that is, each unsatisfactory Euclidean distance corresponds to a sequence phase X i Phase mark.

[0101] Step C20: obtaining a preset proportion of non-standard Euclidean distances from the distance sorting sequence in order from near to far, and taking the sequence phase pointed to by the preset proportion of non-standard Euclidean distances as the phase prediction solution; or / and, taking each of the non-standard Euclidean distances in the distance sorting sequence except the preset proportion of non-standard Euclidean distances as the remaining Euclidean distance set, and taking each of the non-standard Euclidean distances corresponding to the preset random proportion found from the remaining Euclidean distance set as the random Euclidean distance set, and performing sequential calculations on each of the non-standard Euclidean distances in the random Euclidean distance set. A gradient descent update operation is performed on the sequence phase pointed to by the distance to obtain an updated random Euclidean distance set, and the number of gradient updates corresponding to the gradient descent update operation is accumulated. When the number of gradient updates does not exceed the preset number of update iterations, the step of performing the gradient descent update operation on the sequence phase pointed to by each of the non-standard Euclidean distances in the random Euclidean distance set is returned according to the updated random Euclidean distance set, until the number of gradient updates reaches the preset number of update iterations, and each sequence phase in the updated random Euclidean distance set is used as a phase prediction solution.

[0102] In this embodiment, a preset proportion of unsatisfactory Euclidean distances are obtained from the distance sorting sequence in order from near to far, ensuring that the first gradient optimization model can focus on the preset proportion of unsatisfactory Euclidean distances that are closest to the stepped determination threshold in the distance sorting sequence, so that the sequence phase pointed to by the preset proportion of unsatisfactory Euclidean distances can be used as the phase prediction solution, that is, an optimized phase prediction solution with excellent performance can be obtained under the premise of reducing unnecessary consumption of computing resources.

[0103] It should be noted that the preset ratio number can be Figure 4 The first 20% of capacity shown can also be customized according to application requirements, and this application does not impose any restrictions on this.

[0104] In another embodiment, referring to Figure 5, taking all the unqualified Euclidean distances in the distance sorting sequence except for a preset proportion of unqualified Euclidean distances as the remaining Euclidean distance set, to ensure that the first gradient optimization model does not ignore any sequence phase that may reach the optimization standard through further processing. Next, each non-standard Euclidean distance corresponding to a preset random proportion found in the remaining Euclidean distance set is taken as a random Euclidean distance set. That is to say, a certain preset random proportion of non-standard Euclidean distances are randomly selected from the remaining Euclidean distance set to form a random Euclidean distance set, and a gradient descent update operation is performed on the sequence phases pointed to by these selected non-standard Euclidean distances to obtain an updated random Euclidean distance set, which not only increases the randomness and exploratory nature of the first gradient optimization model in the gradient optimization process, but also helps to avoid falling into a local optimal solution; next, the gradient descent update operation is continuously iterated based on the updated random Euclidean distance set, and the number of gradient updates of the gradient descent update operation is accumulated until the number of gradient updates reaches the preset number of update iterations, then each sequence phase in the updated random Euclidean distance set is determined to be a phase prediction solution, so that the phase prediction solution finally obtained is closer to the ideal state, thereby effectively improving the stability and reliability of the design of the diffractive optical element.

[0105] It should be noted that the preset random ratio can be Figure 4 The 0.98 shown is only a feasible implementation of the present application; the preset random ratio can also be customized according to application requirements, and the present application does not impose any restrictions here.

[0106] In addition, it should be noted that Figure 4 The mask shown is a random matrix (i.e., a random Euclidean distance set) of the same size as the phase solution matrix, and the phases of each sequence in the random matrix are uniformly distributed in the interval [0, 1]. The preset number of update iterations can be Figure 4 The 200 iterations shown can also be customized according to application requirements, and this application does not impose any restrictions on this.

[0107] In another embodiment, after taking each non-standard Euclidean distance corresponding to a preset random proportion found from the remaining Euclidean distance set as a random Euclidean distance set, each non-standard Euclidean distance in the remaining Euclidean distance set except the random Euclidean distance set is taken as a non-standard set, and the gradient descent update operation is not performed on the sequence phase pointed to by each non-standard Euclidean distance in the non-standard set, that is, the sequence phase pointed to by each non-standard Euclidean distance in the non-standard set is taken as a phase prediction solution, thereby effectively avoiding excessive convergence of the first gradient optimization model during the gradient optimization process.

[0108] Furthermore, in some other feasible embodiments, the above step S201: determining the final phase solution of the diffractive optical element according to the preset second gradient optimization model and the phase intermediate solution, may also include the following steps D10 to D30.

[0109] Step D10: Determine the step standard threshold corresponding to the second gradient optimization model, and compare the absolute difference between the phase intermediate solution and the preset phase condition threshold with the step standard threshold to obtain the phase optimal solution of the diffractive optical element.

[0110] In this embodiment, the stepped standard threshold corresponding to the second gradient optimization model is determined, and the absolute difference between the phase intermediate solution and the preset phase condition threshold is compared with the stepped standard threshold, so that the phase optimal solution of the diffractive optical element can be accurately obtained, providing accurate and reliable data support for the construction of subsequent step-type optimization structures.

[0111] It should be noted that, refer to Figure 5 , Figure 5 is a schematic diagram of the soft quantization process corresponding to the second gradient optimization model involved in the embodiment of the present application. And the preset phase condition threshold can be 0, 0.5 or 1, and the absolute difference between the phase intermediate solution and the preset phase condition threshold can be Figure 5 The |X0-0|, |X0-0.5| or |X0-1| shown, where 0.5 corresponds to π and 1 corresponds to 2π.

[0112] In a specific embodiment, Figure 5 The soft quantization process steps corresponding to the second gradient optimization model shown are as follows:

[0113] Step 100: Determine the phase intermediate solution X0 and the step standard threshold d2 corresponding to the second gradient optimization model;

[0114] Step 200: Compare the absolute difference between the phase intermediate solution and the preset phase condition threshold with the step standard threshold, that is, determine whether the absolute difference between the phase intermediate solution and the preset phase condition threshold |X0-0|, |X0-0.5| or |X0-1| is less than the step standard threshold d2;

[0115] Step 300: If yes, then detect whether the intermediate phase solution X0 is closer to 0 or 0.5. If the intermediate phase solution X0 is closer to 0, then adjust the intermediate phase solution X0 to 0 as the optimal phase solution of the diffractive optical element; if the intermediate phase solution X0 is closer to 0.5, then adjust the intermediate phase solution X0 to 0.5 as the optimal phase solution of the diffractive optical element.

[0116] Step 400: If not, a gradient descent valve update based on the phase intermediate solution X0 is started until the number of gradient descents exceeds a preset gradient descent threshold (i.e., 200 times), and the last updated phase intermediate solution X0 is used as the phase optimal solution of the diffractive optical element;

[0117] Step 500: accumulatively return the cumulative comparison times E of the step of "comparing the absolute difference between the phase intermediate solution and the preset phase condition threshold with the step standard threshold" (i.e., the cumulative comparison times corresponding to the phase optimal solution); and detect whether the cumulative comparison times E exceeds the preset ideal comparison times (i.e., 100);

[0118] Step 600: If the accumulated comparison times E exceeds the preset ideal comparison times (ie, 100 times), the phase optimal solution is used as the final phase solution of the diffractive optical element.

[0119] Step 700: If the accumulated comparison times E does not exceed the preset ideal comparison times (ie, 100 times), the phase optimal solution is used as the next phase intermediate solution X0, and the process returns to step 100.

[0120] Step D20: When the cumulative number of comparisons corresponding to the phase optimal solution does not exceed the preset ideal number of comparisons, the cumulative number of comparisons is superimposed on the stepped standard threshold to obtain an updated stepped standard threshold, thereby achieving the effect of relaxing the stepped standard threshold. The phase optimal solution is used as the next phase intermediate solution, and based on the updated stepped standard threshold, the step of comparing the absolute difference between the phase intermediate solution and the preset phase condition threshold with the stepped standard threshold is returned to execute.

[0121] In this embodiment, when the cumulative number of comparisons corresponding to the phase optimal solution does not exceed the preset ideal number of comparisons, a method of dynamically adjusting the step standard threshold is adopted. Specifically, the current cumulative number of comparisons is superimposed on the step standard threshold, so as to obtain a more scientific and reasonable step standard threshold (i.e., the updated step standard threshold). Subsequently, the current phase optimal solution is regarded as the next phase intermediate solution, and the step of comparing the absolute difference between the phase intermediate solution and the preset phase condition threshold with the step standard threshold is performed again according to the updated step standard threshold, so as to further improve the search efficiency and accuracy of the subsequent determination of the final phase solution.

[0122] Step D30: until the cumulative comparison times exceed the ideal comparison times, the optimal phase solution is used as the final phase solution of the diffractive optical element.

[0123] In this embodiment, until the cumulative number of comparisons exceeds the ideal number of comparisons, the phase optimal solution is used as the final phase solution of the diffractive optical element, thereby improving the accuracy of determining the final phase solution. That is, steps D20 to D30 set in this application realize the iterative search and optimization of the final phase solution of the diffractive optical element. Exemplarily, before the cumulative number of comparisons does not exceed the preset ideal number of comparisons, the step standard threshold is continuously updated, and the currently found phase optimal solution is repeatedly used as an intermediate solution for further comparison, so as to gradually approach the final phase solution. Once the cumulative number of comparisons reaches or exceeds the ideal number of comparisons, the current phase optimal solution is determined to be the final phase final solution, which helps to improve the accuracy and design efficiency of the diffractive optical element design.

[0124] In summary, in order to achieve an efficient diffraction effect of the diffractive optical element, the diffractive optical element design method provided in the present application will quantify the continuous phase profile to form a multi-step approximate structure (i.e., a step-type optimized structure). Specifically, after determining the initial phase solution of the diffractive optical element in the DOE design, the present application adopts the characteristics of the gradient descent method. Figure 4 The first gradient optimization model shown and Figure 5 The first gradient optimization model shown in the figure is used in combination to effectively form a multi-step approximate structure to approach the light effect formed by the ideal continuous phase value, thereby realizing comprehensive design optimization of the diffraction optical element in terms of diffraction efficiency, non-uniformity performance and background noise level, thereby significantly improving the performance of the diffraction optical element in practical applications.

[0125] In another embodiment, a green vertical line with a FOV (Field of View) of 20° is designed by the diffractive optical element design method provided in the present application, and the DOE size to be designed is 0.5um*0.5um, and the period resolution is 330nm. Figure 6 The figure shows the distribution of scalar light effect of a vertical line. Figure 7 It is the tangent energy distribution of the vertical line along the vertical line direction. Under the premise of ensuring that the diffraction efficiency is maintained at the preset standard, the vertical line structure designed by the diffractive optical element design method set in this application can effectively suppress the surrounding stray light and maintain the uniformity of light distribution in the vertical line area.

[0126] In addition, the present application also provides an electronic device, the electronic device comprising a memory, a processor, and a diffractive optical element design program stored in the memory and executable on the processor, wherein the diffractive optical element design program implements the steps of the above-mentioned diffractive optical element design method when executed by the processor. Figure 8 , Figure 8Schematic diagram of the structure of an electronic device involved in the embodiment of the present application. The electronic device in the embodiment of the present application can be a device for locally running the diffractive optical element design method.

[0127] like Figure 8 As shown, the electronic device of the embodiment of the present application may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface).

[0128] The memory 1005 is arranged on the electronic device body, and a program is stored on the memory 1005, and the program implements the corresponding operation when it is executed by the processor 1001. The memory 1005 is also used to store parameters for use by the electronic device. The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0129] Those skilled in the art will understand that Figure 8 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0130] like Figure 8 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a diffractive optical element design program.

[0131] exist Figure 8 In the electronic device shown, the processor 1001 can be used to call the diffractive optical element design program stored in the memory 1005 and execute the steps of the diffractive optical element design method as described above.

[0132] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a diffractive optical element design program is stored on the computer-readable storage medium. When the diffractive optical element design program is executed by a processor, the steps of the above-mentioned diffractive optical element design method are implemented.

[0133] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0134] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as ROM / RAM, a disk, or an optical disk as described above, and includes a number of instructions for enabling an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0136] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A diffractive optical element design method, characterized in that: The diffractive optical element design method comprises: constructing an evaluation index function according to a test amplitude of the diffractive optical element to be designed, and determining a continuous phase initial solution of the diffractive optical element according to the evaluation index function; The final phase solution of the diffractive optical element is determined according to the preset soft quantization model and the initial phase solution, and the diffractive optical element with a step-type optimized structure is constructed according to the final phase solution.

2. The method for designing a diffractive optical element according to claim 1, wherein: The preset soft quantization model includes a first gradient optimization model and a second gradient optimization model, and the step of determining the final phase solution of the diffractive optical element according to the preset soft quantization model and the initial phase solution includes: An intermediate phase solution of the diffractive optical element is determined based on the first gradient optimization model and the initial phase solution, and a final phase solution of the diffractive optical element is determined based on the second gradient optimization model and the intermediate phase solution.

3. The method for designing a diffractive optical element according to claim 2, wherein: The step of determining the phase intermediate solution of the diffractive optical element according to the first gradient optimization model and the initial phase solution comprises: Determine a step-by-step judgment threshold corresponding to the first gradient optimization model, and compare the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step-by-step judgment threshold to obtain a comparison result; Determining a phase prediction solution of the diffractive optical element according to the comparison result, and detecting whether an actual comparison number indicated by the comparison result exceeds a preset ideal comparison number; If the actual number of comparisons does not exceed the ideal number of comparisons, the phase prediction solution is used as the next phase initial solution, and the process returns to the step of comparing the phase Euclidean distance corresponding to each sequence phase in the phase initial solution with the step determination threshold, and the number of comparisons returned is accumulated until the number of comparisons returned exceeds the ideal number of comparisons, and the phase prediction solution is used as the phase intermediate solution.

4. The method for designing a diffractive optical element according to claim 3, wherein: The step of determining the phase prediction solution of the diffractive optical element according to the comparison result comprises: When the comparison result is that the phase Euclidean distance is less than the step determination threshold, a sequence phase corresponding to the qualified Euclidean distance is found from the plurality of sequence phases as a sequence qualified phase, and the sequence qualified phase is used as a phase prediction solution; wherein, The qualified Euclidean distance is a phase Euclidean distance that is smaller than the step determination threshold among the multiple phase Euclidean distances.

5. The method for designing a diffractive optical element according to claim 3, wherein: The step of determining the phase prediction solution of the diffractive optical element according to the comparison result comprises: When the comparison result is that the phase Euclidean distance is greater than or equal to the step determination threshold, sorting each unsatisfactory Euclidean distance in order from near to far to obtain a distance sorting sequence, wherein the unsatisfactory Euclidean distance is a phase Euclidean distance greater than or equal to the step determination threshold among the multiple phase Euclidean distances; Obtaining a preset proportion of unsatisfactory Euclidean distances from the distance sorting sequence in order from near to far, and taking the sequence phases pointed to by the preset proportion of unsatisfactory Euclidean distances as phase prediction solutions; or / and, Each of the non-standard Euclidean distances in the distance sorting sequence except for the preset proportion of non-standard Euclidean distances is taken as a remaining Euclidean distance set, and each of the non-standard Euclidean distances corresponding to the preset random proportion found from the remaining Euclidean distance set is taken as a random Euclidean distance set, and a gradient descent update operation is performed on the sequence phases pointed to by each of the non-standard Euclidean distances in the random Euclidean distance set in turn to obtain an updated random Euclidean distance set, and the number of gradient updates corresponding to the gradient descent update operation is accumulated. When the number of gradient updates does not exceed the preset number of update iterations, the step of performing the gradient descent update operation on the sequence phases pointed to by each of the non-standard Euclidean distances in the random Euclidean distance set in turn is returned according to the updated random Euclidean distance set, until the number of gradient updates reaches the preset number of update iterations, and each sequence phase in the updated random Euclidean distance set is taken as a phase prediction solution.

6. The method for designing a diffractive optical element according to claim 2, wherein: The step of determining the final phase solution of the diffractive optical element according to the preset second gradient optimization model and the phase intermediate solution comprises: Determining a step standard threshold corresponding to the second gradient optimization model, and comparing an absolute difference between the phase intermediate solution and a preset phase condition threshold with the step standard threshold to obtain a phase optimal solution of the diffractive optical element; When the cumulative number of comparisons corresponding to the phase optimal solution does not exceed the preset ideal number of comparisons, the cumulative number of comparisons is added to the stepped standard threshold to obtain an updated stepped standard threshold, and the phase optimal solution is used as the next phase intermediate solution, and the step of comparing the absolute difference between the phase intermediate solution and the preset phase condition threshold with the stepped standard threshold is returned according to the updated stepped standard threshold; When the accumulated comparison times exceeds the ideal comparison times, the optimal phase solution is used as the final phase solution of the diffractive optical element.

7. The method for designing a diffractive optical element according to claim 1, wherein: The step of determining the initial phase solution of the diffractive optical element according to the evaluation index function comprises: When the function iteration number of the evaluation index function does not exceed the preset ideal iteration number, determining an inter-sequence phase difference between a current test phase and a previous test phase of the diffractive optical element, wherein the previous test phase is a test phase before the current test phase; The test phase difference between the current test phase and the inter-sequence phase difference is used as the next current test phase, the test amplitude is updated according to the current test phase and the test light field of the diffractive optical element, and the step of constructing an evaluation index function according to the test amplitude of the diffractive optical element to be designed is returned to execute until the number of iterations of the function exceeds the ideal number of iterations, and the current test phase is used as the initial phase solution of the diffractive optical element.

8. The method for designing a diffractive optical element according to claim 1, wherein: The diffractive optical element design method comprises: Determine the background noise matrix of the diffractive optical element during the function iteration process, and add the adjustable weight coefficient corresponding to the background noise matrix to the evaluation index function; wherein, The adjustable weight coefficient is a value corresponding to when the target noise in the evaluation function value is minimized when the evaluation index function iterates the function iteration times, and the target noise is the background noise with the largest noise value in the background noise matrix.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a diffractive optical element design program stored in the memory and executable on the processor. When the processor executes the diffractive optical element design program, the steps of the diffractive optical element design method as described in any one of claims 1 to 8 are implemented.

10. A storage medium, the storage medium being a computer-readable storage medium, characterized in that: The computer-readable storage medium stores a diffractive optical element design program, and when the diffractive optical element design program is executed by a processor, the steps of the diffractive optical element design method according to any one of claims 1 to 8 are implemented.