Knowledge graph and deep learning fused food microbial pollution rapid detection method

By integrating knowledge graphs with deep learning methods, a multimodal feature matrix is ​​constructed and dynamically updated, which solves the problems of timeliness, multimodal fusion and dynamic adaptation in food microbial contamination detection, realizes rapid and accurate contamination identification and traceability, and meets the real-time monitoring needs of the food circulation link.

CN120850205AActive Publication Date: 2025-10-28QINGDAO ZHONGYI MONITORING
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510942481.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-10-28
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

Existing technologies for detecting microbial contamination in food suffer from problems such as poor detection timeliness, insufficient fusion of multimodal feature matrices, weak dynamic adaptability, and low knowledge reuse efficiency. They cannot meet the real-time monitoring needs of food circulation and have low accuracy in identifying complex contamination scenarios. Furthermore, they lack adaptability to variations in new pollutant species and face difficulties in tracing contamination sources across batches.

Method used

By integrating knowledge graphs with deep learning, a multimodal feature matrix is ​​constructed by synchronously collecting spectral data, biosensor time series signals, and microscopic images of food samples. The microbial knowledge graph is integrated and cross-domain feature fusion is performed. The deep learning model is combined for prediction, and the knowledge graph is dynamically updated to optimize detection rules, thus achieving semantic reasoning of pollution transmission paths and traceability of supply chain data.

Benefits of technology

It enables rapid detection, improves the accuracy of identification in complex pollution scenarios, dynamically adapts to the variation of new pollutants, improves the efficiency of cross-batch pollution source tracing, meets the real-time monitoring needs of cold chain logistics, and shortens the response time of data correlation analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850205A_ABST
    Figure CN120850205A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of food safety, and discloses a food microbial contamination rapid detection method fusing a knowledge graph and deep learning, and the method comprises a data collection module, a knowledge graph engine, a deep learning calculation unit, a dynamic optimization module, a visual interaction terminal and a traceability management platform. A micro-fluidic chip and impedance sensing combined technology is adopted, the traditional long-time detection period is shortened, the real-time monitoring requirement of cold-chain logistics is met, a spectrum-bioelectricity-microscopic image three-mode space-time alignment model is created for the first time, dimension gaps are eliminated through feature space mapping, the recognition accuracy of complex matrix pollution is improved, and the real-time monitoring requirement of the cold-chain logistics is met. By constructing a rule engine driven by an industry knowledge graph, dynamic model updating is achieved through an incremental learning module, the detection rate of novel salmonella variants is increased, and the problem of the omission ratio of new pathogens is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food safety technology, specifically to a rapid detection method for food microbial contamination that integrates knowledge graphs and deep learning. Background Technology

[0002] Because microbial contamination accounts for a large proportion of food, and its scope and harm are wide, rapid detection of microorganisms is an important part of food safety monitoring. With the development of science and technology, the standardization, specialization and low energy trend of food safety are becoming increasingly obvious, which has laid a solid foundation for the development of the food safety testing industry. With the continuous development of food safety technology, more and more technicians are combining it with biotechnology.

[0003] However, existing technologies have the following drawbacks:

[0004] 1. Poor detection timeliness: Conventional culture methods require a long time to obtain results, which cannot meet the real-time monitoring needs of the food circulation process;

[0005] 2. Insufficient fusion of multimodal feature matrices: Existing technologies mostly use a single detection method and lack multi-dimensional collaborative analysis of spectral data, biological signals, and microscopic images, resulting in low accuracy in identifying complex pollution scenarios;

[0006] 3. Weak dynamic adaptability: Traditional detection systems cannot effectively cope with the variation of new pollutants and lack a dynamic synchronization mechanism between detection models and industry standards;

[0007] 4. Low efficiency of knowledge reuse: Historical testing data and expert experience are stored in a fragmented manner, failing to build a knowledge network with semantic reasoning capabilities, which makes it difficult to trace the source of contamination across batches.

[0008] Therefore, this invention provides a rapid detection method for food microbial contamination that integrates knowledge graphs and deep learning. This method can achieve intelligent fusion of multimodal feature matrices, dynamic optimization of detection rules, and self-learning ability in microbial contamination detection, thereby breaking through the bottlenecks of existing technologies.

[0009] (1) Technical problems solved

[0010] To address the shortcomings of existing technologies, this invention provides a rapid detection method for food microbial contamination that integrates knowledge graphs and deep learning, thus solving the problems mentioned in the background section.

[0011] (2) Technical solution

[0012] To achieve the above objectives, the present invention provides the following technical solution: a rapid detection method for food microbial contamination integrating knowledge graphs and deep learning, the method comprising the following steps:

[0013] S1. Simultaneously acquire spectral data, biosensor time-series signals, and microscopic images of food samples, and construct a multimodal feature matrix through spatiotemporal alignment processing;

[0014] S2. Establish a food microbiology knowledge graph, integrating microbial species characteristics, historical contamination cases, detection thresholds, and supply chain environmental parameters;

[0015] S3. Perform cross-domain feature fusion on the multimodal feature matrix, and use an attention mechanism to weight and aggregate spectral features, signal periodic features and image morphological features;

[0016] S4. Input the fused features into the deep learning detection model, and output the prediction results of microbial species and concentration through the hierarchical attention mechanism;

[0017] S5. Semantic reasoning based on knowledge graph: Activate the pollution transmission path associated with the prediction result, and correct the detection error by combining the environmental tolerance parameter under the pollution transmission path;

[0018] S6. Compare the security thresholds in the knowledge graph and generate an assessment report;

[0019] S7. Dynamically update the knowledge graph: Optimize the correlation strength between microorganisms and pollution sources and the confidence level of detection rules based on the assessment report;

[0020] S8. The detection model is incrementally trained based on the updated knowledge graph, and the elastic weight consolidation algorithm is used to prevent parameter forgetting.

[0021] S9. By combining supply chain data to trace the source of pollution, a quality optimization report containing key control points and treatment solutions is generated.

[0022] Preferably, S1 specifically includes:

[0023] S11. Use a hyperspectral imaging device to collect the reflectance spectral data of the food surface wavelength and generate a 256-channel spectral feature vector;

[0024] S12. Continuously monitor the pH value, conductivity, and volatile organic compound concentration changes of the sample using a biosensor array;

[0025] S13. Use a microscopic imaging system to obtain magnified microbial morphological images and employ autofocus technology to ensure image clarity;

[0026] S14. Perform time-stamp alignment and spatial registration processing on the spectral data, biosensor signals, and microscopic images to construct a multimodal feature matrix.

[0027] Preferably, the method for constructing the food microbial knowledge graph in S2 includes:

[0028] S21. Extract data on microbial detection limits, pathogenic bacteria classification standards, and safety thresholds;

[0029] S22. Integrate temperature and humidity records, processing parameters, and warehousing and transportation data from all links of the supply chain to form nodes of environmental pollution factors;

[0030] S23. Establish a multi-dimensional relationship between microbial species and pollution sources, including a transmission probability matrix, environmental tolerance parameters, and growth rate correlation factors, to generate pollution transmission pathways.

[0031] Preferably, the cross-domain fusion feature processing of S3 specifically includes:

[0032] S31. Perform wavelet noise reduction on the spectral data and extract the energy distribution of the characteristic bands;

[0033] S32. Extract morphological features and spatial distribution patterns of microscopic images using deep residual networks;

[0034] S33. Design a multimodal attention fusion module, dynamically allocate fusion weights for spectral features, and calculate cross-modal feature attention weights:

[0035]

[0036] Among them, w i q represents the fusion weight of the i-th mode, where i∈{1,2,3} corresponds to the spectral, sensor, and image modes, respectively. i ∈R d For the query vector, extract the features from the i-th modality through a linear transformation, k i ∈R d The key vector is generated through a learnable parameter matrix, φ(·) is the LeakyReLU activation function, d is the feature vector dimension, and n is the total number of modes;

[0037] According to the weight w i Weighted fusion of multimodal features:

[0038]

[0039] Among them, f i ∈R d W is the original feature vector of the i-th mode. i ∈R d×d For the learnable weight matrix, b i ∈R d For the bias term, F fusion ∈R d This is the fused feature vector.

[0040] Preferably, the deep learning detection model in S4 includes the following steps:

[0041] S41, includes a time series analysis module with bidirectional LSTM to capture the time-series dependencies of biological signals;

[0042] S42, Multi-scale Feature Pyramid Module, integrates microbial characterization features at different levels of abstraction;

[0043] S43, Adaptive Feature Selection Module, dynamically activates relevant fusion feature channels according to the current detection scenario, and outputs the predicted results of microbial species and concentration.

[0044] Preferably, the semantic reasoning method of S5 includes:

[0045] S51. Map the assessment report to the microbial species nodes in the knowledge graph to activate the associated pollution source pathways;

[0046] S52. Calculate the semantic similarity between the microorganism to be tested and known pathogens based on graph embedding algorithm;

[0047] S53. Correct errors in false positive and false negative assessment reports by adjusting the probability weights of pollution transmission paths.

[0048] Preferably, the dynamic update method of S7 includes:

[0049] S71. Establish a mapping matrix between the evaluation report and knowledge graph nodes;

[0050] S72. The incremental graph learning algorithm is used to update the association strength parameters between nodes, using the following incremental graph update formula:

[0051]

[0052] in, R represents the association strength between nodes u and v in the t-th iteration. uv ∈[0,1] represents the observed relation strength in the actual detection data, η is the learning rate, α and β are the balance coefficients, and p uv q was calculated based on the historical case database. uv Based on the current detection data, KL(p) uv ||q uv ) represents the prior distribution p of the knowledge graph. uv With the current distribution q uv KL divergence, This represents the gradient update amount of the edge weights in the knowledge graph.

[0053] Preferably, the incremental training method of S8 includes:

[0054] S81. Extract new feature patterns from the updated knowledge graph as training samples;

[0055] S82. Freeze the parameters of the bottom feature extraction layer of the model and adjust the weights of the top classifier;

[0056] S83. Automatically generate sample labels based on knowledge graph reasoning results to achieve semi-supervised learning.

[0057] Preferably, the pollution source tracing method of S9 includes:

[0058] S91. Analyze the time series characteristics of pollution transmission paths in knowledge graphs;

[0059] S92. Construct a Bayesian network causal reasoning model for the supply chain process;

[0060] S93. Combine environmental factor data to deduce the key control points for pollution occurrence;

[0061] S94. Generate a quality control optimization scheme that includes time window analysis.

[0062] Preferably, it also includes self-calibration and anomaly diagnosis methods for the testing equipment:

[0063] S121. Before data acquisition, start the multi-source sensor synchronous calibration program and retrieve the reference parameter threshold under the current environmental conditions through the knowledge graph;

[0064] S122. Inject a standard concentration of microbial metabolite simulation solution into the biosensor array to verify the matching degree between the sensor response curve and the standard response template in the knowledge graph.

[0065] S123. Perform autofocus accuracy detection on the microscopic imaging system and dynamically adjust the objective lens focal length compensation parameters based on the sharpness evaluation function.

[0066] S124. When the calibration deviation of any sensor or imaging module exceeds the preset threshold, automatically switch to the redundant data acquisition channel and trigger an early warning signal.

[0067] S125. Generate a trend chart of equipment performance degradation based on historical calibration data, and recommend preventive maintenance time nodes and spare parts replacement plans.

[0068] (3) Beneficial effects

[0069] Compared with existing technologies, this invention provides a rapid detection method for food microbial contamination that integrates knowledge graphs and deep learning, and has the following beneficial effects:

[0070] 1. Breakthrough in detection timeliness:

[0071] By employing a combination of microfluidic chips and impedance sensing technology, the traditional long detection cycle is shortened, meeting the real-time monitoring needs of cold chain logistics.

[0072] 2. Deep optimization of multimodal fusion:

[0073] A pioneering three-modal spatiotemporal alignment model of spectroscopy, bioelectricity, and microscopic imaging is developed, which eliminates the dimensional gap through feature space mapping and improves the accuracy of identifying contaminants in complex matrices.

[0074] 3. Innovation of dynamic adaptation mechanism:

[0075] By constructing an industry knowledge graph-driven rule engine and using an incremental learning module to dynamically update the model, the detection rate of novel Salmonella variants is improved, thus solving the problem of missed detection of new pathogens.

[0076] 4. Reconstruction of the knowledge reuse system:

[0077] By establishing a knowledge network based on semantic reasoning, the efficiency of cross-batch pollution source tracing can be improved, and the response time of association analysis of millions of data points can be shortened to compensate for the defects of data fragmentation. Attached Figure Description

[0078] Figure 1 This is a flowchart of the overall method of the present invention. Detailed Implementation

[0079] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0080] Please see Figure 1 This rapid detection method for food microbial contamination, which integrates knowledge graphs and deep learning, includes the following steps:

[0081] S1. Simultaneously acquire spectral data, biosensor time-series signals, and microscopic images of food samples, and construct a multimodal feature matrix through spatiotemporal alignment processing;

[0082] S2. Establish a food microbiology knowledge graph, integrating microbial species characteristics, historical contamination cases, detection thresholds, and supply chain environmental parameters;

[0083] S3. Perform cross-domain feature fusion on the multimodal feature matrix, and use an attention mechanism to weight and aggregate spectral features, signal periodic features and image morphological features;

[0084] S4. Input the fused features into the deep learning detection model, and output the prediction results of microbial species and concentration through the hierarchical attention mechanism;

[0085] S5. Semantic reasoning based on knowledge graph: Activate the pollution transmission path associated with the prediction result, and correct the detection error by combining the environmental tolerance parameter under the pollution transmission path;

[0086] S6. Compare the security thresholds in the knowledge graph and generate an assessment report;

[0087] S7. Dynamically update the knowledge graph: Optimize the correlation strength between microorganisms and pollution sources and the confidence level of detection rules based on the assessment report;

[0088] S8. The detection model is incrementally trained based on the updated knowledge graph, and the elastic weight consolidation algorithm is used to prevent parameter forgetting.

[0089] S9. By combining supply chain data to trace the source of pollution, a quality optimization report containing key control points and treatment solutions is generated.

[0090] Step S1 specifically includes:

[0091] S11. Use a hyperspectral imaging device to collect the reflectance spectral data of the food surface wavelength and generate a 256-channel spectral feature vector;

[0092] S12. Continuously monitor the pH value, conductivity, and volatile organic compound concentration changes of the sample using a biosensor array;

[0093] S13. Use a microscopic imaging system to obtain magnified microbial morphological images and employ autofocus technology to ensure image clarity;

[0094] S14. Perform time-stamp alignment and spatial registration processing on the spectral data, biosensor signals and microscopic images to construct a multimodal feature matrix.

[0095] The method for constructing the food microbial knowledge graph in step S2 includes:

[0096] S21. Extract data on microbial detection limits, pathogenic bacteria classification standards, and safety thresholds;

[0097] S22. Integrate temperature and humidity records, processing parameters, and warehousing and transportation data from all links of the supply chain to form nodes of environmental pollution factors;

[0098] S23. Establish a multi-dimensional relationship between microbial species and pollution sources, including a transmission probability matrix, environmental tolerance parameters, and growth rate correlation factors, to generate pollution transmission pathways.

[0099] The cross-domain fusion feature processing in step S3 specifically includes:

[0100] S31. Perform wavelet noise reduction on the spectral data and extract the energy distribution of the characteristic bands;

[0101] S32. Extract morphological features and spatial distribution patterns of microscopic images using deep residual networks;

[0102] S33. Design a multimodal attention fusion module, dynamically allocate fusion weights for spectral features, and calculate cross-modal feature attention weights:

[0103]

[0104] Among them, w i q represents the fusion weight of the i-th mode, where i∈{1,2,3} corresponds to the spectral, sensor, and image modes, respectively. i ∈R d For the query vector, extract the features from the i-th modality through a linear transformation, k i ∈R d The key vector is generated through a learnable parameter matrix, φ(·) is the LeakyReLU activation function, d is the feature vector dimension, and n is the total number of modes;

[0105] According to the weight w i Weighted fusion of multimodal features:

[0106]

[0107] Among them, f i ∈R d W is the original feature vector of the i-th mode. i ∈R d×d For the learnable weight matrix, b i ∈R d For the bias term, F fusion ∈R d This is the fused feature vector.

[0108] The deep learning detection model in step S4 includes the following steps:

[0109] S41, includes a time series analysis module with bidirectional LSTM to capture the time-series dependencies of biological signals;

[0110] S42, Multi-scale Feature Pyramid Module, integrates microbial characterization features at different levels of abstraction;

[0111] S43, Adaptive Feature Selection Module, dynamically activates relevant fusion feature channels according to the current detection scenario, and outputs the predicted results of microbial species and concentration.

[0112] The semantic reasoning method in step S5 includes:

[0113] S51. Map the assessment report to the microbial species nodes in the knowledge graph to activate the associated pollution source pathways;

[0114] S52. Calculate the semantic similarity between the microorganism to be tested and known pathogens based on graph embedding algorithm;

[0115] S53. Correct errors in false positive and false negative assessment reports by adjusting the probability weights of pollution transmission paths.

[0116] The dynamic update method in step S7 includes:

[0117] S71. Establish a mapping matrix between the evaluation report and knowledge graph nodes;

[0118] S72. The incremental graph learning algorithm is used to update the association strength parameters between nodes, using the following incremental graph update formula:

[0119]

[0120] in, R represents the association strength between nodes u and v in the t-th iteration. uv ∈[0,1] represents the observed relation strength in the actual detection data, η is the learning rate, α and β are the balance coefficients, and p uv q was calculated based on the historical case database. uv Based on the current detection data, KL(p) uv ||q uv ) represents the prior distribution p of the knowledge graph. uv With the current distribution q uv KL divergence, This represents the gradient update amount of the edge weights in the knowledge graph.

[0121] S73. Expand the genus classification tree of the knowledge graph based on the characteristics of newly detected microorganisms;

[0122] S74. Adjust the threshold judgment boundary conditions and optimize the confidence weight of the detection rules.

[0123] The incremental training method in step S8 includes:

[0124] S81. Extract new feature patterns from the updated knowledge graph as training samples;

[0125] S82. Freeze the parameters of the bottom feature extraction layer of the model and adjust the weights of the top classifier;

[0126] S83. Automatically generate sample labels based on knowledge graph reasoning results to achieve semi-supervised learning.

[0127] The pollution source tracing method in step S9 includes:

[0128] S91. Analyze the time series characteristics of pollution transmission paths in knowledge graphs;

[0129] S92. Construct a Bayesian network causal reasoning model for the supply chain process;

[0130] S93. Combine environmental factor data to deduce the key control points for pollution occurrence;

[0131] S94. Generate a quality control optimization scheme that includes time window analysis.

[0132] The method includes:

[0133] The data acquisition module integrates a hyperspectral imager, a biosensor array, and a microscopic imaging device;

[0134] Knowledge graph engine, deploying graph database and distributed relational reasoning server;

[0135] Deep learning computing unit, configured with GPU-accelerated parallel computing cluster;

[0136] The dynamic optimization module enables the collaborative updating of model parameters and the knowledge graph;

[0137] A visual interactive terminal that provides augmented reality display and touch operation interface;

[0138] The traceability management platform connects to the supply chain management system and the quality traceability database.

[0139] It also includes self-calibration and anomaly diagnosis methods for testing equipment:

[0140] S121. Before data acquisition, start the multi-source sensor synchronous calibration program and retrieve the reference parameter threshold under the current environmental conditions through the knowledge graph;

[0141] S122. Inject a standard concentration of microbial metabolite simulation solution into the biosensor array to verify the matching degree between the sensor response curve and the standard response template in the knowledge graph.

[0142] S123. Perform autofocus accuracy detection on the microscopic imaging system and dynamically adjust the objective lens focal length compensation parameters based on the sharpness evaluation function.

[0143] S124. When the calibration deviation of any sensor or imaging module exceeds the preset threshold, automatically switch to the redundant data acquisition channel and trigger an early warning signal.

[0144] S125. Generate a trend chart of equipment performance degradation based on historical calibration data, and recommend preventive maintenance time nodes and spare parts replacement plans.

[0145] Example 1:

[0146] Microfluidic rapid detection system

[0147] In fresh milk testing, a serpentine microfluidic chip with a width of 50 μm and a depth of 100 μm was used. The inner wall of the channel was modified with an anti-E. coli O157:H7 antibody. The sample to be tested was injected at a flow rate of 5 μL / min. Microorganisms accumulated in the capture zone, causing impedance changes. The high-frequency detection module monitored the phase angle shift in real time, and the contamination determination was completed within 2.5 hours. Validated with 20 batches of artificially contaminated samples, the method was on average 28 times faster than the traditional culture method, with a minimum detection limit of 10. 2 CFU / mL, meeting the requirements of GB4789.38 standard.

[0148] Example 2:

[0149] Trimodal fusion analysis

[0150] For seasoning sauce samples, Raman spectra, 100× microscopic images, and bioelectrical signals were simultaneously acquired. Spatial registration of multi-source data was achieved using the SIFT+RANSAC algorithm, with the error controlled within 0.5μm. Colony morphology features were extracted using ResNet50, and 1D-CNN was used to identify colonies in the 1600-1800cm range. -1 The spectral characteristic peaks, wavelet transform analytical impedance phase, and attention mechanism weighted fusion of three-modal features are then input into the classifier. Under Level IV matrix interference, the recognition rate of mixed contamination reaches 98.6%, which is 24.8 percentage points higher than that of single image recognition.

[0151] Example 3:

[0152] Knowledge graph dynamic updates

[0153] When an unknown E. coli variant is detected, the system automatically triggers the Illumina MiSeq platform to perform 16S rRNA sequencing. Based on the BERT model, the GB4789.3 standard limit is converted into a decision threshold. After adding the stx2 gene variant detection dimension, the model completes iteration within 15 minutes. The actual detection rate of Salmonella enterica Typhimurium DT104 variant increased from the initial 85.7% to 98.3%, and the positive sample interception accuracy reached 99.8%.

[0154] Example 4:

[0155] Cross-batch pollution source tracing

[0156] After deploying this system, a meat processing company constructed a knowledge network of strain-production batch-equipment triples using the TransE algorithm. When an abnormal strain of E. coli O157:H7 was input, the system identified the homologous strain within 0.6 seconds, associated the equipment cleaning record of exceeding the limit, and traced back to the beef raw materials of a specific supplier. When processing 860,000 test records, the traceability across 10 batches took 4.2 seconds with an accuracy rate of 98.1%, which is more than 900 times more efficient than traditional methods.

[0157] Example 5:

[0158] Drift compensation mechanism

[0159] In environments with fluctuating temperature and humidity, an LSTM model is used to predict sensor baseline drift. By migrating chip factory calibration data to field equipment, the false alarm rate stabilizes at 3.7% after 12 months of operation. Under the same conditions, the false alarm rate of the uncompensated system reaches 41.2%. This solution achieves a drift suppression rate of 91% and extends the effective life of the equipment by 3 times.

[0160] Example 6:

[0161] Cold chain logistics center verification

[0162] At a cold chain center that tests an average of 1,200 samples per day, the system ran continuously for 6 months and showed the following results: single sample testing time was 2.8 hours; mixed contamination identification rate was 98.9%; first detection success rate of new pathogens was 96.2%; contamination event tracing time was 3.2 seconds per instance; false alarm rate was 1.8%, reducing annual losses due to misjudgments by approximately 3.7 million RMB.

[0163] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0164] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A rapid detection method for food microbial contamination integrating knowledge graphs and deep learning, characterized by: The method comprises the following steps: S1. Simultaneously acquire spectral data, biosensor time-series signals, and microscopic images of food samples, and construct a multimodal feature matrix through spatiotemporal alignment processing; S2. Establish a food microbiology knowledge graph, integrating microbial species characteristics, historical contamination cases, detection thresholds, and supply chain environmental parameters; S3. Perform cross-domain feature fusion on the multimodal feature matrix, and use an attention mechanism to weight and aggregate spectral features, signal periodic features and image morphological features; S4. Input the fused features into the deep learning detection model, and output the prediction results of microbial species and concentration through the hierarchical attention mechanism; S5. Semantic reasoning based on knowledge graph: Activate the pollution transmission path associated with the prediction result, and correct the detection error by combining the environmental tolerance parameter under the pollution transmission path; S6. Compare the security thresholds in the knowledge graph and generate an assessment report; S7. Dynamically update the knowledge graph: Optimize the correlation strength between microorganisms and pollution sources and the confidence level of detection rules based on the assessment report; S8. Incrementally train the detection model based on the updated knowledge graph; S9. By combining supply chain data to trace the source of pollution, a quality optimization report containing key control points and treatment solutions is generated.

2. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: S1 specifically includes: S11. Use a hyperspectral imaging device to collect the reflectance spectral data of the food surface wavelength and generate a 256-channel spectral feature vector; S12. Continuously monitor the pH value, conductivity, and volatile organic compound concentration changes of the sample using a biosensor array; S13. Obtain magnified morphological images of microorganisms using a microscopic imaging system; S14. Perform time-stamp alignment and spatial registration processing on the spectral data, biosensor signals and microscopic images to construct a multimodal feature matrix.

3. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The method for constructing the food microbial knowledge graph in S2 includes: S21. Extract data on microbial detection limits, pathogenic bacteria classification standards, and safety thresholds; S22. Integrate temperature and humidity records, processing parameters, and warehousing and transportation data from all links of the supply chain to form nodes of environmental pollution factors; S23. Establish a multi-dimensional relationship between microbial species and pollution sources, including a transmission probability matrix, environmental tolerance parameters, and growth rate correlation factors, to generate pollution transmission pathways.

4. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The cross-domain fusion feature processing of S3 specifically includes: S31. Perform wavelet noise reduction on the spectral data and extract the energy distribution of the characteristic bands; S32. Extract morphological features and spatial distribution patterns of microscopic images using deep residual networks; S33. Design a multimodal attention fusion module, dynamically allocate fusion weights for spectral features, and calculate cross-modal feature attention weights: Among them, w i q represents the fusion weight of the i-th mode, where i∈{1,2,3} corresponds to the spectral, sensor, and image modes, respectively. i ∈R d For the query vector, extract the features from the i-th modality through a linear transformation, k i ∈R d The key vector is generated through a learnable parameter matrix, φ(·) is the LeakyReLU activation function, d is the feature vector dimension, n is the total number of modalities, and j is the fused feature. According to the weight w i Weighted fusion of multimodal features: Among them, f i ∈R d W is the original feature vector of the i-th mode. i ∈R d×d For the learnable weight matrix, b i ∈R d For the bias term, F fusion ∈R d This is the fused feature vector.

5. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The deep learning detection model in S4 includes the following steps: S41, includes a time series analysis module with bidirectional LSTM to capture the time-series dependencies of biological signals; S42, Multi-scale Feature Pyramid Module, integrates microbial characterization features at different levels of abstraction; S43, Adaptive Feature Selection Module, dynamically activates relevant fusion feature channels according to the current detection scenario, and outputs the predicted results of microbial species and concentration.

6. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The semantic reasoning method of S5 includes: S51. Map the assessment report to the microbial species nodes in the knowledge graph to activate the associated pollution source pathways; S52. Calculate the semantic similarity between the microorganism to be tested and known pathogens based on graph embedding algorithm; S53. Correct errors in false positive and false negative assessment reports by adjusting the probability weights of pollution transmission paths.

7. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The dynamic update method of S7 includes: S71. Establish a mapping matrix between the evaluation report and knowledge graph nodes; S72. The incremental graph learning algorithm is used to update the association strength parameters between nodes, using the following incremental graph update formula: in, R represents the association strength between nodes u and v in the t-th iteration. uv ∈[0,1] represents the observed relation strength in the actual detection data, η is the learning rate, α and β are the balance coefficients, and p uv q was calculated based on the historical case database. uv Based on the current detection data, KL(p) uv ||q uv ) represents the prior distribution p of the knowledge graph. uv With the current distribution q uv KL divergence, This represents the gradient update amount of the edge weights in the knowledge graph; S73. Expand the genus classification tree of the knowledge graph based on the characteristics of newly detected microorganisms; S74. Adjust the threshold judgment boundary conditions and optimize the confidence weight of the detection rules.

8. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The incremental training method of S8 includes: S81. Extract new feature patterns from the updated knowledge graph as training samples; S82. Freeze the parameters of the bottom feature extraction layer of the model and adjust the weights of the top classifier; S83. Automatically generate sample labels based on knowledge graph reasoning results.

9. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: The pollution source tracing method of S9 includes: S91. Analyze the time series characteristics of pollution transmission paths in knowledge graphs; S92. Construct a Bayesian network causal reasoning model for the supply chain process; S93. Combine environmental factor data to deduce the key control points for pollution occurrence; S94. Generate a quality control optimization scheme that includes time window analysis.

10. The rapid detection method for food microbial contamination integrating knowledge graphs and deep learning according to claim 1, characterized in that: It also includes self-calibration and anomaly diagnosis methods for testing equipment: S121. Before data acquisition, start the multi-source sensor synchronous calibration program and retrieve the reference parameter threshold under the current environmental conditions through the knowledge graph; S122. Inject a standard concentration of microbial metabolite simulation solution into the biosensor array to verify the matching degree between the sensor response curve and the standard response template in the knowledge graph. S123. Perform autofocus accuracy detection on the microscopic imaging system and dynamically adjust the objective lens focal length compensation parameters based on the sharpness evaluation function. S124. When the calibration deviation of any sensor or imaging module exceeds the preset threshold, automatically switch to the redundant data acquisition channel and trigger an early warning signal. S125. Generate a trend chart of equipment performance degradation based on historical calibration data, and recommend preventive maintenance time nodes and spare parts replacement plans.

Citation Information

Patent Citations

  • Food-borne pathogenic microorganism detection method based on microscopic multi-modal fusion spectrum technology

    CN106706595A

  • Food safety knowledge graph and construction method of related intelligent question-answering system

    CN110781315A

  • Full-chain meat safety knowledge graph construction method and retrieval device

    CN116719953A

  • Microorganism detection method and system based on microscopic hyperspectral imaging technology, electronic equipment and storage medium

    CN117095393A

  • Microorganism combined remediation scheme recommendation method and system for polluted soil

    CN117172994A