Method and device for detecting material quality based on quantum sensor detection
By using multi-dimensional feature conversion and pre-trained model analysis based on quantum sensors, the problem of insufficient sensitivity of traditional sensors to the microstructure of materials is solved, enabling comprehensive and accurate detection and localization of material defects and generating detailed defect reports.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GONGCHENG MANAGEMENT CONSULTING
- Filing Date
- 2025-09-18
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional physical sensors have limited sensitivity to the microstructure of materials, and single-dimensional features are difficult to fully reflect the temporal evolution and spatial dependence of defects, resulting in insufficient comprehensiveness and accuracy of detection results. Furthermore, binary classification or single-type labels cannot quantify the spatial distribution probability and multiple types of defects.
A quantum sensor-based detection method is adopted to acquire quantum sensing data sequences. Multi-dimensional feature transformation is performed through a quantum feature extraction module to generate temporal coherence features, spatial coherence features, and coherent noise features. A pre-trained defect diagnosis model is called to output defect probability distribution and type confidence information, thereby generating defect location and type classification information.
It enables comprehensive and accurate detection of internal defects in materials, provides richer defect descriptions, offers precise basis for subsequent analysis, reduces delays and errors in manual analysis, and improves the comprehensiveness and accuracy of detection.
Smart Images

Figure CN121032330B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quality inspection, and more specifically, to a method and apparatus for material quality inspection based on quantum sensor detection. Background Technology
[0002] Materials quality testing is a crucial technology for ensuring material performance and application safety. Its core lies in collecting data through sensors and analyzing internal defects within the material. Currently, common materials quality testing methods typically utilize traditional physical sensors (such as ultrasonic and X-ray detectors) to collect macroscopic physical quantities such as echo intensity and attenuation coefficients. Defects are analyzed by extracting single-dimensional temporal or spatial characteristics (such as amplitude variation and statistical distribution), ultimately outputting a binary classification result indicating the presence or absence of defects or a single-type defect label. However, traditional physical quantities have limited sensitivity to the microstructure of materials (such as lattice defects and stress distribution), and single-dimensional characteristics cannot fully reflect the temporal evolution and spatial dependence of defects, resulting in insufficient comprehensiveness and accuracy of the test results. Furthermore, the binary classification or single-type label output format cannot quantify the spatial distribution probability and multiple types of defects, making it difficult to directly support subsequent precise processing decisions. Summary of the Invention
[0003] This invention provides a material quality detection method and apparatus based on quantum sensor detection.
[0004] In a first aspect, the present invention provides a material quality detection method based on quantum sensor detection. The method includes: acquiring a raw quantum sensing data sequence collected by the quantum sensor in a material detection scenario, wherein the raw quantum sensing data sequence contains quantum state coherence measurements over a continuous detection period, and each measurement corresponds to the quantum coherence characteristics of a corresponding region within the material; performing multi-dimensional feature transformation processing on the raw quantum sensing data sequence through a quantum feature extraction module to generate a quantum feature set reflecting the internal structural characteristics of the material, wherein the quantum feature set includes temporal coherence features, spatial coherence features, and coherent noise features; and calling a pre-trained defect diagnosis model to analyze the quantum features. The data set is subjected to defect pattern analysis and processing, outputting defect probability distribution information and defect type confidence information within the material. The defect probability distribution information indicates the probability value of defects existing in each region of the material, and the defect type confidence information includes the identification confidence of different defect types. Based on the defect probability distribution information and defect type confidence information, the defect location information and defect type classification information of the material are determined. The defect location information includes a set of spatial coordinates of the defect area, and the defect type classification information includes dominant defect types and secondary defect types. A quality inspection report containing a defect spatial distribution map and a type analysis table is generated based on the defect location information and defect type classification information.
[0005] Secondly, embodiments of the present invention provide a material quality testing device, the device comprising: a data acquisition module, configured to acquire a raw quantum sensing data sequence collected by a quantum sensor in a material testing scenario, the raw quantum sensing data sequence containing quantum state coherence measurements during a continuous testing period, each measurement corresponding to the quantum coherence characteristics of a corresponding region within the material; a feature conversion module, configured to perform multi-dimensional feature conversion processing on the raw quantum sensing data sequence through a quantum feature extraction module to generate a set of quantum features reflecting the internal structural characteristics of the material, the set of quantum features including temporal coherence features, spatial coherence features, and coherent noise features; and a defect analysis module, configured to call a pre-trained defect diagnosis model to analyze the quantum state coherence of the material. The feature set is used for defect pattern analysis and processing, outputting defect probability distribution information and defect type confidence information within the material. The defect probability distribution information indicates the probability value of defects existing in each region of the material, and the defect type confidence information includes the identification confidence of different defect types. A defect classification module is used to determine defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information. The defect location information includes a set of spatial coordinates of the defect area, and the defect type classification information includes dominant and secondary defect types. A report generation module is used to generate a quality inspection report containing a defect spatial distribution map and a type analysis table based on the defect location information and defect type classification information.
[0006] The material quality detection method based on quantum sensor detection provided by this invention acquires the original quantum sensing data sequence collected by the quantum sensor. Utilizing the sensitive data foundation—the quantum state coherence measurement values during continuous detection periods, which differ from traditional physical quantities—it can capture subtle changes in the internal microstructure of the material. A quantum feature extraction module performs multi-dimensional feature transformation on the data, generating temporal coherence features, spatial coherence features, and coherent noise features. This covers the temporal evolution law, spatial dependence, and background interference information of material defects, avoiding the one-sidedness of single-dimensional feature extraction. Finally, a pre-trained defect diagnosis model is invoked to output defect probability distribution information and defect... Type confidence information, presented in the form of quantified probability values and multi-type confidence levels, provides richer defect descriptions and more accurate basis for subsequent analysis. Based on the above information, defect location information and defect type classification information are determined, realizing the correlation and matching between defect spatial location and type, ensuring information consistency. A quality inspection report containing a defect spatial distribution map and type analysis table is generated and transmitted to the material quality control system, enabling the inspection results to be directly used to trigger defect handling processes, reducing the delay and error of manual analysis. This improves the comprehensiveness, accuracy, and processing efficiency of internal defect detection in materials, while providing more reliable decision support for material quality control. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a flowchart of a material quality detection method based on quantum sensor detection provided in an embodiment of the present invention;
[0009] Figure 2 This is a schematic diagram of the composition of a material quality testing device provided in an embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0011] Please see Figure 1 The flowchart below shows a material quality detection method based on quantum sensor detection provided by an embodiment of the present invention. The method may include the following steps: A material quality detection method based on quantum sensor detection may specifically include the following steps S100~S500: Step S100: Obtain the original quantum sensing data sequence collected by the quantum sensor in the material detection scenario. The original quantum sensing data sequence contains the quantum state coherence measurement values of continuous detection time periods, and each measurement value corresponds to the quantum coherence characteristics of the corresponding region inside the material.
[0012] The raw quantum sensing data sequence is a collection of data acquired by a quantum sensor in a materials detection scenario, presented in sequence form. The quantum state coherence measurement value is a quantitative measure of the degree of coherence of quantum states; the coherence of quantum states reflects the correlation and interference characteristics between quantum states in a quantum system. Each measurement value corresponds to the quantum coherence characteristics of a specific region within the material. When acquiring the raw quantum sensing data sequence, the quantum sensor continuously measures the material over consecutive detection periods. For example, when detecting a piece of metal, a quantum sensor is placed around the material, and the sensor measures the quantum state coherence within the material at regular time intervals. Each measurement yields a quantum state coherence measurement value, and over time, this forms the raw quantum sensing data sequence containing measurements from consecutive detection periods.
[0013] Step S200: The original quantum sensing data sequence is processed by multi-dimensional feature transformation through the quantum feature extraction module to generate a set of quantum features that reflect the internal structural features of the material. The set of quantum features includes temporal coherence features, spatial coherence features, and coherent noise features.
[0014] The quantum feature extraction module processes and analyzes raw quantum sensing data sequences, extracting representative features from the raw data. Multi-dimensional feature transformation processing refers to analyzing and transforming the raw data from multiple dimensions to obtain more comprehensive information. Temporal coherence features reflect the changing trend of quantum state coherence properties over time, such as whether quantum coherence is increasing or decreasing; spatial coherence features reflect the spatial dependence between quantum coherence properties in different regions within the material, such as whether coherence changes synchronously or asynchronously in adjacent or non-adjacent regions; coherence noise features reflect measurement errors of the quantum sensor or random interference in non-defect regions of the material. By performing multi-dimensional feature transformation processing on the raw quantum sensing data sequences through the quantum feature extraction module, the raw data is transformed into a more characteristic and representative set of quantum features. For example, when processing raw quantum sensing data sequences, the quantum feature extraction module analyzes from both temporal and spatial dimensions. For the temporal dimension, it extracts the changing trend of quantum coherence properties in adjacent detection periods; for the spatial dimension, it analyzes the spatial correlation between the measurement values of different quantum sensors within the same detection period. Then, the difference between temporal coherence features and spatial coherence features is calculated to extract coherent noise features. Finally, these features are integrated to generate a quantum feature set containing temporal coherence features, spatial coherence features, and coherent noise features. The quantum feature extraction module can adopt a deep learning-based architecture, such as a combination of convolutional neural networks (CNNs) and recurrent neural networks (RNNs), with CNNs handling spatial features and RNNs handling temporal features.
[0015] As one implementation method, step S200 may specifically include the following steps S210~S250: Step S210: Input the original quantum sensing data sequence into the time feature processing unit of the quantum feature extraction module, perform time-series feature extraction processing on the quantum state coherence measurement values of continuous detection periods, and extract the changing trend of quantum coherence characteristics of adjacent detection periods as time coherence features. The changing trend includes coherence enhancement trend and coherence decay trend.
[0016] The temporal feature processing unit of the quantum feature extraction module is a dedicated part for processing temporal features. Temporal feature extraction analyzes and processes the quantum state coherence measurements over consecutive detection periods in chronological order to extract temporal features. The changing trend of quantum coherence characteristics between adjacent detection periods reflects how quantum state coherence changes within adjacent time intervals, and is categorized into coherence enhancement trends and coherence decay trends. After the original quantum sensing data sequence is input into the temporal feature processing unit, this unit performs a series of processing steps to extract temporal coherence features. For example, when processing the original quantum sensing data sequence over a consecutive detection period, the temporal feature processing unit first preprocesses the data to remove noise and outliers. Then, by calculating the difference or rate of change of quantum state coherence measurements between adjacent detection periods, it determines whether the quantum coherence characteristics are enhancing or decaying. If the difference is positive and exceeds a certain threshold, an enhancing coherence trend is considered; if the difference is negative and exceeds a certain threshold, a decaying coherence trend is considered. The temporal feature processing unit can use a sliding window method to extract temporal features, and calculate the changing trend of adjacent detection time periods by continuously moving the window.
[0017] As one implementation method, step S210 may specifically include the following steps S211~S215: Step S211: Divide the original quantum sensing data sequence into time windows to obtain multiple sub-data sequences with continuous time period association, each sub-data sequence containing a preset number of continuous detection time period measurement values.
[0018] Time windowing is the process of dividing the original quantum sensing data sequence into multiple sub-data sequences according to a certain time length. Each sub-data sequence contains a preset number of measurements for consecutive detection periods. These sub-data sequences are correlated with each other, meaning that adjacent sub-data sequences are temporally continuous. Time windowing divides the original data sequence into multiple smaller sub-data sequences, facilitating subsequent analysis and processing. For example, assuming the original quantum sensing data sequence contains measurements for 100 consecutive detection periods, and each sub-data sequence contains measurements for 10 consecutive detection periods, then the original data sequence can be divided into 10 sub-data sequences, each containing 10 consecutive measurements. When dividing the time window, a fixed window size method can be used, starting from the beginning of the original data sequence and sequentially extracting sub-data sequences of a preset length.
[0019] Step S212: Perform differential operation on each sub-data sequence, calculate the difference between the quantum state coherence measurement values of adjacent detection periods, and generate a differential feature sequence that reflects the rate of coherence change.
[0020] Differential processing involves subtracting the quantum state coherence measurements from adjacent detection time periods within each sub-data sequence to obtain their differences. These differences reflect the changes in quantum state coherence within adjacent detection time periods, forming a differential feature sequence that reflects the rate of coherence change. For example, for the measurements [1.2, 1.5, 1.3, 1.6] in a sub-data sequence, differential processing yields the differential feature sequence [0.3, -0.2, 0.3]. Differential processing can be implemented using subtraction operations; for instance, it can be achieved by iterating through the sub-data sequences, calculating the differences between adjacent measurements sequentially, and storing each difference in a new sequence to generate the differential feature sequence.
[0021] Step S213: Perform sliding window averaging on the differential feature sequence to eliminate random noise interference and generate a smoothed rate of change curve.
[0022] Sliding window averaging is a method for smoothing difference feature sequences. It involves sliding a fixed-size window across the difference feature sequence, calculating the average value within each window, and replacing the data at the center of the window with this average. This eliminates random noise interference in the difference feature sequence, making the rate of change curve smoother. For example, for the difference feature sequence [0.3, -0.2, 0.3, 0.1, -0.1], assuming a sliding window size of 3, the first window contains [0.3, -0.2, 0.3], with an average value of (0.3 - 0.2 + 0.3) / 3 = 0.133. This average value replaces the -0.2 at the center of the window. This process is repeated for each window to obtain the smoothed rate of change curve. Sliding window averaging can be implemented using a loop program that slides the window according to its size, calculates the average value within each window, and updates the corresponding position in the sequence.
[0023] Step S214: Extract the rising edge and falling edge features from the rate of change curve, which correspond to the starting point of the quantum coherence enhancement trend and the starting point of the quantum coherence decay trend, respectively.
[0024] Rising and falling edge features are important characteristic points in the rate of change curve. A rising edge feature corresponds to the starting point of the increasing trend in quantum coherence, i.e., the point where the rate of change curve changes from a negative value to a positive value; a falling edge feature corresponds to the starting point of the decreasing trend in quantum coherence, i.e., the point where the rate of change curve changes from a positive value to a negative value. These characteristic points can be extracted by traversing the rate of change curve and comparing the values of adjacent data points. For example, in the rate of change curve [0.1, 0.2, -0.1, -0.2, 0.3], the change from 0.2 to -0.1 is a falling edge characteristic point; the change from -0.2 to 0.3 is a rising edge characteristic point. In the program implementation, conditional statements can be used to compare the values of adjacent data points. When the rising or falling edge condition is met, the position of that point is recorded as a characteristic point.
[0025] Step S215: Based on the rising edge features and falling edge features, and combined with the slope information of the rate of change curve, generate time coherence features that include the intensity of the strengthening trend and the intensity of the weakening trend.
[0026] Rising-edge and falling-edge features determine the starting points of the quantum coherence enhancement and decay trends, respectively, while the slope of the rate of change curve reflects the speed of quantum coherence change. Combining these two aspects, temporal coherence features containing the strength of the enhancement and decay trends can be generated. The strength of the enhancement and decay trends quantifies the degree of quantum coherence enhancement and decay, respectively. For example, in the rate of change curve, a larger slope after the rising-edge feature point indicates a faster rate of quantum coherence enhancement and a stronger enhancement trend; a larger slope after the falling-edge feature point indicates a faster rate of quantum coherence decay and a stronger decay trend. When generating temporal coherence features, the average slope of the rate of change curve within a certain range after the rising-edge and falling-edge feature points can be calculated, and the average slope can be used as a measure of the strength of the enhancement and decay trends. Specifically, N data points after the rising-edge or falling-edge feature point can be selected, and the average slope among these data points can be calculated.
[0027] Step S220: Input the original quantum sensing data sequence into the spatial feature processing unit of the quantum feature extraction module, perform spatial correlation analysis on the quantum state coherence measurement values of different quantum sensors during the same detection period, and extract the spatial dependence of quantum coherence characteristics in different regions inside the material as spatial coherence features. The spatial dependence includes the synchronous change relationship of coherence in adjacent regions and the asynchronous change relationship of coherence in non-adjacent regions.
[0028] The spatial feature processing unit of the quantum feature extraction module is responsible for processing spatial dimensional features. Spatial correlation analysis analyzes the quantum state coherence measurements of different quantum sensors during the same detection period to identify their spatial dependencies. Synchronous changes in coherence in adjacent regions indicate that the quantum coherence properties of adjacent regions within the material change simultaneously in the same direction; asynchronous changes in coherence in non-adjacent regions indicate that the changes in quantum coherence properties in non-adjacent regions are not synchronous. After inputting the raw quantum sensing data sequence into the spatial feature processing unit, this unit analyzes the measurements from different sensors during the same detection period. For example, when detecting a material, multiple quantum sensors are deployed at different locations on the material. During the same detection period, these sensors output their respective quantum state coherence measurements. The spatial feature processing unit performs correlation analysis on these measurements to determine the relationship between the quantum coherence properties of adjacent and non-adjacent regions. Spatial dependencies can be determined by calculating the correlation coefficient between the measurements from different sensors; the closer the correlation coefficient is to 1, the higher the degree of synchronous changes in coherence; a correlation coefficient close to 0 or negative indicates a higher degree of asynchronous changes in coherence. The spatial feature processing unit can use matrix operations to perform spatial correlation analysis, arranging the measurement values of different sensors into a matrix and then performing correlation calculations.
[0029] As one implementation method, step S220 may specifically include the following steps S221 to S227: Step S221: Obtain the quantum state coherence measurement values of different quantum sensors during the same detection period, and arrange them according to the spatial position of the sensors to form a two-dimensional spatial data array.
[0030] The quantum state coherence measurements of different quantum sensors during the same detection period are data obtained by each quantum sensor measuring different regions of the material at the same time. Arranging these measurements according to their spatial positions to form a two-dimensional spatial data array involves arranging these measurements according to the sensor's position in space, forming a two-dimensional matrix structure. For example, assuming nine quantum sensors are arranged in a 3×3 grid, and during the same detection period, these sensors output measurement values [1.2, 1.5, 1.3, 1.6, 1.4, 1.7, 1.1, 1.3, 1.5], these measurements can be arranged according to their spatial positions to form a two-dimensional spatial data array [[1.2, 1.5, 1.3], [1.6, 1.4, 1.7], [1.1, 1.3, 1.5]]. In practice, the measurement values can be stored sequentially in a two-dimensional array using the sensor's number and its corresponding spatial position information, thus forming a two-dimensional spatial data array.
[0031] Step S222: Perform neighborhood correlation calculation on the spatial data array, calculate the correlation coefficient between the measurement values of each sensor position and the adjacent sensor positions, and generate a neighborhood correlation matrix that reflects the degree of coherence synchronization in the local area.
[0032] Neighborhood correlation calculation is an operation that performs correlation analysis on the measurements of each sensor location in a spatial data array and its neighboring sensor locations. The correlation coefficient is an indicator that measures the degree of linear correlation between two variables. By calculating the correlation coefficient between each sensor location and the measurements of its neighboring sensor locations, a neighborhood correlation matrix reflecting the degree of coherence and synchronization in a local area can be obtained. For example, for a sensor location in a two-dimensional spatial data array, its neighboring sensor locations might be its vertical, horizontal, and vertical positions. The correlation coefficients between this sensor location and the measurements of its neighboring sensor locations are calculated, and these coefficients are stored in the corresponding positions in the neighborhood correlation matrix. The correlation coefficient can be calculated using the Pearson correlation coefficient formula. For example, it is possible to iterate through each sensor location in the spatial data array, calculate its correlation coefficient with the measurements of its neighboring sensor locations, and store the results in the neighborhood correlation matrix.
[0033] Step S223: Perform a global correlation calculation operation on the spatial data array, calculate the correlation coefficient between the measurement values of each sensor location and all other sensor locations, and generate a global correlation matrix that reflects the degree of coherence and cooperation in the global region.
[0034] Global correlation calculation is an operation that performs correlation analysis between the measurements of each sensor location in a spatial data array and all other sensor locations. By calculating these correlation coefficients, a global correlation matrix is generated that reflects the degree of coherence coordination across the entire region. Unlike neighborhood correlation calculation, global correlation calculation considers the relationships between all sensor locations, not just adjacent ones. For example, for a spatial data array with N sensors, the correlation coefficient for each sensor location is calculated with the measurements of the other N-1 sensor locations. These coefficients are stored in an N×N matrix, forming the global correlation matrix. Each element in the global correlation matrix represents the degree of correlation between the measurements of one sensor location and another, reflecting the degree of coordination of quantum coherence properties within the global region. When calculating the correlation coefficients, the Pearson correlation coefficient formula can also be used, employing a double loop to traverse the spatial data array, calculating the correlation coefficient between each sensor location and the measurements of all other sensor locations, and storing it in the global correlation matrix.
[0035] Step S224: Perform a difference calculation operation between the neighborhood correlation matrix and the global correlation matrix to extract the difference features of the degree of coherence correlation between the local and global regions. The difference features represent the spatial heterogeneity of the regional coherence dependency.
[0036] The difference calculation operation involves subtracting corresponding elements from the neighborhood correlation matrix and the global correlation matrix to obtain their differences. These differences reflect the variations in the degree of coherence between local and global contexts, forming a difference feature representing the spatial heterogeneity of regional coherence dependencies. For example, the difference between the element (1,2) in the neighborhood correlation matrix and the element (1,2) in the global correlation matrix is the difference feature corresponding to that position. In the program implementation, a double loop can be used to traverse the neighborhood correlation matrix and the global correlation matrix, subtract corresponding elements, and store the results in a new matrix to obtain the difference feature matrix.
[0037] Step S225: Based on the neighborhood correlation matrix, global correlation matrix and difference features, identify regions within the material where coherence changes synchronously, and the coherence measurements of sensor locations within these regions are highly positively correlated.
[0038] Region clusters refer to sets of regions within a material that exhibit synchronous changes in coherence, where the coherence measurements of sensor locations within a cluster show a high positive correlation. These region clusters can be identified based on neighborhood correlation matrices, global correlation matrices, and differential characteristics. For example, a correlation coefficient threshold can be set; when elements in the neighborhood or global correlation matrices exceed this threshold, and the differential characteristics are within a certain range, these sensor locations are considered to belong to the same region cluster. Clustering algorithms, such as K-means clustering, can be used to identify region clusters. Using sensor locations as data points and correlation coefficients and differential characteristics as features, clustering algorithms group data points with similar characteristics into the same cluster, thereby identifying the region clusters.
[0039] Step S226: Calculate the coverage area and internal correlation strength of each region cluster. The coverage area represents the number of sensor locations contained in the region cluster, and the correlation strength represents the average value of the correlation coefficient within the region cluster.
[0040] Coverage refers to the number of sensor locations contained in a cluster, reflecting the size of the cluster. Internal correlation strength is the average of the correlation coefficients among all sensor locations within a cluster, reflecting the degree of coherence and synchronization among them. For example, for a cluster containing 5 sensor locations with correlation coefficients of [0.8, 0.9, 0.7, 0.8, 0.9], the coverage is 5, and the internal correlation strength is (0.8 + 0.9 + 0.7 + 0.8 + 0.9) / 5 = 0.82. When calculating coverage, the number of sensor locations within a cluster can be directly calculated; when calculating internal correlation strength, all correlation coefficients within the cluster can be summed and then divided by the number of coefficients to obtain the average value.
[0041] Step S227: Combine the coverage, association strength and spatial heterogeneity differences of the regional clusters to form spatial coherence features that include local synchronization, global collaboration and spatial heterogeneity information.
[0042] By combining the coverage, correlation strength, and spatial heterogeneity differences of regional clusters, spatial coherence features are formed that encompass local synchronization, global coordination, and spatial heterogeneity information. These three features describe the spatial dependence of the quantum coherence properties within the material from different perspectives. For example, the coverage, correlation strength, and spatial heterogeneity differences can be arranged into a vector in a certain order to serve as spatial coherence features. When combining these features, different weights can be assigned according to their importance, and then a weighted combination can be performed to obtain more representative spatial coherence features.
[0043] Step S230: Calculate the difference between the temporal coherence feature and the spatial coherence feature, and extract the part of the difference feature that exceeds the stable range as the coherent noise feature. The coherent noise feature reflects the measurement error of the quantum sensor or the random interference in the non-defect region of the material.
[0044] Calculating the difference between temporal and spatial coherence features involves comparing the two features and obtaining their difference. A stable range is a pre-defined range; when the difference exceeds this range, the excess is considered coherent noise. Coherent noise features reflect measurement errors in quantum sensors or random interference in non-defect regions of materials. For example, if the temporal coherence feature is [0.3, 0.2, 0.4] and the spatial coherence feature is [0.1, 0.3, 0.2], their difference is calculated as [0.2, -0.1, 0.2]. Assuming a stable range of [-0.1, 0.1], the portion exceeding this range [0.2, 0.2] is considered coherent noise. When calculating the difference, corresponding elements of the temporal and spatial coherence features can be directly subtracted; when extracting coherent noise features, the difference can be iterated through, and elements exceeding the stable range can be selected to form new features.
[0045] Step S240: Input the temporal coherence features, spatial coherence features, and coherent noise features into the feature fusion unit of the quantum feature extraction module. Perform time-dependent modeling processing on the temporal coherence features, spatial coherence features, and coherent noise features through a gated recurrent network to generate a fused feature sequence with spatiotemporal consistency. The fused feature sequence contains the correlation information between the time dimension and the spatial dimension.
[0046] The feature fusion unit in the quantum feature extraction module is used to fuse different types of features. A gated recurrent network (GRU) is a type of recurrent neural network capable of handling temporal dependencies in sequential data. After inputting temporally coherent features, spatially coherent features, and coherent noise features into the feature fusion unit, the GRU performs temporal dependency modeling on these features, generating a fused feature sequence with spatiotemporal consistency. For example, the GRU processes the input features based on the temporal information in the temporally coherent features and the spatial information in the spatially coherent features, learning the correlation between them. At each time step, the GRU updates the current hidden state based on the current input features and the hidden state of the previous time step, and outputs a fused feature. Through processing over multiple time steps, a fused feature sequence is finally generated. When implementing a GRU, deep learning frameworks such as TensorFlow or PyTorch can be used to build a GRU model, and the input feature sequence can be fed into the model for training and prediction.
[0047] Step S250: Perform feature standardization on the fused feature sequence, eliminate the dimensional differences of different feature dimensions through normalization operations, and generate a quantum feature set containing temporal coherence features, spatial coherence features, coherent noise features and fused feature sequence.
[0048] Feature standardization is a normalization operation performed on the fused feature sequence to eliminate dimensional differences between different feature dimensions. Normalization maps the data in the fused feature sequence to a specific range, such as [0,1] or [-1,1]. By normalizing, data from different feature dimensions can have the same scale, facilitating subsequent analysis and processing. For example, for a feature dimension in the fused feature sequence with a data range of [10,100], normalization can map it to the range [0,1]. Commonly used normalization methods include min-max normalization and Z-score normalization. The min-max normalization formula is: (x-min) / (max-min), where x is the original data, and min and max are the minimum and maximum values of the data, respectively. In program implementation, a loop can be used to iterate through each feature dimension of the fused feature sequence, performing normalization on the data in each dimension, ultimately generating a quantum feature set containing temporal coherence features, spatial coherence features, coherent noise features, and the fused feature sequence.
[0049] Step S300: Call the pre-trained defect diagnosis model to perform defect pattern analysis on the quantum feature set, and output the defect probability distribution information and defect type confidence information inside the material. The defect probability distribution information marks the probability value of defects in each region of the material, and the defect type confidence information includes the identification confidence of different defect types.
[0050] The pre-trained defect diagnosis model is a model pre-trained to identify material defects. Defect pattern analysis involves inputting the quantum feature set into the defect diagnosis model, allowing the model to analyze defect patterns within the material. Defect probability distribution information labels the probability values of defects in different regions of the material; these probability values reveal which regions within the material are likely to contain defects. Defect type confidence information includes the recognition confidence of different defect types, reflecting the model's accuracy in identifying different defect types. For example, for a material, the defect probability distribution information might show a probability of 0.8 for a certain region containing a defect, indicating that the region is very likely to contain a defect; the defect type confidence information might show a recognition confidence of 0.9 for a certain defect type, indicating that the model's recognition accuracy for that defect type is high. When the pre-trained defect diagnosis model is invoked, the quantum feature set is used as input. The model processes the input based on its internal parameters and structure, outputting defect probability distribution information and defect type confidence information. Pre-trained defect diagnosis models can employ deep neural network architectures, such as multilayer perceptrons (MLP) or convolutional neural networks (CNN). During training, a large amount of labeled data is used to train the model, enabling it to learn the relationship between different sets of quantum features and defect patterns.
[0051] As one implementation method, step S300 may specifically include the following steps S310~S350: Step S310: Input the fused feature sequence in the quantum feature set into the feature embedding layer of the defect diagnosis model, and map the fused feature sequence to the high-dimensional feature space through linear transformation to generate an embedded feature vector. The embedded feature vector retains the spatiotemporal correlation information of the original features.
[0052] The feature embedding layer of a defect diagnosis model is used to transform the input features. A linear transformation maps the input fused feature sequence to a high-dimensional feature space. The embedded feature vector is the vector obtained after the linear transformation, preserving the spatiotemporal correlation information of the original features. For example, if the fused feature sequence is a vector of length 10, the linear transformation of the feature embedding layer maps it to a high-dimensional feature space of length 20, resulting in the embedded feature vector. The linear transformation can be implemented using matrix multiplication. The feature embedding layer can be represented as a weight matrix; multiplying the fused feature sequence by the weight matrix yields the embedded feature vector. When implementing the feature embedding layer, a fully connected layer from a deep learning framework can be used. The input fused feature sequence is fed into the fully connected layer, which automatically performs the linear transformation and outputs the embedded feature vector.
[0053] Step S320: The embedded feature vector is processed by multi-level feature extraction through the feature perception layer of the defect diagnosis model. The first level extracts fine defect features of local areas, the second level extracts structural defect features of medium scale range, and the third level extracts distributed defect features of global range.
[0054] The feature-aware layer of the defect diagnosis model is used to extract features from the embedded feature vectors. Multi-level feature extraction involves extracting features from the embedded feature vectors at different scales. The first level extracts fine-grained defect features in local regions, reflecting the details of defects in small areas within the material. The second level extracts structural defect features at a medium scale, reflecting the defect structure in medium-sized areas within the material. The third level extracts distributed defect features globally, showing the overall defect distribution within the material. For example, for an embedded feature vector of a material, the first level of feature extraction might focus on minute defects in a small region; the second level might focus on structural deformation in a medium-sized region; and the third level might focus on the overall defect distribution pattern of the material. The feature-aware layer can employ a convolutional neural network (CNN) structure, using convolutional kernels of different sizes and different convolutional operations to achieve multi-level feature extraction.
[0055] As one implementation method, step S320 involves performing multi-level feature extraction processing on the embedded feature vector through the feature perception layer of the defect diagnosis model. The first level extracts fine defect features of local areas, the second level extracts structural defect features in the medium-scale range, and the third level extracts distributed defect features in the global range. Specifically, this may include the following steps S321 to S325: Step S321: The embedded feature vector is input into the first-level processing unit of the feature perception layer. The local feature extraction operation extracts the defect detail features of a small area inside the material. The local feature extraction operation retains high-resolution feature information.
[0056] The first-level processing unit of the feature-aware layer is specifically designed to extract fine-grained defect features from local regions. Local feature extraction operations process the embedded feature vector to extract detailed defect features from small areas within the material. These operations preserve high-resolution feature information, enabling accurate identification of defects in small regions. For example, given an embedded feature vector of a material, the first-level processing unit can use a small-sized convolutional kernel to perform convolution operations on the embedded feature vector, extracting local features. The small-sized convolutional kernel can capture detailed information from small areas within the material, thus extracting fine-grained defect features. To implement local feature extraction, convolutional layers in a convolutional neural network can be used, with appropriate kernel size and stride settings, to perform convolution operations on the embedded feature vector and output the fine-grained defect features of the local region.
[0057] Step S322: Input the embedded feature vector into the second-level processing unit of the feature perception layer, and extract the defect structure features of the medium-range area inside the material through the mesoscale feature extraction operation. The mesoscale feature extraction operation reduces the resolution by feature downsampling to expand the perception range.
[0058] The second-level processing unit of the feature perception layer is used to extract structural defect features at a medium scale. The medium-scale feature extraction operation processes the embedded feature vector to extract structural defect features in a medium-sized region within the material. To expand the perception range, the medium-scale feature extraction operation reduces resolution through feature downsampling. For example, pooling operations can be used to downsample the embedded feature vector, reducing the feature dimensionality and thus expanding the perception range. The downsampled features can reflect the overall structural information of a medium-sized region within the material, extracting structural defect features. In implementing the medium-scale feature extraction operation, pooling layers in convolutional neural networks, such as max-pooling or average-pooling layers, can be used to downsample the embedded feature vector and combined with convolutional layers for feature extraction.
[0059] Step S323: Input the embedded feature vector into the third-level processing unit of the feature perception layer, and extract the defect distribution features of the entire material through global feature extraction operation. The global feature extraction operation further reduces the resolution by downsampling to cover the entire material area.
[0060] The third-level processing unit of the feature perception layer is used to extract globally distributed defect features. Global feature extraction processes the embedded feature vectors to extract the overall defect distribution features within the material. To cover the entire material region, global feature extraction further reduces resolution through downsampling. For example, a larger pooling kernel can be used to significantly downsample the embedded feature vectors, enabling them to reflect information from the entire material region. The downsampled features can reveal the overall distribution pattern of defects within the material, extracting the distributed defect features. To implement global feature extraction, a global average pooling layer or a global max pooling layer in a convolutional neural network can be used to perform global downsampling of the embedded feature vectors, combined with a fully connected layer for feature extraction.
[0061] Step S324: Perform feature dimension alignment processing on the fine defect features of the local area, the structural defect features of the mesoscale range, and the distribution defect features of the global range to ensure that the three types of features have the same feature dimension.
[0062] Feature dimension alignment processes the fine-grained defect features of a local region, the structural defect features at a mesoscale, and the distributed defect features at a global scale, ensuring they share the same feature dimension. Since feature extraction operations at different scales may result in varying feature dimensions, dimension alignment is necessary. For example, the fine-grained defect features of a local region might have a dimension of 100, the structural defect features at a mesoscale might have a dimension of 50, and the distributed defect features at a global scale might have a dimension of 20. Feature dimension alignment unifies their dimensions to a single value, such as 100. When implementing feature dimension alignment, padding or clipping operations can be used to pad features with smaller dimensions and clip features with larger dimensions to ensure they are consistent.
[0063] Step S325: The three types of features after dimension alignment are spliced along the channel dimension to generate a joint feature vector containing multi-scale defect information.
[0064] The concatenation process connects the fine-grained defect features of the local region, the structural defect features at the mesoscale, and the distributed defect features at the global scale along the channel dimension after dimensional alignment, generating a joint feature vector containing multi-scale defect information. For example, representing the three types of dimensionally aligned features as vectors of length 100, concatenating them along the channel dimension yields a joint feature vector of length 300. This joint feature vector contains defect information at different scales, providing a more comprehensive description of the internal defect situation of the material. In implementing the concatenation process, a concatenation function from a deep learning framework can be used to concatenate the three types of dimensionally aligned features and output the joint feature vector.
[0065] Step S330: Input the fine defect features of the local region, the structural defect features of the mesoscale range, and the distribution defect features of the global range into the attention mechanism layer of the defect diagnosis model, calculate the importance weight of each feature dimension to defect identification, and generate weighted multi-scale defect features. The importance weight reflects the degree of contribution of different feature dimensions to defect identification.
[0066] The attention mechanism layer of the defect diagnosis model is used to calculate the importance weights of each feature dimension for defect identification. The attention mechanism automatically learns the importance of each feature dimension based on the input features and assigns it a corresponding weight. After inputting fine-grained defect features of local regions, structural defect features at the mesoscale, and distributed defect features at the global scale into the attention mechanism layer, this layer calculates the importance weights of each feature dimension for defect identification. For example, for a feature dimension, if its contribution to defect identification is large, the attention mechanism layer will assign it a larger weight; if its contribution is small, it will assign a smaller weight. Then, these weights are multiplied by the corresponding feature dimension to obtain the weighted multi-scale defect features. When implementing the attention mechanism layer, attention-based neural network structures, such as multi-head attention mechanisms, can be used to process the input features and output the weighted multi-scale defect features.
[0067] Step S340: Input the multi-scale defect features into the dual-branch output layer of the defect diagnosis model. The first branch outputs the defect probability values of each region of the material through a fully connected network and maps the probability values to the internal spatial coordinates of the material according to the quantum sensor position information to generate defect probability distribution information. The second branch outputs the probability values of different defect types through a classification activation function to generate defect type confidence information.
[0068] The dual-branch output layer of the defect diagnosis model outputs defect probability distribution information and defect type confidence information. It comprises two branches. The first branch processes multi-scale defect features through a fully connected network, outputting defect probability values for each region of the material. Then, based on the quantum sensor's location information, these probability values are mapped to spatial coordinates within the material, generating defect probability distribution information. For example, the fully connected network converts multi-scale defect features into a vector representing defect probabilities, with each element corresponding to a region of the material. Based on the quantum sensor's location information, these probability values are mapped to specific spatial locations within the material, forming the defect probability distribution information. The second branch processes multi-scale defect features through a classification activation function (such as the softmax function), outputting probability values for different defect types and generating defect type confidence information. When implementing the dual-branch output layer, fully connected layers and activation functions from deep learning frameworks can be used to construct the dual-branch structure and output the corresponding information.
[0069] Step S350: Perform spatial smoothing on the defect probability distribution information and confidence screening on the defect type confidence information, retaining defect types with probability values exceeding a preset level as valid identification results.
[0070] Spatial smoothing processes process defect probability distribution information to eliminate local fluctuations and make the distribution smoother. Methods such as sliding window averaging can be used to smooth the defect probability distribution information. For example, in the defect probability distribution information, the probability value of a certain region may fluctuate significantly due to noise or other reasons; sliding window averaging can make the probability value of that region more stable. Confidence filtering processes filter defect type confidence information, retaining defect types with probability values exceeding a preset level as valid identification results. The preset level is a pre-defined threshold; when the probability value of a defect type exceeds this threshold, the defect type is considered a valid identification result. For example, with a preset level of 0.5, a defect type with a probability value of 0.6 is retained, while a defect type with a probability value of 0.3 is discarded. When implementing spatial smoothing and confidence filtering processes, appropriate algorithms and functions can be used to process the defect probability distribution information and defect type confidence information and output the processed results.
[0071] Step S400: Determine the defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information. The defect location information includes the set of spatial coordinates of the defect area, and the defect type classification information includes the dominant defect type and the secondary defect type.
[0072] Based on defect probability distribution information and defect type confidence information, defect location information and defect type classification information of a material can be determined. Defect location information refers to the set of spatial coordinates of areas in the material where defects exist. Defect probability distribution information identifies areas with high probability values, and their spatial coordinates are recorded to form defect location information. Defect type classification information includes dominant and secondary defect types. Defect type confidence information identifies the defect type with the highest probability value as the dominant defect type, and the defect type with the second highest probability value exceeding a preset level as the secondary defect type. For example, if the defect probability distribution information shows a defect probability value of 0.8 for a certain area of the material, then the spatial coordinates of that area are included in the defect location information; if the defect type confidence information shows a probability value of 0.9 for defect type A and a probability value of 0.7 for defect type B, with a preset level of 0.5, then defect type A is designated as the dominant defect type, and defect type B as the secondary defect type. When determining defect location information and defect type classification information, programs can be written to analyze and process the defect probability distribution information and defect type confidence information to extract the relevant information.
[0073] As one implementation method, step S400, which determines the defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information, may specifically include the following steps S410~S450: Step S410: Analyze the correspondence between spatial coordinates and probability values in the defect probability distribution information, extract the region with probability value exceeding a preset threshold as candidate defect region, and record the set of spatial coordinates of the candidate defect region.
[0074] Analyzing the correspondence between spatial coordinates and probability values in defect probability distribution information involves analyzing the defect probability distribution information to find the defect probability value corresponding to each spatial coordinate. A preset threshold is a pre-defined value; when the defect probability value of a certain area exceeds this threshold, that area is considered a candidate defect area. For example, if the preset threshold is 0.6, and the spatial coordinates of a certain area in the defect probability distribution information are (10, 20), with a corresponding defect probability value of 0.8, then this area is considered a candidate defect area, and its spatial coordinates (10, 20) are recorded. When analyzing the correspondence, the defect probability distribution information can be traversed, matching each spatial coordinate with its corresponding probability value, filtering out areas whose probability values exceed the preset threshold, and recording their spatial coordinates to form a set of spatial coordinates for candidate defect areas.
[0075] Step S420: Perform density clustering analysis on the spatial coordinate set of candidate defect regions to identify the boundary range of dense defect regions and generate defect location information containing boundary coordinates.
[0076] Density clustering analysis is a clustering method based on data point density, which can identify dense defect regions based on the distribution density of spatial coordinates of candidate defect regions. In this implementation, density clustering analysis can group adjacent regions with high defect probabilities together to form dense defect regions and determine their boundary range, thereby obtaining more accurate defect location information.
[0077] When performing density clustering analysis, the neighborhood radius and minimum sample number parameters of the density clustering algorithm need to be initialized first. The neighborhood radius parameter reflects the spatial proximity of defect regions, determining the size of the neighborhood range of a data point; the minimum sample number parameter reflects the density of defect regions, i.e., how many data points must be contained within a neighborhood to be considered a core of a dense region. For example, when clustering the spatial coordinates of candidate defect regions on a two-dimensional plane, assuming the neighborhood radius parameter is set to 5 units and the minimum sample number parameter is set to 3, a point is considered a core point when its neighborhood of at least 3 other candidate defect region spatial coordinates are contained within a neighborhood of 5 units. The next step is to calculate the number of samples within the neighborhood of each candidate defect region's spatial coordinates and identify core points whose sample number exceeds the minimum sample number parameter. This step involves traversing the spatial coordinates of all candidate defect regions, drawing a circle (in two-dimensional space) or a sphere (in three-dimensional space) centered on each coordinate point and with the neighborhood radius as the radius, and counting the number of other coordinate points contained within the neighborhood. Coordinate points whose neighborhood sample number exceeds the minimum sample number parameter are marked as core points.
[0078] By expanding the neighborhood of a core point, adjacent core points and boundary points are merged into a dense defect region. The neighborhood of a core point may contain other core points or boundary points. A boundary point is a point whose number of samples in its neighborhood is less than the minimum sample number parameter, but is still within the neighborhood of a certain core point. By continuously expanding the neighborhood of a core point, adjacent core points and boundary points are connected to form a connected region, which is the dense defect region.
[0079] Extract the coordinates of the boundary points of the dense defect region, and calculate the minimum enclosing polygon of the boundary points using the convex hull algorithm to generate the set of boundary coordinates of the dense defect region. The convex hull algorithm is an algorithm used to calculate the minimum enclosing polygon of a set of points. It can find the outermost boundary points of a set of points, forming a polygon that encloses all the points. After obtaining the coordinates of the boundary points of the dense defect region, the minimum enclosing polygon of the boundary points is calculated using a convex hull algorithm (such as the Graham scan algorithm). The vertex coordinates of this polygon are the set of boundary coordinates of the dense defect region.
[0080] The boundary coordinate set is smoothed to eliminate local fluctuations at boundary points, generating a regularly shaped boundary range for dense defect regions. This boundary range contains multiple consecutive boundary coordinate points. Smoothing can be achieved using methods such as moving averages to refine the boundary coordinates. For example, for each point in the boundary coordinate set, its average value with its neighboring points is calculated, and this average value replaces the point's coordinates. This process is repeated multiple times until the boundary becomes smooth. After smoothing, the resulting boundary range for dense defect regions is more regular, facilitating subsequent analysis and processing.
[0081] Step S430: Analyze the probability values of different defect types in the defect type confidence information, extract the defect type with the highest probability value as the dominant defect type, and extract the defect type with the second highest probability value that exceeds the preset level as the secondary defect type.
[0082] Parsing the probability values of different defect types in the defect type confidence information involves a detailed analysis of the defect type confidence information to clarify the probability value corresponding to each defect type. Defect type confidence information is typically a list or vector containing multiple defect types and their corresponding probability values.
[0083] For example, suppose the defect type confidence information includes the following defect types and their probability values: the probability value of defect type A is 0.7, the probability value of defect type B is 0.2, the probability value of defect type C is 0.05, and the probability value of defect type D is 0.03.
[0084] The defect type with the highest probability value is extracted as the dominant defect type. In the example above, defect type A has the highest probability value, so it is determined as the dominant defect type. The dominant defect type reflects the most likely defect situation in the material and may have the greatest impact on the material quality.
[0085] Defect types with the second-highest probability values exceeding a preset level are identified as minor defect types. The preset level is a pre-defined threshold used to filter out defect types with a certain degree of reliability. Assuming the preset level is 0.1, in the example above, defect type B has the second-highest probability value, and its probability of 0.2 exceeds the preset level; therefore, defect type B is identified as a minor defect type. Minor defect types also require attention because they may affect material properties to some extent.
[0086] Step S440: Based on the preset defect type classification rules, map the dominant defect type and secondary defect type to the standard defect classification system to generate defect type classification information containing classification name and severity.
[0087] The preset defect type classification rules are a predefined set of rules used to map the identified dominant and secondary defect types to the standard defect classification system. The standard defect classification system is a unified and standardized defect classification framework that includes the classification names of various defect types and their corresponding severity information.
[0088] For example, the preset defect type classification rules may stipulate that when the identified defect type is "surface crack", the corresponding classification name in the standard defect classification system is "surface damage type - crack defect", and the severity is "moderate"; when the identified defect type is "internal porosity", the corresponding classification name is "internal defect type - porosity defect", and the severity is "mild".
[0089] The dominant and secondary defect types are mapped according to these rules to find their corresponding classification names and severity in the standard defect classification system. For example, if the dominant defect type is "surface crack" and the secondary defect type is "internal porosity", the generated defect type classification information after mapping according to the rules will include "Dominant defect type: surface damage - crack defect, severity: moderate; Secondary defect type: internal defect - porosity defect, severity: mild".
[0090] By mapping defect types to a standard defect classification system, the description of defect types can be made more standardized and uniform, facilitating communication and exchange among different personnel. It also helps to accurately assess the severity of material defects, providing a basis for subsequent handling decisions.
[0091] Step S450: Perform geometric feature analysis on the boundary range of dense defect areas in the defect location information, extract the area parameters and shape parameters of the area, and supplement and generate defect location information that reflects the spatial distribution characteristics of defects.
[0092] Geometric feature analysis of the boundaries of densely defective regions is conducted to gain a more comprehensive understanding of the spatial distribution of defects. Area and shape parameters are indicators describing the geometric characteristics of a region, providing information about the size and shape of the defects.
[0093] Extracting the area parameter of a region can be achieved through various methods. On a two-dimensional plane, if the boundary of a dense defect region is a polygon composed of a series of boundary coordinate points, its area can be calculated using the shoelace formula. The shoelace formula calculates the area using the coordinates of the polygon's vertices. For example, for a polygon composed of n vertices (x1, y1), (x2, y2), ..., (xn, yn), its area A can be calculated using the following formula: Shape parameters reflect the morphological characteristics of a defective region. Common shape parameters include perimeter, roundness, and rectangularity. Perimeter refers to the total length of the boundary of a densely populated defective region, which can be obtained by calculating the sum of the distances between adjacent boundary coordinate points. Roundness measures the degree of similarity between a region and a circle; the calculation formula is... Where A is the area of the region and P is the perimeter. The closer the circularity is to 1, the closer the region is to a circle. Rectangularity measures the similarity between the region and a rectangle, and can be obtained by calculating the ratio of the region's area to the area of the smallest rectangle containing it. By extracting area and shape parameters and supplementing this information into the defect location information, the spatial distribution characteristics of defects can be more completely reflected. For example, defect location information not only includes the boundary coordinates of dense defect areas, but also information such as their area size and shape characteristics. This helps to further analyze the impact of defects on material properties and to develop more targeted treatment solutions.
[0094] Step S500: Generate a quality inspection report containing a defect spatial distribution map and a type analysis table based on the defect location information and defect type classification information.
[0095] Generating a quality inspection report based on defect location information and defect type classification information involves organizing and visualizing defect-related information obtained from material testing. The quality inspection report includes a defect spatial distribution map and a type analysis table, which can intuitively present the spatial distribution and defect type information of defects in the material.
[0096] As one implementation method, step S500 may specifically include the following steps S510~S560: Step S510: Obtain a preset quality inspection report template, and extract the defect location field and type classification field that need to be filled in the template.
[0097] The preset quality inspection report template is a pre-designed document framework for generating quality inspection reports. It contains fixed formats and fields for displaying different types of information. The defect location field is where defect location information is entered, and the type classification field is where defect type classification information is entered.
[0098] For example, a quality inspection report template might be a Word document with a dedicated table for filling in defect location information, such as fields like "defect area boundary coordinates," "defect area area," and "defect area shape parameters"; and another table for filling in defect type classification information, such as fields like "dominant defect type," "minor defect type," and "severity."
[0099] By reading a pre-defined quality inspection report template, the defect location and type classification fields that need to be filled in are located and extracted, preparing for subsequent information filling. In practice, a document processing library (such as Python's python-docx library) can be used to read and manipulate Word document templates and extract the corresponding fields.
[0100] Step S520: Fill the boundary coordinates, area parameters and shape parameters of the dense defect area in the defect location information into the defect location field to generate textual description information of the spatial distribution of defects.
[0101] Filling the defect location field with relevant information from the defect location information is the process of accurately recording the spatial distribution characteristics of the defects obtained from actual detection in text form in the quality inspection report.
[0102] For example, the boundary coordinates of dense defect areas can be filled into the "Defect Area Boundary Coordinates" field of the template according to a certain format (such as a list of coordinate pairs). Assuming the boundary coordinates of dense defect areas are [(10,20),(15,25),(20,20),(15,15)], then they would be filled into the template as "[(10,20),(15,25),(20,20),(15,15)]".
[0103] Enter the area parameter into the "Defect Area" field. If the calculated area is 50 square units, enter "50 square units". Enter the shape parameters (such as roundness, rectangularity, etc.) into the corresponding fields, such as "Roundness: 0.8, Rectangularity: 0.6". By filling in this information, a textual description of the spatial distribution of the defect is generated, allowing the report reader to clearly understand the specific location and spatial characteristics of the defect in the material.
[0104] Step S530: Fill the type classification field with the dominant defect type, secondary defect type and severity description from the defect type classification information to generate textual analysis information of the defect type.
[0105] Filling in the relevant information from the defect type classification into the type classification field is the process of clearly presenting the identified defect types and their severity in text form in the quality inspection report. For example, the dominant defect type, secondary defect type, and corresponding severity are filled in the corresponding fields according to the template format. If the dominant defect type is "Surface Damage - Crack Defect" with a severity of "Medium"; and the secondary defect type is "Internal Defect - Porosity Defect" with a severity of "Mild", then the template would be filled in as "Dominant Defect Type: Surface Damage - Crack Defect, Severity: Moderate; Secondary Defect Type: Internal Defect - Porosity Defect, Severity: Mild". By filling in this information, textual analysis information about the defect types is generated, helping the report reader quickly understand the main defect types present in the material and their potential impact.
[0106] Step S540: Visualize the correspondence between spatial coordinates and probability values in the defect probability distribution information to generate a defect probability distribution chart with material spatial coordinates as the horizontal axis and probability values as the vertical axis.
[0107] Visualizing the probability distribution of defects allows abstract data to be presented in an intuitive graphical form, making it easier for readers to understand the probability of defects existing in different areas of the material. As one implementation method, step S540 may specifically include the following steps S541-S546:
[0108] Step S541: Establish a material space coordinate system with the geometric center of the material as the origin and the length, width, and height of the material as the coordinate axes.
[0109] Establishing a material space coordinate system is crucial for accurately locating the positions of various regions within the material, allowing for the mapping of defect probability distribution information. Using the material's geometric center as the origin makes the coordinate system more symmetrical and facilitates calculations. Using the material's length, width, and height as coordinate axes visually reflects the material's actual spatial structure. For example, for a cuboid-shaped material, its geometric center can be used as the origin (0,0,0), with the length direction defined as the x-axis, the width direction as the y-axis, and the height direction as the z-axis.
[0110] Step S542: Map the spatial coordinates in the defect probability distribution information to the material space coordinate system and determine the position of each coordinate point on the horizontal axis of the chart.
[0111] Mapping the spatial coordinates in the defect probability distribution information to the material space coordinate system involves converting the spatial coordinates corresponding to the actual detected defect probabilities into coordinate values within the material space coordinate system. For example, if a spatial coordinate in the defect probability distribution information is (10, 20, 30), after coordinate transformation in the established material space coordinate system, this coordinate point will correspond to a specific position on the horizontal axis of the graph. This position can be determined based on the scale and range of the coordinate system.
[0112] Step S543: Map the probability values in the defect probability distribution information to the vertical axis position of the chart, and determine the vertical axis height of each coordinate point.
[0113] Mapping the probability values in the defect probability distribution information to the vertical axis of a chart converts the defect probability values into height values on the chart. The vertical axis typically represents the defect probability, generally ranging from 0 to 1. For example, if the defect probability value at a certain coordinate point is 0.7, the height corresponding to that coordinate point on the vertical axis will be determined by the scale and range of the vertical axis.
[0114] Step S544: Select a 3D bar chart as the visualization chart type. Draw a bar with a height corresponding to the probability value for each coordinate point in the material space coordinate system. The color of the bar is rendered in a gradient according to the probability value.
[0115] Choosing a 3D bar chart as the visualization type clearly displays the defect probability distribution at different spatial locations within a material. Each coordinate point corresponds to a bar, and the height of the bar represents the defect probability value at that coordinate point. For example, in the material's spatial coordinate system, for the coordinate point (x, y, z) with a defect probability value of p, a bar of height p is drawn. To more intuitively show the differences in probability values, the bar's color is rendered with a gradient based on the probability value. A color map can be used, representing areas with lower probability values with lighter colors and areas with higher probability values with darker colors. For example, areas with probability values close to 0 are represented by light blue, and areas with probability values close to 1 are represented by dark blue.
[0116] Step S545: Add a chart title, axis labels, and color legend. The chart title describes the meaning of the defect probability distribution, the axis labels indicate the physical meaning of the material space coordinates, and the color legend explains the probability value range corresponding to different colors.
[0117] Adding chart titles, axis labels, and color legends makes charts more complete and easier to understand. Chart titles clearly state the content displayed, such as "Material Defect Probability Distribution Chart." Axis labels indicate the physical meaning of the horizontal and vertical axes; for example, the horizontal axis is labeled "Material Spatial Coordinates," and the vertical axis is labeled "Defect Probability Value." Color legends illustrate the probability ranges corresponding to different colors, allowing readers to quickly determine the probability of defects based on color. For example, a color legend could show "Light blue: probability value 0-0.2; Blue: probability value 0.2-0.4; Dark blue: probability value 0.4-0.6; Purple: probability value 0.6-0.8; Dark red: probability value 0.8-1."
[0118] Step S546: Adjust the perspective of the 3D bar chart to ensure that the bars at each coordinate point in the chart are unobstructed, and generate a visual chart that clearly shows the probability distribution of defects.
[0119] Adjusting the viewing angle of a 3D bar chart is crucial for displaying the chart from a suitable perspective, preventing bars from obscuring each other, and ensuring the reader can clearly see the defect probability at each coordinate point. For example, rotation and translation can be used to adjust the viewing angle of the 3D bar chart, finding an optimal viewing angle where all bars are fully displayed. In some visualization tools (such as Python's Matplotlib library combined with the mplot3d module), viewing angle adjustments can be achieved by setting viewing angle parameters (such as azimuth and elevation). After viewing angle adjustment, the generated visualization chart clearly displays the defect probability distribution of the material.
[0120] Step S550: Visualize the probability values of different defect types in the defect type confidence information to generate a defect type confidence chart with defect type as the horizontal axis and probability value as the vertical axis.
[0121] Visualizing the confidence information of defect types can display the confidence of different defect types in an intuitive chart format, helping readers quickly understand the probability of various defect types.
[0122] For example, a bar chart can be chosen as the visualization chart type. With defect type as the horizontal axis, different defect types (such as "surface cracks," "internal porosity," "inclusion defects," etc.) are arranged sequentially; with probability value as the vertical axis, bars are drawn based on the probability value corresponding to each defect type in the defect type confidence information. The height of the bar represents the probability value of that defect type, allowing for a direct comparison of the probabilities of different defect types. When creating the chart, different colors can be used to distinguish different defect types. A chart title (such as "Material Defect Type Confidence Chart"), axis labels (horizontal axis labeled "Defect Type," vertical axis labeled "Probability Value"), and data labels can be added as needed to display the specific probability value corresponding to each bar, making the chart clearer and easier to understand.
[0123] Step S560: Integrate the textual description information of the defect spatial distribution, the textual analysis information of the defect type, the defect probability distribution chart, and the defect type confidence chart into the quality inspection report template to generate a quality inspection report containing a defect spatial distribution map and a type analysis table.
[0124] Integrating previously generated information and charts into a quality inspection report template involves presenting material defect information in a unified format to create a complete quality inspection report. For example, in a pre-defined quality inspection report template, textual descriptions of defect spatial distribution are inserted into the corresponding defect location field, and textual analysis information of defect types is inserted into the type classification field. Then, the generated defect probability distribution chart and defect type confidence chart are inserted into the report at appropriate sizes and positions to ensure a logical and aesthetically pleasing layout. During the integration process, attention must be paid to the layout and formatting of charts and text information to ensure a consistent overall report style. Document processing tools (such as Word) can be used to adjust the size and position of charts and the font and size of text, ultimately generating a quality inspection report that includes a defect spatial distribution map and a type analysis table.
[0125] In one implementation, step S500 may further include the following steps S570~S5120:
[0126] Step S570: Analyze the defect location information and defect type classification information in the quality inspection report, and extract the identifiers of dense defect areas and dominant defect types that need to be prioritized.
[0127] Analyzing defect location and defect type classification information in quality inspection reports is crucial for accurately extracting key information related to defect handling. Areas with dense defects requiring priority handling are typically those with a high probability of occurrence and a significant impact on material properties. Dominant defect types refer to those with the highest probability of occurrence in the material and the potential to have a major impact on material quality. For example, by analyzing the defect location information in the quality inspection report, we can identify the boundary coordinates and area of dense defect areas. Based on pre-defined rules (such as large area or defect probability exceeding a certain threshold), we can determine the dense defect areas requiring priority handling and extract their identifiers (such as area numbers). Simultaneously, we extract the name or number of the dominant defect type from the defect type classification information as its identifier.
[0128] Step S580: Based on the dense defect area identifier and the dominant defect type identifier, match the corresponding processing strategy from the preset defect processing strategy library. The processing strategy includes defect repair methods, material replacement schemes and subsequent inspection plans.
[0129] The pre-built defect handling strategy library is a database containing various defect handling strategies, which formulate corresponding handling methods based on different defect types and defect area conditions. For example, when a dense defect area is identified as "Area 3" and the dominant defect type is identified as "surface crack," the library searches for the handling strategy corresponding to "Area 3" and "surface crack." The handling strategy may include repair methods for surface cracks, such as welding repair or grinding repair; material replacement schemes, such as whether to replace the entire material or only the defective part; and subsequent inspection plans, such as what inspections need to be performed after repair (e.g., non-destructive testing, mechanical property testing, etc.) and the inspection time intervals and standards.
[0130] Step S590: Convert the data format of the quality inspection report, defect location information, defect type classification information and matching processing strategy to generate standardized transmission data that meets the data interface requirements of the material quality control system.
[0131] Materials quality control systems typically have data interface requirements, necessitating the conversion of relevant information into a data format compatible with that interface before transmission. Data format conversion involves organizing and transforming quality inspection reports, defect location information, defect type classification information, and matching processing strategies. For example, if the materials quality control system's data interface requires XML format, this information needs to be organized according to XML specifications to generate the corresponding XML file. During the conversion process, information encoding and formatting are required to ensure data accuracy and integrity. This data format conversion can be implemented using programming languages (such as Python) combined with relevant libraries (such as xml.etree.ElementTree).
[0132] Step S5100: Standardized transmission data is sent to the material quality control system through a preset communication protocol, triggering the system's defect handling process. The defect handling process includes defect repair execution, processing result recording, and processing effect verification steps.
[0133] A pre-defined communication protocol is a set of rules and conventions for data transmission between the sender and receiver. Common protocols include HTTP and TCP / IP. Sending standardized transmission data to the material quality control system via a pre-defined communication protocol ensures reliable data transmission. For example, the generated standardized transmission data can be sent to a designated interface address of the material quality control system using the HTTP protocol. Upon receiving the data, the material quality control system triggers a defect handling process based on the information contained within. This process first executes defect repair according to a matching handling strategy, such as assigning maintenance personnel to repair the defective area; then it records the processing results, including the repair time, materials used, and methods; finally, it verifies the processing effect by evaluating whether the repair achieved the expected results through methods such as re-inspection.
[0134] Step S5110: After the defect handling process is completed, receive the processing result feedback information returned by the material quality control system. The feedback information includes the defect repair completion status, the processing effect evaluation results, and subsequent improvement suggestions.
[0135] After the defect handling process is completed, the material quality control system summarizes and evaluates the results, and returns relevant information as feedback to the sender. For example, the feedback might show the defect repair status as "repaired," the assessment result as "the probability of the defect has been reduced to an acceptable range after repair," and the follow-up improvement suggestion as "strengthen raw material inspection to prevent similar defects from recurring." The recipient can use this feedback to understand the final result of the defect handling, evaluate its effectiveness, and take corresponding measures based on the follow-up improvement suggestions to further improve the level of material quality control.
[0136] Step S5120: The feedback information is associated with and stored in conjunction with the original quantum sensing data sequence, quantum feature set, and quality inspection report to form a complete record of the material quality inspection and processing process.
[0137] Association-based storage processing integrates and stores feedback information with previous relevant data to establish a complete record of the entire material quality inspection and processing process. Such records facilitate long-term tracking and analysis of material quality, providing a basis for subsequent quality improvements. For example, database systems (such as MySQL or Oracle) can be used to store this data. Corresponding tables are created in the database to store the original quantum sensing data sequence, quantum feature set, quality inspection report, and feedback information, and these are linked together using association fields (such as material number and inspection time). In this way, when it is necessary to query the entire process information of a material's quality inspection and processing, relevant data can be quickly obtained through association queries to understand the details of the entire process, thereby better managing and improving material quality.
[0138] It is understood that the various algorithms involved in the above descriptions of the embodiments of the present invention, such as convex hull algorithms, clustering algorithms, etc., can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of the present invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solution of the present invention. For example, based on common knowledge in the art, normalization can be used to eliminate dimensional conflicts before feature fusion, interpolation can be used to eliminate dimensional differences, thresholds can be reasonably set in combination with historical data, experience or business scenario requirements, the model can be trained based on a general model training method, the number of layers in the model structure can be set based on actual needs, activation functions can be selected, etc. The present invention will not provide redundant descriptions of overly detailed implementation processes.
[0139] Figure 2 This is a schematic diagram of the composition structure of a material quality testing device provided in an embodiment of the present invention, as shown below. Figure 2As shown, the material quality testing device 200 includes: a data acquisition module 210, used to acquire the original quantum sensing data sequence collected by the quantum sensor in the material testing scenario, wherein the original quantum sensing data sequence contains quantum state coherence measurement values during continuous detection periods, and each measurement value corresponds to the quantum coherence characteristics of a corresponding region inside the material; a feature conversion module 220, used to perform multi-dimensional feature conversion processing on the original quantum sensing data sequence through a quantum feature extraction module to generate a quantum feature set reflecting the internal structural characteristics of the material, wherein the quantum feature set includes temporal coherence features, spatial coherence features, and coherent noise features; and a defect analysis module 230, used to call a pre-trained defect diagnosis model to analyze the quantum feature set. The defect pattern analysis and processing module outputs defect probability distribution information and defect type confidence information within the material. The defect probability distribution information indicates the probability value of defects existing in each area of the material, and the defect type confidence information includes the identification confidence of different defect types. The defect classification module 240 is used to determine the defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information. The defect location information includes a set of spatial coordinates of the defect area, and the defect type classification information includes the dominant defect type and the secondary defect type. The report generation module 250 is used to generate a quality inspection report containing a defect spatial distribution map and a type analysis table based on the defect location information and defect type classification information.
[0140] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided by the present invention can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of the present invention, please refer to the descriptions of the method embodiments of the present invention for understanding.
Claims
1. A material quality detection method based on quantum sensor detection, characterized in that, The method includes: acquiring a raw quantum sensing data sequence collected by a quantum sensor in a material detection scenario, wherein the raw quantum sensing data sequence contains quantum state coherence measurements during continuous detection periods, and each measurement corresponds to the quantum coherence characteristics of a corresponding region within the material; performing multi-dimensional feature transformation processing on the raw quantum sensing data sequence through a quantum feature extraction module to generate a quantum feature set reflecting the internal structural characteristics of the material, wherein the quantum feature set includes temporal coherence features, spatial coherence features, and coherent noise features; and calling a pre-trained defect diagnosis model to perform defect pattern analysis processing on the quantum feature set, outputting defect probability distribution information and defect type confidence information within the material, wherein the defect probability distribution... The information labeling module specifies the probability values of defects in each region of the material, and the defect type confidence information includes the identification confidence of different defect types. Specifically, this includes: inputting the original quantum sensing data sequence into the time feature processing unit of the quantum feature extraction module; performing time-series feature extraction processing on the quantum state coherence measurement values during continuous detection periods; and extracting the changing trends of quantum coherence characteristics between adjacent detection periods as time coherence features, including coherence enhancement trends and coherence decay trends; and inputting the original quantum sensing data sequence into the spatial feature processing unit of the quantum feature extraction module; performing spatial correlation analysis processing on the quantum state coherence measurement values of different quantum sensors during the same detection period; and extracting the different quantum state coherence characteristics within the material. The spatial dependence of regional quantum coherence properties is used as a spatial coherence feature, which includes the synchronous change relationship of coherence in adjacent regions and the asynchronous change relationship of coherence in non-adjacent regions. The difference between the temporal coherence feature and the spatial coherence feature is calculated, and the portion of the difference feature exceeding the stable range is extracted as a coherent noise feature. This coherent noise feature reflects the measurement error of the quantum sensor or random interference in non-defect regions of the material. The temporal coherence feature, spatial coherence feature, and coherent noise feature are input into the feature fusion unit of the quantum feature extraction module. A gated recurrent network is used to perform temporal dependency modeling on the temporal coherence feature, spatial coherence feature, and coherent noise feature to generate a fused feature with spatiotemporal consistency. The fused feature sequence contains correlation information between the temporal and spatial dimensions. The fused feature sequence undergoes feature standardization processing, eliminating dimensional differences between different feature dimensions through normalization operations, generating a quantum feature set containing temporal coherence features, spatial coherence features, coherent noise features, and the fused feature sequence. Based on the defect probability distribution information and defect type confidence information, defect location information and defect type classification information of the material are determined. The defect location information includes a set of spatial coordinates of the defect region, and the defect type classification information includes dominant and secondary defect types. A quality inspection report containing a defect spatial distribution map and a type analysis table is generated based on the defect location information and defect type classification information.The step of inputting the original quantum sensing data sequence into the spatial feature processing unit of the quantum feature extraction module, and performing spatial correlation analysis on the quantum state coherence measurement values of different quantum sensors during the same detection period to extract the spatial dependence of quantum coherence characteristics in different regions within the material as spatial coherence features, includes: acquiring the quantum state coherence measurement values of different quantum sensors during the same detection period, arranging them according to the spatial positions of the sensors to form a two-dimensional spatial data array; performing a neighborhood correlation calculation operation on the spatial data array to calculate the correlation coefficient between the measurement values of each sensor position and the measurement values of adjacent sensor positions, generating a neighborhood correlation matrix reflecting the degree of coherence synchronization in the local region; and performing a global correlation calculation operation on the spatial data array to calculate the correlation coefficient between the measurement values of each sensor position and the measurement values of all other sensor positions, generating a global correlation matrix reflecting the degree of coherence synchronization in the local region. A global correlation matrix of regional coherence synergy is generated. The difference between the neighborhood correlation matrix and the global correlation matrix is calculated to extract the difference features of coherence correlation between local and global levels. These difference features represent the spatial heterogeneity of regional coherence dependencies. Based on the neighborhood correlation matrix, the global correlation matrix, and the difference features, clusters of regions within the material exhibiting synchronous changes in coherence are identified. Coherence measurements of sensor locations within these clusters show a high positive correlation. The coverage area and internal correlation strength of each cluster are statistically analyzed. The coverage area represents the number of sensor locations within the cluster, and the correlation strength represents the average correlation coefficient within the cluster. The coverage area, correlation strength, and spatial heterogeneity difference features of each cluster are combined to form a spatial coherence feature that includes information on local synchronization, global synergy, and spatial heterogeneity.
2. The material quality detection method based on quantum sensor detection according to claim 1, characterized in that, The process of calling a pre-trained defect diagnosis model to perform defect pattern analysis on the quantum feature set and outputting defect probability distribution information and defect type confidence information within the material includes: inputting the fused feature sequence from the quantum feature set into the feature embedding layer of the defect diagnosis model; mapping the fused feature sequence to a high-dimensional feature space through linear transformation to generate an embedded feature vector, wherein the embedded feature vector retains the spatiotemporal correlation information of the original features; performing multi-level feature extraction processing on the embedded feature vector through the feature perception layer of the defect diagnosis model, wherein the first level extracts fine defect features of local regions, the second level extracts structural defect features of the mesoscale range, and the third level extracts distributed defect features of the global range; and combining the fine defect features of the local regions, the structural defect features of the mesoscale range, and the distributed defect features of the global range... The features are input into the attention mechanism layer of the defect diagnosis model, and the importance weight of each feature dimension to defect identification is calculated to generate weighted multi-scale defect features. The importance weight reflects the degree of contribution of different feature dimensions to defect identification. The multi-scale defect features are input into the dual-branch output layer of the defect diagnosis model. The first branch outputs the defect probability value of each region of the material through a fully connected network, and maps the probability value to the internal spatial coordinates of the material according to the quantum sensor position information to generate defect probability distribution information. The second branch outputs the probability value of different defect types through a classification activation function to generate defect type confidence information. The defect probability distribution information is spatially smoothed, and the defect type confidence information is subjected to confidence screening processing, retaining defect types with probability values exceeding a preset level as valid identification results.
3. The material quality detection method based on quantum sensor detection according to claim 2, characterized in that, The process of determining the defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information includes: parsing the correspondence between spatial coordinates and probability values in the defect probability distribution information, extracting regions with probability values exceeding a preset threshold as candidate defect regions, and recording the set of spatial coordinates of the candidate defect regions; performing density clustering analysis on the set of spatial coordinates of the candidate defect regions to identify the boundary range of dense defect regions and generating defect location information containing boundary coordinates; parsing the probability values of different defect types in the defect type confidence information, extracting the defect type with the highest probability value as the dominant defect type, and extracting the defect type with the second highest probability value exceeding a preset level as the secondary defect type; mapping the dominant and secondary defect types to a standard defect classification system according to preset defect type classification rules to generate defect type classification information containing classification names and severity; and performing geometric feature analysis on the boundary range of dense defect regions in the defect location information to extract the area parameters and shape parameters of the regions and supplement the generation of defect location information reflecting the spatial distribution characteristics of defects.
4. The material quality detection method based on quantum sensor detection according to claim 3, characterized in that, The step of generating a quality inspection report containing a defect spatial distribution map and a type analysis table based on the defect location information and defect type classification information includes: obtaining a preset quality inspection report template; extracting the defect location field and type classification field that need to be filled in the template; filling the defect location field with the boundary coordinates, area parameters, and shape parameters of dense defect areas in the defect location information to generate textual description information of the defect spatial distribution; filling the type classification field with the descriptions of the dominant defect type, secondary defect type, and severity in the defect type classification information to generate textual analysis information of the defect type; visualizing the correspondence between spatial coordinates and probability values in the defect probability distribution information to generate a defect probability distribution chart with material spatial coordinates as the horizontal axis and probability values as the vertical axis; visualizing the probability values of different defect types in the defect type confidence information to generate a defect type confidence chart with defect type as the horizontal axis and probability values as the vertical axis; and integrating the textual description information of the defect spatial distribution, the textual analysis information of the defect type, the defect probability distribution chart, and the defect type confidence chart into the quality inspection report template to generate a quality inspection report containing a defect spatial distribution map and a type analysis table.
5. The material quality detection method based on quantum sensor detection according to claim 1, characterized in that, The step of inputting the original quantum sensing data sequence into the time feature processing unit of the quantum feature extraction module to perform time-series feature extraction processing on the quantum state coherence measurement values of continuous detection periods, and extracting the changing trend of quantum coherence characteristics of adjacent detection periods as time coherence features, includes: dividing the original quantum sensing data sequence into time windows to obtain multiple sub-data sequences with continuous time period association, each sub-data sequence containing a preset number of continuous detection period measurement values; performing differential operation processing on each sub-data sequence to calculate the difference between the quantum state coherence measurement values of adjacent detection periods, generating a differential feature sequence reflecting the rate of coherence change; performing sliding window averaging processing on the differential feature sequence to eliminate random noise interference and generate a smoothed rate of change curve; extracting the rising edge feature and falling edge feature in the rate of change curve, corresponding to the starting point of the quantum coherence enhancement trend and the starting point of the quantum coherence decay trend, respectively; and generating time coherence features containing the intensity of the enhancement trend and the intensity of the decay trend based on the rising edge feature and falling edge feature, combined with the slope information of the rate of change curve.
6. The material quality detection method based on quantum sensor detection according to claim 2, characterized in that, The process involves multi-level feature extraction of the embedded feature vector through the feature perception layer of the defect diagnosis model. The first level extracts fine defect features in local areas, the second level extracts structural defect features at a medium scale, and the third level extracts distributed defect features globally. This includes: inputting the embedded feature vector into the first-level processing unit of the feature perception layer to extract detailed defect features in small areas within the material through local feature extraction, where high-resolution feature information is preserved; and inputting the embedded feature vector into the second-level processing unit of the feature perception layer to extract structural defect features in medium-scale areas within the material through medium-scale feature extraction. The mesoscale feature extraction operation reduces resolution through feature downsampling to expand the perception range; the embedded feature vector is input into the third-level processing unit of the feature perception layer, and the global feature extraction operation extracts the defect distribution features of the entire material area through global feature extraction. The global feature extraction operation further reduces resolution through downsampling to cover the entire material area; the fine defect features of the local area, the structural defect features of the mesoscale range, and the distribution defect features of the global range are aligned in feature dimensions to ensure that the three types of features have the same feature dimensions; the three types of features after dimension alignment are spliced along the channel dimension to generate a joint feature vector containing multi-scale defect information.
7. The material quality detection method based on quantum sensor detection according to claim 3, characterized in that, The process of performing density clustering analysis on the spatial coordinate set of the candidate defect regions to identify the boundary range of dense defect regions and generate defect location information containing boundary coordinates includes: initializing the neighborhood radius parameter and minimum sample number parameter of the density clustering algorithm, where the neighborhood radius parameter reflects the spatial proximity of defect regions and the minimum sample number parameter reflects the density of defect regions; calculating the number of samples in the neighborhood of the spatial coordinates of each candidate defect region and identifying core points whose sample number exceeds the minimum sample number parameter; merging adjacent core points and boundary points into dense defect regions through a neighborhood expansion operation of the core points; extracting the boundary point coordinates of the dense defect regions, calculating the minimum enclosing polygon of the boundary points using the convex hull algorithm, and generating a boundary coordinate set of dense defect regions; and smoothing the boundary coordinate set to eliminate local fluctuations of the boundary points and generate a regularly shaped boundary range of dense defect regions, wherein the boundary range contains multiple consecutive boundary coordinate points.
8. The material quality detection method based on quantum sensor detection according to claim 4, characterized in that, The process of visualizing the correspondence between spatial coordinates and probability values in the defect probability distribution information to generate a defect probability distribution chart with material spatial coordinates as the horizontal axis and probability values as the vertical axis includes: establishing a material spatial coordinate system with the geometric center of the material as the origin and the length, width, and height of the material as coordinate axes; mapping the spatial coordinates in the defect probability distribution information to the material spatial coordinate system to determine the horizontal axis position of each coordinate point in the chart; mapping the probability values in the defect probability distribution information to the vertical axis position of the chart to determine the vertical axis height of each coordinate point; selecting a 3D bar chart as the visualization chart type, drawing a bar with a height corresponding to the probability value for each coordinate point in the material spatial coordinate system, and rendering the color of the bar with a gradient based on the probability value; adding a chart title, axis labels, and color legend, whereby the chart title describes the meaning of the defect probability distribution, the axis labels indicate the physical meaning of the material spatial coordinates, and the color legend explains the probability value range corresponding to different colors; and adjusting the perspective of the 3D bar chart to ensure that the bars at each coordinate point in the chart are unobstructed, generating a visual chart that clearly displays the defect probability distribution.
9. A material quality testing device, characterized in that, The device includes: a data acquisition module for acquiring raw quantum sensing data sequences collected by a quantum sensor in a material detection scenario, wherein the raw quantum sensing data sequences contain quantum state coherence measurements during continuous detection periods, and each measurement corresponds to the quantum coherence characteristics of a corresponding region within the material; a feature conversion module for performing multi-dimensional feature conversion processing on the raw quantum sensing data sequences through a quantum feature extraction module to generate a set of quantum features reflecting the internal structural characteristics of the material, wherein the set of quantum features includes temporal coherence features, spatial coherence features, and coherent noise features; and a defect analysis module for calling a pre-trained defect diagnosis model to perform defect pattern analysis processing on the set of quantum features and output the material internal structure characteristics. The system includes: inputting the original quantum sensing data sequence into the time feature processing unit of the quantum feature extraction module; performing time-series feature extraction processing on the quantum state coherence measurement values during continuous detection periods; extracting the changing trend of quantum coherence characteristics between adjacent detection periods as time coherence features, wherein the changing trend includes coherence enhancement trend and coherence decay trend; and inputting the original quantum sensing data sequence into the spatial feature processing unit of the quantum feature extraction module to process the quantum state coherence measurements during the same detection period. Spatial correlation analysis is performed on the quantum state coherence measurements of the sensor to extract the spatial dependence of quantum coherence characteristics in different regions within the material as spatial coherence features. This spatial dependence includes synchronous changes in coherence between adjacent regions and asynchronous changes in coherence between non-adjacent regions. The difference between the temporal and spatial coherence features is calculated, and the portion of the difference features exceeding the stable range is extracted as coherence noise features. These coherence noise features reflect measurement errors in the quantum sensor or random interference in non-defect regions of the material. The temporal, spatial, and coherence noise features are input into the feature fusion unit of the quantum feature extraction module. A gated recurrent network is used to process the temporal and spatial coherence features. The features and coherent noise features are subjected to time-dependent modeling to generate a fused feature sequence with spatiotemporal consistency. The fused feature sequence contains correlation information between the time and spatial dimensions. The fused feature sequence is then subjected to feature standardization, and the dimensional differences between different feature dimensions are eliminated through normalization operations to generate a quantum feature set containing temporal coherent features, spatial coherent features, coherent noise features, and the fused feature sequence. A defect classification module is used to determine the defect location information and defect type classification information of the material based on the defect probability distribution information and defect type confidence information. The defect location information contains a set of spatial coordinates of the defect region, and the defect type classification information contains the dominant defect type and the secondary defect type.The report generation module is used to generate a quality inspection report containing a defect spatial distribution map and a type analysis table based on the defect location information and defect type classification information. Specifically, the step of inputting the original quantum sensing data sequence into the spatial feature processing unit of the quantum feature extraction module to perform spatial correlation analysis on the quantum state coherence measurement values of different quantum sensors during the same detection period, and extracting the spatial dependence of quantum coherence characteristics in different regions within the material as spatial coherence features, includes: acquiring the quantum state coherence measurement values of different quantum sensors during the same detection period, arranging them according to the sensor spatial positions to form a two-dimensional spatial data array; performing a neighborhood correlation calculation operation on the spatial data array to calculate the correlation coefficient between the measurement values of each sensor position and adjacent sensor positions, generating a neighborhood correlation matrix reflecting the degree of coherence synchronization in local regions; and performing a global correlation calculation operation on the spatial data array to calculate the correlation coefficient between the measurement values of each sensor position and adjacent sensor positions. A global correlation matrix is generated by setting correlation coefficients with all other sensor location measurements to reflect the degree of global regional coherence coordination. The neighborhood correlation matrix and the global correlation matrix are then compared to extract differences in coherence correlation between local and global levels. These differences represent the spatial heterogeneity of regional coherence dependencies. Based on the neighborhood correlation matrix, the global correlation matrix, and the differences, clusters of regions within the material exhibiting synchronous coherence changes are identified. The coherence measurements of sensor locations within these clusters show a high positive correlation. The coverage area and internal correlation strength of each cluster are statistically analyzed. The coverage area represents the number of sensor locations within the cluster, and the correlation strength represents the average correlation coefficient within the cluster. The coverage area, correlation strength, and spatial heterogeneity differences of each cluster are combined to form a spatial coherence feature that includes information on local synchronization, global coordination, and spatial heterogeneity.
Citation Information
Patent Citations
Defect identification method and system based on solid-state quantum nondestructive magnetic flux leakage detection
CN118330017A
High-precision material defect detection method based on nano sensor
CN120468375A
Polaroid defect detection method and system based on deep learning
CN120471930A