High-speed defect recognition method and system based on optical diffraction imaging
By constructing a composite optical diffraction unit and quantum phase modulation strategy, combined with a quantum state phase reconstruction network, the contradiction between imaging quality and speed in high-speed detection of existing optical imaging systems is resolved, high-precision micro-nanoscale defect identification is achieved, and detection efficiency and reliability are improved.
Patent Information
- Application Number
- CN202511106866.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-08-08
AI Technical Summary
Existing optical diffraction imaging systems have a contradiction between imaging quality and detection speed in high-speed detection scenarios, making it difficult to meet the needs of high-precision identification of micro-nanoscale defects. They also lack adaptability and flexibility to complex defect characteristics, resulting in low detection accuracy and reliability.
A composite optical diffraction unit is constructed, including a programmable optical metasurface and a quantum phase modulator. Through a phase modulation strategy optimized by a multi-objective constraint function, the incident light field is converted into a quantum-classical hybrid modulated light field. The quantum state phase reconstruction network is combined to process the quantum encoded diffraction image, extract surface morphology data and perform defect identification.
It achieves high-speed defect recognition, significantly improves imaging quality and detection accuracy, enhances system stability and anti-interference ability, and is suitable for tiny defect detection in industrial manufacturing and other fields.
Smart Images

Figure CN120609832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to optical technology, and in particular to a high-speed defect recognition method and system based on optical diffraction imaging. Background Art
[0002] With the development of advanced manufacturing, the accuracy and efficiency requirements for product surface defect detection are constantly increasing. Optical diffraction imaging technology has been widely used in product quality control and defect identification due to its non-contact, high-precision, and full-field measurement characteristics. However, existing defect recognition technologies have the following shortcomings:
[0003] The imaging quality and resolution of existing optical diffraction imaging systems are constrained by the classical diffraction limit, making it difficult to meet the requirements for high-precision identification of micro- and nano-scale defects. Especially in high-speed detection scenarios, there is an obvious contradiction between imaging quality and detection speed.
[0004] Existing optical inspection systems usually use a single optical modulation method, which lacks adaptability and flexibility to complex defect characteristics. This results in reduced detection accuracy and reliability when facing different types of defects or material surfaces, and poor system versatility.
[0005] Existing defect image processing algorithms are inefficient when processing high-dimensional and high-complexity diffraction image data, especially under conditions of low signal-to-noise ratio. It is difficult to accurately reconstruct the surface morphology of the object and extract effective defect features, which limits the accuracy and real-time performance of defect recognition. Summary of the Invention
[0006] The embodiments of the present invention provide a high-speed defect recognition method and system based on optical diffraction imaging, which can solve the problems in the prior art.
[0007] A first aspect of an embodiment of the present invention provides a high-speed defect recognition method based on optical diffraction imaging, comprising:
[0008] Constructing a composite optical diffraction unit comprising a programmable optical metasurface and a quantum phase modulator; converting an incident light field into a quantum-classical hybrid modulated light field by simultaneously determining the classical modulation properties of the programmable optical metasurface and the quantum state encoding properties of the quantum phase modulator through a phase modulation strategy optimized based on a multi-objective constraint function;
[0009] collecting a quantum coded diffraction image output by the composite optical diffraction unit;
[0010] Processing the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information;
[0011] Feature parameters are extracted based on the surface topography data, and the feature parameters are analyzed using a defect recognition model to obtain a defect recognition result.
[0012] In an optional embodiment,
[0013] The steps of simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator by a phase modulation strategy based on multi-objective constraint function optimization include:
[0014] Constructing a phase modulation strategy, wherein the phase modulation strategy includes a structural parameter control term corresponding to classical phase modulation and a phase modulation term corresponding to quantum state encoding;
[0015] Establishing a multi-objective constraint optimization function to optimize the phase modulation strategy, wherein the multi-objective constraint optimization function includes an energy normalization constraint term, a frequency interval constraint term, and a phase gradient constraint term;
[0016] The optimized structural parameter control items are configured on a programmable optical metasurface with a metal-dielectric-metal structure, and classical phase modulation is performed by adjusting the geometric size and spacing of the metasurface structural units. At the same time, the optimized phase modulation items are configured on a quantum phase modulator, and phase encoding of the quantum state is performed by regulating its equivalent refractive index distribution.
[0017] By changing the modulation depth of the structural parameter control term and the phase modulation term, the classical phase modulation effect and the quantum state encoding effect are balanced. When the comprehensive evaluation index of the two modulation effects meets the preset requirements, the final phase modulation strategy is determined.
[0018] In an optional embodiment,
[0019] The steps of establishing a multi-objective constraint optimization function to optimize the phase modulation strategy include:
[0020] The energy normalization constraint term is determined by the difference between the energy distribution uniformity of the structural parameter control term and a preset unit value, the frequency interval constraint term is determined by the spatial frequency distribution characteristics of the phase modulation term, and the phase gradient constraint term is determined by the combined gradient norm of the structural parameter control term and the phase modulation term;
[0021] Calculating a sensitivity matrix of the phase modulation strategy to each constraint, the sensitivity matrix comprehensively characterizing local response characteristics, frequency response characteristics, and diffraction efficiency; performing a tensor product operation on the sensitivity matrix and the gradient value of the constraint item to obtain an initial weight adjustment; and normalizing the initial weight adjustment, the normalization taking into account the contribution of each constraint item to the optimization objective;
[0022] The multi-objective constrained optimization function is optimized using a gradient descent algorithm with a momentum term, where the momentum term is a weighted combination of the current gradient and the historical gradient. The learning rate of the gradient descent algorithm is adaptively adjusted according to the change in the value of the multi-objective constrained optimization function. The optimization process ends when the rate of change of the value of the multi-objective constrained optimization function for a consecutive preset number of times is less than a preset change rate threshold, or when the gradient norm of the multi-objective constrained optimization function is less than a preset gradient threshold.
[0023] In an optional embodiment,
[0024] The step of processing the quantum coded diffraction image using a quantum state phase reconstruction network to calculate the surface topography data of the object to be measured includes:
[0025] Perform quantum state decoding on the quantum-encoded diffraction image, establish a quantum state density matrix consisting of the tensor product of the quantum ground state and its conjugate transpose and the expansion coefficients, and consider quantum noise suppression and measurement uncertainty constraints during the construction process. Use a unitary operator to perform trace operation on the quantum state density matrix and extract phase information;
[0026] Optimizing the phase information based on maximum likelihood estimation;
[0027] The optimized phase information is input into a multi-scale phase reconstruction network, which includes a feature extraction module coupled with multiple physical fields. The multi-scale phase reconstruction network extracts features from the input data through a physics-guided iterative strategy and calculates the phase distribution.
[0028] The surface height distribution is obtained by calculating the ratio of the phase distribution to the light wavelength parameter, the measurement difference between the measured value and the true value of the surface height distribution is calculated, and the measurement difference is corrected using a compensation coefficient to obtain the surface morphology data of the object to be measured.
[0029] In an optional embodiment,
[0030] The steps of optimizing phase information based on maximum likelihood estimation include:
[0031] Constructing an optimization objective function including a quantum noise suppression term and a measurement uncertainty constraint term, wherein the quantum noise suppression term is jointly determined by a decoherence time parameter and a quantum state purity;
[0032] Based on the optimization objective function, an adaptive measurement basis selection strategy is adopted to determine an optimal measurement scheme, and the optimal measurement scheme is used to perform tomographic reconstruction of the quantum state to obtain quantum measurement data; a maximum likelihood estimation method is applied to the quantum measurement data to estimate phase parameters by maximizing the conditional probability of the observation data, wherein the maximum likelihood estimation method minimizes the statistical deviation between the estimated parameters and the actual observation results through iterative optimization; a confidence interval of the quantum state density matrix is calculated based on the maximum likelihood estimation result; a probability estimation of the phase information is performed within the confidence interval, and an optimal estimate is determined;
[0033] When the uncertainty of the optimal estimate is less than a preset threshold, the optimal estimate is output as optimized phase information to the multi-scale phase reconstruction network for subsequent processing; when the uncertainty of the optimal estimate is greater than or equal to the preset threshold, the method returns to the adaptive measurement basis selection strategy step and redetermines the optimal measurement scheme until the condition that the uncertainty of the optimal estimate is less than the preset threshold is met.
[0034] In an optional embodiment,
[0035] The optimized phase information is input into a multi-scale phase reconstruction network, which includes a feature extraction module coupled with multiple physical fields. The steps of extracting features from the input data through a physics-guided iterative strategy and calculating the phase distribution include:
[0036] Constructing a multi-physics field coupled feature extraction module, which includes light field propagation constraints, material constitutive relationship constraints, and geometric boundary constraints; decomposing the input phase information at multiple spatial scales to obtain feature information at different scales;
[0037] Perform physical constraint solving at different scales. Establish the optical path difference equations based on light field propagation constraints and solve the phase propagation characteristics. Solve the stress and strain distribution characteristics based on material constitutive constraints. Calculate the boundary curvature continuity condition based on geometric boundary constraints. Combine the constraint solving results at each scale with the characteristic information of the corresponding scale to generate the physical constraint solution.
[0038] Calculate the physical field residuals of the physical constraint solutions at each scale, analyze the correlation between the depth features and the physical constraint solutions, and determine the weight coefficients of each constraint based on the physical field residuals and correlations. Use the weight coefficients of each constraint to perform a weighted combination of the physical constraint solutions and the depth features to obtain the fusion features.
[0039] The fusion features are input into the iterative optimization module, and the physical field constraints and feature preservation requirements are simultaneously considered in each iteration; the iterative residual between the current iteration result and the previous iteration result, as well as the degree to which the current iteration result satisfies each physical field constraint, are calculated; when the iterative residual is less than a preset physical threshold and satisfies all physical field constraints, the final phase distribution is output.
[0040] In an optional embodiment,
[0041] The steps of extracting characteristic parameters based on the surface topography data and analyzing the characteristic parameters using a defect recognition model to obtain a defect recognition result include:
[0042] Based on the surface topography data, local curvature and normal vector changes are extracted through the differential geometry feature layer, persistent homology features and critical point distribution are calculated through the topology feature layer, and surface roughness and spectral characteristics are analyzed through the statistical feature layer; a quantum metric preserving mapping matrix is established to perform quantum fidelity correction on the extracted characteristic parameters;
[0043] A defect recognition model is constructed, and the quantum phase information output by the quantum state decoding module is fused with the corrected characteristic parameters in the same feature space to obtain a hybrid feature vector. A graph structure representation is constructed based on the hybrid feature vector, and a similarity matrix between feature nodes is calculated. The similarity matrix represents the degree of correlation between local area features. The similarity matrix is matched with a preset standard defect feature template to generate a defect feature indication map. The defect recognition model is trained using a contrastive learning method, with the feature representation of the standard sample as a positive sample and the feature representation of the known defect sample as a negative sample.
[0044] The mixed feature vector is analyzed using the trained defect recognition model, the defect location coordinates are determined based on the cluster center of the defect feature indication map, the defect type is determined according to the degree of feature deviation in the cluster area, and the defect severity is determined based on the abnormality degree score in the similarity matrix to obtain the defect recognition result.
[0045] A second aspect of an embodiment of the present invention provides a high-speed defect recognition system based on optical diffraction imaging, comprising:
[0046] The first unit is used to construct a composite optical diffraction unit, which includes a programmable optical metasurface and a quantum phase modulator; the incident light field is converted into a quantum-classical hybrid modulated light field by simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator through a phase modulation strategy based on multi-objective constraint function optimization;
[0047] A second unit is used to collect the quantum coded diffraction image output by the composite optical diffraction unit;
[0048] A third unit is configured to process the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information;
[0049] The fourth unit is used to extract characteristic parameters based on the surface morphology data, analyze the characteristic parameters using a defect recognition model, and obtain a defect recognition result.
[0050] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:
[0051] processor;
[0052] a memory for storing processor-executable instructions;
[0053] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0054] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0055] The beneficial effects of this application are as follows:
[0056] The present invention achieves high-speed defect recognition by constructing a composite optical diffraction unit and a quantum phase modulation strategy, overcoming the resolution and efficiency limitations of traditional optical imaging methods in detecting complex surface defects, and significantly improving imaging quality and detection accuracy.
[0057] This method combines quantum state encoding with classical optical processing, and achieves high-precision reconstruction of complex surface morphology through quantum-classical hybrid modulated light field, making the detection of tiny defects in industrial manufacturing and other fields more efficient and reliable, and significantly improving system stability and anti-interference capabilities.
[0058] Through the application of quantum state phase reconstruction network, the present invention optimizes information extraction and processing efficiency, reduces computing resource consumption, is suitable for real-time detection needs on high-speed production lines, and has broad industrial application prospects, especially in the fields of precision manufacturing, semiconductor technology and optical component quality control. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Schematic diagram of the process of a high-speed defect recognition method based on optical diffraction imaging according to an embodiment of the present invention;
[0060] Figure 2Flowchart for phase modulation strategy optimization of multi-objective constrained optimization function. DETAILED DESCRIPTION
[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0062] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0063] Figure 1 FIG. 1 is a flow chart of a high-speed defect recognition method based on optical diffraction imaging according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0064] Constructing a composite optical diffraction unit comprising a programmable optical metasurface and a quantum phase modulator; converting an incident light field into a quantum-classical hybrid modulated light field by simultaneously determining the classical modulation properties of the programmable optical metasurface and the quantum state encoding properties of the quantum phase modulator through a phase modulation strategy optimized based on a multi-objective constraint function;
[0065] collecting a quantum coded diffraction image output by the composite optical diffraction unit;
[0066] Processing the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information;
[0067] Feature parameters are extracted based on the surface topography data, and the feature parameters are analyzed using a defect recognition model to obtain a defect recognition result.
[0068] In an optional embodiment, the step of simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator through a phase modulation strategy based on multi-objective constraint function optimization includes:
[0069] Constructing a phase modulation strategy, wherein the phase modulation strategy includes a structural parameter control term corresponding to classical phase modulation and a phase modulation term corresponding to quantum state encoding;
[0070] Establishing a multi-objective constraint optimization function to optimize the phase modulation strategy, wherein the multi-objective constraint optimization function includes an energy normalization constraint term, a frequency interval constraint term, and a phase gradient constraint term;
[0071] The optimized structural parameter control items are configured on a programmable optical metasurface with a metal-dielectric-metal structure, and classical phase modulation is performed by adjusting the geometric size and spacing of the metasurface structural units. At the same time, the optimized phase modulation items are configured on a quantum phase modulator, and phase encoding of the quantum state is performed by regulating its equivalent refractive index distribution.
[0072] By changing the modulation depth of the structural parameter control term and the phase modulation term, the classical phase modulation effect and the quantum state encoding effect are balanced. When the comprehensive evaluation index of the two modulation effects meets the preset requirements, the final phase modulation strategy is determined.
[0073] For example, the phase modulation strategy integrates two key components: the structural parameter control term Φc(x,y) for classical phase modulation and the phase modulation term Φq(x,y) for quantum state encoding. The structural parameter control term Φc(x,y) primarily affects the geometric parameters of the metal-dielectric-metal structure, such as the height, diameter, and spacing of the nanopillars; while the phase modulation term Φq(x,y) is used to control the equivalent refractive index distribution in the quantum phase modulator, thereby achieving phase encoding of a specific quantum state. The overall phase modulation strategy is expressed as Φ(x,y)=αΦc(x,y)+βΦq(x,y), where α and β are weight coefficients used to control the relative strength of the two modulation effects.
[0074] When establishing a multi-objective constrained optimization function, three main constraints were designed to optimize the phase modulation strategy. The energy normalization constraint ensured that the energy of the output light field met normalization requirements. The frequency spacing constraint ensured that the spacing between adjacent frequency components in the frequency domain was no less than a preset threshold. For example, in the terahertz range, a minimum spacing of 0.05 THz was set to avoid spectral aliasing.
[0075] After constrained optimization, the optimized structural parameter control term Φc(x,y) was applied to a programmable optical metasurface with a metal-dielectric-metal structure. The metasurface consists of a metal base layer, a silicon dioxide dielectric layer, and an array of metal nanostructures. The metal base layer is 150nm thick, the dielectric layer is 200nm thick, and the metal nanostructures are cylindrical with diameters ranging from 50-300nm and a height of 80nm. By adjusting the diameter and spacing of these nanopillars (within the range of 300-600nm), continuous phase modulation from 0 to 2π is achieved. For example, when the nanopillar diameter is 120nm and the spacing is 450nm, a phase delay of approximately π / 2 is achieved; when the diameter increases to 220nm, the phase delay increases to approximately π.
[0076] The optimized phase modulation term Φq(x,y) is then configured into a quantum phase modulator. This modulator is made of an electro-optical crystal material (such as lithium niobate), and its effective refractive index distribution is manipulated by applying a spatially distributed electric field. At a communications wavelength of 1550nm, the refractive index of the lithium niobate crystal can be manipulated within a range of ±0.01, corresponding to a phase modulation range of 0-2π. The desired phase distribution can be created by applying a voltage of 0-5V across a 10×10 electrode array.
[0077] To balance the effects of classical phase modulation and quantum state encoding, an adaptive control mechanism is employed. Modulation depth parameters α and β are introduced, resulting in an overall phase modulation strategy expressed as Φ(x,y)=αΦc(x,y)+βΦq(x,y), where α controls the strength of classical modulation and β controls the strength of quantum encoding. By systematically adjusting the values of these two parameters (0 ≤ α, β ≤ 1, and α + β = 1), a continuous transition between classical modulation and quantum encoding can be achieved. A comprehensive evaluation metric, J(α,β), is designed. This metric consists of three components: classical modulation efficiency Ec(α), quantum encoding fidelity Eq(β), and a system complexity penalty term P(α,β). The expression is J(α,β)=w1Ec(α)+w2Eq(β)-w3P(α,β), where w1, w2, and w3 are weight coefficients. Increasing the value of α improves classical modulation efficiency but reduces quantum encoding fidelity; the opposite occurs with increasing β. During the optimization process, a gradient search method is used to search the (α, β) parameter space, and the value of J(α, β) is evaluated after each iteration. The final parameter configuration is determined when J(α, β) reaches a preset threshold (such as 0.85) and changes by less than 0.01 for three consecutive iterations.
[0078] By dividing the phase modulation strategy into a structural parameter control term and a phase modulation term, this method achieves the coordinated optimization of classical modulation and quantum state encoding, improving the precision and controllability of light field modulation. By balancing the two modulation effects, the system can maintain the high resolution of classical phase modulation while enhancing the information capacity of quantum state encoding, thereby improving the sensitivity and reliability of defect identification, making it particularly suitable for high-precision surface inspection scenarios.
[0079] In an optional embodiment, the step of establishing a multi-objective constraint optimization function to optimize the phase modulation strategy includes:
[0080] The energy normalization constraint term is determined by the difference between the energy distribution uniformity of the structural parameter control term and a preset unit value, the frequency interval constraint term is determined by the spatial frequency distribution characteristics of the phase modulation term, and the phase gradient constraint term is determined by the combined gradient norm of the structural parameter control term and the phase modulation term;
[0081] Calculating a sensitivity matrix of the phase modulation strategy to each constraint, the sensitivity matrix comprehensively characterizing local response characteristics, frequency response characteristics, and diffraction efficiency; performing a tensor product operation on the sensitivity matrix and the gradient value of the constraint item to obtain an initial weight adjustment; and normalizing the initial weight adjustment, the normalization taking into account the contribution of each constraint item to the optimization objective;
[0082] The multi-objective constrained optimization function is optimized using a gradient descent algorithm with a momentum term, where the momentum term is a weighted combination of the current gradient and the historical gradient. The learning rate of the gradient descent algorithm is adaptively adjusted according to the change in the value of the multi-objective constrained optimization function. The optimization process ends when the rate of change of the value of the multi-objective constrained optimization function for a consecutive preset number of times is less than a preset change rate threshold, or when the gradient norm of the multi-objective constrained optimization function is less than a preset gradient threshold.
[0083] Combine Figure 2 The phase modulation strategy optimization flow chart of the multi-objective constrained optimization function is illustrated. For example, the energy normalization constraint term is determined by calculating the difference between the energy distribution uniformity of the structural parameter control term and the preset unit value. Taking the light field energy as an example, the energy normalization constraint term can be designed as the difference between the standard deviation of the energy of the structural parameter control term in the spatial region and the preset unit value of 0.05. This design ensures the uniformity of the light field energy distribution. The frequency interval constraint term is determined based on the spatial frequency distribution characteristics of the phase modulation term and can be quantified by calculating the difference between the minimum interval between adjacent frequency components and the expected interval of 0.02. The phase gradient constraint term is determined by the combined gradient norm of the structural parameter control term and the phase modulation term and can be set as the ratio of the combined gradient norm to the preset threshold of 0.3. This constraint ensures the smoothness of the phase change.
[0084] After establishing the constraints, the sensitivity matrix of the phase modulation strategy with respect to each constraint needs to be calculated. This sensitivity matrix, obtained through perturbation analysis, comprehensively characterizes the local response characteristics, frequency response characteristics, and diffraction efficiency. The local response characteristics describe the degree of influence of the modulation strategy on a local area, the frequency response characteristics characterize the ability to adjust different frequency components, and the diffraction efficiency reflects the efficiency of energy conversion. For example, assuming that the phase modulation strategy includes 100 modulation parameters, a 100×3 sensitivity matrix can be constructed by applying a small change of 0.01 to each parameter and then calculating the impact of this change on the three constraints.
[0085] After obtaining the sensitivity matrix, a tensor product operation is performed on it with the gradient values of the constraint items to obtain the initial weight adjustments. Taking the aforementioned system as an example, if the gradient values of the constraint items are [0.15, -0.08, 0.12], the tensor product operation yields an initial weight adjustment vector of 100. These initial weight adjustments are normalized by weighting the contribution of each constraint item according to its importance. For example, the energy normalization constraint item, the frequency separation constraint item, and the phase gradient constraint item can be assigned weights of 0.4, 0.35, and 0.25, respectively. This operation ensures a balanced impact of each constraint item during the optimization process.
[0086] During the optimization process, a gradient descent algorithm with a momentum term is used. The momentum term is designed as a weighted combination of the current gradient and the historical gradient, which can be expressed as 0.9 times the current gradient plus 0.1 times the historical gradient. This design helps overcome local optimality traps during the optimization process and improves convergence efficiency. The learning rate of the gradient descent algorithm is adaptively adjusted based on the change in the value of the multi-objective constrained optimization function. When the function value decreases, the learning rate can be increased appropriately, for example, from an initial value of 0.01 to 0.015. When the function value increases, the learning rate should be decreased, for example, from 0.01 to 0.005, to avoid oscillations in the optimization process. The optimization termination criteria are set: the optimization process ends when the rate of change of the multi-objective constrained optimization function value is less than 0.001 for five consecutive times, or when the gradient norm of the multi-objective constrained optimization function is less than 0.0005. This ensures that the algorithm stops when sufficient accuracy is achieved, avoiding unnecessary consumption of computing resources.
[0087] For phase modulation systems of varying complexity, more refined optimization results can be achieved by adjusting the constraint weights, learning rate variation rules, and termination thresholds. For example, for high-precision optical systems, the energy normalization constraint weight can be increased to 0.5, and the termination threshold lowered to 0.0001, to achieve a more uniform energy distribution. For real-time response systems, the learning rate cap can be increased to 0.02, and the termination threshold relaxed to 10 consecutive changes of less than 0.005, to accelerate the optimization process.
[0088] This method utilizes an optimization function containing multiple constraints, combined with phase sensitivity analysis and an adaptive adjustment strategy, allowing the optimization process to fully account for the varying contributions of each constraint to the final imaging quality. By incorporating a momentum-based gradient descent algorithm and adaptive learning rate adjustment, the stability and convergence speed of the optimization process are improved, effectively overcoming the tendency of traditional optimization methods to fall into local optimality and ensuring the global optimality of the phase modulation strategy.
[0089] In an optional embodiment, the step of processing the quantum coded diffraction image using a quantum state phase reconstruction network to calculate the surface topography data of the object to be measured includes:
[0090] Perform quantum state decoding on the quantum-encoded diffraction image, establish a quantum state density matrix consisting of the tensor product of the quantum ground state and its conjugate transpose and the expansion coefficients, and consider quantum noise suppression and measurement uncertainty constraints during the construction process. Use a unitary operator to perform trace operation on the quantum state density matrix and extract phase information;
[0091] Optimizing the phase information based on maximum likelihood estimation;
[0092] The optimized phase information is input into a multi-scale phase reconstruction network, which includes a feature extraction module coupled with multiple physical fields. The multi-scale phase reconstruction network extracts features from the input data through a physics-guided iterative strategy and calculates the phase distribution.
[0093] The surface height distribution is obtained by calculating the ratio of the phase distribution to the light wavelength parameter, the measurement difference between the measured value and the true value of the surface height distribution is calculated, and the measurement difference is corrected using a compensation coefficient to obtain the surface morphology data of the object to be measured.
[0094] For example, when performing quantum state decoding on a quantum-encoded diffraction image, the system receives the image and represents it as a complex matrix I(x,y), where x and y represent pixel coordinates. The diffraction image contains both amplitude and phase information. The amplitude can be directly derived from the image intensity, while the phase information requires quantum state decoding to extract. During the decoding process, each pixel in the diffraction image is considered a quantum state, and a quantum state density matrix ρ is established. For each 32×32 pixel block in the image, the corresponding quantum ground state |ψ> and its conjugate transpose ⟨ψ| are constructed, and the density matrix is constructed through the tensor product |ψ>⟨ψ|. To suppress quantum noise, a quantum denoising filter is employed. Specifically, this is implemented by applying a wavelet transform filter with a noise threshold set to 3.5 times the measurement noise variance to filter out high-frequency random fluctuations. A measurement uncertainty constraint is also introduced to control the measurement accuracy to within one-twentieth of the light wavelength to ensure decoding stability. A trace operation is performed on the density matrix using a set of unitary operators (a set of 16 special orthogonal matrices such that the product of a matrix and its conjugate transpose equals the identity matrix). This operation calculates the sum of the diagonal elements of the product of the density matrix and each unitary operator. This operation measures the projection probability of the quantum state onto different bases, and extracts phase information from these probability distributions. In practice, using 16 complementary measurement bases, the extracted phase values range from 0 to 2π, with a phase resolution of 0.01 radians.
[0095] After the phase information is extracted, optimization is performed based on maximum likelihood estimation.
[0096] The optimized phase information is input into the multi-scale phase reconstruction network for further processing. The network contains a feature extraction module coupled with multiple physical fields, which extracts features from the input data through a physics-oriented iterative strategy. The network architecture consists of five convolutional layers, each containing 64 3×3 convolution kernels, and the activation function uses ReLU. The feature extraction module implements a coupling model of light field propagation and material surface physical properties, including physical effects such as reflectivity change, surface scattering, and material stress distribution. The network adopts a multi-scale structure with three scale levels, which process 1×, 2×, and 4× downsampled phase maps respectively. Each scale level is equipped with a residual connection to maintain high-frequency detail information. The iterative strategy is based on the alternating direction multiplier method, with the number of iterations set to 20 times, and the stopping condition is that the difference between the results of two adjacent iterations is less than 10 -5 The network was trained on a dataset of 8,000 pairs of simulated diffraction images and corresponding phase distributions, with a batch size of 32 and an initial learning rate of 0.001, using the Adam optimizer for 100 cycles. The resulting output phase distribution achieved a spatial resolution of up to 100 nm and a phase resolution better than 0.01 radian.
[0097] The surface height distribution is calculated by dividing the phase distribution by the wavelength parameter. The specific calculation formula is to divide the phase value by 4π and then multiply it by the wavelength of the light used. Taking green light with a wavelength of 532nm as an example, a phase value of 1 radian corresponds to a surface height of approximately 84.7nm. When calculating the difference between the measured value and the true value, a calibration standard is used. The standard sample has a stepped structure with a step height of 100nm and an accuracy of ±0.5nm. The system measurement deviation is obtained by measuring the standard sample, with a typical deviation of 3-5nm. A compensation factor is introduced to correct the measurement difference, which depends on the material properties and the angle of incidence. For silicon, the compensation factor is 0.97 at normal incidence; for metal surfaces, the compensation factor is approximately 0.99. In practical applications, the system can measure height variations in the range of 0.5μm to 10μm with repeatability better than 1nm. The measured waviness of semiconductor wafer surfaces is less than 0.8nm at RMS, with a deviation of less than 2% from the atomic force microscope measurement results. Through this compensation method, the surface morphology data of the object to be measured can achieve a sub-nanometer accuracy in the vertical direction, and the lateral resolution is about 1 / 4 of the wavelength of the light source used.
[0098] The present invention introduces quantum state decoding and multi-scale phase reconstruction networks to achieve efficient conversion from quantum-encoded diffraction images to surface morphology data. By fully utilizing the high-precision characteristics of quantum measurement and extracting phase information through unitary operators and trace operations, and combining them with a physics-guided iterative strategy for feature extraction, the accuracy and noise resistance of phase reconstruction are significantly improved, providing high-quality surface morphology data for subsequent defect identification.
[0099] In an optional implementation, the step of optimizing the phase information based on maximum likelihood estimation includes:
[0100] Constructing an optimization objective function including a quantum noise suppression term and a measurement uncertainty constraint term, wherein the quantum noise suppression term is jointly determined by a decoherence time parameter and a quantum state purity;
[0101] Based on the optimization objective function, an adaptive measurement basis selection strategy is adopted to determine an optimal measurement scheme, and the optimal measurement scheme is used to perform tomographic reconstruction of the quantum state to obtain quantum measurement data; a maximum likelihood estimation method is applied to the quantum measurement data to estimate phase parameters by maximizing the conditional probability of the observation data, wherein the maximum likelihood estimation method minimizes the statistical deviation between the estimated parameters and the actual observation results through iterative optimization; a confidence interval of the quantum state density matrix is calculated based on the maximum likelihood estimation result; a probability estimation of the phase information is performed within the confidence interval, and an optimal estimate is determined;
[0102] When the uncertainty of the optimal estimate is less than a preset threshold, the optimal estimate is output as optimized phase information to the multi-scale phase reconstruction network for subsequent processing; when the uncertainty of the optimal estimate is greater than or equal to the preset threshold, the method returns to the adaptive measurement basis selection strategy step and redetermines the optimal measurement scheme until the condition that the uncertainty of the optimal estimate is less than the preset threshold is met.
[0103] Exemplarily, the optimization objective function consists of two main components: a quantum noise suppression term and a measurement uncertainty constraint term. The quantum noise suppression term is determined by the decoherence time parameter T2 and the quantum state purity P. T2 represents the characteristic time for a quantum system to maintain coherence, typically on the order of microseconds to milliseconds, while P represents the purity of the quantum state, ranging from 0 to 1. For a specific quantum bit, the T2 value can be obtained through experimental measurement. For example, for superconducting quantum bits, T2 is 20 microseconds. When the P value is close to 1, the quantum state is almost pure; when the P value is close to 0, the quantum state is severely mixed. In the optimization objective function, the quantum noise suppression term can be expressed as a function of T2 and P. As T2 increases or P increases, the value of this term decreases, thereby reducing the overall value of the objective function. The measurement uncertainty constraint term aims to limit the uncertainty of the phase estimate and is typically related to the number of measurements. This constraint term is proportional to the inverse of the square root of the number of measurements. That is, as the number of measurements increases, the value of the constraint term decreases according to the inverse of the square root of the number of measurements. For example, when the number of measurements increases from 100 to 10,000 (a 100-fold increase), the value of the constraint term decreases to one-tenth of its original value.
[0104] To determine the optimal measurement solution, an adaptive measurement basis selection strategy is employed. This strategy dynamically adjusts the basis for the next round of measurements based on the current estimate of the phase parameter. The system initially randomly selects one of the three measurement bases (X, Y, or Z) to begin measurement. After obtaining preliminary measurement results, the optimal next measurement basis is calculated based on the optimization objective function. For example, if the initial estimated phase value is 0.3 radians, the system recommends selecting the X measurement basis for the next round of measurements. Once the estimate is updated to 0.4 radians, the system recommends switching to the Y measurement basis for subsequent measurements. This adaptive strategy updates the understanding of the system state after each measurement, guiding the direction of subsequent measurements and improving measurement efficiency.
[0105] Quantum state tomographic reconstruction involves measuring the quantum state from multiple angles using an optimal measurement scheme to obtain sufficient information to fully reconstruct the quantum state. Multiple measurements are performed on the quantum state based on a measurement basis sequence determined by an adaptive strategy, such as "XYZXZYX...". Each set of measurements is repeated 1000 times to collect statistical data. These measurement results form a quantum measurement dataset, which contains the projection probabilities of the quantum state observed under various measurement bases.
[0106] The maximum likelihood estimation method seeks parameter values that best explain the observed data. It first establishes the probability between the quantum state phase parameter and the measurement outcome: For a given phase parameter θ, the theoretical probability distribution of a particular outcome in different measurement bases is predicted. For example, at a phase of 0.3 radians, the theoretical probability of obtaining a +1 outcome in the X measurement base is 65%. The system then calculates the overall probability (likelihood function) of observing the actual measurement outcome under the current phase parameter assumption. If 600 out of 1000 measurements in the X basis are actually observed to be +1, the system calculates the probability of observing this outcome under different phase parameter assumptions. Using iterative optimization methods (such as gradient descent), the phase parameter value is adjusted to maximize the probability of the observed data. In practice, the system performs 50 iterations of optimization. Each iteration calculates the difference (statistical deviation) between the theoretical probability under the current phase estimate and the actual observed frequency, and updates the phase parameter in a direction that reduces this deviation. For example, the initial estimated value is 0.2 radians, which converges to 0.35 radians after optimization iterations. At this time, the statistical deviation between the theoretical predicted probability and the actual observed frequency is the smallest, indicating that this is the most realistic phase value.
[0107] When calculating confidence intervals for the quantum state density matrix based on maximum likelihood estimation, the system uses the Fisher information matrix to estimate parameter uncertainty. For a specific phase estimate of θ = 0.35 radians, the system calculates a 95% confidence interval of [0.32, 0.38] radians. Within this confidence interval, a Bayesian approach is used to estimate the probability of phase information, combining the prior distribution with the likelihood function to obtain the posterior distribution of the phase parameter. Based on this posterior distribution, the system calculates the expected value of the phase parameter as the final optimal estimate, for example, 0.347 radians.
[0108] When the uncertainty (e.g., standard deviation) of the optimal estimate is 0.015 radians, if the preset threshold is 0.02 radians, the estimate satisfies the uncertainty requirement of being less than the preset threshold, and the system outputs 0.347 radians as the optimized phase information to the multiscale phase reconstruction network for subsequent processing. If the uncertainty is 0.025 radians, which is greater than the preset threshold of 0.02 radians, the system returns to the adaptive measurement basis selection strategy step, updates the measurement basis selection based on the current estimate, increases the number of measurements to 12,000, and re-performs quantum state tomography reconstruction and maximum likelihood estimation until a phase information estimate that meets the uncertainty requirements is obtained.
[0109] The maximum likelihood estimation method based on quantum noise suppression and measurement uncertainty constraints of the present invention solves the problems of noise interference and uncertainty in quantum measurement; through an adaptive measurement basis selection strategy and an iterative optimization process, the extraction of phase information is made more accurate, and at the same time, a confidence interval is established for probability estimation, which ensures the reliability of phase information and effectively improves the robustness of defect recognition in complex environments.
[0110] In an optional embodiment, the optimized phase information is input into a multi-scale phase reconstruction network, wherein the multi-scale phase reconstruction network includes a feature extraction module coupled with multiple physical fields, and the steps of extracting features from the input data through a physics-guided iterative strategy and calculating the phase distribution include:
[0111] Constructing a multi-physics field coupled feature extraction module, which includes light field propagation constraints, material constitutive relationship constraints, and geometric boundary constraints; decomposing the input phase information at multiple spatial scales to obtain feature information at different scales;
[0112] Perform physical constraint solving at different scales. Establish the optical path difference equations based on light field propagation constraints and solve the phase propagation characteristics. Solve the stress and strain distribution characteristics based on material constitutive constraints. Calculate the boundary curvature continuity condition based on geometric boundary constraints. Combine the constraint solving results at each scale with the characteristic information of the corresponding scale to generate the physical constraint solution.
[0113] Calculate the physical field residuals of the physical constraint solutions at each scale, analyze the correlation between the depth features and the physical constraint solutions, and determine the weight coefficients of each constraint based on the physical field residuals and correlations. Use the weight coefficients of each constraint to perform a weighted combination of the physical constraint solutions and the depth features to obtain the fusion features.
[0114] The fusion features are input into the iterative optimization module, and the physical field constraints and feature preservation requirements are simultaneously considered in each iteration; the iterative residual between the current iteration result and the previous iteration result, as well as the degree to which the current iteration result satisfies each physical field constraint, are calculated; when the iterative residual is less than a preset physical threshold and satisfies all physical field constraints, the final phase distribution is output.
[0115] For example, the feature extraction module integrates three key physical constraints: light field propagation constraints, material constitutive constraints, and geometric boundary constraints. The light field propagation constraint describes the propagation of light waves from the object surface to the imaging plane, primarily through the relationship between optical path difference and phase change. The material constitutive constraint represents the mapping between internal material stress and surface deformation. The geometric boundary constraint ensures that the reconstructed phase maintains continuity and smoothness at the boundary.
[0116] The feature extraction module is implemented using a deep convolutional neural network architecture, consisting of a five-layer downsampling encoding structure and a five-layer upsampling decoding structure. The encoding part uses a 3×3 convolution kernel with 64, 128, 256, 512, and 512 channels, respectively. The decoding part uses a 4×4 transposed convolution with 512, 256, 128, 64, and 32 channels, respectively. The network input is the initial phase information, and the output is a multi-channel feature map, with each channel corresponding to different physical field information.
[0117] The input phase information is decomposed at multiple scales using a wavelet transform. The original phase image (e.g., 1024×1024 pixels) is decomposed into five levels using the Daubechies wavelet basis function. This yields feature representations at five different scales: the first scale retains full resolution (1024×1024), while the fifth scale is the coarsest representation (64×64). The low-frequency approximation coefficients extracted at each scale reflect the overall structural characteristics, while the high-frequency detail coefficients capture local variations.
[0118] Based on light field propagation constraints, a set of optical path difference equations is established. This system describes the quantitative relationship between surface height variations and phase changes: when a light wave passes through areas of varying surface height, the optical path length (the length of the light wave's propagation path) changes, resulting in a phase delay. Specifically, a surface height change of Δh corresponds to an optical path change of 2Δh (for both incident and reflected paths), and a phase change of 4πΔh / λ, where λ is the wavelength of the light wave. In actual calculations, for each point (x, y) on the surface, an equation is established based on its height h(x, y) to describe the phase distribution of the light wave reflected from that point after propagating to the observation plane. This set of equations jointly describes the light field propagation characteristics of the entire surface. Solving this set of equations using the iterative angular spectrum method determines the mapping between the surface topography and the diffraction image. For example, the light wave wavelength is set to 650 nanometers, the propagation distance is 10 mm, and the sampling interval is 5 microns. Through the iterative angular spectrum method, the light field is forward propagated from the object plane to the observation plane, and then reversely propagated back to the object plane in combination with the measured intensity distribution. This is iterated 50 times to obtain the phase propagation characteristics at each scale.
[0119] Based on the material constitutive constraints, the stress and strain distribution characteristics are solved, the phase change is converted into surface deformation, and the internal stress distribution is calculated based on the material mechanics relationship. For common metal materials (such as aluminum alloys), the Young's modulus is set to 70 GPa and the Poisson's ratio is set to 0.33. The surface is divided into 10,000 triangular finite element elements, and the stress field distribution caused by surface deformation is calculated using a linear elastic model. The calculation results include the magnitude and direction of the principal stresses, which can effectively indicate the location of potential defects, as defect areas often manifest as stress concentrations or stress discontinuities.
[0120] Boundary curvature continuity conditions are calculated based on geometric boundary constraints. This step ensures that the phase reconstruction results maintain smooth transitions at object boundaries. First, the Canny edge detection algorithm (high threshold 85, low threshold 35, Gaussian smoothing coefficient 1.4) is used to identify object boundaries, and a 1-pixel-wide transition region is set on both sides of the boundary. Cubic spline interpolation is then used to ensure continuity of the phase values and their first and second derivatives within the transition region, avoiding artifacts at the boundary. This processing is crucial for accurately identifying defects near edges.
[0121] The results of solving the three physical constraints at each scale are combined with the wavelet feature information at the corresponding scale using weighted feature fusion. Initially, the weight of the physical constraint solution is set to 0.7, and the weight of the wavelet feature is set to 0.3. The fusion strategy varies at different scales: at the finest scale (1024×1024), the focus is on preserving texture details, thus giving higher weight to high-frequency information; at the coarser scale (64×64), the focus is on overall deformation trends, thus giving higher weight to low-frequency information. This multi-scale fusion strategy preserves details while suppressing noise interference.
[0122] The physical field residuals of the physical constraint solutions at each scale are calculated, representing the degree of deviation between the actual solution and the theoretical expectation. The light field propagation residual is obtained by calculating the intensity difference between the reconstructed light field and the measured light field; the material constraint residual is determined by calculating the degree of satisfaction of the stress equilibrium equation; and the geometric boundary residual is quantified by evaluating the degree of curvature continuity violation at the boundary. The light field constraint residual threshold is set to 0.05, the material constraint residual threshold to 0.08, and the geometric constraint residual threshold to 0.06.
[0123] The correlation between deep features and physical constraint solutions is measured by calculating the cosine similarity between feature vectors, ranging from -1 to 1, with larger values indicating higher correlation. When the correlation coefficient exceeds 0.85, the deep features are considered highly correlated with the physical constraints. The weight coefficients for each constraint are determined based on the physical residuals and correlations. This means that the accuracy of the physical constraint solution (residuals) and the degree of match between the constraint and the deep features (correlation) are used to determine the weight assignment. Specifically, the physical residuals reflect the degree of satisfaction of the constraint equation; smaller residuals indicate a more accurate physical model. Correlation reflects the consistency between the physical constraints and the actual features; higher correlations indicate a closer fit to the actual observations. Weight assignment follows the principle of inversely proportional residuals and directly proportional correlations, meaning that constraints with smaller residuals and higher correlations receive greater weights. The calculation formula is: The weight of a constraint is equal to the constraint's correlation multiplied by the sum of all constraint residuals, divided by the sum of the products of all constraint correlations and residuals. This ensures that weight assignment takes into account both physical plausibility and data consistency. In specific implementation, the initial weights of the three physical constraints are set to 0.4, 0.3, and 0.3, respectively, and are dynamically adjusted during the iterative process, with the adjustment range limited to ±0.1.
[0124] The physical constraint solution and deep features are weighted together using the weight coefficients of each constraint to generate a fused feature. This fusion process utilizes a channel-wise attention mechanism, assigning different importance to different feature channels. This channel-wise attention mechanism is implemented through a global average pooling layer, two fully connected layers, and a sigmoid activation function, outputting a weight coefficient for each channel. The weight coefficients for high-frequency detail feature channels are set between 0.6 and 0.8, while the weight coefficients for low-frequency structural feature channels are set between 0.7 and 0.9. This differentiated weighting strategy ensures the accuracy of structural information while preserving details.
[0125] The fused features are input into the iterative optimization module, where an alternating direction multiplier method is used for iterative optimization. Each iteration considers both physical constraints and feature preservation requirements. The physical constraints are converted into penalty terms and added to the objective function. The penalty factor initially has a value of 0.01 and increases to a maximum of 10 with increasing iterations. Feature preservation requires that key information from the original depth features be retained during the optimization process to prevent oversmoothing or distortion. This is achieved through a feature preservation term that calculates a structural similarity index between the current solution and the original depth features, ensuring that important edges, textures, and local variations are not lost during the iterations. The feature preservation term is evaluated using a multi-scale structural similarity index, which considers similarity in brightness, contrast, and structure. The preservation threshold is set to 0.75. When the feature preservation score falls below the threshold, the feature preservation term is weighted, forcing the solution to converge towards the original features. The iteration step size starts at an initial value of 0.1 and gradually decreases to 0.001 as the residual decreases. This adaptive adjustment strategy ensures both rapid initial convergence and fine-tuning in the later stages.
[0126] After each iteration, two key metrics are calculated: the iterative residual between the current and previous results, and the degree to which the current result satisfies the various physical constraints. The iterative residual is calculated using the root mean square difference (RMS), and the degree to which the physical constraints are satisfied is assessed using the residual norm of each constraint equation. The iterative residual threshold is set to 0.001, and the combined physical constraint residual threshold is set to 0.01. When both conditions are met, the iteration process terminates and the final phase distribution is output.
[0127] The resulting phase distribution is then used directly for subsequent surface topography reconstruction and defect identification. Because the entire reconstruction process combines physical prior knowledge with the advantages of deep learning, it ensures both physical plausibility and excellent detail recovery and noise immunity.
[0128] The present invention captures the complex interactions between optical imaging, material deformation, and geometric constraints through a multi-physics field coupling model, achieving high-precision and high-robustness phase reconstruction, significantly improving the accuracy and reliability of subsequent surface defect identification, and is particularly suitable for industrial scenarios with complex surface morphology and high-precision detection requirements.
[0129] In an optional embodiment, the step of extracting characteristic parameters based on the surface topography data, analyzing the characteristic parameters using a defect recognition model, and obtaining a defect recognition result includes:
[0130] Based on the surface topography data, local curvature and normal vector changes are extracted through the differential geometry feature layer, persistent homology features and critical point distribution are calculated through the topology feature layer, and surface roughness and spectral characteristics are analyzed through the statistical feature layer; a quantum metric preserving mapping matrix is established to perform quantum fidelity correction on the extracted characteristic parameters;
[0131] A defect recognition model is constructed, and the quantum phase information output by the quantum state decoding module is fused with the corrected characteristic parameters in the same feature space to obtain a hybrid feature vector. A graph structure representation is constructed based on the hybrid feature vector, and a similarity matrix between feature nodes is calculated. The similarity matrix represents the degree of correlation between local area features. The similarity matrix is matched with a preset standard defect feature template to generate a defect feature indication map. The defect recognition model is trained using a contrastive learning method, with the feature representation of the standard sample as a positive sample and the feature representation of the known defect sample as a negative sample.
[0132] The mixed feature vector is analyzed using the trained defect recognition model, the defect location coordinates are determined based on the cluster center of the defect feature indication map, the defect type is determined according to the degree of feature deviation in the cluster area, and the defect severity is determined based on the abnormality degree score in the similarity matrix to obtain the defect recognition result.
[0133] Exemplarily, multi-level feature parameters are extracted from surface morphology data. Feature extraction is divided into three key levels: differential geometry feature layer, topological feature layer and statistical feature layer. These three levels can comprehensively capture the key features of surface morphology.
[0134] The differential geometry feature layer mainly extracts local curvature and normal vector change information. The specific implementation method of local curvature extraction is: first, pre-process the surface height data with a Gaussian filter with a filter kernel size of 5×5 pixels and a standard deviation of 1.0 to remove measurement noise; then calculate the principal curvature value of each point on the surface, including Gaussian curvature and average curvature. The Gaussian curvature calculation adopts the discrete differential geometry method to construct a local quadratic surface fitting for each point. The fitting range is a 9×9 pixel neighborhood, and the fitting coefficient is determined by the least squares method. The two principal curvatures k1 and k2 are directly calculated based on the fitting coefficients. The Gaussian curvature is k1 multiplied by k2, and the average curvature is (k1+k2) / 2. In the case of metal surface detection, the Gaussian curvature variation in the normal surface area is usually ±0.001mm. -2 range, and the scratch defect area can reach ±0.1mm -2, the pit defect presents an obvious negative Gaussian curvature distribution. The specific method of normal vector change extraction is: calculate the surface normal vector of each point through a three-dimensional gradient operator. The gradients in the horizontal and vertical directions are calculated using the Sobel operator, and then the gradients in the two directions are combined with the unit vertical vector to form a three-dimensional normal vector, and then normalized. Then calculate the angular difference of the normal vectors of adjacent points, and the angular difference is obtained by the arc cosine of the vector dot product. For each point, calculate the average of the angular difference between the normal vector and the 8 neighboring points as the normal vector change indicator of the point. In actual detection, the normal vector angle change in normal surface areas is usually less than 5 degrees, while that in edges and defective areas can reach more than 30 degrees. The normal vector change map is particularly sensitive to detecting surface protrusions, depressions and edge changes, and can effectively identify linear defects such as cracks and scratches.
[0135] The topological feature layer calculates persistent homological features and critical point distributions. The specific method for extracting persistent homological features is to treat the surface height data as a two-dimensional scalar field and construct an ascending filtered sequence of height values. 100 uniform threshold levels are set, ranging from the minimum to the maximum height value. For each threshold, regions with height values greater than the threshold are retained to form a binary image. The creation and disappearance of connected components, voids, and cavities are tracked to generate zero-dimensional, one-dimensional, and two-dimensional persistence maps. In the persistence map, the abscissa represents the threshold for feature appearance, the ordinate represents the threshold for feature disappearance, and the lifetime of a point (the ordinate minus the abscissa) indicates the stability of the feature. Stable features typically have lifetimes exceeding 30% of the total height range, while noise lifetimes are typically less than 5%. Defects appear as obvious outliers in the persistence map. For example, cracks produce long-lived features in the one-dimensional persistence map. The critical point distribution is extracted by detecting maxima, minima, and saddle points in the surface topography. For each point, its height is compared with that of its eight neighboring points. If the point is higher than all neighboring points, it is a maximum point; if it is lower than all neighboring points, it is a minimum point; otherwise, it is a saddle point (determined by the sign of the second-order derivative along different directions). The number, density, and spatial distribution pattern of each type of critical point are calculated. While the critical point density of a normal surface is typically between 100 and 200 per mm² and is evenly distributed, the critical point density in defective areas can reach 500 to 1000 per mm² and be concentrated or exhibit a specific pattern. For example, the density of saddle points along the scratch direction of a scratch defect is significantly higher than that of normal areas.
[0136] The statistical feature layer analyzes the surface roughness and spectral characteristics. The surface roughness analysis method is: divide the surface into local areas of 200×200 microns and calculate the root mean square roughness, peak-to-valley roughness, and ten-point height roughness of each area. The root mean square roughness is calculated as the square root of the sum of the squares of the deviations of all points in the area relative to the average height; the peak-to-valley roughness is the height difference between the highest and lowest points in the area; and the ten-point height roughness is the average difference between the heights of the five highest and five lowest points in the area. Different types of defects exhibit different roughness characteristics: the root mean square roughness of the scratch area is usually 1-3μm, which is significantly higher than the 0.1-0.5μm of the normal area; the corrosion area shows a uniformly increased peak-to-valley roughness, usually 3-5 times that of the normal area. The spectral characteristic analysis method is: apply a two-dimensional fast Fourier transform to the surface morphology data to obtain the spatial frequency distribution. The spectrum is divided into three frequency bands: low frequency (0-10 cycles / mm), mid-frequency (10-50 cycles / mm), and high frequency (>50 cycles / mm). The energy contribution and spectrum attenuation rate of each frequency band are calculated. The energy of a normal surface is primarily concentrated in the low-frequency band (accounting for over 80% of the total energy), and the spectrum exhibits uniform attenuation. However, defective areas also have significant energy distribution in the mid- and high-frequency bands. For example, scratches exhibit a significant high-frequency component perpendicular to the scratch direction, which can account for over 40% of the total energy. Directional analysis of the spectrum can also identify the directional characteristics of defects. For example, a unidirectional scratch exhibits a linear distribution in the spectrum perpendicular to the scratch direction.
[0137] All extracted features are combined into a high-dimensional feature vector, typically 400-600. A symmetric positive definite matrix of feature dimension × feature dimension is then constructed as a quantum metric-preserving mapping matrix, whose element values are determined by the quantum mutual information between the features. Diagonal elements are set to 1.0, indicating complete fidelity of the feature itself; off-diagonal elements are set to values between -0.2 and 0.5 based on feature correlation, with higher values corresponding to features with high correlation. The correction process involves multiplying the original feature vector by this matrix to transform the feature space. This correction effectively suppresses the uncertainty and noise introduced by quantum measurements, improving the distinguishability of features and achieving an improvement in the measured signal-to-noise ratio of over 25%.
[0138] The defect recognition model is constructed by establishing a multi-layered neural network architecture consisting of four key components: a feature fusion module, a graph structure construction module, a template matching module, and a classification decision module. The feature fusion module employs a dual-path network architecture: one path processes quantum phase information (256 dimensions) and the other processes the aforementioned three-layer features (400-600 dimensions). Each path consists of two fully connected layers with 512 hidden nodes and a LeakyReLU activation function. The outputs of the two paths are then concatenated to form a fused feature (128 dimensions). This architecture leverages the complementarity between quantum phase information and traditional features, enhancing the model's expressive power. The graph structure construction module divides the surface area into a 100×100 grid, with each grid point corresponding to a graph node. The node feature is the fused feature vector at that location. Node connectivity is established using the K-nearest neighbor algorithm, with a K value of 8. A similarity matrix is calculated between feature nodes using the exponential function of the inner product of the two node feature vectors, with a kernel width parameter of 0.1. The similarity matrix, with a size of node × node, describes the degree of correlation between features in different regions of the surface. A graph convolutional network (GCN) is applied to the graph structure for feature extraction. This network consists of three graph convolutional layers, each with 64, 32, and 16 output channels. This ultimately yields graph embedding features for each node. The template matching module maintains a library of standard defect feature templates, containing 10 common defect types and 50 samples of varying severity for each type. Each template is represented as a node-level feature vector and similarity pattern. The matching process calculates the cosine similarity between the graph embedding features of the sample under test and each sample in the template library. The template type with the highest similarity is selected as the preliminary judgment result. The matching results generate a defect feature indicator map, where the pixel values in the indicator map indicate the probability of a defect at that location.
[0139] Model training utilizes a contrastive learning approach, constructing a triplet loss function. Each triplet consists of an anchor sample (the sample to be tested), a positive sample (a sample of the same type), and a negative sample (a sample of a different type). The loss function encourages the distance between the anchor sample and the positive sample to be smaller than the distance between the anchor sample and the negative sample, with a threshold of 0.5. The training dataset consists of 10,000 standard samples and 10,000 known defect samples, covering 10 defect types. Training parameters are: batch size 128, learning rate 0.001, weight decay 0.0001, and 100 training epochs. To enhance model generalization, data augmentation techniques are applied during training, including random rotation (0-360 degrees), translation (±10%), and noise addition (signal-to-noise ratio 20-30 dB).
[0140] The model inputs the mixed feature vectors of the surface to be tested into a defect feature map. The density clustering algorithm, DBSCAN, is then applied to the map with parameters set to a neighborhood radius of 0.05 and a minimum number of 10 points to identify defect regions. The center coordinates of each cluster region are then calculated as the defect location. The Euclidean distance between the features of the cluster region and the standard template is used to determine the defect type (the template type with the smallest distance is the identified result). Finally, the defect severity is determined based on the anomaly score in the similarity matrix. The anomaly score is calculated as the ratio of the average similarity between nodes within the defect region to the average similarity between nodes in the defect region and nodes in the normal region. A smaller ratio indicates a more severe defect. Severity is categorized as mild (ratio > 0.7), moderate (ratio 0.4-0.7), and severe (ratio < 0.4).
[0141] The final defect recognition result includes multi-dimensional information: defect location coordinates (accurate to the pixel level), defect type (10 preset types or unknown), defect severity (a three-level rating), defect area size (number of pixels or actual area), and defect boundary outline (represented as a polygonal point set). For complex defects (defects containing multiple types of features), the model provides a combined recognition result for the primary and secondary types, along with a confidence score.
[0142] The multi-level feature extraction and deep learning defect recognition method of the present invention fully combines the precise description capability of traditional image processing with the advanced feature extraction capability of deep learning, while integrating the high-precision advantage of quantum measurement; the introduction of graph structure representation and comparative learning strategy enables the model to effectively learn the essential differences between defects and normal areas, greatly improving the recognition accuracy and anti-interference ability.
[0143] A second aspect of an embodiment of the present invention provides a high-speed defect recognition system based on optical diffraction imaging, comprising:
[0144] The first unit is used to construct a composite optical diffraction unit, which includes a programmable optical metasurface and a quantum phase modulator; the incident light field is converted into a quantum-classical hybrid modulated light field by simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator through a phase modulation strategy based on multi-objective constraint function optimization;
[0145] A second unit is used to collect the quantum coded diffraction image output by the composite optical diffraction unit;
[0146] A third unit is configured to process the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information;
[0147] The fourth unit is used to extract characteristic parameters based on the surface morphology data, analyze the characteristic parameters using a defect recognition model, and obtain a defect recognition result.
[0148] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:
[0149] processor;
[0150] a memory for storing processor-executable instructions;
[0151] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0152] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0153] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A high-speed defect recognition method based on optical diffraction imaging, characterized in that: include: constructing a composite optical diffraction unit, the composite optical diffraction unit comprising a programmable optical metasurface and a quantum phase modulator; The method comprises the following steps: simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator through a phase modulation strategy optimized based on a multi-objective constraint function, and converting the incident light field into a quantum-classical hybrid modulated light field, specifically comprising: constructing a phase modulation strategy, wherein the phase modulation strategy includes a structural parameter control item corresponding to classical phase modulation and a phase modulation item corresponding to quantum state encoding; establishing a multi-objective constraint optimization function to optimize the phase modulation strategy, wherein the multi-objective constraint optimization function includes an energy normalization constraint item, a frequency interval constraint item, and a phase gradient constraint item; configuring the optimized structural parameter control item to a programmable optical metasurface of a metal-dielectric-metal structure, and performing classical phase modulation by adjusting the geometric size and spacing of the metasurface structural unit; at the same time, configuring the optimized phase modulation item to a quantum phase modulator, and performing phase encoding of the quantum state by regulating its equivalent refractive index distribution; balancing the classical phase modulation effect and the quantum state encoding effect by changing the modulation depth of the structural parameter control item and the phase modulation item, and determining the final phase modulation strategy when the comprehensive evaluation index of the two modulation effects meets the preset requirements; collecting a quantum coded diffraction image output by the composite optical diffraction unit; Processing the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information; Feature parameters are extracted based on the surface topography data, and the feature parameters are analyzed using a defect recognition model to obtain a defect recognition result.
2. The method according to claim 1, characterized in that The steps of establishing a multi-objective constraint optimization function to optimize the phase modulation strategy include: The energy normalization constraint term is determined by the difference between the energy distribution uniformity of the structural parameter control term and a preset unit value, the frequency interval constraint term is determined by the spatial frequency distribution characteristics of the phase modulation term, and the phase gradient constraint term is determined by the combined gradient norm of the structural parameter control term and the phase modulation term; Calculating a sensitivity matrix of the phase modulation strategy to each constraint, the sensitivity matrix comprehensively characterizing local response characteristics, frequency response characteristics, and diffraction efficiency; performing a tensor product operation on the sensitivity matrix and the gradient value of the constraint item to obtain an initial weight adjustment; and normalizing the initial weight adjustment, the normalization taking into account the contribution of each constraint item to the optimization objective; The multi-objective constrained optimization function is optimized using a gradient descent algorithm with a momentum term, where the momentum term is a weighted combination of the current gradient and the historical gradient. The learning rate of the gradient descent algorithm is adaptively adjusted according to the change in the value of the multi-objective constrained optimization function. The optimization process ends when the rate of change of the value of the multi-objective constrained optimization function for a consecutive preset number of times is less than a preset change rate threshold, or when the gradient norm of the multi-objective constrained optimization function is less than a preset gradient threshold.
3. The method according to claim 1, characterized in that The step of processing the quantum coded diffraction image using a quantum state phase reconstruction network to calculate the surface topography data of the object to be measured includes: Perform quantum state decoding on the quantum-encoded diffraction image, establish a quantum state density matrix consisting of the tensor product of the quantum ground state and its conjugate transpose and the expansion coefficients, and consider quantum noise suppression and measurement uncertainty constraints during the construction process. Use a unitary operator to perform trace operation on the quantum state density matrix and extract phase information; Optimizing the phase information based on maximum likelihood estimation; The optimized phase information is input into a multi-scale phase reconstruction network, which includes a feature extraction module coupled with multiple physical fields. The multi-scale phase reconstruction network extracts features from the input data through a physics-guided iterative strategy and calculates the phase distribution. The surface height distribution is obtained by calculating the ratio of the phase distribution to the light wavelength parameter, the measurement difference between the measured value and the true value of the surface height distribution is calculated, and the measurement difference is corrected using a compensation coefficient to obtain the surface morphology data of the object to be measured.
4. The method according to claim 3, characterized in that The steps of optimizing phase information based on maximum likelihood estimation include: Constructing an optimization objective function including a quantum noise suppression term and a measurement uncertainty constraint term, wherein the quantum noise suppression term is jointly determined by a decoherence time parameter and a quantum state purity; Based on the optimization objective function, an adaptive measurement basis selection strategy is adopted to determine an optimal measurement scheme, and the optimal measurement scheme is used to perform tomographic reconstruction of the quantum state to obtain quantum measurement data; a maximum likelihood estimation method is applied to the quantum measurement data to estimate phase parameters by maximizing the conditional probability of the observation data, wherein the maximum likelihood estimation method minimizes the statistical deviation between the estimated parameters and the actual observation results through iterative optimization; a confidence interval of the quantum state density matrix is calculated based on the maximum likelihood estimation result; a probability estimation of the phase information is performed within the confidence interval, and an optimal estimate is determined; When the uncertainty of the optimal estimate is less than a preset threshold, the optimal estimate is output as optimized phase information to the multi-scale phase reconstruction network for subsequent processing; when the uncertainty of the optimal estimate is greater than or equal to the preset threshold, the method returns to the adaptive measurement basis selection strategy step and redetermines the optimal measurement scheme until the condition that the uncertainty of the optimal estimate is less than the preset threshold is met.
5. The method according to claim 3, characterized in that The optimized phase information is input into a multi-scale phase reconstruction network, which includes a feature extraction module coupled with multiple physical fields. The steps of extracting features from the input data through a physics-guided iterative strategy and calculating the phase distribution include: Constructing a multi-physics field coupled feature extraction module, which includes light field propagation constraints, material constitutive relationship constraints, and geometric boundary constraints; decomposing the input phase information at multiple spatial scales to obtain feature information at different scales; Perform physical constraint solving at different scales. Establish the optical path difference equations based on light field propagation constraints and solve the phase propagation characteristics. Solve the stress and strain distribution characteristics based on material constitutive constraints. Calculate the boundary curvature continuity condition based on geometric boundary constraints. Combine the constraint solving results at each scale with the characteristic information of the corresponding scale to generate the physical constraint solution. Calculate the physical field residuals of the physical constraint solutions at each scale, analyze the correlation between the depth features and the physical constraint solutions, and determine the weight coefficients of each constraint based on the physical field residuals and correlations. Use the weight coefficients of each constraint to perform a weighted combination of the physical constraint solutions and the depth features to obtain the fusion features. The fusion features are input into the iterative optimization module, and the physical field constraints and feature preservation requirements are simultaneously considered in each iteration; the iterative residual between the current iteration result and the previous iteration result, as well as the degree to which the current iteration result satisfies each physical field constraint, are calculated; when the iterative residual is less than a preset physical threshold and satisfies all physical field constraints, the final phase distribution is output.
6. The method according to claim 1, characterized in that The steps of extracting characteristic parameters based on the surface topography data and analyzing the characteristic parameters using a defect recognition model to obtain a defect recognition result include: Based on the surface topography data, local curvature and normal vector changes are extracted through the differential geometry feature layer, persistent homology features and critical point distribution are calculated through the topology feature layer, and surface roughness and spectral characteristics are analyzed through the statistical feature layer; a quantum metric preserving mapping matrix is established to perform quantum fidelity correction on the extracted characteristic parameters; A defect recognition model is constructed, and the quantum phase information output by the quantum state decoding module is fused with the corrected characteristic parameters in the same feature space to obtain a hybrid feature vector. A graph structure representation is constructed based on the hybrid feature vector, and a similarity matrix between feature nodes is calculated. The similarity matrix represents the degree of correlation between local area features. The similarity matrix is matched with a preset standard defect feature template to generate a defect feature indication map. The defect recognition model is trained using a contrastive learning method, with the feature representation of the standard sample as a positive sample and the feature representation of the known defect sample as a negative sample. The mixed feature vector is analyzed using the trained defect recognition model, the defect location coordinates are determined based on the cluster center of the defect feature indication map, the defect type is determined according to the degree of feature deviation in the cluster area, and the defect severity is determined based on the abnormality degree score in the similarity matrix to obtain the defect recognition result.
7. A high-speed defect recognition system based on optical diffraction imaging, used to implement the method according to any one of claims 1 to 6, characterized in that: include: A first unit is used to construct a composite optical diffraction unit, wherein the composite optical diffraction unit includes a programmable optical metasurface and a quantum phase modulator; The incident light field is converted into a quantum-classical hybrid modulated light field by simultaneously determining the classical modulation characteristics of the programmable optical metasurface and the quantum state encoding characteristics of the quantum phase modulator through a phase modulation strategy based on multi-objective constraint function optimization; A second unit is used to collect the quantum coded diffraction image output by the composite optical diffraction unit; A third unit is configured to process the quantum coded diffraction image using a quantum state phase reconstruction network, wherein the quantum state phase reconstruction network includes a quantum state decoding module and a phase reconstruction module, wherein the quantum state decoding module converts quantum coded information into phase information, and the phase reconstruction module calculates surface topography data of the object to be measured based on the phase information; The fourth unit is used to extract characteristic parameters based on the surface morphology data, analyze the characteristic parameters using a defect recognition model, and obtain a defect recognition result.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Optical element stress measurement and defect identification method based on digital holographic photoelastic method
CN120084633A
Methods for reconstructing system states
DE102022203308A1