Rapid detection method for food microbial contamination by fusing knowledge graph and deep learning
By integrating knowledge graphs and deep learning, the problems of timeliness, multimodal fusion, and dynamic adaptation in food microbial contamination detection have been solved, enabling rapid and accurate microbial contamination detection and traceability, and meeting the real-time monitoring needs of the food circulation process.
Patent Information
- Application Number
- CN202510942481.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-07-09
AI Technical Summary
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 efficiency of knowledge reuse. They cannot meet the real-time monitoring needs of food circulation and the accurate identification of complex contamination scenarios.
By employing a method that integrates knowledge graphs and deep learning, a multimodal feature matrix is constructed by simultaneously collecting spectral data, biosensor time-series signals, and microscopic images of food samples. The features are then weighted and aggregated using an attention mechanism, combined with a deep learning model for prediction, and semantic reasoning and dynamic updates are performed using the knowledge graph. This enables rapid detection of microbial species and concentrations and source tracing of contamination.
It enables rapid and accurate detection of microbial contamination, improves the identification rate of complex matrix contamination, dynamically adapts to the variation of new pollutant species, improves the efficiency of cross-batch contamination tracing, and meets the real-time monitoring needs of cold chain logistics.
Smart Images

Figure CN120850205B_ABST
Abstract
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] (a) Technical problems to be 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] (II) 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] (III) 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 technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[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] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A rapid detection method of food microbial contamination by fusing knowledge graph and deep learning, characterized in that: The method comprises the following steps: S1, synchronously collecting spectral data, biosensor time series signal and microscopic image of food samples, constructing multi-modal feature matrix through time and space alignment processing; S2, establishing food microorganism knowledge graph, integrating microorganism species characteristics, historical pollution cases, detection threshold and supply chain environmental parameters; S3, performing cross-domain fusion feature on the multi-modal feature matrix, and adopting attention mechanism to weight and aggregate spectral feature, signal period feature and image morphology feature; S4, inputting the fusion feature into a deep learning detection model, and outputting microorganism species and concentration prediction results through hierarchical attention mechanism; S5, performing semantic reasoning based on the knowledge graph: activating the pollution transmission path associated with the prediction results, and correcting the detection error in combination with the environmental tolerance parameter under the pollution transmission path; S6, comparing the safety threshold in the knowledge graph, and generating an evaluation report; S7, dynamically updating the knowledge graph: optimizing the microorganism-pollution source correlation strength and detection rule confidence according to the evaluation report; S8, incrementally training the detection model based on the updated knowledge graph; S9, tracing the pollution source in combination with the supply chain data, and generating a quality optimization report containing key control points and treatment schemes.
2. The method for rapid detection of food microbial contamination by fusing knowledge graph and deep learning according to claim 1, characterized in that: The S1 specifically comprises: S11, collecting wavelength reflection spectrum data of food surface by using a hyperspectral imaging device, and generating a 256-channel spectral feature vector; S12, continuously monitoring the pH value, conductivity and volatile organic compound concentration change curve of the sample by using a biosensor array; S13, acquiring an enlarged microorganism morphology image by using a microscopic imaging system; S14, performing time stamp alignment and space registration processing on the spectral data, biosensor signal and microscopic image, and constructing a multi-modal feature matrix. 3.The method of claim 1, wherein the method comprises: The construction method of the food microorganism knowledge graph in the S2 comprises: S21, extracting microorganism detection limit, pathogenic bacteria classification standard and safety threshold data; S22, integrating temperature and humidity records, processing process parameters and warehouse transportation data of each link of the supply chain to form pollution environmental factor nodes; S23, establishing a multi-dimensional correlation between microorganism species and pollution sources, including a transmission probability matrix, an environmental tolerance parameter and a growth rate correlation factor, for generating a pollution transmission path. 4.The method of claim 1, wherein the method comprises: The cross-domain fusion feature processing of the S3 specifically comprises: S31, performing wavelet denoising processing on the spectral data and extracting feature band energy distribution; S32, extracting morphological features and spatial distribution patterns of the microscopic image by using a deep residual network; S33, designing a multi-modal attention fusion module, dynamically allocating fusion weights of spectral features, and calculating cross-modal feature attention weights: where w i denotes the fusion weight of the i-th modality, i ∈ {1, 2, 3} corresponds to the spectral, sensor, image modality, q i ∈ R d is the query vector, which is extracted from the i-th modality feature by linear transformation, k i ∈ R d is the key vector, which is generated by a learnable parameter matrix, φ(·) is a LeakyReLU activation function, d is the feature vector dimension, n is the total number of modalities, and j is the fusion feature, is the query vector transpose, k j is the key vector; According to the weight w i Weighted fusion is performed on the multi-modal features: where f i ∈R d is the original feature vector of the i-th modality, W i ∈R d×d is a learnable weight matrix, b i ∈R d is a bias term, F fusion ∈R d is the fused feature vector.
5. The method for rapid detection of food microbial contamination by fusing knowledge graph and deep learning according to claim 1, characterized in that: The deep learning detection model in the S4 comprises the following steps: S41, a time series analysis module containing a bidirectional LSTM, capturing the time series dependence of the biosignal; S42, a multi-scale feature pyramid module, fusing microorganism representation features at different abstraction levels; S43, an adaptive feature selection module, dynamically activating relevant fusion feature channels according to the current detection scene, and outputting microorganism species and concentration prediction results.
6. The method for rapid detection of food microbial contamination by fusing knowledge graph and deep learning according to claim 1, characterized in that: The semantic reasoning method of the S5 comprises: S51, map the evaluation report to the microorganism species node in the knowledge graph, and activate the associated pollution source path; S52, calculate the semantic similarity between the test microorganism and the known pathogenic bacteria based on the graph embedding algorithm; S53, correct the false positive and false negative evaluation reports according to the probability weight of the pollution transmission path to correct the error.
7. The method for rapid detection of food microbial contamination by fusing knowledge graph and deep learning according to claim 1, characterized in that: The dynamic updating method of S7 comprises: S71, establish the mapping relationship matrix of the evaluation report and the knowledge graph node; S72, update the correlation strength parameters between nodes using an incremental graph learning algorithm, and use the following incremental graph updating formula: wherein, represents the association strength between nodes u and v in the tth iteration, R uv is the observed relationship strength in the actual detection data, η is the learning rate, α, β are balance coefficients, p uv is calculated according to the historical case library, q uv is obtained by statistics of the current detection data, KL(p uv ∥q uv ) represents the KL divergence of the knowledge graph prior distribution p uv and the current distribution q uv , represents the gradient update amount of the knowledge graph edge weight; S73, expand the species classification tree of the knowledge graph according to the newly detected microorganism characteristics; S74, adjust the threshold decision boundary condition and optimize the detection rule confidence weight. 8.The method of claim 1, wherein the method comprises: The incremental training method of S8 comprises: S81, extract the new feature mode from the updated knowledge graph as a training sample; S82, freeze the model bottom layer feature extraction layer parameters, and adjust the top layer classifier weight; S83, automatically generate sample labels based on the knowledge graph reasoning results. 9.The method of claim 1, wherein the method comprises: The pollution tracing method of S9 comprises: S91, analyze the time sequence characteristics of the pollution transmission path in the knowledge graph; S92, build a Bayesian network causal reasoning model for the supply chain link; S93, combine environmental factor data to back-propagate the key control points of pollution occurrence; S94, generate a quality control optimization scheme containing time window analysis.
10. The method for rapid detection of food microbial contamination by fusing knowledge graph and deep learning according to claim 1, characterized in that: It also includes a self-calibration and abnormal diagnosis method for the detection equipment: S121, start the multi-source sensor synchronous calibration program before data acquisition, and retrieve the reference parameter threshold under the current environmental condition through the knowledge graph; S122, inject a standard concentration of microorganism metabolite simulation solution into the biosensor array, and verify the matching degree of the sensor response curve with the standard response template in the knowledge graph; S123, perform automatic focusing precision 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 a warning signal; S125, generate an equipment performance degradation trend chart according to historical calibration data, recommend a preventive maintenance time node and spare parts replacement scheme.
Citation Information
Patent Citations
Food-borne pathogenic microorganism detection method based on microscopic multi-modal fusion spectrum technology
CN106706595A
Microorganism detection method and system based on microscopic hyperspectral imaging technology, electronic equipment and storage medium
CN117095393A