A foodborne pathogen identification method, device, equipment, medium and product

CN122885650APending Publication Date: 2026-10-09ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611019910.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]然而,SERS数据的高维、多噪声与非线性等复杂特性对传统分析方法提出了挑战,如偏最小二乘判别分析等传统的机器学习方法难以充分挖掘其中的深度特征

Benefits of technology

本申请提供了一种食源性致病菌识别方法、装置、设备、介质及产品,通过将训练好的宽深度模型作为病菌识别模型,基于待识别病菌的拉曼光谱数据进行病菌识别,能够提高识别的准确性和稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885650A_ABST
    Figure CN122885650A_ABST
Patent Text Reader

Abstract

The application discloses a foodborne pathogenic bacteria identification method, device, equipment, medium and product, and relates to the field of pathogenic bacteria detection. The method comprises the following steps: acquiring Raman spectrum data of pathogenic bacteria to be identified; and identifying the Raman spectrum data by using a pathogenic bacteria identification model to obtain a pathogenic bacteria identification result. The pathogenic bacteria identification model is a trained wide-depth model, and the application can improve the accuracy and stability of identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pathogen detection, and in particular to a method, apparatus, equipment, medium and product for identifying foodborne pathogens. Background Technology

[0002] Foodborne illnesses caused by foodborne pathogens have become a serious global public health problem. Timely and accurate detection of foodborne pathogens can identify their presence early and provide a head start in developing effective control measures to minimize their harm. Efficient detection technologies are of significant practical importance in ensuring food safety and protecting consumer health. For example, pork, as one of the most consumed meat products globally, has a complex supply chain, and its production, transportation, and sales stages can all be susceptible to microbial contamination. For instance, enterocolitis (Salmonella enterica)... Salmonella enterica, S. enterica ), Escherichia coli ( Escherichia coli, E. coli ) and Staphylococcus aureus ( Staphylococcus aureus, S. aureus Foodborne pathogens such as SARS-CoV-2 not only affect pork quality but can also trigger serious food safety incidents and public health risks. Therefore, establishing rapid, sensitive, and scalable pathogen detection and classification technologies is of great significance for ensuring food safety and promoting the modernization of the food industry.

[0003] In recent years, surface-enhanced Raman spectroscopy (SERS) has attracted widespread attention in the field of foodborne pathogen detection due to its advantages of distinct fingerprint features, fast detection speed, and simple sample pretreatment. Among various enhancing substrates, Au@Ag core-shell nanoparticles have become an important material for improving Raman signal quality and distinguishing different bacterial species due to their high enhancement factor, good surface chemical stability, and good interaction with bacterial cell walls. SERS data constructed using Au@Ag nanoparticles provide a data foundation for developing efficient foodborne pathogen identification models.

[0004] However, the high dimensionality, high noise levels, and nonlinearity of SERS data pose challenges to traditional analysis methods. For example, traditional machine learning methods such as partial least squares discriminant analysis struggle to fully extract the deep features within the data. To achieve accurate identification of different pathogen types, a reliable and stable identification method is needed. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, equipment, medium, and product for identifying foodborne pathogens, which can improve the accuracy and stability of identification.

[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for identifying foodborne pathogens, including: Obtain Raman spectral data of the pathogen to be identified; The Raman spectral data is used to identify pathogens using a pathogen identification model to obtain pathogen identification results; the pathogen identification model is a trained wide-depth model.

[0007] In one embodiment, acquiring the Raman spectral data of the pathogen to be identified specifically includes: Sample preparation based on bacterial suspensions of pathogens to be identified was carried out using gold-core silver-shell nanoparticles. Spectral data were obtained using a Raman spectrometer based on the prepared samples; The average spectrum is obtained by averaging the spectral data. The detection limit is determined based on the average spectrum using linear fitting. Raman spectral data of the pathogen to be identified are obtained based on the average spectrum and the detection limit.

[0008] In one embodiment, the data preprocessing includes cosmic ray removal, baseline correction, and smoothing.

[0009] In one embodiment, the expression for the detection limit is: LOD = 3N / K; Where LOD is the detection limit, N is the standard deviation of the characteristic peak intensity obtained by repeated measurements of the blank sample 20 times, and K is the slope of the standard curve.

[0010] In one embodiment, the wide-depth model includes a width portion and a depth portion; The width portion is a single-layer linear structure; the depth portion includes three fully connected layers connected in sequence; the output of the width portion and the output of the depth portion are spliced ​​together and output.

[0011] In one embodiment, the training process of the pathogen identification model specifically includes: Using Raman spectral data of foodborne pathogens at different concentrations as input and the type of foodborne pathogen as output, a pathogen identification model is obtained by using sparse classification cross-entropy as the loss function and employing the Adam optimizer to update the parameters of the wide-depth model. The types of foodborne pathogens include Escherichia coli, Listeria monocytogenes, Staphylococcus aureus, or Salmonella enterica.

[0012] Secondly, this application provides a foodborne pathogen identification device, comprising: The acquisition module is used to acquire the Raman spectral data of the pathogen to be identified; The identification module is used to identify the Raman spectral data using a pathogen identification model to obtain pathogen identification results; the pathogen identification model is a trained wide-depth model.

[0013] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the foodborne pathogen identification method.

[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for identifying foodborne pathogens.

[0015] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for identifying foodborne pathogens.

[0016] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method, apparatus, device, medium, and product for identifying foodborne pathogens. By using a trained wide-depth model as the pathogen identification model, and performing pathogen identification based on the Raman spectral data of the pathogen to be identified, the accuracy and stability of the identification can be improved. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a method for identifying foodborne pathogens according to an embodiment of this application; Figure 2 This is a schematic diagram of the Raman spectroscopy results for Escherichia coli. Figure 3 This is a schematic diagram of the Raman spectroscopy results for Staphylococcus aureus. Figure 4 A schematic diagram of Raman spectroscopy results for Listeria monocytogenes; Figure 5 Schematic diagram of Raman spectroscopy results for intestinal Salmonella; Figure 6 This is a schematic diagram showing the changing trends of classification performance of five classification models based on the test set under different concentrations; Figure 7A schematic diagram of the confusion matrix for different models classifying test sets of Escherichia coli at different concentrations of Raman spectra. Figure 8 A schematic diagram of the confusion matrix for different models classifying test sets of Staphylococcus aureus at different concentrations of Raman spectra; Figure 9 A schematic diagram of the confusion matrix for different models classifying test sets of Raman spectra of Listeria monocytogenes at different concentrations; Figure 10 A schematic diagram of the confusion matrix for different models classifying test sets of different concentrations of Raman spectra of Salmonella in the gut; Figure 11 A schematic diagram of the functional modules of a foodborne pathogen identification device provided in an embodiment of this application; Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The advantage of wide-depth (W&D) models in SERS spectral analysis lies in their combined "memory" and "generalization" capabilities, effectively addressing the limitations of traditional models in processing complex spectral data. SERS spectra are typically characterized by high dimensionality, strong nonlinearity, peak overlap, and weak inter-sample differences. Traditional machine learning models often rely on manual feature extraction, making it difficult to fully uncover hidden information. While single deep learning models possess strong feature learning capabilities, they tend to overlook stable correlations between local features and categories. W&D models, through their width module, retain explicit correlations and known discriminative information between feature peaks, achieving "memory" of key spectral features. Simultaneously, their depth module automatically learns complex nonlinear feature expressions and latent patterns, achieving "generalization" to unknown samples. This dual-pathway synergistic mechanism not only improves the model's ability to identify SERS spectra of different concentrations and bacterial species but also enhances its robustness and generalization performance in complex contexts, providing a more effective solution for the rapid and accurate detection of foodborne pathogens.

[0021] This application constructs and compares various machine learning and deep learning models, including Support Vector Machine (SVM) and Partial Least Squares Discriminant Analysis (PLS-DA), which are widely used in discriminant analysis, and Convolutional Neural Network (CNN), which can automatically extract spectral latent features. Furthermore, Residual Network (ResNet), which has shown outstanding performance in visual tasks in recent years, is introduced to explore its advantages in spectral sequence modeling. Simultaneously, a wide-depth model combining linear memory features and nonlinear expressive power is constructed to verify the potential of the structure-mixing approach in bacterial classification tasks.

[0022] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] In one exemplary embodiment, such as Figure 1 As shown, a method for identifying foodborne pathogens is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method includes the following steps.

[0024] Step 101: Obtain the Raman spectral data of the pathogen to be identified.

[0025] Step 102: The Raman spectral data is used to identify pathogens using a pathogen identification model to obtain pathogen identification results; the pathogen identification model is a trained wide-depth model. The pathogen identification results are Escherichia coli, Listeria monocytogenes, Staphylococcus aureus, or Salmonella enterica.

[0026] By implementing the above steps, and using the trained wide-depth model as the pathogen identification model, pathogen identification can be performed based on the Raman spectral data of the pathogen to be identified, thereby improving the accuracy and stability of identification.

[0027] In one exemplary embodiment, obtaining Raman spectral data of the pathogen to be identified specifically includes: preparing a sample based on a bacterial suspension of the pathogen to be identified using gold-core silver-shell nanoparticles (Au@Ag NPs); acquiring spectral data based on the prepared sample using a Raman spectrometer; averaging the spectral data to obtain an average spectrum; determining the detection limit based on the average spectrum using linear fitting; and obtaining the Raman spectral data of the pathogen to be identified based on the average spectrum and the detection limit.

[0028] In practical applications, the data preprocessing includes cosmic ray removal, baseline correction, and smoothing.

[0029] The expression for the detection limit is: LOD = 3N / K Where LOD is the detection limit, N is the standard deviation of the characteristic peak intensity obtained by repeated measurements of the blank sample 20 times, and K is the slope of the standard curve.

[0030] In an exemplary embodiment, the wide-depth model includes a width portion and a depth portion; the width portion is a single-layer linear structure; the depth portion includes three fully connected layers connected in sequence; the output of the width portion and the output of the depth portion are spliced ​​together and output.

[0031] In an exemplary embodiment, the training process of the pathogen identification model specifically includes: taking Raman spectral data of foodborne pathogens at different concentrations as input, taking the type of foodborne pathogen as output, using sparse classification cross-entropy as loss function, and using the Adam optimizer to update the parameters of the wide-depth model to obtain the pathogen identification model; the type of foodborne pathogen includes Escherichia coli, Listeria monocytogenes, Staphylococcus aureus, or Salmonella enterica.

[0032] In another exemplary embodiment, this application provides a method for identifying foodborne pathogens, the entire process from sample preparation to identification result analysis, including the following.

[0033] Experimental steps: Preparation of gold core silver shell nanoparticle (Au@Ag NPs) substrate.

[0034] Gold nanoparticles (AuNPs) were prepared via a sodium citrate reduction method. The specific steps were as follows: 100 mL of 0.01% chloroauric acid (HAuCl4) solution was heated to boiling, and 1.2 mL of 1% sodium citrate (Na3C6H5O7) solution was rapidly added while continuously stirring. The boiling reaction was maintained for approximately 30 min. During the reaction, the solution color gradually changed from light yellow to wine red, indicating successful AuNP formation. After the reaction, the system was cooled to room temperature and stored at 4°C for later use.

[0035] Gold-core silver-shell nanoparticles (Au@Ag NPs) were prepared by epitaxially growing a silver shell on the surface of AuNPs. 45 mL of the prepared AuNPs solution was placed under magnetic stirring, and 12 mL of 10 mM ascorbic acid solution was rapidly added as a mild reducing agent, with stirring continued for 5 min. Subsequently, 12 mL of 10 mM silver nitrate (AgNO3) solution was added dropwise at a rate of 1 mL / min, allowing silver to gradually grow onto the gold core surface to form a silver shell. The reaction was continued with stirring for 30 min until the solution color changed from orange-yellow to yellow-brown and stabilized.

[0036] The reaction system was then placed in a centrifuge tube and centrifuged at 1697×g for 30 min. Part of the supernatant was discarded, concentrating the colloidal particles approximately 5 times in volume to obtain enriched Au@Ag NPs colloidal particles. The final product was stored at 4℃ for later use.

[0037] Sample preparation.

[0038] The Escherichia coli used in this application ( Escherichia coli, E. coli ), enteric Salmonella ( Salmonella enterica, S. enterica Staphylococcus aureus ( Staphylococcus aureus, S. aureus Listeria monocytogenes ( ) Listeria monocytogenes, L. monocytogenes All strains were stored in glycerol cryovials at -80℃. During thawing, the cryovials were rapidly thawed in a 37℃ water bath. A small amount of bacterial culture was then taken using a sterile inoculation loop and streaked onto an LB agar plate. The plate was then inverted and incubated at 37℃ for 18 h to obtain morphologically typical single colonies from a single source.

[0039] Single colonies of each strain were picked from freshly streaked plates and inoculated into 10 mL of sterile LB broth. The culture was incubated at 37°C and 200 rpm for 18 h with shaking to obtain activated bacterial suspensions. The incubated suspensions were transferred to sterile centrifuge tubes and centrifuged at 4°C and 8500 × g for 10 min, discarding the supernatant. The bacterial pellet was gently resuspended in sterile phosphate-buffered saline (PBS) at pH 7.4, and the centrifugation and washing steps were repeated three times under the same conditions to thoroughly remove residual culture medium components. The bacterial pellet was then resuspended in pre-chilled sterile PBS, and its optical density (OD) at 600 nm was measured using a UV spectrophotometer. 600 The bacterial suspensions of each strain were uniformly adjusted to OD. 600 = 0.2, approximately corresponding to a quantity of 10 8 Colony forming units per milliliter (CFU / mL).

[0040] After concentration calibration, the bacterial suspension was serially diluted tenfold using sterile PBS at pH 7.4 as the dilution medium to prepare concentrations ranging from 10... 7 ~10 2 A series of bacterial suspensions at CFU / mL were prepared. 1 mL of each concentration gradient was prepared and stored briefly at 4°C for subsequent experiments.

[0041] Acquisition of Raman spectroscopy information.

[0042] 10 μL of Au@Ag nanoparticle colloid was thoroughly mixed with 10 μL of the treated bacterial suspension and then dropped onto a clean glass slide for Raman spectroscopy. SERS spectra were acquired using a WITec Alpha300 Ri confocal Raman spectrometer (WITec, Ulm, Germany), equipped with a 532 nm laser and a 20× objective lens. A 600 g / mm grating and a laser power of 30 mW were used during the test. After focusing the microscope on the sample surface, the spectra were obtained at a resolution of 200 × 200 μm. 2 A surface scan was performed within the area, with a step size of 4 μm, and a total of 50×50 (X×Y) measurement points were collected. The integration time for each point was 0.5 s.

[0043] For each bacterial culture concentration, three independent batches of samples were prepared and their spectral data were collected separately. The spectral data from the three batches of samples at the same concentration were then averaged, and 1000 spectral data points were selected from the central region of the average spectrum for subsequent data preprocessing and modeling analysis.

[0044] To ensure the reliability of model training and performance evaluation, a stratified sampling method was used to divide the dataset. First, all samples were divided into training and test sets at a ratio of 85% and 15%, respectively. Then, 20% of the samples were randomly selected from the training set as a validation set for model parameter optimization and training process monitoring. Finally, the proportions of the training, validation, and test sets were 68%, 17%, and 15%, respectively.

[0045] To prevent overfitting, this application employs feature standardization, stratified sampling, and early stopping strategies. When the validation set loss no longer decreases over several consecutive iterations, the training process automatically terminates, and the model parameters optimal for validation set performance are restored.

[0046] Data processing methods.

[0047] Detection limit analysis.

[0048] To achieve higher detection sensitivity, this application systematically optimized the nano-substrate, sample preparation, and spectral processing procedures during SERS measurement. First, by optimizing the particle size of Au@Ag nanoparticles and the mixing ratio of the bacterial suspension, the interaction efficiency between bacteria and the metal nanosurface was significantly improved, thereby enhancing the overall SERS signal intensity. In imaging mode, 2500 spectra were acquired for each sample. To reduce random errors caused by spatial inhomogeneity, 1000 spectra were selected from the imaging center for preprocessing and averaging to obtain more robust and statistically representative characteristic peak intensities. This strategy effectively reduced the impact of signal fluctuations on LOD in point measurement mode, resulting in a significant improvement in the signal-to-noise ratio.

[0049] Subsequently, 10 2 -10 7 The average characteristic peak intensity of bacterial suspensions at different CFU / mL concentrations is correlated with the logarithm of their concentrations (log). 10 Linear fitting was performed using CFU / mL to obtain a high linear correlation coefficient (R²). 2 The standard curve of the blank sample was used. The limit of detection (LOD) was calculated using the formula LOD = 3N / K, where N is the standard deviation of the characteristic peak intensity obtained from 20 repeated measurements of the blank sample (reflecting the instrument noise level), and K is the slope of the standard curve (characterizing the sensitivity of the system to concentration changes). The coefficient 3 in the formula comes from the definition of the limit of detection by the International Union of Pure and Applied Chemistry (IUPAC), which states that when the analytical signal reaches three times the standard deviation of the blank signal, the signal can be considered reliably distinguishable from background noise, corresponding to a confidence level of approximately 99%. This definition is widely used in the calculation of the limit of detection in trace analysis and spectroscopic detection. The blank sample was prepared using the same detection system as the experimental group, but without the addition of the target bacterial culture. It was obtained by mixing PBS buffer and Au@Ag NPs in the same volume ratio as the experimental group. Subsequently, SERS detection was performed under the same experimental conditions, with a total of 20 repeated measurements. The standard deviation N of the corresponding characteristic peak intensity was calculated. Twenty repeated measurements were chosen to obtain stable and reliable noise statistics, reduce the influence of random errors on the standard deviation estimation, and meet the statistical requirements for background noise evaluation in analytical chemistry. The results show that, after the above signal enhancement and data denoising strategies, the SERS analysis method established in this application still maintains high spectral stability and linear response in the low concentration region, enabling all four foodborne pathogens to achieve low detection limits, and significantly improving the practicality and sensitivity of SERS technology in the rapid detection of foodborne pathogens.

[0050] Data preprocessing includes cosmic ray removal, baseline correction, and smoothing.

[0051] Cosmic ray removal.

[0052] Cosmic rays in Raman spectroscopy originate from high-energy particles producing electrons on a CCD, exhibiting high-intensity, sharp peaks and generally considered statistical outliers. Detection methods include second derivative analysis, and linear interpolation repair is a common removal method. When using Project FIVE 5.3 (PLUS version) software with a WITec Raman instrument for cosmic ray removal, the filter size is set to 2 and the dynamic factor to 8.

[0053] Baseline correction and smoothing.

[0054] Baseline correction is a crucial step in spectral preprocessing, especially for the strong fluorescence background commonly found in Raman spectroscopy. Fluorescence has a smooth and broad peak shape, and its intensity is usually higher than that of the Raman signal; without correction, it will severely mask the effective information. Mathematical baseline correction methods include polynomial fitting and asymmetric least squares, which can estimate and subtract fluorescence background, but often require iterative calculations and empirical parameter adjustments. Alternatively, fluorescence can be reduced through instrumental means, such as time-resolved Raman spectroscopy or near-infrared excitation, but these are costly and have limited applications.

[0055] Smoothing often employs the Savitzky-Golay (SG) smoothing method, which utilizes local polynomial least squares fitting to reduce random noise and improve the signal-to-noise ratio without significantly compromising peak shape. However, improper selection of window size or polynomial order can lead to peak distortion or information loss. Some studies have also indicated that in certain cases, the original unsmoothed data may actually provide better modeling results.

[0056] SG smoothing is a convolutional smoothing method based on the least squares principle. It is primarily used to eliminate random noise without reducing spectral variables, thereby improving the signal-to-noise ratio of the spectrum. This method can smooth spectral data, but improper selection of the smoothing window number can lead to the loss of some important modeling information. The calculation formula is: .

[0057] It is the original input sequence (in sample) (centered) This is the smoothed output. Parameters The half-width of the locally approximating window is defined, therefore the total window length is... . m Represents the filter impulse response Relative to the current output sample index The offset. Coefficient. The impulse response of the filter is represented by a polynomial least squares fit, which is derived based on the polynomial least squares fit and remains constant for a given polynomial order and window size.

[0058] To reduce the impact of random noise on the spectral signal, The Unscrambler X 10.4 software (CAMO Software AS, Oslo, Norway) was used to perform SG smoothing on the original SERS spectrum. The SG smoothing parameters were set as follows: polynomial order of 2, number of left side and number of right side points of 4, corresponding to a smoothing window size of 9 data points.

[0059] The parameter selection referenced commonly used settings for Raman spectroscopy preprocessing in relevant literature and was determined based on preliminary experimental results. Considering both noise suppression and characteristic peak retention, a window size of 9 and a polynomial order of 2 were ultimately chosen as the preprocessing parameters. This parameter combination effectively reduces random noise while maintaining the position, shape, and intensity information of Raman characteristic peaks, providing a reliable data foundation for subsequent feature extraction and model analysis.

[0060] Classification model.

[0061] (1) Support Vector Machine (SVM).

[0062] Superficial Vector Machine (SVM) is a supervised learning algorithm with strong generalization capabilities and is currently widely used to predict hyperspectral properties. The mathematical principle of SVM is to find a hyperplane that correctly partitions the training set and maximizes geometric distance. SVM's advantage lies in its robustness to small sample data, effectively preventing overfitting. However, for large datasets, its computational complexity is high and its efficiency is low. SVM offers four kernel functions to choose from: RBF, Linear, Poly, and Sigmoid. In this application, RBF is selected as the kernel function.

[0063] (2) Partial Least Squares Discriminant Analysis (PLS-DA).

[0064] PLS-DA is a supervised classification method based on PLS, widely used in spectral data analysis. This method maps the original high-dimensional spectral variables to a small number of latent variable spaces by establishing a regression relationship between the spectral data matrix X and the categorical variable matrix Y, thereby maximizing the correlation between independent variables and categorical information while reducing data dimensionality. The PLS-DA model effectively distinguishes between different categories of samples by extracting latent variables that characterize sample differences. In the model, scores represent the projected position of a sample in the latent variable space, reflecting the clustering and separation of samples; loadings describe the contribution of each variable to the latent variables, helping to identify key spectral features that significantly influence the classification results. Furthermore, regression coefficients reflect the weight of each variable in classification prediction and its correlation with the categorical response.

[0065] (3) Convolutional Neural Network (CNN).

[0066] CNN (Neural Network Connectivity) is a feedforward deep learning model inspired by the biological visual cortex and is considered a simplified computational model of the information processing mechanism of the mammalian visual cortex. Through local receptive fields, weight sharing, and pooling mechanisms, CNNs can efficiently extract local patterns from spatial or temporal data, and are therefore widely used in image, video, and one-dimensional signal analysis. The main advantage of CNNs is that they integrate feature extraction and classification processes into the same network, enabling end-to-end training while maintaining relatively low computational complexity.

[0067] (4) Residual Network (ResNet).

[0068] The development of deep learning has greatly promoted the advancement of image processing technology, with ResNet demonstrating outstanding performance in image analysis. Deep learning models, represented by ResNet, can automatically extract deep features from images, enabling efficient and accurate diagnosis of various diseases. The basic building block of ResNet is the residual unit, and its structure typically includes stacked convolutional layers, batch normalization layers, and non-linear activation function layers. The architecture and skip connections employed by ResNet are particularly crucial for addressing the vanishing gradient problem in deep network training and improving the interpretability and performance of medical image analysis models.

[0069] (5) Wide & Deep Model.

[0070] The wide-depth model, proposed by Google in 2016, is a recommender system model that combines a generalized linear model with a deep neural network to simultaneously capture explicit and implicit feature interactions. In the wide-depth model, feature interactions are primarily achieved through embedding layers and fully connected layers. The combination and intersection of features can be achieved using different activation functions and weight matrices, resulting in better prediction performance. The wide-depth model used in this application comprises a width part and a depth part. The width part is a single-layer linear structure used to learn the global linear relationship between input features and classification results; the depth part is a three-layer fully connected neural network used to automatically extract high-order nonlinear features from spectral data. The outputs of the width and depth parts are concatenated and then output through a softmax layer to determine the predicted probabilities for each category.

[0071] The width part is a generalized linear model whose output is a linear weighted sum of the input features: .

[0072] in, The input feature vector (i.e., Raman spectral data). For the weight vector, For bias terms, For the width portion of the output, This is a transpose of a superscript.

[0073] The deep part is a three-layer fully connected feedforward neural network, with the input also being... By learning higher-order interactions of features through a multi-layer fully connected network, the model gains "generalization ability." The network structure is as follows: First layer: Fully connected layer, 128 neurons, activation function is ReLU: .

[0074] Second layer: Fully connected layer, 64 neurons, activation function is ReLU: .

[0075] The third layer: a fully connected layer with 32 neurons, using ReLU as the activation function. .

[0076] in, and Trainable weights and biases, the ReLU function is defined as follows: . This is the output vector of the first fully connected layer (128 neurons) after passing through the ReLU activation function, with a dimension of 128. For the second fully connected layer (64 neurons) The input is a ReLU-activated vector with a dimension of 64. For the third fully connected layer (32 neurons) The input is a ReLU-activated output vector with a dimension of 32.

[0077] Extensive preliminary experiments were conducted, comparing different network depths (2, 3, 4, and 5 layers) and combinations of neuron numbers (e.g., 256-128-64, 128-64-32, 64-32-16, etc.). Using classification accuracy and training stability as indicators, a three-layer fully connected structure with 128, 64, and 32 neurons was ultimately selected for the depth component. Experiments show that this structure achieves the best generalization performance and the lowest overfitting risk on the Raman spectroscopy dataset.

[0078] Merging layer and output layer.

[0079] Output scalar of the width portion 32-dimensional vector output of the depth part By concatenating the features, a joint feature representation is obtained. : .

[0080] The concatenated vector is input to the output layer, which is a fully connected layer with the number of neurons equal to the number of classes. The activation function is softmax: .

[0081] The softmax function converts a linear output into a probability distribution: .

[0082] in, The weight matrix of the output layer. This is the bias vector for the output layer. This is the sum of the logit exponentiation of all categories, used to achieve probability normalization so that the sum of the predicted probabilities of each category equals 1. For the first k Logit value for each category C This indicates the total number of categories. This refers to the predicted probability output by the model. In this application... C = 4, corresponding to four foodborne pathogens: Escherichia coli, Staphylococcus aureus, Listeria monocytogenes, and Salmonella enterica.

[0083] Loss function and optimizer.

[0084] The model uses sparse categorical crossentropy as the loss function. Applicable to integer tags (non-one-hot encoded): .

[0085] in, This represents the total number of samples participating in the training. For the first The true class index of each sample The model predicts the first The probability of a sample in its true class.

[0086] The optimizer uses Adam (Adaptive Moment Estimation), which combines momentum and RMSProp to adaptively adjust the learning rate, accelerating convergence and stabilizing the training process. The initial learning rate is set to 1×10⁻⁶. -3 The batch size is set to 32, and the number of training rounds is set to 50.

[0087] In this application, a hybrid wide-depth learning framework is used to simultaneously model explicit linear relationships and implicit nonlinear structures in complete Raman spectral data. The wide portion directly receives standardized high-dimensional spectral vectors and treats them as a set of structured features. Through linear transformation, this module learns the global association between spectral intensity distribution and corresponding category labels, effectively capturing interpretable patterns generated by the overall spectral shape, peak intensity ratio, and large-scale trends, thereby memorizing explicit feature interactions crucial for Raman-based pathogen identification. When wide-depth models are used in recommendation systems, the wide portion relies on manually constructed discrete feature interactions; however, this application, targeting continuous Raman spectral data, directly learns the global linear relationship of spectral intensity without feature engineering. This design, by learning the global linear association between the overall distribution of spectral intensity and bacterial species through a linear layer, compensates for the large-scale trend information that the deep portion might ignore.

[0088] Meanwhile, the depth component also takes the complete spectrum as input, but processes it through a multilayer perceptron architecture to construct a nonlinear feature mapping space. This module consists of three fully connected layers with 128, 64, and 32 neurons respectively. Each layer uses ReLU as the activation function to introduce nonlinear expressive power and improve the level of feature abstraction. Batch normalization is not introduced during model training, but the input features are standardized to stabilize the network training process.

[0089] In terms of optimization strategy, the model uses the Adam optimizer for parameter updates, with an initial learning rate set to 1×10⁻⁶. -3The loss function used was the sparse classification cross-entropy function, the batch size was set to 32, and the training epochs were set to 50. For the optimizer selection, SGD, RMSprop, and Adam optimizers were compared for multi-class classification tasks with dense spectral data. Experimental results show that the Adam optimizer converges fastest and achieves the highest validation set accuracy. The learning rate was adjusted from 1×10⁻⁶. -2 Up to 1×10 -5 A grid search was used to ultimately determine 1×10 -3 The optimal value is determined by the fact that this application requires the identification of four pathogenic bacteria belonging to multiple classifications, and the training labels use integer encoding (0, 1, 2, 3). Therefore, the sparse classification cross-entropy loss function is chosen. Compared to the traditional one-to-many strategy, this loss function is naturally compatible with the softmax output layer, avoids the storage redundancy of one-hot encoding, and has more stable gradients. The training batch size is set to 32, which was selected after comparing four values: 16, 32, 64, and 128. This value showed the fastest convergence without significant oscillations with thousands of spectra. The number of training epochs is set to 50, based on the observation that the early stopping method (stopping if the validation set loss does not decrease for 10 consecutive epochs) resulted in approximately 42 epochs of actual convergence. Therefore, setting it to 50 epochs ensures sufficient training.

[0090] Subsequently, the outputs of the width and depth components are concatenated in a fusion layer and fed into a softmax classifier for final prediction. By combining the explicit memory capability of the width module with the nonlinear representation learning capability of the depth module, the proposed architecture achieves a balance between interpretability, robustness, and high classification accuracy. This design significantly improves the performance and generalization ability of Raman spectroscopy-based pathogen classification tasks.

[0091] The model is built on the TensorFlow framework and Keras API; the hardware environment is a computing device that can run on a general-purpose CPU or NVIDIA GPU; the loss curve shows that the model loss gradually decreases with iteration and tends to converge in the later stage; the training does not use the automatic convergence judgment criterion of stopping when the validation loss does not decrease continuously, but instead executes 50 iteration cycles at a fixed time; regarding random initialization, the random state of the training set and the test set is fixed by random_state = 42 when the data is split to ensure that the split can be repeated, while the initialization of the model weights adopts the framework's default random method.

[0092] Model performance evaluation.

[0093] In this application, the performance of the classification model is systematically evaluated using multiple metrics, including accuracy, precision, recall, and F1-score. The model first predicts the test set samples and constructs a normalized confusion matrix to show the correspondence between the true class and the predicted result.

[0094] In classification tasks, the confusion matrix consists of four basic elements: TP (True Positive): The number of samples that the model correctly predicts to belong to a certain class.

[0095] TN (True Negative): The number of samples that the model correctly predicts as not belonging to this class.

[0096] FP (False Positive): The number of samples that the model incorrectly predicts as belonging to another class.

[0097] FN (False Negative): The number of samples that the model fails to identify as belonging to a certain class and instead predicts as belonging to another class.

[0098] Based on this, accuracy is defined as the proportion of correct predictions made by the model: .

[0099] Precision is used to measure the reliability of a model's predictions for a particular class, and is defined as: .

[0100] Recall reflects a model's ability to identify true samples of a particular class, and is defined as: .

[0101] To comprehensively balance precision and recall, this application further calculates the F1-score, the expression of which is: .

[0102] The above multi-indicator comprehensive evaluation can fully reflect the stability and reliability of the model in multi-category spectral data classification tasks.

[0103] Experimental results and analysis.

[0104] Analysis of the detection limits of SERS for four pure cultures of foodborne pathogens.

[0105] like Figure 2 As shown, Figure 2 A in the figure shows different concentrations (10) 2 ~10 7SERS spectrum of Escherichia coli (CFU / mL) at 1646 cm⁻¹. -1 Characteristic peaks were observed at all locations, and with the increase of bacterial concentration, these characteristic peaks may be attributed to the CH bending vibration of proteins or nucleic acids in Escherichia coli cells. The Raman signal intensity showed a significant increasing trend, indicating that SERS spectroscopy can effectively distinguish different concentrations of Escherichia coli. Figure 2 In this context, B represents the logarithm of Raman intensity versus Escherichia coli concentration (log 10 The standard curve (CFU / mL) was obtained. The fitted equation was derived through linear regression analysis: .

[0106] The intensity (signal value) of the Raman characteristic peak. The value represents the logarithm of the bacterial concentration. The results showed a good linear relationship between Raman intensity and the logarithm of Escherichia coli concentration, making it suitable for quantitative detection of bacteria. Based on the formula LOD = 3N / K (N = 5.76, K = 10.32), the detection limit of this method was calculated to be 47 CFU / mL, indicating that the established SERS standard curve has high sensitivity and can reliably detect low concentrations of Escherichia coli. Compared to the method used by Guven et al. (LOD = 8 CFU / mL) involving immunomagnetic bead enrichment combined with SERS, the detection results are similar. This method eliminates the need for pre-enrichment or separation steps, saving detection time and reducing costs.

[0107] like Figure 3 As shown, Figure 3 A in the diagram shows 10 2 ~10 7 SERS spectra of Staphylococcus aureus at different concentrations of CFU / mL. At 1646 cm⁻¹ -1 Characteristic peaks were observed at all locations, which may originate from the phenylalanine ring vibration or the CH bending mode of cell wall proteins. Furthermore, the Raman signal intensity showed a significant increasing trend with the increase of bacterial concentration, indicating that SERS spectroscopy can effectively distinguish Staphylococcus aureus at different concentrations. Figure 3 In this context, B represents the logarithm of Raman intensity versus Staphylococcus aureus concentration (log 10 The standard curve (CFU / mL) was obtained. The fitted equation was derived through linear regression analysis: .

[0108] The results showed a good linear relationship between Raman intensity and the logarithm of Staphylococcus aureus concentration, which can be used for quantitative detection of bacterial cultures. According to the formula LOD = 3N / K ( , The detection limit of this method was calculated to be 56 CFU / mL, indicating that the established SERS standard curve has high sensitivity and can reliably detect low concentrations of Staphylococcus aureus, which is close to the detection method used by Zhang et al. (LOD = 35 CFU / mL) using gold nanoparticles modified with Raman molecules and aptamer capture. Unlike this method, the method used in this application simplifies the detection process, reduces costs, and has a similar detection limit, making the detection of Staphylococcus aureus in meat samples more efficient and economical.

[0109] like Figure 4 As shown, Figure 4 A in the diagram shows 10 2 ~10 7 SERS spectra of Listeria monocytogenes at different concentrations of CFU / mL. (At 1607 cm⁻¹) -1 Characteristic peaks were observed at all locations, which may be related to the CH deformation vibration of intracellular lipids or proteins. Furthermore, the Raman signal intensity showed a significant increasing trend with increasing bacterial concentration, indicating that SERS spectroscopy can effectively distinguish between different concentrations of Listeria monocytogenes. Figure 4 In this context, B represents the logarithm of Raman intensity versus Listeria monocytogenes concentration (log 10 The standard curve (CFU / mL) was obtained. The fitted equation was derived through linear regression analysis: .

[0110] The results showed a good linear relationship between Raman intensity and the logarithm of Listeria monocytogenes concentration, which can be used for quantitative detection of bacterial cultures. According to the formula LOD = 3N / K ( , The detection limit of this method was calculated to be 64 CFU / mL, indicating that the established SERS standard curve has high sensitivity and can reliably detect low concentrations of Listeria monocytogenes. Compared with the antibody enrichment method used by Akcinar et al. (LOD = 12 CFU / mL), the method in this application does not require antibody participation, which reduces the risk of false positives and improves detection stability.

[0111] like Figure 5 As shown, Figure 5 A in the diagram shows 10 2 ~10 7 SERS spectra of different concentrations of Salmonella enterica at CFU / mL. (At 1507 cm⁻¹) -1 Characteristic peaks were observed at all locations, which may be related to specific components of the Salmonella intestinal biofilm or extracellular polysaccharides. Furthermore, the Raman signal intensity showed a significant increasing trend with the increase of bacterial concentration, indicating that SERS spectroscopy can effectively distinguish different concentrations of Salmonella intestinale. Figure 5 In this context, B represents the logarithm of Raman intensity versus Salmonella concentration in the gut (log 10 The standard curve (CFU / mL) was obtained. The fitted equation was derived through linear regression analysis: .

[0112] The results showed a good linear relationship between Raman intensity and the logarithm of Salmonella intestinal concentration, which can be used for quantitative detection of bacteria in culture. According to the formula LOD = 3N / K ( , The detection limit of this method was calculated to be 24 CFU / mL, indicating that the established SERS standard curve has high sensitivity and can reliably detect low concentrations of Salmonella enterica. Compared with the method used by Wang et al. using gold nanoparticles as the SERS substrate (LOD ≈ 10 CFU / mL), both methods showed a Raman shift of 1520 cm⁻¹. -1 The signal intensity at this location increased with increasing concentration of intestinal Salmonella, and the same characteristic peak was also observed, for example, at 1086 cm⁻¹. -1 1148 cm -1 1358 cm -1 .

[0113] The linear correlation coefficient R of the above four standard curves 2 All values ​​were above 0.91, indicating a good fit and reliable LOD calculation results.

[0114] Model building and screening results.

[0115] Comparison of the classification performance of different bacterial species at the same concentration.

[0116] Based on 10 2 ~10 7 This application systematically compared the performance of five typical classification models—SVM, PLS-DA, CNN, ResNet, and Wide&Deep—as a function of concentration using six CFU / mL concentration gradients. The results are shown below. Figure 6 .in, Figure 6 In the figure, A represents the trend of accuracy changes for the five classification models under different concentrations. Figure 6 In the graph, B represents the trend of accuracy changes for the five classification models at different concentrations. Figure 6 In the figure, C represents the recall rate trend of the five classification models under different concentrations. Figure 6In the graph, D represents the F1 score trend of the five classification models under different bacterial concentrations. Overall, all models tested demonstrated high classification performance at different bacterial concentrations. The vast majority of models maintained precision, recall, accuracy, and F1 score above 0.90, with some models even achieving a perfect score of 1.00. This indicates that both traditional machine learning algorithms and deep learning models can effectively extract bacterial spectral or feature information to complete the classification task.

[0117] In terms of performance comparison among the various models, the CNN and Wide&Deep models performed the best, becoming the performance leaders in this experiment. These two models performed the best at all concentrations, especially at the highest concentration of 10. 7 CFU / mL and minimum concentration 10 3 10 2 At CFU / mL, both models repeatedly achieved a perfect score of 1.00, demonstrating their powerful feature learning and classification capabilities. Even in the medium concentration range, where model performance generally fluctuates slightly, CNN and Wide&Deep maintained extremely high levels of various metrics, ranging from 0.97 to 0.99. The Wide&Deep model, in particular, achieved a minimum metric of 0.98 across all six concentrations, making it the most stable and outstanding model overall. This fully demonstrates the inherent advantages of deep learning models in handling complex, non-linear data.

[0118] SVM, as a representative of traditional machine learning, also delivers impressive performance. SVM's performance is highly stable, with all metrics consistently remaining within the range of 0.93 to 0.99 without drastic fluctuations. At a high concentration of 10... 7 CFU / mL and lower concentrations of 10 4 10 3 10 2 At CFU / mL, SVM achieved an accuracy of 0.99 or close to 0.99, showing a very small gap compared to top-tier deep learning models. This indicates that in classification tasks with small sample sizes or moderate feature dimensions, SVM remains a highly competitive and computationally efficient choice due to its powerful ability to find classification boundaries.

[0119] In contrast, the PLS-DA and ResNet models performed relatively poorly, both exhibiting significant performance fluctuations. PLS-DA ranked at the bottom for most concentrations, especially at 10. 6 At a CFU / mL concentration, its accuracy dropped to 0.86, making it the only model among all models with an accuracy below 0.90 at that concentration; while ResNet's best performance was at 10. 3 The accuracy rate reached 0.96 for CFU / mL concentration, but at 10... 5However, the CFU / mL score dropped to 0.89. The performance fluctuations of both methods across multiple concentrations were quite similar, indicating that they are both sensitive to changes in sample concentration. PLS-DA, as a linear dimensionality reduction combined with classification, may struggle to fully capture subtle changes in bacterial spectral characteristics and nonlinear information at different concentrations. While ResNet has a more complex structure, its internal mechanisms are also less stable than CNN and Wide&Deep when handling concentration changes. Both require further optimization to adapt to diverse sample conditions.

[0120] In the high-concentration region, the signal is strong and the features are obvious, allowing all models to learn easily and thus generally achieving near-perfect results. In the medium-concentration region, which is typically the challenging area for model performance, almost all models experience varying degrees of performance decline. This may be because as the concentration decreases, the absolute strength of the bacterial signal weakens while the relative influence of background noise increases, leading to a decrease in the signal-to-noise ratio and increasing the difficulty of classification. Interestingly, in the low-concentration region, model performance actually rebounds, even approaching the level of the high-concentration region. This may mean that at extremely low concentrations, the differences between samples become greater, or that preprocessing methods effectively amplify key features in this region, making it easier for the model to capture decisive classification information.

[0121] In summary, the Wide&Deep model exhibits superior classification performance and strongest stability across all concentration conditions in this application, consistently maintaining scores above 0.98, nearly achieving perfect classification and demonstrating its high usability and reliability in practical bacterial classification tasks. Wide&Deep accurately identifies both strong signal samples at high concentrations and weak signal samples at low concentrations, making it the preferred model for such problems. CNN models also perform exceptionally well, achieving perfect scores across multiple concentrations, second only to Wide&Deep, making them highly competitive candidates. SVM, as a classic algorithm, offers excellent stability and near-top-tier performance, making it a highly reliable alternative in scenarios with limited computational resources or those prioritizing rapid modeling. In contrast, PLS-DA and ResNet, due to their sensitivity to concentration changes and insufficient performance stability, require further optimization on this dataset before practical application. Future work could focus on exploring the root causes of performance degradation at medium concentrations and further optimizing the model to improve its generalization ability under various conditions.

[0122] Analysis of the taxonomic performance of the same bacterial species at different concentrations.

[0123] Based on confusion matrix data, five machine learning models—SVM, PLS-DA, CNN, ResNet, and Wide&Deep—were systematically evaluated at different concentration gradients (10⁻⁶) of four foodborne pathogens (Escherichia coli, Staphylococcus aureus, Listeria monocytogenes, and Salmonella enterica). 2 ~10 7 Classification performance at CFU / mL. Each confusion matrix displays the normalized probability of the model's predicted concentration versus the actual concentration; the diagonal values ​​represent the probability of correct classification, while the off-diagonal values ​​reflect the proportion of misclassifications. Comparative analysis allows for a comprehensive evaluation of the accuracy, stability, and generalization ability of each model across different bacterial species.

[0124] like Figure 7 As shown, Figure 7 (A) in the diagram is a schematic diagram of the classification confusion matrix of Escherichia coli at different concentrations using SVM. Figure 7 (B) in the diagram is a schematic diagram of the classification confusion matrix of PLS-DA for different concentrations of Escherichia coli Raman spectra. Figure 7 (C is a schematic diagram of the classification confusion matrix of Escherichia coli at different concentrations using CNN.) Figure 7 (D) in the diagram is a schematic diagram of the classification confusion matrix of Escherichia coli at different concentrations using ResNet. Figure 7 (E) in the diagram is a schematic representation of the confusion matrix for the classification of Escherichia coli at different concentrations using Wide&Deep. The classification results for Escherichia coli show that the deep learning model generally outperforms traditional machine learning methods. The Wide&Deep model exhibits excellent performance across all concentration gradients, with its prediction accuracy at leading levels, especially at 10... 7 The model achieved a perfect 1.00 recognition rate at high CFU / mL concentrations and an extremely low false positive rate at low to medium concentrations, demonstrating strong robustness. The CNN model performed second only to Wide&Deep, exhibiting high overall accuracy and a balanced distribution. In contrast, the SVM and ResNet models showed a clear "strong at both ends, weak in the middle" characteristic; while the SVM model achieved a high accuracy of 10... 2 CFU / mL low concentration end and 10 7 The recognition rates at the high concentration end (CFU / mL) reached 0.80 and 0.98, respectively, but at 10... 4 CFU / mL and 10 6 In the mid-concentration range of CFU / mL, the accuracy dropped to 0.61 and 0.62, respectively, indicating significant confusion between adjacent concentrations. The ResNet model also showed instability in this range, with accuracy dropping below 10. 4 CFU / mL and 10 5The accuracy at CFU / mL concentrations was only 0.60 and 0.54, respectively, failing to maintain excellent performance at high concentrations and showing significantly lower stability than models such as CNN. The PLS-DA model performed the weakest in this task, especially at 10... 4 and 10 5 In the CFU / mL range, the diagonal probability values ​​were only 0.21 and 0.05, respectively, almost completely losing their distinguishing ability, indicating that they were unable to capture the characteristic differences of this species in complex spectral data.

[0125] like Figure 8 As shown, Figure 8 (A) in the diagram is a schematic diagram of the classification confusion matrix of Staphylococcus aureus at different concentrations using SVM. Figure 8 (B) in the diagram is a schematic diagram of the classification confusion matrix of PLS-DA for different concentrations of Staphylococcus aureus Raman spectra. Figure 8 (C) in the diagram is a schematic diagram of the classification confusion matrix of Staphylococcus aureus at different concentrations using CNN. Figure 8 (D) in the diagram is a schematic diagram of the classification confusion matrix of Staphylococcus aureus at different concentrations using ResNet. Figure 8 (E) in the diagram represents the confusion matrix for the classification of Staphylococcus aureus at different concentrations using the Wide&Deep model. The classification results for Staphylococcus aureus show a significant positive correlation between model complexity and classification accuracy. The Wide&Deep model maintains a recognition rate between 0.84 and 0.92 at various concentration gradients, demonstrating stable robustness, especially at 10... 2 10 3 and 10 4 The accuracy rate reached 0.89 at all concentrations, and at 10 7 At a concentration as high as 0.92, it demonstrates excellent low-concentration discrimination ability and effectively suppresses confusion between adjacent concentrations. The CNN model followed closely behind, achieving a similar score at 10... 4 and 10 5 The accuracy reached 0.85 at the lowest concentration, but at 10... 6 and 10 7 Some confusion exists in the low concentration range. ResNet performs reasonably well in the high concentration range, exhibiting some instability, although it shows some performance at 10... 3 The performance was acceptable at CFU / mL, but not at 10 2 The accuracy at low concentrations of CFU / mL is only 0.56, and at 10... 4 The CFU / mL concentration was only 0.59, limiting the model's generalization ability. Traditional models SVM and PLS-DA performed poorly at low to medium concentrations, especially PLS-DA at 10... 5The recognition rate at the concentration level was only 0.09, with a large number of false positives, which illustrates the limitations of linear discriminant in handling complex nonlinear features.

[0126] like Figure 9 As shown, Figure 9 (A) in the diagram is a schematic diagram of the classification confusion matrix of Listeria monocytogenes at different concentrations using SVM. Figure 9 (B) in the diagram is a schematic diagram of the classification confusion matrix of Listeria monocytogenes at different concentrations using PLS-DA. Figure 9 (C) in the diagram is a schematic diagram of the classification confusion matrix of Listeria monocytogenes at different concentrations using CNN. Figure 9 (D) in the diagram is a schematic diagram of the classification confusion matrix of Listeria monocytogenes at different concentrations using ResNet. Figure 9 (E) in the diagram is a schematic representation of the classification confusion matrix of Listeria monocytogenes at different concentrations using Wide&Deep. The classification results for Listeria monocytogenes show that both the CNN and Wide&Deep models exhibit superior feature extraction capabilities. CNN performs better in 10... 2 10 5 10 6 and 10 7 The accuracy rates at different concentrations reached 0.94, 0.94, 0.97, and 0.97, respectively. Wide&Deep achieved an accuracy rate higher than 0.84 at all concentrations, and even at 10... 7 At a concentration of 0.96, it demonstrated excellent stability. ResNet showed significant fluctuations in its performance on this strain, particularly at 10... 6 At the specified concentration, the accuracy was only 0.33, and 0.35% of the samples were misclassified as 10. 7 The results indicate that the residual network lacks sufficient feature capture capability at intermediate concentrations, leading to severe prediction divergence in the model. The SVM model demonstrates basic classification ability, showing good recognition at both ends, but at 10... 3 The accuracy was only 0.48 at a CFU / mL concentration, indicating difficulty in feature extraction at specific concentrations. The PLS-DA model also performed poorly, achieving an accuracy of only 0.48 at 10 CFU / mL. 3 The accuracy at CFU / mL was only 0.11, and at 10... 6 With a CFU / mL value of only 0.24, the overall classification performance is extremely limited and cannot meet the requirements for accurate concentration identification.

[0127] like Figure 10 As shown, Figure 10 (A) in the diagram is a schematic diagram of the classification confusion matrix of different concentrations of Salmonella enterica by SVM. Figure 10(B) in the diagram is a schematic diagram of the classification confusion matrix of PLS-DA for different concentrations of Salmonella enterica. Figure 10 (C) in the diagram is a schematic diagram of the classification confusion matrix of different concentrations of Raman spectra of Salmonella in the gut using CNN. Figure 10 (D) in the diagram is a schematic diagram of the classification confusion matrix of different concentrations of Salmonella enterica by ResNet. Figure 10 (E) in the diagram is a schematic representation of the classification confusion matrix of Wide&Deep for different concentrations of Salmonella enterica. The classification results of Salmonella enterica show that the Wide&Deep model performs best across the entire concentration range, with an accuracy rate higher than 0.82, especially at 10. 5 A concentration of 0.92 demonstrates its strong concentration discrimination ability, making it the most ideal classification model among all models. CNN achieves this at 10... 2 10 3 and 10 5 The accuracy performance was good at certain concentrations, but at 10... 4 The concentration decreased to 0.66, showing some fluctuation. The ResNet model performed poorly in identifying this bacterial species, especially at 10. 3 and 10 4 The accuracy was low at low and medium concentrations, with precision rates of only 0.57 and 0.09. SVM and PLS-DA showed low recognition rates in the low to medium concentration range, while PLS-DA showed low accuracy at 10... 4 and 10 6 The accuracy rates at different concentrations were below 0.03 and 0.09, respectively, reflecting the limitations of traditional linear methods in processing complex nonlinear data.

[0128] The confusion matrix results from four bacterial species and five models show that the Wide&Deep model exhibits the most stable performance and highest accuracy across all bacterial species and concentration gradients, especially at extremely low (10⁻⁶) concentrations. 2 ~10 3 CFU / mL) and extremely high (10 CFU / mL) 6 ~10 7 Within the CFU / mL concentration range, it demonstrated strong feature extraction and concentration identification capabilities, making it the best model in this application. CNN also performed well in most tasks, especially in high-recognition bacteria such as Listeria monocytogenes, similar to Wide&Deep, but in the middle concentration range (10 CFU / mL), it lagged behind. 4 ~10 5The concentration (CFU / mL) still exhibits some misclassification. In contrast, ResNet shows significant differences in performance across different bacterial species. For some species (such as Listeria monocytogenes), it suffers from insufficient feature extraction or low sensitivity to intermediate concentrations. Traditional machine learning methods SVM and PLS-DA, on the other hand, generally have lower classification performance and stability than deep learning models, exhibiting more misclassifications in the low-to-medium concentration range. Overall, deep learning methods such as Wide&Deep and CNN demonstrate significant advantages in complex nonlinear feature extraction and low-concentration sample identification. However, the intermediate concentration range remains a high-risk area for model misclassification. This phenomenon may be related to the physiological stability of bacterial cultures within this concentration range, feature signal saturation, or random fluctuations during sample preparation, thus increasing the difficulty of classification. Therefore, the Wide&Deep model demonstrates the best performance in the task of identifying foodborne pathogen concentrations, showing high application potential and suitable for promotion and validation in practical food safety testing.

[0129] This application systematically evaluated the application effect of SERS combined with multiple machine learning models in the quantitative detection and concentration classification of four common foodborne pathogens: Escherichia coli, Staphylococcus aureus, Listeria monocytogenes, and Salmonella enterica. First, by collecting SERS spectra of the four bacteria at different concentration gradients, a standard curve was established between Raman signal intensity and the logarithm of bacterial concentration. It was observed that the characteristic Raman peak intensity of the four bacteria showed a regular increase with increasing concentration. The coefficients of determination for the fitting equations of the four bacteria were all above 0.91, and the limits of detection were 47, 56, 64, and 24 CFU / mL, respectively. These results validated the high sensitivity of the constructed SERS detection system in the detection of low-concentration pathogens, and it has the advantages of being simple to operate and low in cost, without the need for complex pre-enrichment or antibody modification steps.

[0130] Five machine learning models—SVM, PLS-DA, CNN, ResNet, and Wide&Deep—were further introduced to compare their classification performance on bacterial Raman spectra at different concentrations. By analyzing the trends in precision, recall, accuracy, and F1 score of each model at different concentrations, and combining this with a confusion matrix to further analyze the concentration recognition performance within different bacterial species, the following main conclusions were drawn: From the overall performance perspective, the Wide&Deep model exhibits superior classification performance and the strongest stability across all bacterial species and concentration gradients. Its accuracy at various concentrations generally remains above 0.98, and at 10... 7 CFU / mL and 10 2The model achieved perfect classification of 1.00 multiple times at extreme concentrations such as CFU / mL, fully demonstrating its powerful feature extraction and concentration identification capabilities. The CNN model also performed exceptionally well, achieving accuracy exceeding 0.95 for most bacterial species and concentrations. Its performance was particularly close to Wide&Deep for highly recognizable species such as Listeria monocytogenes, but it also performed better at 10... 4 ~10 5 There is still a certain degree of misjudgment in the intermediate concentration range of CFU / mL.

[0131] SVM, as a representative of traditional machine learning methods, demonstrated impressive stability and competitiveness. Its metrics consistently remained between 0.93 and 0.99 across six concentrations, approaching the performance of deep learning models in both high and low concentration ranges, validating its continued high application value in classification tasks with small samples or moderate feature dimensions. In contrast, the ResNet model exhibited significant performance fluctuations across different bacterial species. In the intermediate concentration ranges of some species, such as Listeria monocytogenes and Salmonella enterica, it suffered from severe feature extraction deficiencies, resulting in a significant drop in accuracy. This reflects a need to improve the stability of its deep structure in dealing with nonlinear feature changes caused by concentration. The PLS-DA model performed the weakest overall, with accuracy below 0.50 in the low to medium concentration ranges of multiple bacterial species, and even below 0.10 in some concentrations. This indicates that linear dimensionality reduction discriminant methods struggle to effectively capture nonlinear features in complex Raman spectra and cannot meet the demands of refined concentration classification.

[0132] From the perspective of the impact of concentration gradient on classification performance, 10 6 ~10 7 CFU / mL high concentration range and 10 2 ~10 3 The low CFU / mL concentration range was where all models performed relatively well. At high concentrations, signal characteristics were more pronounced, making the model easier to learn; at low concentrations, inter-sample differences might be more significant, or preprocessing methods might effectively amplify key features in this range, leading to a rebound in the model's classification ability. 4 ~10 5 The intermediate CFU / mL concentration range is a high-risk area for model misclassification, with almost all models showing varying degrees of performance decline in this range. This phenomenon may be related to the fact that the physiological state of the bacterial culture tends to stabilize, the characteristic signal tends to saturate, the signal-to-noise ratio decreases, or random fluctuations during sample preparation within this concentration range, leading to increased overlap of spectral features between adjacent concentrations, thus increasing the difficulty of classification.

[0133] The process of determining the model structure and hyperparameters.

[0134] The wide & deep model in this application adopts a Wide & Deep architecture. Addressing the specific needs of Raman spectral identification of foodborne pathogens, extensive exploratory experiments and systematic optimizations were conducted on the model structure, hyperparameters, and optimization strategies. Specifically, these include: (1) Network depth and width selection.

[0135] We compared 2-layer, 3-layer, and 4-layer fully connected networks, as well as different combinations of the number of neurons (256-128-64, 128-64-32, 64-32-16, etc.). Using validation set classification accuracy and training stability as indicators, we ultimately determined that the depth component should adopt a three-layer structure with 128, 64, and 32 neurons. The decreasing structure of 128-64-32 helps to extract higher-order abstract features layer by layer, avoiding information redundancy.

[0136] (2) Input method for width portion.

[0137] To address the continuity of spectral data, three width-based input schemes were compared: (a) Use only manual cross features (such as specific wavenumber intensity ratios).

[0138] (b) Principal component scores using the original spectrum.

[0139] (c) Use the complete spectral vector directly.

[0140] Experiments show that scheme (c) improves classification accuracy most significantly (about 8%) on low-concentration samples, and requires no feature engineering.

[0141] (3) Optimizer and learning rate selection.

[0142] Training was performed using SGD, RMSprop, and Adam respectively. Adam converged fastest and achieved the highest final accuracy of 98.5%. The learning rate was calculated using logarithmic grid search (10^65). -2 10 -3 10 -4 10 -5 ), 1×10 -3 In 10 -2 (Non-convergent) and 10 -4 Achieving the best balance between (slow convergence) and (slow convergence).

[0143] (4) Training batch size and number of rounds.

[0144] In preliminary experiments, the effects of batch sizes of 16, 32, 64, and 128 on classification accuracy and training stability were compared. Results showed that batch size 32 resulted in the smoothest decrease in validation set loss and the highest final test accuracy (98.5% vs. 97.1% for batch size 16 and 97.8% for batch size 128). Among batch sizes 16, 32, 64, and 128, batch size 32 had the smallest gradient variance and acceptable training time; early stopping was used to confirm sufficient convergence after 50 epochs.

[0145] The number of training epochs was determined using an early stopping method: the validation loss was evaluated every 10 epochs, and training stopped when the loss no longer decreased after 10 consecutive epochs. Experiments showed that the model achieved optimal validation performance after approximately 42 epochs of training. Therefore, this application sets the number of training epochs to 50 to ensure sufficient model convergence with redundancy, while avoiding overfitting.

[0146] (5) Data preprocessing parameters.

[0147] The SG smoothing window size and polynomial order were optimized through cross-validation, and a window size of 9 and an order of 2 were finally adopted; the baseline correction adopted the asymmetric least squares method.

[0148] The parameters and structures mentioned above are not general choices, but rather specific technical solutions obtained by this application after creative effort based on the characteristics of Raman spectroscopy, including its continuous, high-dimensional, concentration-dependent signal-to-noise ratio and the requirements of classification tasks involving multiple bacterial species and a wide concentration range.

[0149] In summary, this application constructs a highly sensitive SERS detection method based on Au@Ag core-shell nanoparticles and systematically evaluates the performance of various machine learning models in bacterial concentration classification tasks. The results show that deep learning methods, particularly Wide&Deep and CNN, have significant advantages in complex nonlinear feature extraction and low-concentration sample identification, meeting the needs for rapid and high-precision detection of foodborne pathogens. Among them, the Wide&Deep model, with its excellent stability and generalization ability, is the optimal identification model in this application and has the value for widespread application in practical food safety testing.

[0150] In summary, the SERS combined with the Wide & Deep model demonstrated the best quantitative detection and concentration classification performance in this application, exhibiting high sensitivity, high accuracy, and strong robustness. It provides a feasible technical solution for the rapid and accurate detection of foodborne pathogens and has good practical application and promotion value.

[0151] Based on the same inventive concept, this application also provides a foodborne pathogen identification device for implementing the aforementioned foodborne pathogen identification method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the foodborne pathogen identification device provided below can be found in the limitations of the foodborne pathogen identification method described above, and will not be repeated here.

[0152] In one exemplary embodiment, such as Figure 11 As shown, a foodborne pathogen identification device is provided, comprising: The acquisition module is used to acquire the Raman spectral data of the pathogen to be identified.

[0153] The identification module is used to identify the Raman spectral data using a pathogen identification model to obtain pathogen identification results; the pathogen identification model is a trained wide-depth model.

[0154] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 12 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data on the identification of foodborne pathogens. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for identifying foodborne pathogens.

[0155] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment to which the present application is applied. Specific computer equipment may include, for example, [the following is a list of possible additional structures]. Figure 12 The embodiments show more or fewer components, combinations of certain components, or different component arrangements. In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the above-described method embodiments.

[0156] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method embodiments.

[0157] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method embodiments.

[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0159] In this application, all actions to acquire signals, information, or data are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with the authorization granted by the owner of the relevant device.

[0160] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0161] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0162] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0163] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for identifying foodborne pathogens, characterized in that, include: Obtain Raman spectral data of the pathogen to be identified; The Raman spectral data is used to identify pathogens using a pathogen identification model to obtain pathogen identification results; The pathogen identification model is a pre-trained wide-depth model.

2. The method for identifying foodborne pathogens according to claim 1, characterized in that, Obtain the Raman spectral data of the pathogen to be identified, specifically including: Sample preparation based on bacterial suspensions of pathogens to be identified was carried out using gold-core silver-shell nanoparticles. Spectral data were obtained using a Raman spectrometer based on the prepared samples; The average spectrum is obtained by averaging the spectral data. The detection limit is determined based on the average spectrum using linear fitting. Raman spectral data of the pathogen to be identified are obtained based on the average spectrum and the detection limit.

3. The method for identifying foodborne pathogens according to claim 2, characterized in that, The data preprocessing includes cosmic ray removal, baseline correction, and smoothing.

4. The method for identifying foodborne pathogens according to claim 2, characterized in that, The expression for the detection limit is: LOD = 3N / K; Where LOD is the detection limit, N is the standard deviation of the characteristic peak intensity obtained by repeated measurements of the blank sample 20 times, and K is the slope of the standard curve.

5. The method for identifying foodborne pathogens according to claim 1, characterized in that, The wide-depth model includes a width portion and a depth portion; The width portion is a single-layer linear structure; the depth portion includes three fully connected layers connected in sequence; the output of the width portion and the output of the depth portion are spliced ​​together and output.

6. The method for identifying foodborne pathogens according to claim 1, characterized in that, The training process of the pathogen identification model specifically includes: Using Raman spectral data of foodborne pathogens at different concentrations as input and the type of foodborne pathogen as output, a pathogen identification model is obtained by using sparse classification cross-entropy as the loss function and employing the Adam optimizer to update the parameters of the wide-depth model. The types of foodborne pathogens include Escherichia coli, Listeria monocytogenes, Staphylococcus aureus, or Salmonella enterica.

7. A device for identifying foodborne pathogens, characterized in that, include: The acquisition module is used to acquire the Raman spectral data of the pathogen to be identified; The identification module is used to identify the Raman spectral data using a pathogen identification model to obtain pathogen identification results; the pathogen identification model is a trained wide-depth model.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the method for identifying foodborne pathogens according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for identifying foodborne pathogens as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method for identifying foodborne pathogens as described in any one of claims 1-6.