Medium surface microstructure detection device and method based on spectrum technology

Through partitioning and intelligent resource allocation based on spectral technology, the problem of low detection accuracy of the microstructure of the media surface is solved, efficient and reliable local anomaly residue recognition is achieved, and detection efficiency and reliability of the results are improved.

CN120495298AActive Publication Date: 2025-08-15TANGSHAN ANIMAL HUSBANDRY AQUATIC PROD QUALITY MONITORING CENT +1

Patent Information

Application Number
CN202510984662.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-08-15
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

In the prior art, the detection accuracy of the surface microstructure of the media is low, resource utilization is not optimized, and the confidence of the detection results is insufficient, so local abnormal residues cannot be accurately identified and detection efficiency is low.

Method used

Using a spectral technology-based microstructure detection device and method for the media surface, the partitioning module, the quality identification module, the abnormal identification module and the result processing module are used to realize dynamic partitioning spectrum acquisition and intelligent resource allocation, and combined with the abnormal residual distribution similarity analysis, high robustness detection results are generated.

Benefits of technology

It significantly improves the detection accuracy and detection efficiency of microscopic abnormal residues on the food surface, breaks through the signal masking effect, realizes intelligent matching of computing resources and risk levels, and improves the reliability and resource efficiency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495298A_ABST
    Figure CN120495298A_ABST
Patent Text Reader

Abstract

The invention discloses a medium surface microstructure detection device and method based on a spectrum technology, and relates to the technical field of structure detection, and the device comprises a partition division module which is used for dividing a target medium surface to obtain a medium partition sequence, and collecting a reflection spectrum of a surface microstructure to obtain a reflection spectrum sequence; the quality identification module is used for carrying out quality identification on the target medium to obtain a quality coefficient sequence and configuring abnormal residue identification precision; the exception identification module is used for calling exception residue identification resources and carrying out exception residue identification on the reflection spectrum sequence to obtain an exception residue parameter sequence; and the result processing module is used for performing processing to obtain abnormal residual distribution, performing similarity analysis on the abnormal residual distribution and historical abnormal residual distribution, obtaining identification confidence, combining the quality coefficient sequence and the abnormal residual parameter sequence, and performing calculation to obtain a medium quality parameter as a detection result. The technical problem that the medium surface detection effect is poor in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of structure detection technology, and in particular to a device and method for detecting the microstructure of a medium surface based on spectroscopy technology. Background Art

[0002] In the field of food quality and safety testing, spectral technology has been widely used to analyze the microstructure of media surfaces. For example, near-infrared spectroscopy or visible light spectroscopy is used to collect reflectance data to evaluate food surface characteristics and help identify potential defects, contaminant residues, or quality changes. Existing technologies mainly rely on holistic or static sampling methods to obtain reflectance spectra. For example, analyzing the surface microstructure through a single scanning point or a fixed area, but this ignores the complexity and heterogeneity of the food surface, making it difficult to capture local anomalies such as residues or microscopic defects, thereby reducing detection accuracy. At the same time, existing methods have defects in resource allocation. For example, the abnormal residue identification stage often adopts a unified recognition accuracy or fixed computing resources, and cannot be dynamically optimized according to real-time quality status, such as the overall degree of food deterioration. This results in insufficient resources when high precision is required, such as missing high-risk areas, or wasting resources in low-risk scenarios, increasing the detection burden. In addition, the credibility of the test results is insufficient, mainly reflected in the lack of a benchmark reference of historical data. This makes the analysis of abnormal residue distribution isolated from the context, unable to assess changing trends or eliminate random interference, affecting the reliability of the test results. Summary of the Invention

[0003] The present application provides a device and method for detecting the microstructure of a medium surface based on spectral technology, which is used to solve the technical problems in the prior art of low detection accuracy of the microstructure of a medium surface, unoptimized resource utilization, and insufficient confidence in the detection results.

[0004] In view of the above problems, the present application provides a device and method for detecting the surface microstructure of a medium based on spectroscopy technology.

[0005] In a first aspect, the present application provides a device for detecting the surface microstructure of a medium based on spectroscopy technology, the device comprising: A partitioning module is used to partition the surface of the target medium to obtain a medium partition sequence, and collect the reflectance spectra of the microstructure of the inner surface of multiple medium partitions through spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; a quality identification module, configured to identify the quality of the target medium according to the reflection spectrum sequence, obtain a quality coefficient sequence, and configure an abnormal residue identification accuracy according to the quality coefficient sequence; an abnormality identification module, configured to call abnormal residue identification resources according to the abnormal residue identification accuracy, perform abnormal residue identification on the reflectance spectrum sequence, and obtain an abnormal residue parameter sequence; The result processing module is used to obtain abnormal residue distribution according to the abnormal residue parameter sequence, perform similarity analysis with historical abnormal residue distribution to obtain recognition confidence, and combine the quality coefficient sequence and abnormal residue parameter sequence to calculate the medium quality parameter as the detection result.

[0006] In a second aspect, the present application provides a method for detecting the surface microstructure of a medium based on spectroscopy technology, the method comprising: The target medium surface is divided to obtain a medium partition sequence, and the reflectance spectra of the microstructure of the inner surface of multiple medium partitions are collected by spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; Performing quality identification of the target medium according to the reflection spectrum sequence to obtain a quality coefficient sequence, and configuring an abnormal residue identification accuracy according to the quality coefficient sequence; According to the abnormal residue identification accuracy, calling abnormal residue identification resources, performing abnormal residue identification on the reflectance spectrum sequence, and obtaining an abnormal residue parameter sequence; The abnormal residue parameter sequence is processed to obtain the abnormal residue distribution, and a similarity analysis is performed with the historical abnormal residue distribution to obtain the recognition confidence. The quality coefficient sequence and the abnormal residue parameter sequence are combined to calculate the medium quality parameter as the detection result.

[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages: Through dynamic partitioning spectrum acquisition and intelligent resource allocation mechanism, the detection accuracy and efficiency of abnormal residues at the microscopic level on the surface of food are significantly improved. Compared with traditional methods, the technical solution provided by this application significantly overcomes the signal shielding effect caused by surface heterogeneity: the reflectance spectrum acquisition mode based on the medium partition sequence can accurately capture the residual characteristic signal of the local microstructure and avoid the averaging dilution of the overall spectrum; at the same time, through the dynamic configuration of abnormal residue identification accuracy driven by the quality coefficient sequence, the intelligent matching of computing resources and risk levels is realized, and the analysis granularity of high-risk areas represented by low quality coefficients is automatically improved, while the resource consumption of stable areas is optimized, fundamentally solving the contradiction of over-detection and missed detection in traditional solutions; further combined with the recognition confidence generated by the similarity analysis of abnormal residue distribution, the spatial pollution pattern and the law of historical data are effectively integrated, so that the system has the ability to distinguish between random pollution and systematic penetration. This application has achieved the technical effect of multi-dimensional collaborative optimization: at the level of detection accuracy, it breaks through the identification bottleneck of trace residues and reduces the false detection rate caused by photon scattering interference; at the level of resource efficiency, it establishes a closed-loop control chain of quality-accuracy-resources to improve the effective detection capacity per unit computing resource; at the level of result reliability, through the fusion calculation of confidence-weighted residue parameters and quality parameters, the local pollution situation is transformed into a global safety quantitative assessment, providing highly robust decision-making support for food contamination traceability and risk warning.

[0008] The present application provides a device and method for detecting the microstructure of a medium surface based on spectral technology, which is used to solve the technical problems in the prior art that local abnormal residues on the medium surface cannot be accurately identified and the detection efficiency is low. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of the structure of a medium surface microstructure detection device based on spectroscopy technology provided in an embodiment of the present application; Figure 2 Schematic diagram of the steps of the medium surface microstructure detection method based on spectroscopy technology provided in an embodiment of the present application.

[0011] In the accompanying drawings, the components represented by the reference numerals are described as follows: Partition division module 11, quality identification module 12, abnormality identification module 13, result processing module 14. DETAILED DESCRIPTION

[0012] This application provides a medium surface microstructure detection device and method based on spectral technology to solve the technical problems in the existing technology of low medium surface microstructure detection accuracy, unoptimized resource utilization and insufficient confidence in detection results.

[0013] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0014] It should be noted that the terms "including" and "having" are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or are inherent to these processes, methods, products or devices.

[0015] Example 1, as Figure 1 As shown, the present application provides a medium surface microstructure detection device based on spectroscopy technology, wherein the device includes: A partitioning module 11 is used to partition the surface of the target medium to obtain a medium partition sequence, and collect reflectance spectra of the microstructure of the inner surface of multiple medium partitions using spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; The quality identification module 12 is used to identify the quality of the target medium according to the reflection spectrum sequence, obtain a quality coefficient sequence, and configure the abnormal residue identification accuracy according to the quality coefficient sequence; An abnormality identification module 13 is configured to call an abnormality residue identification resource according to the abnormality residue identification accuracy, perform abnormality residue identification on the reflectance spectrum sequence, and obtain an abnormality residue parameter sequence; The result processing module 14 is used to obtain abnormal residue distribution according to the abnormal residue parameter sequence, perform similarity analysis with historical abnormal residue distribution to obtain recognition confidence, and combine the quality coefficient sequence and abnormal residue parameter sequence to calculate the medium quality parameter as the detection result.

[0016] In the embodiment of the present application, the partitioning module 11 is used to partition the surface of the target medium to obtain a medium partition sequence, and collect the reflection spectra of the microstructure of the inner surface of multiple medium partitions using spectral technology to obtain a reflection spectrum sequence, wherein the target medium is food, including: Sampling a target medium, dividing the surface of the target medium to obtain a plurality of medium partitions, and numbering and arranging the partitions to obtain a medium partition sequence, wherein the target medium is food; The reflection spectra of the plurality of medium partitions are collected respectively by using spectral technology to obtain a reflection spectrum sequence.

[0017] The heterogeneity of food surface microstructures, such as the pore distribution of vegetable skins, the texture of meats, and the crispness gradient of baked goods, complicates photon scattering paths. Traditional overall spectral acquisition, due to the coupling of reflected signals from areas with sudden changes in curvature with flat areas, easily overwhelms characteristic spectra with background noise. Existing technologies use a global averaging process, which fails to highlight the spectral characteristics of local high-risk points, making it difficult to identify key spectral information.

[0018] A target medium is randomly sampled and its surface is divided, for example, into multiple 1 cm x 1 cm square grids. The grids are numbered to obtain a medium partition sequence. The target medium is food, such as apples, bread, etc.

[0019] For example, a fiber optic spectrometer is used to collect the reflection spectra of each medium partition. Fiber optic spectrometers are commonly used in spectral measurements, offering advantages such as high accuracy and speed. The collected reflection spectra are organized and each is labeled with the medium partition number, resulting in a reflection spectrum sequence.

[0020] By using a sequential acquisition mechanism based on the partitioning of the surface of the medium, an independent spectral analysis channel for microstructural features is established. This application collects spectral signals from different regions separately, specifically capturing the spectral characteristics of high-risk concave structures such as the pedicles, and eliminating the dilution interference of the flat region spectrum on the signal of the mutation region.

[0021] In the embodiment of the present application, the quality identification module 12 is configured to identify the quality of the target medium according to the reflection spectrum sequence, obtain a quality coefficient sequence, and configure the abnormal residue identification accuracy according to the quality coefficient sequence, including: Inputting each reflection spectrum in the reflection spectrum sequence into a medium quality identification network, identifying and outputting a plurality of quality coefficients to obtain a quality coefficient sequence, wherein the medium quality identification network is trained using a set of sample reflection spectra and a set of annotated sample quality coefficients, the sample quality coefficients being greater than 0 and less than 1 and positively correlated with the medium quality; configuring the abnormal residue identification accuracy according to the quality coefficient sequence; The abnormal residue recognition accuracy is configured according to the quality coefficient sequence, including: Calculating an average quality coefficient according to the quality coefficient sequence; The configuration abnormality residue recognition accuracy is calculated according to the average quality coefficient, wherein the average quality coefficient is negatively correlated with the abnormality residue recognition accuracy.

[0022] The surface quality distribution of food products is strongly correlated with contamination risk. For example, a distorted reflectance spectrum in bruised areas indicates tissue damage and the accumulation of contaminants. However, existing technologies employ a uniform static recognition accuracy across the entire area, failing to respond to changes in surface risk gradients. In low-quality areas, such as those surrounding insect holes, insufficient fixed analysis granularity can lead to missed detection of micro-residues. In high-quality areas, such as intact fruit peels, overly detailed analysis wastes computing power. This uniform precision allocation mechanism prevents high-risk areas from receiving detection resources commensurate with their threat level.

[0023] In an embodiment of the present application, a neural network is used as the basis for constructing a medium quality identification network. The medium quality identification network includes a three-layer structure. The number of nodes in the input layer is equal to the number of spectral bands. For example, if the collected reflectance spectrum has 20 bands, the input layer contains 20 neurons, the hidden layer contains 128 neurons, and the ReLU function is used for activation. The output layer contains 1 node and the Sigmoid function is used for activation. The collected reflectance spectrum set is labeled and the quality coefficient is labeled to obtain a sample reflectance spectrum set and a labeled sample quality coefficient set. The quality coefficient is a coefficient greater than 0 and less than 1 and is positively correlated with the quality of the medium. For example, the quality coefficient is labeled according to the proportion of contaminated and damaged areas on the surface of the apple. If the proportion of contaminated and damaged areas is 0.05, the labeled quality coefficient is 1-0.05=0.95. The quality coefficient reflects the quality of the medium. The larger the quality coefficient, the better the quality of the medium. The constructed medium quality identification network is supervised trained using the sample reflectance spectrum set and the labeled sample quality coefficient set, and the loss function uses the mean square error. The model parameters are continuously adjusted for training until the model converges and the error in the output quality coefficient does not exceed ±0.1. This indicates that the medium quality identification network training is complete. Each reflection spectrum in the reflection spectrum sequence is input into the medium quality identification network, and multiple quality coefficients are identified and output. These are integrated to obtain a quality coefficient sequence.

[0024] The arithmetic mean of all the quality coefficients in the quality coefficient sequence is calculated to obtain the average quality coefficient.

[0025] The configuration anomaly residue identification accuracy is calculated based on the average quality coefficient, where the average quality coefficient is negatively correlated with the anomaly residue identification accuracy. For example, the anomaly residue identification accuracy = 1 - the average quality coefficient. For example, if the average quality coefficient is 0.6, the anomaly residue identification accuracy = 1 - 0.6 = 0.4.

[0026] In the embodiments of this application, a risk-driven dynamic precision mapping system is constructed based on the quality coefficient sequence, achieving intelligent closed-loop control of surface defect degree and analysis precision. When the quality coefficient is abnormally low, the local recognition accuracy is automatically improved to a refined analysis; when the quality coefficient is stable at a high level, it switches to a macro-fast scanning mode. This mechanism breaks the shackles of uniform global precision, allowing limited computing resources to be precisely focused on high-risk target areas, ensuring ultra-fine detection in high-risk areas while optimizing overall energy efficiency.

[0027] In the embodiment of the present application, the abnormality identification module 13 is configured to call abnormality residue identification resources according to the abnormal residue identification accuracy, perform abnormal residue identification on the reflectance spectrum sequence, and obtain an abnormal residue parameter sequence, including: obtaining a plurality of abnormal residue identifiers; Among them, multiple abnormal residue identifiers are obtained, including: Based on the test data of similar media, a set of sample reflection spectra is collected, and the abnormal residual amount of the medium under each sample reflection spectrum is marked to obtain a set of sample abnormal residual parameters; selecting, with replacement, a preset proportion of data from the sample reflectance spectrum set and the sample abnormal residue parameter set to obtain first abnormal residue identification training data, and training a first abnormal residue identifier using machine learning; Continue training to obtain multiple abnormal residue identifiers; Calculate the number K of configured call identifiers according to the abnormal residue recognition accuracy and the number of the plurality of abnormal residue identifiers, where K is a positive integer; K abnormal residue identifiers are randomly selected, each reflection spectrum in the reflection spectrum sequence is input, a plurality of abnormal residue identification parameter sets are obtained, and the average is calculated to obtain an abnormal residue parameter sequence, wherein each abnormal residue identification parameter set includes K abnormal residue identification parameters.

[0028] The computational intensity of abnormal residue identification increases exponentially with precision requirements. Traditional methods rely on a fixed-scale identification resource pool. In unexpected high-risk scenarios, such as localized high-concentration contamination caused by accumulation of pesticide sprays on apples, insufficient identifiers limit the depth of spectral feature analysis, potentially leading to misjudgments. In low-risk areas, excessive identifier invocation leads to redundant computation. Existing technologies lack a dynamic balance between precision requirements and computing power supply, resulting in a mismatch and loss of high-value identification resources in the spatial dimension.

[0029] In an embodiment of the present application, a set of sample reflection spectra is collected based on detection data of similar media, and the abnormal residue amount on the medium surface under each sample reflection spectrum is marked to obtain a set of sample abnormal residue parameters.

[0030] The Bootstrap sampling method is used to perform random sampling with replacement. For example, the preset ratio is set to 60%, and 60% of the data in the sample reflectance spectrum set and the sample abnormal residue parameter set are randomly sampled to obtain the first abnormal residue recognition training data.

[0031] A random forest regressor from machine learning was used to construct the first abnormal residual identifier. The abnormal residual identifier consists of a three-layer structure. The number of nodes in the input layer is equal to the number of spectral bands. For example, if the reflectance spectrum has 20 bands, the input layer contains 20 nodes. The decision tree layer contains 50 decision trees, each with a depth of 10. The output layer contains 1 node, which outputs the abnormal residual parameters. The first abnormal residual identifier undergoes supervised training using the first abnormal residual identification training data. The loss function uses the mean squared error, and the optimization method uses the default decision tree splitting rule. Training continues until the model converges, meaning that the output abnormal residual parameter accuracy exceeds 95%. The first abnormal residual identifier is considered trained successfully. Using the same structure and training method, repeated sampling and training are performed to obtain multiple abnormal residual identifiers.

[0032] Calculate the number of identifiers, K, to be called based on the residual anomaly recognition accuracy and the number of residual anomaly identifiers. K is a positive integer. K = residual anomaly recognition accuracy × number of residual anomaly identifiers. For example, if the residual anomaly recognition accuracy is 0.4 and the number of residual anomaly identifiers is 10, then K = 0.4 × 10 = 4. If the result is not an integer, round it up.

[0033] K abnormal residue identifiers are randomly selected and each reflection spectrum in the reflection spectrum sequence is input into the K abnormal residue identifiers to obtain multiple abnormal residue identification parameter sets. The means of the multiple abnormal residue identification parameter sets are calculated and integrated to obtain the abnormal residue parameter sequence.

[0034] The embodiments of the present application achieve real-time spatial matching of computing power and risk threats by establishing a precision parameter-guided elastic scheduling architecture for identification resources. For areas with peak accuracy in abnormal residue identification, such as areas rich in pesticide residues, dynamic expansion calls for a dense identifier cluster for fusion analysis; for areas with low precision requirements, it shrinks to lightweight identification. This intelligent load balancing mechanism breaks through the bottleneck of unified resource allocation, maximizing the computing power input-output ratio of a single test. While high-risk areas receive in-depth analysis guarantees, the overall resource consumption curve of the system is significantly reduced.

[0035] In the embodiment of the present application, the result processing module 14 is used to process the abnormal residue parameter sequence to obtain an abnormal residue distribution, perform similarity analysis with the historical abnormal residue distribution to obtain recognition confidence, and combine the quality coefficient sequence and the abnormal residue parameter sequence to calculate the medium quality parameter as the detection result, including: Calculating the ratio of each abnormal residual parameter to the mean of the abnormal residual parameter sequence to obtain a plurality of relative residual coefficients, marking a plurality of medium partitions, and obtaining an abnormal residual distribution; Obtaining an average abnormal residual distribution detected over a historical period of time for the same type of media to obtain a historical abnormal residual distribution, wherein the historical abnormal residual distribution includes a plurality of historical relative residual coefficients of a plurality of media partitions; Calculating the similarity between the abnormal residue distribution and the historical abnormal residue distribution to obtain recognition confidence, wherein the similarity between the relative residue coefficient of each medium partition and the historical relative residue coefficient is calculated, and the mean is calculated as the similarity; Calculating and obtaining medium quality parameters as detection results based on the identification confidence, quality coefficient sequence, and abnormal residual parameter sequence; The medium quality parameter is calculated and obtained as a detection result based on the recognition confidence, the quality coefficient sequence and the abnormal residual parameter sequence, including: Get the preset residual weight; Multiplying the recognition confidence by the preset residual weight to obtain a residual weight, and calculating a quality weight; Obtaining a standard abnormal residual parameter, calculating a mean of a ratio of the standard abnormal residual parameter to a plurality of abnormal residual parameters in the abnormal residual parameter sequence, and obtaining a residual quality coefficient; Calculating the mean of the quality coefficient sequence to obtain an average quality coefficient; The mass weight and the residual weight are used to perform weighted calculation on the average mass coefficient and the residual mass coefficient to obtain a medium quality parameter as a detection result.

[0036] Food contaminants exhibit inherent migration patterns, such as the gradient of pesticide penetration from the concave area of an apple stem toward the core. Existing solutions rely solely on absolute numerical thresholds, misclassifying high concentrations of residues in the stem as incidental surface contamination and ignoring the potential risk of contamination migrating into the flesh. Furthermore, due to a lack of confidence calibration based on historical distribution patterns, they are insufficiently adaptable to emerging contamination distribution patterns, such as condensation traces from cold chain transportation.

[0037] In this embodiment, the ratio of each abnormal residual parameter to the mean of the abnormal residual parameter sequence is calculated to obtain multiple relative residual coefficients. Relative residual coefficient = abnormal residual parameter ÷ mean of the abnormal residual parameter sequence. For example, if the abnormal residual parameter is 0.6 and the mean of the abnormal residual parameter sequence is 0.3, then the relative residual coefficient = 0.6 ÷ 0.3 = 2. The larger the relative residual coefficient, the more severe the residual condition compared to the average residual. Multiple media partitions are labeled, and the relative residual coefficients are assigned to the corresponding media partitions to obtain the abnormal residual distribution.

[0038] From the historical detection data, the average abnormal residual distribution of the same type of media detected in the historical time is extracted. For example, the average abnormal residual distribution of the same type of media detected in the historical time in the past 30 days is extracted to obtain the historical abnormal residual distribution, wherein the historical abnormal residual distribution includes multiple historical relative residual coefficients of multiple media partitions.

[0039] Calculate the similarity between the abnormal residue distribution and the historical abnormal residue distribution to obtain the recognition confidence. Calculate the similarity between the relative residue coefficient of each media partition and the historical relative residue coefficient, and calculate the mean as the similarity. Similarity = 1 - |relative residue coefficient - historical relative residue coefficient| / historical relative residue coefficient. For example, if the relative residue coefficient is 2 and the historical relative residue coefficient is 2.5, then the similarity = 1 - |2 - 2.5| / 2.5 = 0.8. Calculate the arithmetic mean of the similarities between the relative residue coefficient of each media partition and the historical relative residue coefficient to obtain the recognition confidence.

[0040] A preset residue weight is obtained. The preset residue weight is a preset weight parameter reflecting the importance of the residue in the medium surface detection. For example, the preset residue weight is set to 0.3.

[0041] The recognition confidence is multiplied by the preset residual weight to obtain the residual weight, and the quality weight is calculated. For example, if the recognition confidence is 0.6 and the preset residual weight is 0.3, then the residual weight = recognition confidence × preset residual weight = 0.6 × 0.3 = 0.18, and the quality weight is 1-residual weight = 1-0.18 = 0.82.

[0042] Obtain the standard abnormal residue parameter and calculate the mean of the ratio of the standard abnormal residue parameter to the multiple abnormal residue parameters within the abnormal residue parameter sequence to obtain the residue quality coefficient. The standard abnormal residue coefficient is a pre-set standard for pesticide residues and other residues. Residues below the standard parameter are considered to have minimal impact. Calculate the arithmetic mean of the ratio of the standard abnormal residue parameter to the multiple abnormal residue parameters within the abnormal residue parameter sequence as the residue quality coefficient. The residue quality coefficient = ∑ (standard abnormal residue parameter ÷ abnormal residue parameter) / number of abnormal residue parameters. The larger the abnormal residue parameter, the smaller the residue quality coefficient.

[0043] Calculate the arithmetic mean of the quality coefficient sequence as the average quality coefficient.

[0044] The quality weight and residual weight are used to weight the average quality coefficient and the residual quality coefficient to obtain the medium quality parameter as the test result. For example, if the quality weight = 0.82, the residual weight = 0.18, the average quality coefficient = 0.6, and the residual quality coefficient = 0.5, then the test result = quality weight × average quality coefficient + residual weight × residual quality coefficient = 0.582.

[0045] In the examples of this application, a historical comparison mechanism for spatial pollution patterns is established through similarity analysis of abnormal residue distributions, enabling systematic comparison. A quantitative assessment of identification confidence converts the degree to which the current distribution deviates from the historical baseline into a reliability indicator, significantly improving the ability to warn of migratory pollution risks. Finally, a confidence-weighted quality parameter algorithm is integrated, breaking through the limitations of traditional single-value assessments. This approach not only quantifies surface structural integrity (quality coefficient sequence) but also assesses contaminant penetration (abnormal residue parameter sequence), generating a global safety factor that is both real-time and predictive.

[0046] Example 2, as Figure 2 As shown, the present application provides a method for detecting the surface microstructure of a medium based on spectroscopy technology, wherein the method comprises: S10: Dividing the surface of the target medium to obtain a medium partition sequence, collecting reflectance spectra of the microstructure of the inner surfaces of the multiple medium partitions using spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; S20: Identify the quality of the target medium according to the reflection spectrum sequence, obtain a quality coefficient sequence, and configure the abnormal residue identification accuracy according to the quality coefficient sequence; S30: According to the abnormal residue recognition accuracy, calling abnormal residue recognition resources, performing abnormal residue recognition on the reflectance spectrum sequence, and obtaining an abnormal residue parameter sequence; S40: Obtain abnormal residue distribution according to the abnormal residue parameter sequence, perform similarity analysis with historical abnormal residue distribution to obtain recognition confidence, and calculate and obtain medium quality parameters as detection results by combining the quality coefficient sequence and the abnormal residue parameter sequence.

[0047] In particular, step S10 in the method provided in the embodiment of the present application includes: Sampling a target medium, dividing the surface of the target medium to obtain a plurality of medium partitions, and numbering and arranging the partitions to obtain a medium partition sequence, wherein the target medium is food; The reflection spectra of the plurality of medium partitions are collected respectively by using spectral technology to obtain a reflection spectrum sequence.

[0048] In particular, step S20 in the method provided in the embodiment of the present application includes: Inputting each reflection spectrum in the reflection spectrum sequence into a medium quality identification network, identifying and outputting a plurality of quality coefficients to obtain a quality coefficient sequence, wherein the medium quality identification network is trained using a set of sample reflection spectra and a set of annotated sample quality coefficients, the sample quality coefficients being greater than 0 and less than 1 and positively correlated with the medium quality; configuring the abnormal residue identification accuracy according to the quality coefficient sequence; The abnormal residue recognition accuracy is configured according to the quality coefficient sequence, including: Calculating an average quality coefficient according to the quality coefficient sequence; The configuration abnormality residue recognition accuracy is calculated according to the average quality coefficient, wherein the average quality coefficient is negatively correlated with the abnormality residue recognition accuracy.

[0049] In particular, step S30 in the method provided in the embodiment of the present application includes: obtaining a plurality of abnormal residue identifiers; Among them, multiple abnormal residue identifiers are obtained, including: Based on the test data of similar media, a set of sample reflection spectra is collected, and the abnormal residual amount of the medium under each sample reflection spectrum is marked to obtain a set of sample abnormal residual parameters; selecting, with replacement, a preset proportion of data from the sample reflectance spectrum set and the sample abnormal residue parameter set to obtain first abnormal residue identification training data, and training a first abnormal residue identifier using machine learning; Continue training to obtain multiple abnormal residue identifiers; Calculate the number K of configured call identifiers according to the abnormal residue recognition accuracy and the number of the plurality of abnormal residue identifiers, where K is a positive integer; K abnormal residue identifiers are randomly selected, each reflection spectrum in the reflection spectrum sequence is input, a plurality of abnormal residue identification parameter sets are obtained, and the average is calculated to obtain an abnormal residue parameter sequence, wherein each abnormal residue identification parameter set includes K abnormal residue identification parameters.

[0050] In particular, step S40 in the method provided in the embodiment of the present application includes: Calculating the ratio of each abnormal residual parameter to the mean of the abnormal residual parameter sequence to obtain a plurality of relative residual coefficients, marking a plurality of medium partitions, and obtaining an abnormal residual distribution; Obtaining an average abnormal residual distribution detected over a historical period of time for the same type of media to obtain a historical abnormal residual distribution, wherein the historical abnormal residual distribution includes a plurality of historical relative residual coefficients of a plurality of media partitions; Calculating the similarity between the abnormal residue distribution and the historical abnormal residue distribution to obtain recognition confidence, wherein the similarity between the relative residue coefficient of each medium partition and the historical relative residue coefficient is calculated, and the mean is calculated as the similarity; Calculating and obtaining medium quality parameters as detection results based on the identification confidence, quality coefficient sequence, and abnormal residual parameter sequence; The medium quality parameter is calculated and obtained as a detection result based on the recognition confidence, the quality coefficient sequence and the abnormal residual parameter sequence, including: Get the preset residual weight; Multiplying the recognition confidence by the preset residual weight to obtain a residual weight, and calculating a quality weight; Obtaining a standard abnormal residual parameter, calculating a mean of a ratio of the standard abnormal residual parameter to a plurality of abnormal residual parameters in the abnormal residual parameter sequence, and obtaining a residual quality coefficient; Calculating the mean of the quality coefficient sequence to obtain an average quality coefficient; The mass weight and the residual weight are used to perform weighted calculation on the average mass coefficient and the residual mass coefficient to obtain a medium quality parameter as a detection result.

[0051] The present application provides a device and method for detecting the microstructure of a medium surface based on spectral technology, which is used to solve the technical problems in the prior art that local abnormal residues on the medium surface cannot be accurately identified and the detection efficiency is low.

[0052] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0053] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0054] This specification and drawings are merely illustrative of the present application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Obviously, those skilled in the art may make various modifications and variations to this application without departing from the scope of this application. Thus, this application is intended to include such modifications and variations as fall within the scope of this application and its equivalents.

Claims

1. A medium surface microstructure detection device based on spectroscopy technology, characterized in that: The device comprises: A partitioning module is used to partition the surface of the target medium to obtain a medium partition sequence, and collect the reflectance spectra of the microstructure of the inner surface of multiple medium partitions through spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; a quality identification module, configured to identify the quality of the target medium according to the reflection spectrum sequence, obtain a quality coefficient sequence, and configure an abnormal residue identification accuracy according to the quality coefficient sequence; an abnormality identification module, configured to call abnormal residue identification resources according to the abnormal residue identification accuracy, perform abnormal residue identification on the reflectance spectrum sequence, and obtain an abnormal residue parameter sequence; The result processing module is used to obtain abnormal residue distribution according to the abnormal residue parameter sequence, perform similarity analysis with historical abnormal residue distribution to obtain recognition confidence, and combine the quality coefficient sequence and abnormal residue parameter sequence to calculate the medium quality parameter as the detection result.

2. The medium surface microstructure detection device based on spectroscopy technology according to claim 1, characterized in that: The target medium surface is divided to obtain a medium partition sequence, and the reflection spectra of the microstructures of the inner surfaces of the plurality of medium partitions are collected by spectral technology to obtain a reflection spectrum sequence, including: Sampling a target medium, dividing the surface of the target medium to obtain a plurality of medium partitions, and numbering and arranging the partitions to obtain a medium partition sequence, wherein the target medium is food; The reflection spectra of the plurality of medium partitions are collected respectively by using spectral technology to obtain a reflection spectrum sequence.

3. The medium surface microstructure detection device based on spectroscopy technology according to claim 1, characterized in that: Performing quality identification of the target medium according to the reflection spectrum sequence to obtain a quality coefficient sequence, and configuring abnormal residue identification accuracy according to the quality coefficient sequence, including: Inputting each reflection spectrum in the reflection spectrum sequence into a medium quality identification network, identifying and outputting a plurality of quality coefficients to obtain a quality coefficient sequence, wherein the medium quality identification network is trained using a set of sample reflection spectra and a set of annotated sample quality coefficients, the sample quality coefficients being greater than 0 and less than 1 and positively correlated with the medium quality; According to the quality coefficient sequence, the abnormal residue recognition accuracy is configured.

4. The medium surface microstructure detection device based on spectroscopy technology according to claim 3, characterized in that: According to the quality coefficient sequence, the abnormal residue recognition accuracy is configured, including: Calculating an average quality coefficient according to the quality coefficient sequence; The configuration abnormality residue recognition accuracy is calculated according to the average quality coefficient, wherein the average quality coefficient is negatively correlated with the abnormality residue recognition accuracy.

5. The medium surface microstructure detection device based on spectroscopy technology according to claim 1, characterized in that: According to the abnormal residue identification accuracy, calling abnormal residue identification resources, performing abnormal residue identification on the reflectance spectrum sequence, and obtaining an abnormal residue parameter sequence, including: obtaining a plurality of abnormal residue identifiers; Calculate the number K of configured call identifiers according to the abnormal residue recognition accuracy and the number of the plurality of abnormal residue identifiers, where K is a positive integer; K abnormal residue identifiers are randomly selected, each reflection spectrum in the reflection spectrum sequence is input, a plurality of abnormal residue identification parameter sets are obtained, and the average is calculated to obtain an abnormal residue parameter sequence, wherein each abnormal residue identification parameter set includes K abnormal residue identification parameters.

6. The medium surface microstructure detection device based on spectroscopy technology according to claim 5, characterized in that: Get multiple abnormal residue identifiers, including: Based on the test data of similar media, a set of sample reflection spectra is collected, and the abnormal residual amount of the medium under each sample reflection spectrum is marked to obtain a set of sample abnormal residual parameters; selecting, with replacement, a preset proportion of data from the sample reflectance spectrum set and the sample abnormal residue parameter set to obtain first abnormal residue identification training data, and training a first abnormal residue identifier using machine learning; Continue training to obtain multiple abnormal residual identifiers.

7. The medium surface microstructure detection device based on spectroscopy technology according to claim 1, characterized in that: The abnormal residue parameter sequence is processed to obtain an abnormal residue distribution, and similarity analysis is performed with the historical abnormal residue distribution to obtain recognition confidence. The quality coefficient sequence and the abnormal residue parameter sequence are combined to calculate the medium quality parameter as the detection result, including: Calculating the ratio of each abnormal residual parameter to the mean of the abnormal residual parameter sequence to obtain a plurality of relative residual coefficients, marking a plurality of medium partitions, and obtaining an abnormal residual distribution; Obtaining an average abnormal residual distribution detected over a historical period of time for the same type of media to obtain a historical abnormal residual distribution, wherein the historical abnormal residual distribution includes a plurality of historical relative residual coefficients of a plurality of media partitions; Calculating the similarity between the abnormal residue distribution and the historical abnormal residue distribution to obtain recognition confidence, wherein the similarity between the relative residue coefficient of each medium partition and the historical relative residue coefficient is calculated, and the mean is calculated as the similarity; According to the identification confidence, the quality coefficient sequence and the abnormal residual parameter sequence, the medium quality parameter is calculated and obtained as the detection result.

8. The medium surface microstructure detection device based on spectroscopy technology according to claim 7, characterized in that: According to the identification confidence, the quality coefficient sequence and the abnormal residual parameter sequence, the medium quality parameter is calculated as the detection result, including: Get the preset residual weight; Multiplying the recognition confidence by the preset residual weight to obtain a residual weight, and calculating a quality weight; Obtaining a standard abnormal residual parameter, calculating a mean of a ratio of the standard abnormal residual parameter to a plurality of abnormal residual parameters in the abnormal residual parameter sequence, and obtaining a residual quality coefficient; Calculating the mean of the quality coefficient sequence to obtain an average quality coefficient; The mass weight and the residual weight are used to perform weighted calculation on the average mass coefficient and the residual mass coefficient to obtain a medium quality parameter as a detection result.

9. A method for detecting the surface microstructure of a medium based on spectroscopy technology, characterized in that: The method comprises: The target medium surface is divided to obtain a medium partition sequence, and the reflectance spectra of the microstructure of the inner surface of multiple medium partitions are collected by spectral technology to obtain a reflectance spectrum sequence, wherein the target medium is food; Performing quality identification of the target medium according to the reflection spectrum sequence to obtain a quality coefficient sequence, and configuring an abnormal residue identification accuracy according to the quality coefficient sequence; According to the abnormal residue identification accuracy, calling abnormal residue identification resources, performing abnormal residue identification on the reflectance spectrum sequence, and obtaining an abnormal residue parameter sequence; The abnormal residue parameter sequence is processed to obtain the abnormal residue distribution, and a similarity analysis is performed with the historical abnormal residue distribution to obtain the recognition confidence. The quality coefficient sequence and the abnormal residue parameter sequence are combined to calculate the medium quality parameter as the detection result.

Citation Information

Patent Citations

  • Intelligent cloth inspection detection method, system, equipment and medium

    CN118583802A

  • Deep learning-based hyperspectral detection method and system for pesticide residues on surfaces of Chinese cabbages

    CN118641488A

  • Processing a spectrum image measurement

    US20250173842A1

Cited By

  • Multi-sensor fusion oxygenerator fault diagnosis method and system

    CN120869259A