Nut defect detection method based on X-ray imaging

By combining high-coherence X-ray scattering imaging of synchronous radiation sources and electron cloud density perturbation analysis, the problem of microscopic physical deterioration in the background of the weak density gradient in the prior art is solved, and efficient non-destructive detection and risk assessment of early microscopic defects inside nuts is achieved.

CN120339279AInactive Publication Date: 2025-07-18HANGZHOU KUI KRYPTON IND TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510813691.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing nut detection methods based on X-ray absorption imaging are difficult to identify microscopic physical deterioration areas under the background of weak density gradient and homogeneity of components, especially early physical deterioration caused by the oxidation of oil and fat in the nut core. Traditional detection technologies lack the ability to analyze the density distribution characteristics of electron clouds.

Method used

Using a detection method combining high-coherence X-ray scattering imaging based on synchronous radiation sources and electron cloud density perturbation analysis, electron cloud density optimization distribution data is generated by constructing uniform irradiation fields, phase inversion and sparse constraint optimization, local feature vectors are extracted and fused feature data is constructed, abnormal areas are identified and deterioration risk is evaluated.

Benefits of technology

The lossless recognition of early microscopic physical deterioration areas inside the nut is achieved, the resolution and stability of microscopic defects are improved, the range of defect type recognition is expanded, and the reliability and adaptability of detection results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339279A_ABST
    Figure CN120339279A_ABST
Patent Text Reader

Abstract

The invention discloses a nut defect detection method based on X-ray imaging, and particularly relates to the field of X-ray nut material internal defect imaging, which comprises the following steps: generating and adjusting an initial light beam of X-rays through a synchronous radiation source, and constructing uniform irradiation field data for nut material detection; acquiring angle scattering light intensity matrix data based on the uniform irradiation field data; and performing phase inversion and sparse constraint optimization on the angle scattering light intensity matrix data to generate electron cloud density optimization distribution data, and constructing density connectivity relation graph data based on the electron cloud density optimization distribution data. By introducing a detection principle of combining high-coherence X-ray scattering imaging based on a synchronous radiation source and electron cloud density disturbance analysis, lossless identification of an early microcosmic physical deterioration region in a nut is realized; the problem that an existing method based on absorption imaging is insufficient in defect detection capacity under the background of weak density gradient and homogeneous component is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of internal defect imaging technology of nut materials by X-rays. More specifically, the present invention relates to a method for detecting nut defects based on X-ray imaging. Background Art

[0002] In the existing quality detection technology of nut agricultural products, the method based on X-ray absorption imaging is generally adopted. By measuring the change of the linear absorption coefficient of substances to single-energy or multi-energy X-rays, an internal density distribution image is formed. Although such methods have certain effects in identifying the integrity of the nut shell-core structure, detecting cavities and significant tissue differences, in the face of microscopic structural changes with similar density and composition, especially the early physical deterioration phenomena such as local chemical bond breakage and protein conformational rearrangement caused by the oxidation of nut kernels, traditional X-ray absorption imaging is difficult to provide effective discrimination. Since such microscopic changes are mainly manifested in the electron cloud density perturbation at the molecular scale, rather than significant changes in macroscopic material density or atomic number, it is difficult for conventional detection means based on absorption attenuation or scattering intensity to perceive the initial evolution process of internal micro-defects. In addition, the existing X-ray imaging mainly focuses on the absorption effect, ignores the interaction information between high-energy photons and the electron cloud inside the material, and lacks the ability to analyze the characteristics of electron density distribution, which limits the detection of microscopic structural heterogeneity changes. Therefore, in the case of weak density gradient and homogeneous composition inside nuts, the existing X-ray detection technology is difficult to achieve early non-destructive identification of microscopic physical deterioration regions, which has become a technical bottleneck faced by the current nut defect detection method based on X-ray imaging from the detection perspective. Summary of the Invention

[0003] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a method for detecting nut defects based on X-ray imaging. By introducing a detection principle that combines high-coherence X-ray scattering imaging based on a synchrotron radiation source and the analysis of electron cloud density perturbation, the non-destructive identification of early microscopic physical deterioration regions inside nuts is realized, and the problem of insufficient defect detection ability of the existing absorption imaging method in the case of weak density gradient and homogeneous composition is solved.

[0004] To achieve the above object, the present invention provides the following technical solution: A method for detecting nut defects based on X-ray imaging, including: S1. Generate and adjust the initial light beam of X-rays through a synchrotron radiation source, construct uniform irradiation field data for nut material detection, and obtain angular scattered light intensity matrix data based on the uniform irradiation field data; S2. Perform phase inversion and sparse constraint optimization on the angular scattered light intensity matrix data to generate optimized electron cloud density distribution data, and construct density connectivity relationship graph data based on the optimized electron cloud density distribution data; S3. Extract local feature vector data based on the optimized electron cloud density distribution data, fuse the density connectivity relationship graph data to construct fused feature data, and identify abnormal regions based on the fused feature data; S4. Classify the defect features and evaluate the deterioration risk of the fused feature data determined to be abnormal to generate defect type classification data and failure risk level data, and generate deteriorated defect distribution map data based on the failure risk level data and the fused feature data; S5. Compare the fused feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data, update the feature extraction parameter data and deterioration risk assessment parameter data based on the comparison results, and synchronously feedback the updated parameters to the initial beam generation process of the X-ray to form updated uniform irradiation field data, completing the update of the nut defect detection method.

[0005] In a preferred embodiment, in S1, it includes: generating an initial beam of X-rays through a synchrotron radiation source, performing energy resolution processing on the initial beam to screen photon data within a specified preset wavelength range, and performing spatial coherence adjustment to form initial irradiation beam data. Immediately thereafter, perform phase modulation processing on the initial irradiation beam data through a wavefront correction method, determine the modulation parameters according to the nut material characteristics, and form uniform irradiation field data; Adjust the spatial energy distribution of the X-rays according to the uniform irradiation field data, control the adjusted X-rays to irradiate the nut material to form a scattering pattern based on the electron cloud density perturbation, collect the scattering pattern to form scattering signal data, and perform multi-angle collection on the scattering signal data through the angle step scanning method to form an angular scattered light intensity matrix data, where the angular scattered light intensity matrix data includes scattered intensity sub-data at multiple azimuths; It should be noted that the synchrotron radiation source is the electromagnetic radiation released when high-energy electrons move in a high-speed curved path in a magnetic field. Its characteristics are high brightness, high coherence, and continuous wide-spectrum coverage; electrons are affected by the magnetic field in an accelerator orbit close to the speed of light to generate synchrotron radiation, and the radiation photon energy range can cover the X-ray band. Therefore, the synchrotron radiation source can generate an X-ray initial beam with controllable energy, wavelength, and directivity, meeting the requirements for the light source quality of high-resolution imaging and structure detection; In practical applications, energy resolution processing is to screen photons in the initial light beam by setting an energy selection mechanism. Based on the inverse relationship between photon energy and wavelength, a preset wavelength range is set and correspondingly converted into an energy range. A monochromator device can be used for energy diffraction separation, and photon data that meet the preset wavelength range are screened out based on the Bragg diffraction principle; energy resolution processing includes, but is not limited to, execution logics such as grating diffraction, crystal monochromatization, or multilayer film reflection. By changing the diffraction angle or incident angle, spatial separation and selection of photons with different energies are achieved, and beam data that meet the wavelength requirements and have high energy purity are output; Among them, the methods of wavefront correction include modulating the wavefront morphology of the irradiated light beam through a phase plate, a wavefront encoder, or an adaptive optical element to correct local phase distortion and uniform the wavefront distribution; phase control processing includes setting a phase delay function based on the characteristics of the target material, precisely controlling the phase offset of each region of the light beam according to the spatial position, and forming a phase distribution that meets the preset requirements of uniformity and coherence; the phase delay function includes the corresponding relationship between the spatial coordinates of the incident light beam, the refractive index distribution of the target material, and the preset phase offset; In practical applications, the characteristics of the nut material include, but are not limited to, the distribution of the electron cloud density inside the nut, the local refractive index change, the material thickness distribution, and the internal microstructure uniformity. These characteristics are used to determine the control parameters to match the phase distribution of the irradiation field with the internal physical characteristics of the material.

[0006] In a preferred embodiment, in S2, it includes: inputting the angular scattering intensity matrix data into the phase retrieval method, performing Fourier space inversion in the phase retrieval method to obtain preliminary phase distribution data; performing sparse constraint optimization on the preliminary phase distribution data through Laplacian regularization processing to obtain preliminary electron cloud density distribution data, performing local phase difference analysis on the preliminary electron cloud density distribution data, and outputting optimized electron cloud density distribution data by extracting local frequency characteristics and performing high-frequency compensation processing; Based on the neighborhood density gradient analysis of the optimized electron cloud density distribution data, a density connectivity relationship graph data is constructed. The density connectivity relationship graph data includes position node data and gradient weight data; Among them, based on the input angular scattering intensity matrix data, the phase retrieval method first initializes the amplitude information contained in the angular scattering intensity matrix data in the Fourier space and sets a random or estimated initial phase distribution. Subsequently, the amplitude information and the phase distribution information are combined to generate complex amplitude data, and the spatial domain image data is obtained through Fourier inverse transformation; in the spatial domain, amplitude constraints are applied to match known physical conditions or sampling characteristics, and Fourier forward transformation is performed back to the frequency domain. By iteratively updating the phase information in the frequency domain, the error between the complex amplitude data and the angular scattering intensity matrix data is gradually reduced. Finally, after multiple iterations converge, preliminary phase distribution data that meets amplitude consistency and phase continuity is obtained; It should be noted that the Laplacian regularization process performs sparse constraint optimization based on the preliminary phase distribution data. A regularization term with the Laplacian operator as the kernel function is constructed. By calculating the second-order derivative information of the preliminary phase distribution data, the sensitivity of local gradient changes is enhanced, high-frequency noise and non-physical oscillations are suppressed. Combining with the sparse constraint objective, the weighted sum of the data fitting term and the Laplacian regularization term is minimized, and the preliminary phase distribution data is iteratively updated to highlight local significant features while maintaining the continuity of the overall structure. Finally, the preliminary distribution data of the electron cloud density conforming to the sparse distribution characteristics is obtained; Among them, the local phase difference analysis is based on the preliminary distribution data of the electron cloud density. First, a local window is selected in the spatial domain, the phase gradient distribution within the window is calculated, and the local phase change rate is extracted as the local frequency feature. Subsequently, the local frequency feature is mapped to the frequency domain through Fourier transform, the local detail information corresponding to the high-frequency components is identified, and then a compensation function is constructed according to the high-frequency energy distribution characteristics to perform gain modulation on the high-frequency signal components, suppress low-frequency background interference and restore the local micro-structure features. Finally, it returns to the spatial domain through inverse Fourier transform, and the optimized distribution data of the electron cloud density with enhanced details is output; In addition, the density connectivity graph data constructed based on the neighborhood density gradient analysis in S2 is based on the optimized distribution data of the electron cloud density. First, a local neighborhood window with a fixed size is selected in the spatial domain, the density gradient values between each spatial position and its adjacent positions within the neighborhood are calculated, and the spatial adjacency relationship is established according to the change trend of the density gradient values. Each spatial position is defined as a position node data, and the node data includes the three-dimensional coordinate information of this position. For any pair of adjacent position nodes, the corresponding density gradient difference is calculated as the gradient weight data of the edge connecting the two nodes. By traversing all spatial positions and neighborhood nodes, the node set and the edge set are constructed in turn, and finally the density connectivity graph data including the position node data and the corresponding gradient weight data is formed, which is used to describe the local connectivity and density change characteristics of the optimized distribution data of the electron cloud density.

[0007] In a preferred embodiment, in S3, it includes: inputting the optimized distribution data of the electron cloud density into the feature extraction method, performing local density gradient change extraction based on the convolution kernel operation in the feature extraction method to form local density change rate sub-data, and synchronously extracting local frequency perturbation sub-data based on the frequency space analysis method. The local density change rate sub-data and the local frequency perturbation sub-data are combined to form local feature vector data; Performing feature fusion processing on the local feature vector data and the density connectivity graph data to construct fusion feature data; inputting the fusion feature data into the abnormal area recognition method. In the abnormal area recognition method, the absolute value determination range of the upper limit of the density change rate is set according to the local density change rate sub-data, and the lower threshold of the gradient weight is set according to the gradient weight data; Compare the local density change rate sub-data extracted from the fused feature data with the gradient weight data respectively. If the absolute value of the local density change rate sub-data exceeds the absolute value determination range of the density change rate upper limit, and the gradient weight data is less than the gradient weight lower limit threshold, it is determined as abnormal; If the gradient weight data is less than the gradient weight lower limit threshold, it is determined as abnormal; otherwise, skip the current fused feature data and continue to process the next fused feature data; It should be noted that in the extraction of local density gradient changes based on convolution kernel operations, first, the optimized distribution data of electron cloud density is used as the input, and the convolution kernel is defined as a weight matrix with fixed scale and direction-sensitive characteristics. The convolution kernel includes a horizontal gradient sub-kernel and a vertical gradient sub-kernel for capturing spatial gradient changes; in the spatial domain, the convolution kernel is weighted and accumulated point by point with the input data in a sliding window manner to calculate the local density change rate in the horizontal and vertical directions at each position; by taking the square root of the sum of the squares of the local density change rates in the horizontal and vertical directions, the local density gradient amplitude at this position is obtained as the local density change rate sub-data; after this operation is completed by traversing the entire spatial domain, the complete local density change rate sub-data is output to describe the local density gradient change characteristics of the optimized distribution data of electron cloud density at each position; In addition, frequency space analysis takes the optimized distribution data of electron cloud density as the input, performs Fourier transform on the data, maps the spatial domain density distribution to the frequency domain, and obtains the corresponding frequency spectrum distribution; in the frequency domain, a local analysis window is set to extract the energy density characteristics of different frequency components, and focus on identifying the local perturbation characteristics corresponding to high-frequency components and medium-frequency components; by analyzing the distribution pattern of local frequency energy, the frequency perturbation amplitude corresponding to each position is calculated as the local frequency perturbation sub-data; this sub-data is used to characterize the change rate and detailed perturbation characteristics of the optimized distribution data of electron cloud density in the local area of the frequency domain; In the analysis of the distribution pattern of local frequency energy, first, a local frequency region is intercepted in the frequency domain with a local window of fixed size, the energy of each frequency component in the window is statistically calculated, and the energy spectral density is calculated; then, according to the distribution gradient of energy on the frequency coordinate, the energy change rate characteristics are extracted to identify the distribution differences of energy in the high-frequency region and the low-frequency region; then, through the weighted integral of the change amplitude of energy density and the frequency position, the frequency perturbation amplitude corresponding to the center of each local window is calculated, and finally, the perturbation amplitudes of all local windows are summarized to form the complete local frequency perturbation sub-data.

[0008] In a preferred embodiment, S4 includes: performing defect feature classification on the fusion feature data determined to be abnormal, performing defect type feature matching based on the local density change rate sub-data and the local frequency perturbation sub-data, and forming defect type classification data, where the defect type classification data includes crack-type defect sub-data, cavity-type defect sub-data, and deterioration-type defect sub-data; Synchronously input the defect type classification data and the fusion feature data determined to be abnormal into the deterioration risk assessment. In the deterioration risk assessment, extract the local density change rate sub-data and the gradient weight data, and construct deterioration feature matrix data, where the deterioration feature matrix data includes perturbation amplitude sub-data, connectivity feature sub-data, and density change trend sub-data; Set a perturbation amplitude determination interval based on the perturbation amplitude sub-data, set a connectivity threshold based on the connectivity feature sub-data, and set a change trend determination range based on the density change trend sub-data; if the perturbation amplitude sub-data exceeds the perturbation amplitude determination interval, and the connectivity feature sub-data is lower than the connectivity threshold, and the density change trend sub-data exceeds the change trend determination range, then output the failure risk level data; otherwise, skip the current deterioration feature matrix data and continue to process the next deterioration feature matrix data; The failure risk level data is a joint determination result based on the perturbation amplitude sub-data, the connectivity feature sub-data, and the density change trend sub-data, and represents the likelihood classification result of the fusion feature data determined to be abnormal deteriorating or failing during future evolution; Combine the failure risk level data with the fusion feature data determined to be abnormal, perform three-dimensional visualization processing, and generate deterioration defect distribution map data, where the deterioration defect distribution map includes the spatial coordinates of the fusion feature data determined to be abnormal and the corresponding failure risk level; It should be noted that the meaning of performing defect type feature matching is to perform feature space comparison between each fusion feature data and a preset defect type feature template based on the local density change rate sub-data and the local frequency perturbation sub-data extracted from the fusion feature data determined to be abnormal, calculate the similarity between feature vectors, and determine the corresponding defect type based on the matching result with the highest similarity; specifically, by matching the spatial gradient pattern reflected by the local density change rate feature and the microstructure complexity reflected by the local frequency perturbation feature, the fusion feature data is divided into crack-type defect sub-data, cavity-type defect sub-data, or deterioration-type defect sub-data, and finally form defect type classification data containing different types of sub-data sets; In constructing the deterioration feature matrix data, first, based on the fusion feature data determined to be abnormal, extract the corresponding local density change rate sub-data and gradient weight data, and perform local statistics and dynamic analysis for each group of fusion feature data; Among them, the generation of the disturbance amplitude sub-data is achieved by dividing the local density change rate sub-data into windows, statistically calculating the difference between the maximum amplitude and the minimum amplitude of the density change rate within the window, and computing the local maximum gradient change range as the disturbance amplitude sub-data, which characterizes the severity of the local electron cloud density change; The generation of the connectivity feature sub-data is based on the extracted gradient weight data. A local density connectivity relationship graph is constructed, and the effective connection number of each position node and the scale of the overall connected component are statistically calculated in the graph. The average connectivity and maximum connectivity indexes of the local area are computed to form the connectivity feature sub-data, which is used to measure the continuity and integrity of the local microstructure; The generation of the density change trend sub-data is achieved by tracking the distribution gradient of the local density change rate sub-data in the spatial coordinate system, combining multi-temporal scan data to calculate the change rate of the density gradient with the spatial expansion, and extracting the trend growth rate and fluctuation frequency characteristics by fitting the local change trend curve to form the density change trend sub-data, which is used to describe the expansion rate and stability of the potential degradation process; Finally, the disturbance amplitude sub-data, the connectivity feature sub-data, and the density change trend sub-data are combined according to the spatial coordinate correspondence relationship to construct a complete degradation feature matrix data, which serves as the basic input for subsequent degradation risk assessment; In addition, during the three-dimensional visualization process, the spatial coordinate sub-data of the fusion feature data determined to be abnormal is extracted, and the corresponding failure risk level data is paired one by one with the spatial coordinate sub-data to form a mapping relationship between the spatial position and the failure risk level. Based on the mapping relationship, a three-dimensional coordinate system is constructed, with the spatial coordinate sub-data as the three-dimensional coordinate points and the failure risk level data as the attribute values of each coordinate point. In the three-dimensional coordinate system, a visualization technique based on volume rendering is adopted. Through spatial voxelization, the discrete coordinate points are transformed into continuous spatial volume data, and the failure risk level data is mapped to the color or transparency characteristics of the voxels. By scanning the voxel space through the ray casting method, a visualization image containing the spatial distribution characteristics of different failure risk levels is generated. Finally, the degradation defect distribution map data is output. The degradation defect distribution map data completely contains the spatial coordinate sub-data of the fusion feature data determined to be abnormal and the corresponding failure risk level data, realizing the positioning and risk level grading display of the abnormal area in the three-dimensional space.

[0009] In a preferred embodiment, S5 includes: comparing the fused feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data through label comparison to form detection accuracy comparison result data, where the detection accuracy comparison result data includes classification correct rate sub-data and risk level prediction accuracy sub-data; the labels for label comparison include preset sample label sub-data corresponding to the defect type classification data and preset risk level label sub-data corresponding to the failure risk level data, and the preset sample label sub-data and the preset risk level label sub-data are constructed based on known nut defect characteristics and historical evolution trends; Perform feature extraction on the classification correct rate sub-data and the risk level prediction accuracy sub-data in the detection accuracy comparison result data and update the parameters. Based on the local density change rate sub-data and the local frequency perturbation sub-data, adjust the parameters of the convolution kernel to form updated feature extraction parameter data; Use the fused feature data determined to be abnormal and the deterioration feature matrix data as inputs, and based on the perturbation amplitude sub-data, connectivity feature sub-data, and density change trend sub-data, perform update processing on the deterioration risk assessment parameters to form updated deterioration risk assessment parameter data; Synchronously feedback the updated feature extraction parameter data and the updated deterioration risk assessment parameter data to the initial beam generation process of the X-ray in S1, and based on the synchronous feedback process, adjust the phase control parameters preset for the wavefront correction method to form updated uniform irradiation field data; the phase control parameters are used to adjust the wavefront structure of the X-ray irradiation field; Input the updated uniform irradiation field data into the next round of the nut defect detection method based on X-ray imaging to complete the update of the nut defect detection method; It should be noted that the logic of performing feature extraction on the classification correct rate sub-data and the risk level prediction accuracy sub-data in the detection accuracy comparison result data and updating the parameters in S5 is as follows: First, extract the classification correct rate sub-data and the risk level prediction accuracy sub-data from the detection accuracy comparison result data, calculate their change trends in different detection batches respectively to form a performance change feature vector; based on the performance change feature vector, analyze the decline amplitude and change rate of the classification performance and the risk prediction performance, and determine the feature-sensitive dimensions corresponding to the local density change rate sub-data and the local frequency perturbation sub-data in the feature extraction method; combined with the sensitive dimension information, adjust the weight parameters and size parameters of the convolution kernel through the gradient descent method or the optimization strategy based on error backpropagation, so that the convolution kernel has a higher response to key change features when extracting local features; after completing the parameter update, form the updated feature extraction parameter data as the optimization basis for the subsequent feature extraction and defect recognition processes; In adjusting the parameters of the convolutional kernel, using the local density change rate sub-data and the local frequency perturbation sub-data as input features, the gradient distribution characteristics of the local density change rate sub-data in the spatial domain are statistically analyzed, its local maximum gradient, average gradient and gradient change frequency are analyzed, and the spatial scale of the significantly density-changing region is determined; simultaneously, the energy concentration degree and energy diffusion rate of the local frequency perturbation sub-data in the frequency domain are statistically analyzed to determine the spatial detail level of the frequency perturbation characteristics; according to the density change scale and the frequency perturbation level, the receptive field size of the convolutional kernel is adjusted respectively, so that the convolutional kernel size covers the significantly density-changing region and takes into account the detail characteristics of the frequency perturbation; on this basis, the spatial first-order derivative of the local gradient change rate and the local variance of the frequency perturbation amplitude are calculated, and according to the derivative change rate and the variance size, the weight parameter distribution of the convolutional kernel is adjusted, so that the convolutional kernel has a higher weighted response in the region with intense density change and the region with active frequency perturbation; through the above process, the updated convolutional kernel size parameters and weight parameters are finally formed to constitute the updated feature extraction parameter data; In the update process of the deterioration risk assessment parameters, using the fusion feature data determined to be abnormal and the deterioration feature matrix data as input, first, the perturbation amplitude sub-data in the deterioration feature matrix data is extracted, the maximum perturbation amplitude and the mean value of the perturbation amplitude distribution in each local region are statistically analyzed, and according to the difference range between the maximum value and the mean value, the upper and lower threshold values of the perturbation amplitude determination interval are adjusted to dynamically adapt to different degrees of local deterioration characteristics; then, the connectivity feature sub-data is extracted, the mean value and standard deviation of the local connectivity are calculated, and the connectivity threshold is adjusted according to the dispersion degree of the connectivity to enhance the sensitivity to the low-connectivity deterioration region; then, the density change trend sub-data is extracted, the growth rate and fluctuation frequency of the local density change trend are analyzed, and according to the growth rate distribution and the fluctuation amplitude, the change trend determination range is adjusted to cover the characteristic intervals of the deterioration acceleration stage and the abnormal fluctuation stage; through the above process, the perturbation amplitude determination interval parameters, the connectivity threshold parameters and the density change trend determination range parameters are updated respectively, and combined to form the updated deterioration risk assessment parameter data for subsequent use in determining the deterioration risk level; In addition, in S5, during the initial beam generation process of the synchrotron radiation X-ray, the updated feature extraction parameter data and the updated deterioration risk assessment parameter data are used as the synchronous feedback input. First, the convolution kernel size parameter and the weight parameter in the feature extraction parameter data are mapped to the corresponding spatial resolution and local structure sensitivity requirements, and the spatial resolution distribution function required for the target irradiation field is calculated. At the same time, the perturbation amplitude determination interval, the connectivity threshold, and the density change trend determination range in the deterioration risk assessment parameter data are transformed into the regulation requirements for the X-ray wavefront uniformity, the phase gradient continuity, and the spatial coherence length. Based on the above requirements, the phase regulation constraint model is jointly constructed with the spatial resolution distribution function and the coherence regulation requirements. By solving the optimal phase delay function, the phase regulation parameters preset for the wavefront correction method are adjusted, including the local phase delay amplitude and the phase distribution smoothness setting. After the adjustment is completed, the wavefront correction process is re-executed based on the new phase regulation parameters to form the uniform irradiation field data that meets the updated detection requirements, which is used as the input for the X-ray initial beam generation process in S1, thus completing the adaptive update closed-loop of the detection process.

[0010] Technical effects and advantages of the present invention: The present invention uses the highly coherent X-ray beam generated by the synchrotron radiation source, combines the wavefront correction and phase regulation technologies, constructs a uniform irradiation field, and collects the scattering signals caused by the electron cloud density perturbation, breaking through the ability bottleneck of the traditional absorption imaging method for non-destructive detection of microscopic deterioration regions under weak density gradients and homogeneous backgrounds of components, and realizing the sensitive detection of early physical deterioration inside nuts. By introducing the sparse constraint optimization processing of the phase retrieval method combined with Laplace regularization, the analytical ability for the fine features of the electron cloud density distribution is improved, the high-frequency noise and non-physical oscillations are effectively suppressed, the resolution of early local structure changes is enhanced, and the limitation problem that traditional imaging technologies are difficult to identify the initial stage of microscopic defect evolution is solved. Based on the local density gradient change extraction and frequency space perturbation analysis of the convolution kernel operation, the joint characterization of the local density change rate and the frequency perturbation amplitude inside the nut material is realized, the extraction ability for fine-grained defect features is improved, and the accuracy and stability of abnormal region recognition are enhanced. By constructing multi-dimensional fusion feature data that combines local features and connectivity features, and combining the density connectivity relationship graph analysis, the accurate capture of the continuous change of the local microstructure is realized, the fine classification ability for various defect types such as crack type, cavity type, and deterioration type is improved, and the defect recognition range of traditional detection methods is extended. By introducing sub-data such as perturbation amplitude, connectivity features, and density change trends to construct a deterioration feature matrix, and combining the multi-feature joint determination strategy, the quantitative assessment of the failure risk level of potential deterioration regions inside nuts is realized, and the reliability and interpretability of the detection results are improved. A parameter update mechanism based on detection accuracy feedback synchronously optimizes the joint feature extraction parameters and risk assessment parameters, and closed-loop adjusts the wavefront phase control in the process of generating the initial X-ray beam, constructs an adaptive detection process, and improves the stability and adaptability of the detection system during the detection of different batches of samples. Description of the Drawings

[0011] Figure 1 This is the flowchart of the method steps of the present invention. Detailed Embodiments

[0012] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0013] Referring to the attached Figure 1 drawings, a nut defect detection method based on X-ray imaging according to an embodiment of the present invention includes: S1. Generate and adjust the initial X-ray beam through a synchrotron radiation source, construct uniform irradiation field data for nut material detection, and obtain angular scattered light intensity matrix data based on the uniform irradiation field data; S2. Perform phase inversion and sparse constraint optimization on the angular scattered light intensity matrix data to generate optimized electron cloud density distribution data, and construct density connectivity graph data based on the optimized electron cloud density distribution data; S3. Extract local feature vector data based on the optimized electron cloud density distribution data, fuse the density connectivity graph data to construct fusion feature data, and identify abnormal regions based on the fusion feature data; S4. Classify the defect features and evaluate the deterioration risk of the fusion feature data determined to be abnormal to generate defect type classification data and failure risk level data, and generate deteriorated defect distribution map data based on the failure risk level data and the fusion feature data; S5. Compare the fusion feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data, update the feature extraction parameter data and the deterioration risk assessment parameter data based on the comparison result, and synchronously feedback the updated parameters to the process of generating the initial X-ray beam to form updated uniform irradiation field data, thereby completing the update of the nut defect detection method.

[0014] In S1, it includes: generating an initial X-ray beam through a synchrotron radiation source, performing energy resolution processing on the initial beam to screen photon data within a specified preset wavelength range, and performing spatial coherence adjustment to form initial irradiation beam data. Immediately afterwards, the initial irradiation beam data is subjected to phase modulation processing through wavefront correction, determining modulation parameters according to the nut material characteristics, and forming uniform irradiation field data; Adjust the spatial energy distribution of the X-ray according to the uniform irradiation field data, control the adjusted X-ray to irradiate the nut material, form a scattering pattern based on the electron cloud density perturbation, and collect the scattering pattern to form scattering signal data. Perform multi-angle collection on the scattering signal data through the angle step scanning method to form angle scattering intensity matrix data. The angle scattering intensity matrix data includes scattering intensity sub-data at multiple azimuths; It should be noted that the synchrotron radiation source is the electromagnetic radiation released when high-energy electrons move in a high-speed curved motion in a magnetic field. Its characteristics are high brightness, high coherence, and continuous wide-spectrum coverage; electrons are subjected to magnetic field effects in an accelerator orbit close to the speed of light to generate synchrotron radiation, and the radiation photon energy range can cover the X-ray band. Therefore, the synchrotron radiation source can generate an X-ray initial beam with controllable energy, wavelength, and directivity, meeting the requirements for the light source quality in high-resolution imaging and structure detection; In practical applications, the energy resolution processing is to screen the photons in the initial beam by setting an energy selection mechanism. According to the inverse relationship between photon energy and wavelength, set the preset wavelength range and correspondingly convert it into an energy interval. A monochromator device can be used for energy diffraction separation, and based on the Bragg diffraction principle, screen out the photon data that meets the preset wavelength range; the energy resolution processing includes but is not limited to execution logics such as grating diffraction, crystal monochromatization, or multilayer film reflection. By changing the diffraction angle or incident angle, realize the spatial separation and selection of photons with different energies, and output beam data that meets the wavelength requirements and has high energy purity; The wavefront correction methods include modulating the wavefront morphology of the irradiation beam through a phase plate, a wavefront encoder, or an adaptive optical element, correcting local phase distortion and uniforming the wavefront distribution; the phase modulation processing includes setting a phase delay function based on the target material characteristics, precisely controlling the phase offset of each region of the beam according to the spatial position, and forming a phase distribution that meets the preset uniformity and coherence requirements; the phase delay function includes the corresponding relationship between the spatial coordinates of the incident beam, the refractive index distribution of the target material, and the preset phase offset; In practical applications, the nut material characteristics include but are not limited to the electron cloud density distribution inside the nut, local refractive index changes, material thickness distribution, and internal microstructure uniformity. These characteristics are used to determine the modulation parameters to match the irradiation field phase distribution with the internal physical characteristics of the material.

[0015] S2 includes: inputting the angular scattering light intensity matrix data into the phase retrieval method, performing Fourier space inversion in the phase retrieval method to obtain preliminary phase distribution data; performing sparse constraint optimization on the preliminary phase distribution data through Laplacian regularization processing to obtain preliminary electron cloud density distribution data, performing local phase difference analysis on the preliminary electron cloud density distribution data, extracting local frequency characteristics and performing high-frequency compensation processing, and outputting optimized electron cloud density distribution data; Based on the optimized electron cloud density distribution data, a density connectivity relationship graph data is constructed through neighborhood density gradient analysis. The density connectivity relationship graph data includes position node data and gradient weight data; Among them, the phase retrieval method is based on the input angular scattering light intensity matrix data. First, the amplitude information contained in the angular scattering light intensity matrix data is initialized in the Fourier space and a random or estimated initial phase distribution is set. Subsequently, the amplitude information and the phase distribution information are combined to generate complex amplitude data, and the spatial domain image data is obtained through inverse Fourier transform; in the spatial domain, amplitude constraints are applied to match known physical conditions or sampling characteristics, and the Fourier forward transform is performed to return to the frequency domain. By iteratively updating the frequency domain phase information, the error between the complex amplitude data and the angular scattering light intensity matrix data is gradually reduced. Finally, after multiple iterations converge, preliminary phase distribution data that satisfies amplitude consistency and phase continuity is obtained; It should be noted that the Laplacian regularization processing for performing sparse constraint optimization is based on the preliminary phase distribution data. A regularization term with the Laplacian operator as the kernel function is constructed. By calculating the second derivative information of the preliminary phase distribution data, the sensitivity of local gradient changes is enhanced, high-frequency noise and non-physical oscillations are suppressed, combined with the sparse constraint objective, the weighted sum of the data fitting term and the Laplacian regularization term is minimized, and the preliminary phase distribution data is iteratively updated to make it highlight local significant features while maintaining the overall structural continuity. Finally, preliminary electron cloud density distribution data that conforms to the sparse distribution characteristics is obtained; Among them, the local phase difference analysis is based on the preliminary electron cloud density distribution data. First, a local window is selected in the spatial domain, the phase gradient distribution within the window is calculated, and the local phase change rate is extracted as the local frequency characteristic; subsequently, the local frequency characteristic is mapped to the frequency domain through Fourier transform, the local detail information corresponding to the high-frequency components is identified, and then a compensation function is constructed according to the high-frequency energy distribution characteristics to perform gain modulation on the high-frequency signal components, suppress low-frequency background interference and restore local microstructural characteristics. Finally, it returns to the spatial domain through inverse Fourier transform and outputs the optimized electron cloud density distribution data with enhanced details; In addition, the data of the density-connected relationship graph constructed based on the neighborhood density gradient analysis in S2 is based on the optimized electron cloud density distribution data. First, a local neighborhood window of a fixed size is selected in the spatial domain, and the density gradient values between each spatial position and its adjacent positions in the neighborhood are calculated. The spatial adjacency relationship is established according to the change trend of the density gradient values. Each spatial position is defined as a position node data, and the node data includes the three-dimensional coordinate information of this position. For any pair of adjacent position nodes, the corresponding density gradient difference is calculated as the gradient weight data of the edge connecting the two nodes. By traversing all spatial positions and neighborhood nodes, the node set and the edge set are constructed in sequence, and finally, the density-connected relationship graph data including the position node data and the corresponding gradient weight data is formed, which is used to describe the local connectivity and density change characteristics of the optimized electron cloud density distribution data.

[0016] In S3, it includes: inputting the optimized electron cloud density distribution data into the feature extraction method, performing local density gradient change extraction based on the convolution kernel operation in the feature extraction method to form local density change rate sub-data, and synchronously extracting local frequency perturbation sub-data based on the frequency space analysis method. The local density change rate sub-data and the local frequency perturbation sub-data are combined to form local feature vector data. Performing feature fusion processing on the local feature vector data and the density-connected relationship graph data to construct fused feature data. Inputting the fused feature data into the abnormal region recognition method. In the abnormal region recognition method, the absolute value determination range of the upper limit of the density change rate is set according to the local density change rate sub-data, and the lower threshold of the gradient weight is set according to the gradient weight data. Comparing the local density change rate sub-data and the gradient weight data extracted from the fused feature data respectively. If the absolute value of the local density change rate sub-data exceeds the absolute value determination range of the upper limit of the density change rate, and the gradient weight data is less than the lower threshold of the gradient weight, it is determined as abnormal. If the gradient weight data is less than the lower threshold of the gradient weight, it is determined as abnormal; otherwise, skip the current fused feature data and continue to process the next fused feature data. It should be noted that in the extraction of local density gradient changes based on convolutional kernel operations, first, the optimized distribution data of electron cloud density is used as the input, and the convolutional kernel is defined as a weight matrix with fixed scale and direction-sensitive characteristics. The convolutional kernel includes a horizontal gradient sub-kernel and a vertical gradient sub-kernel for capturing spatial gradient changes. In the spatial domain, the convolutional kernel is weighted and accumulated point by point with the input data in the form of a sliding window, and the local density change rates in the horizontal and vertical directions at each position are calculated respectively. By taking the square root of the sum of the squares of the local density change rates in the horizontal and vertical directions, the local density gradient amplitude at this position is obtained as the local density change rate sub-data. After this operation is completed by traversing the entire spatial domain, the complete local density change rate sub-data is output, which is used to describe the local density gradient change characteristics of the optimized distribution data of electron cloud density at each position. In addition, frequency space analysis takes the optimized distribution data of electron cloud density as the input, performs Fourier transform on the data, maps the density distribution in the spatial domain to the frequency domain, and obtains the corresponding frequency spectrum distribution. In the frequency domain, a local analysis window is set to extract the energy density characteristics of different frequency components, and the local perturbation characteristics corresponding to high-frequency components and medium-frequency components are mainly identified. By analyzing the distribution pattern of local frequency energy, the frequency perturbation amplitude corresponding to each position is calculated as the local frequency perturbation sub-data. This sub-data is used to characterize the change rate and detailed perturbation characteristics of the optimized distribution data of electron cloud density in the local area of the frequency domain. In the analysis of the distribution pattern of local frequency energy, first, a local frequency region is intercepted in the frequency domain with a local window of fixed size, the energy of each frequency component in the window is statistically analyzed, and the energy spectral density is calculated. Then, according to the distribution gradient of energy on the frequency coordinate, the energy change rate characteristics are extracted, and the distribution differences of energy in the high-frequency region and the low-frequency region are identified. Next, through the weighted integral of the change amplitude of energy density and the frequency position, the frequency perturbation amplitude corresponding to the center of each local window is calculated. Finally, the perturbation amplitudes of all local windows are summarized to form the complete local frequency perturbation sub-data.

[0017] In S4, it includes: classifying the defect features of the fusion feature data determined to be abnormal, performing defect type feature matching based on the local density change rate sub-data and the local frequency perturbation sub-data, and forming defect type classification data, which includes crack-type defect sub-data, cavity-type defect sub-data, and deterioration-type defect sub-data. The defect type classification data and the fusion feature data determined to be abnormal are synchronously input into the deterioration risk assessment. In the deterioration risk assessment, the local density change rate sub-data and the gradient weight data are extracted to construct the deterioration feature matrix data, which includes perturbation amplitude sub-data, connectivity feature sub-data, and density change trend sub-data. Set a disturbance amplitude determination interval based on the disturbance amplitude sub-data, set a connectivity threshold based on the connectivity feature sub-data, and set a change trend determination range based on the density change trend sub-data; if the disturbance amplitude sub-data exceeds the disturbance amplitude determination interval, and the connectivity feature sub-data is lower than the connectivity threshold, and the density change trend sub-data exceeds the change trend determination range, then output the failure risk level data; otherwise, skip the current deterioration feature matrix data and continue to process the next deterioration feature matrix data; The failure risk level data is the combined determination result based on the disturbance amplitude sub-data, the connectivity feature sub-data, and the density change trend sub-data, representing the classification result of the likelihood of deterioration or failure during the future evolution of the fusion feature data determined to be abnormal; Combine the failure risk level data with the fusion feature data determined to be abnormal, perform three-dimensional visualization processing to generate deterioration defect distribution map data. The deterioration defect distribution map includes the spatial coordinates of the fusion feature data determined to be abnormal and the corresponding failure risk levels; It should be noted that the meaning of performing defect type feature matching is based on the local density change rate sub-data and the local frequency disturbance sub-data extracted from the fusion feature data determined to be abnormal. Compare each fusion feature data with the preset defect type feature template in the feature space, calculate the similarity between the feature vectors, and determine the corresponding defect type based on the matching result with the highest similarity; specifically, by matching the spatial gradient pattern reflected by the local density change rate feature and the microstructural complexity reflected by the local frequency disturbance feature, divide the fusion feature data into crack-type defect sub-data, cavity-type defect sub-data, or deterioration-type defect sub-data, and finally form defect type classification data including different types of sub-data sets; In constructing the deterioration feature matrix data, first, based on the fusion feature data determined to be abnormal, extract the corresponding local density change rate sub-data and gradient weight data, and perform local statistics and dynamic analysis for each group of fusion feature data; Among them, the generation of the disturbance amplitude sub-data is achieved by dividing the window of the local density change rate sub-data, calculating the difference between the maximum amplitude and the minimum amplitude of the density change rate within the window, and calculating the local maximum gradient change range as the disturbance amplitude sub-data, which represents the degree of intensity of the local electron cloud density change; The generation of the connectivity feature sub-data is based on the extracted gradient weight data, constructing a local density connectivity relationship graph, counting the number of effective connections of each position node and the scale of the overall connected component in the graph, calculating the average connectivity and maximum connectivity indicators of the local area, and forming the connectivity feature sub-data, which is used to measure the continuity and integrity of the local microstructure; The generation of density change trend sub-data is achieved by tracking the distribution gradient of local density change rate sub-data in the spatial coordinate system, calculating the change rate of density gradient with spatial expansion in combination with multi-temporal scanning data, fitting the local change trend curve, extracting the trend growth rate and fluctuation frequency characteristics, and forming density change trend sub-data to describe the expansion rate and stability of the potential deterioration process; Finally, the disturbance amplitude sub-data, connectivity feature sub-data, and density change trend sub-data are combined according to the spatial coordinate correspondence relationship to construct the complete deterioration feature matrix data, which serves as the basic input for subsequent deterioration risk assessment; In addition, during the three-dimensional visualization process, the spatial coordinate sub-data of the fusion feature data determined to be abnormal is extracted, and the corresponding failure risk level data is paired with the spatial coordinate sub-data one by one to form a mapping relationship between the spatial position and the failure risk level; based on the mapping relationship, a three-dimensional coordinate system is constructed, with the spatial coordinate sub-data as the three-dimensional coordinate points and the failure risk level data as the attribute values of each coordinate point; in the three-dimensional coordinate system, a visualization technique based on volume rendering is adopted, and the discrete coordinate points are converted into continuous spatial volume data through spatial voxelization, and the failure risk level data is mapped to the color or transparency characteristics of the voxels; by scanning the voxel space through the ray casting method, a visualization image containing the spatial distribution characteristics of different failure risk levels is generated, and finally the deterioration defect distribution map data is output. The deterioration defect distribution map data completely contains the spatial coordinate sub-data of the fusion feature data determined to be abnormal and the corresponding failure risk level data, realizing the positioning and risk level classification display of the abnormal area in the three-dimensional space.

[0018] In S5, it includes: comparing the labels of the fusion feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data to form detection accuracy comparison result data, which includes classification correct rate sub-data and risk level prediction accuracy sub-data; among them, the labels for label comparison include the preset sample label sub-data corresponding to the defect type classification data and the preset risk level label sub-data corresponding to the failure risk level data, and the preset sample label sub-data and the preset risk level label sub-data are constructed based on the known nut defect characteristics and historical evolution trends; Perform feature extraction and parameter update on the classification correct rate sub-data and risk level prediction accuracy sub-data in the detection accuracy comparison result data, and adjust the parameters of the convolution kernel based on the local density change rate sub-data and local frequency perturbation sub-data to form updated feature extraction parameter data; Take the fusion feature data determined to be abnormal and the deterioration feature matrix data as inputs, and perform update processing on the deterioration risk assessment parameters based on the disturbance amplitude sub-data, connectivity feature sub-data, and density change trend sub-data to form updated deterioration risk assessment parameter data; The updated feature extraction parameter data and the updated degradation risk assessment parameter data are synchronously fed back to the initial beam generation process of the X-ray in S1, and the phase control parameters preset in the wavefront correction method are adjusted based on the synchronous feedback process to form updated uniform irradiation field data; the phase control parameters are used to adjust the wavefront structure of the X-ray irradiation field; The updated uniform irradiation field data is input into the next round of nut defect detection method based on X-ray imaging, thereby completing the update of the nut defect detection method; It should be noted that the logic of performing feature extraction and parameter updating on the classification accuracy sub-data and risk level prediction accuracy sub-data in the detection accuracy comparison result data in S5 is as follows: first, the classification accuracy sub-data and risk level prediction accuracy sub-data are extracted from the detection accuracy comparison result data, and their change trends in different detection batches are calculated respectively to form a performance change feature vector; based on the performance change feature vector, the decline amplitude and change rate of the classification performance and the risk prediction performance are analyzed to determine the feature sensitive dimensions corresponding to the local density change rate sub-data and the local frequency perturbation sub-data in the feature extraction method; combined with the sensitive dimension information, the weight parameters and size parameters of the convolution kernel are adjusted through the gradient descent method or the optimization strategy based on error back propagation, so that the convolution kernel has a higher responsiveness to the key change features when extracting local features; after completing the parameter update, the updated feature extraction parameter data is formed as the optimization basis for the subsequent feature extraction and defect recognition process; In adjusting the parameters of the convolution kernel, the local density change rate sub-data and the local frequency perturbation sub-data are used as input features, the gradient distribution characteristics of the local density change rate sub-data in the spatial domain are counted, and the local maximum gradient, average gradient and gradient change frequency are analyzed to determine the spatial scale of the area with significant density changes; the energy concentration and energy diffusion rate of the local frequency perturbation sub-data in the frequency domain are simultaneously counted to determine the spatial detail level of the frequency perturbation feature; according to the density change scale and the frequency perturbation level, the receptive field size of the convolution kernel is adjusted respectively, so that the convolution kernel size covers the area with significant density changes and takes into account the detailed characteristics of the frequency perturbation; on this basis, the spatial first-order derivative of the local gradient change rate and the local variance of the frequency perturbation amplitude are calculated, and according to the derivative change rate and the variance size, the distribution of the convolution kernel weight parameter is adjusted, so that the convolution kernel has a higher weighted response in the area with drastic density changes and the area with active frequency perturbations; through the above process, the updated convolution kernel size parameter and weight parameter are finally formed, which constitute the updated feature extraction parameter data; In the update process of deterioration risk assessment parameters, using the fused feature data and deterioration feature matrix data determined as abnormal as inputs, first extract the disturbance amplitude sub-data in the deterioration feature matrix data, and statistically calculate the maximum disturbance amplitude and the mean value of the disturbance amplitude distribution in each local area. According to the difference range between the maximum value and the mean value, adjust the upper and lower threshold values of the disturbance amplitude determination interval to make it dynamically adapt to different degrees of local deterioration features. Then extract the connectivity feature sub-data, calculate the mean value and standard deviation of the local connectivity, and adjust the connectivity threshold according to the dispersion degree of the connectivity to enhance the sensitivity to the low-connectivity deterioration area. Next, extract the density change trend sub-data, analyze the growth rate and fluctuation frequency of the local density change trend, and adjust the change trend determination range according to the growth rate distribution and the fluctuation amplitude to make it cover the feature intervals of the deterioration acceleration stage and the abnormal fluctuation stage. Through the above process, update the disturbance amplitude determination interval parameters, connectivity threshold parameters, and density change trend determination range parameters respectively, and combine them to form the updated deterioration risk assessment parameter data for subsequent use in determining the deterioration risk level. In addition, in S5, during the initial beam generation process of the synchronous feedback X-ray, using the updated feature extraction parameter data and the updated deterioration risk assessment parameter data as synchronous feedback inputs. First, map the convolution kernel size parameter and weight parameter in the feature extraction parameter data to the corresponding spatial resolution and local structure sensitivity requirements, and calculate the spatial resolution distribution function required for the target irradiation area. At the same time, convert the disturbance amplitude determination interval, connectivity threshold, and density change trend determination range in the deterioration risk assessment parameter data into the regulation requirements for the X-ray wavefront uniformity, phase gradient continuity, and spatial coherence length. Based on the above requirements, jointly construct a phase regulation constraint model with the spatial resolution distribution function and the coherence regulation requirements, and adjust the phase regulation parameters preset for the wavefront correction method, including the local phase delay amplitude and the phase distribution smoothness setting, by solving the optimal phase delay function. After the adjustment, re-execute the wavefront correction process based on the new phase regulation parameters to form the uniform irradiation field data that meets the updated detection requirements, and use it as the input for the X-ray initial beam generation process in S1 to complete the adaptive update closed-loop of the detection process.

[0019] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting nut defects based on X-ray imaging, characterized in that, Including: S1. Generate and adjust the initial X-ray beam through a synchrotron radiation source, construct uniform irradiation field data for nut material detection, and obtain angular scattered light intensity matrix data based on the uniform irradiation field data; S2. Perform phase inversion and sparse constraint optimization on the angular scattered light intensity matrix data to generate optimized electron cloud density distribution data, and construct density connectivity graph data based on the optimized electron cloud density distribution data; S3. Extract local feature vector data based on the optimized electron cloud density distribution data, fuse the density connectivity graph data to construct fused feature data, and identify abnormal regions based on the fused feature data; S4. Classify the defect features and evaluate the deterioration risk of the fused feature data determined to be abnormal to generate defect type classification data and failure risk level data, and generate deterioration defect distribution map data based on the failure risk level data and the fused feature data; S5. Compare the fused feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data, update the feature extraction parameter data and deterioration risk assessment parameter data based on the comparison result, and synchronously feedback the updated parameters to the generation process of the initial X-ray beam to form updated uniform irradiation field data, completing the update of the nut defect detection method.

2. A nut defect detection method based on X-ray imaging according to claim 1, wherein: In S1, it includes: generating the initial X-ray beam through a synchrotron radiation source, performing energy resolution processing on the initial beam to screen photon data within a specified preset wavelength range, and performing spatial coherence adjustment to form initial irradiation beam data. Immediately, perform phase modulation processing on the initial irradiation beam data through wavefront correction, and determine the modulation parameters according to the nut material characteristics to form uniform irradiation field data; Adjust the spatial energy distribution of the X-ray according to the uniform irradiation field data, control the adjusted X-ray to irradiate the nut material to form a scattering pattern based on the electron cloud density perturbation, collect the scattering pattern to form scattering signal data, and perform multi-angle collection on the scattering signal data through the angular step scanning method to form angular scattered light intensity matrix data, and the angular scattered light intensity matrix data includes scattered intensity sub-data at multiple azimuths.

3. A nut defect detection method based on X-ray imaging according to claim 2, wherein: In S2, it includes: inputting the angular scattered light intensity matrix data into the phase retrieval method, performing Fourier space inversion in the phase retrieval method to obtain preliminary phase distribution data; performing sparse constraint optimization on the preliminary phase distribution data through Laplacian regularization processing to obtain preliminary electron cloud density distribution data, performing local phase difference analysis on the preliminary electron cloud density distribution data, and outputting optimized electron cloud density distribution data by extracting local frequency features and performing high-frequency compensation processing; Construct density connectivity graph data based on the optimized electron cloud density distribution data through neighborhood density gradient analysis, and the density connectivity graph data includes position node data and gradient weight data.

4. A nut defect detection method based on X-ray imaging according to claim 3, wherein: In S3, it includes: inputting the optimized distribution data of electron cloud density into a feature extraction method, performing local density gradient change extraction based on convolution kernel operations in the feature extraction method to form local density change rate sub-data, and synchronously extracting local frequency perturbation sub-data based on frequency space analysis, and combining the local density change rate sub-data with the local frequency perturbation sub-data to form local feature vector data; Performing feature fusion processing on the local feature vector data and the density connectivity relationship graph data to construct fused feature data; inputting the fused feature data into an abnormal region recognition method, in the abnormal region recognition method, setting the absolute value determination range of the upper limit of the density change rate according to the local density change rate sub-data, and setting the lower threshold of the gradient weight according to the gradient weight data; Comparing the local density change rate sub-data extracted from the fused feature data with the gradient weight data respectively. If the absolute value of the local density change rate sub-data exceeds the absolute value determination range of the upper limit of the density change rate and the gradient weight data is less than the lower threshold of the gradient weight, it is determined as abnormal; If the gradient weight data is less than the lower threshold of the gradient weight, it is determined as abnormal; otherwise, skip the current fused feature data and continue to process the next fused feature data.

5. A nut defect detection method based on X-ray imaging according to claim 4, wherein: In S4, it includes: performing defect feature classification on the fused feature data determined to be abnormal, performing defect type feature matching based on the local density change rate sub-data and the local frequency perturbation sub-data, and forming defect type classification data, and the defect type classification data includes crack-type defect sub-data, cavity-type defect sub-data, and deterioration-type defect sub-data; Synchronously inputting the defect type classification data and the fused feature data determined to be abnormal into deterioration risk assessment. In the deterioration risk assessment, extracting the local density change rate sub-data and the gradient weight data to construct deterioration feature matrix data, and the deterioration feature matrix data includes perturbation amplitude sub-data, connectivity feature sub-data, and density change trend sub-data; Setting a perturbation amplitude determination interval according to the perturbation amplitude sub-data, setting a connectivity threshold according to the connectivity feature sub-data, and setting a change trend determination range according to the density change trend sub-data; if the perturbation amplitude sub-data exceeds the perturbation amplitude determination interval, and the connectivity feature sub-data is lower than the connectivity threshold, and the density change trend sub-data exceeds the change trend determination range, output failure risk level data; otherwise, skip the current deterioration feature matrix data and continue to process the next deterioration feature matrix data; The failure risk level data is the combined determination result based on the perturbation amplitude sub-data, the connectivity feature sub-data, and the density change trend sub-data, and represents the classification result of the fused feature data determined to be abnormal deteriorating or failing in the future evolution process; Combining the failure risk level data with the fused feature data determined to be abnormal, performing three-dimensional visualization processing to generate deterioration defect distribution map data, and the deterioration defect distribution map includes the spatial coordinates of the fused feature data determined to be abnormal and the corresponding failure risk level.

6. A method for detecting nut defects based on X-ray imaging according to claim 5, characterized in that: In S5, it includes: comparing the fusion feature data determined to be abnormal with the corresponding defect type classification data and failure risk level data for label comparison to form detection accuracy comparison result data, and the detection accuracy comparison result data includes classification correct rate sub-data and risk level prediction accuracy sub-data; Performing feature extraction and parameter update on the classification correct rate sub-data and risk level prediction accuracy sub-data in the detection accuracy comparison result data, and adjusting the parameters of the convolution kernel based on the local density change rate sub-data and local frequency perturbation sub-data to form updated feature extraction parameter data; Using the fusion feature data determined to be abnormal and the deterioration feature matrix data as inputs, and performing update processing on the deterioration risk assessment parameters based on the perturbation amplitude sub-data, connectivity feature sub-data, and density change trend sub-data to form updated deterioration risk assessment parameter data; Synchronously feedbacking the updated feature extraction parameter data and the updated deterioration risk assessment parameter data to the initial light beam generation process of the X-ray in S1, and adjusting the phase control parameters preset for the wavefront correction method based on the synchronous feedback process to form updated uniform irradiation field data; Inputting the updated uniform irradiation field data into the next round of the method for detecting nut defects based on X-ray imaging to complete the update of the method for detecting nut defects.

Citation Information

Cited By

  • Precise calibration method for external reference initial value of camera array based on space laser beam linear extrapolation

    CN120894434A

  • Camera array extrinsic parameter initial value precision calibration method for spatial laser beam straight extrapolation

    CN120894434B

  • AI-based automobile pipe fitting annular solder appearance detection system and method

    CN121095244A

  • Highway engineering geological survey intelligent identification method and system

    CN121167525A