Method, device, equipment, medium and product for synchronously detecting multiple germs in edible meat
Through the combination of hyperspectral imaging technology and machine learning models, the characteristic wavelengths in edible meat are extracted, and the synchronous detection of various bacteria in edible meat is achieved, solving the problem of time-consuming and costly traditional detection methods, and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411805683.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional germ detection methods in edible meat are time-consuming and costly, and the prior art is difficult to improve detection efficiency.
Hyperspectral imaging technology is used to extract spectral reflectivity from the hyperspectral image of the target edible meat, and feature wavelengths are extracted through bootstrap soft shrinkage algorithm or variable iterative spatial shrinkage method, and input them into the trained machine learning model to achieve synchronous detection of multiple bacteria.
The synchronous online detection of various bacteria in edible meat is achieved, which improves the efficiency of bacteria detection and provides higher sensitivity and specificity.
Smart Images

Figure CN119763103A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pathogen detection, and in particular to a method, device, equipment, medium and product for simultaneous detection of multiple pathogens in edible meat. Background Art
[0002] The detection and identification of pathogens in edible meat is crucial to health and safety. Traditional methods for detecting pathogenic microorganisms usually include steps such as culture, microscopic observation, and biochemical tests, which are not only time-consuming but also costly. With the advancement of science and technology, the demand for rapid and accurate detection of pathogenic microorganisms has become increasingly urgent. In recent years, hyperspectral imaging technology, as an emerging detection method, has gradually attracted the attention of researchers. Hyperspectral imaging technology can achieve detailed chemical feature analysis of samples by acquiring spectral information in different bands. Compared with traditional methods, hyperspectral imaging technology can provide richer spectral data, thereby improving the sensitivity and specificity of pathogenic microorganism detection. However, the efficiency of detecting pathogens in edible meat still needs to be improved. Summary of the invention
[0003] The purpose of the present application is to provide a method, device, equipment, medium and product for simultaneous detection of multiple pathogens in edible meat, which can realize simultaneous detection of multiple pathogens, thereby improving the efficiency of detection of pathogens in edible meat.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] In a first aspect, the present application provides a method for simultaneously detecting multiple pathogens in edible meat, comprising:
[0006] extracting spectral reflectance from a hyperspectral image of target edible meat;
[0007] Extracting characteristic wavelengths from the spectral reflectance using a bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method;
[0008] The characteristic wavelength is input into a classification model, and classification results of multiple target pathogens are output; the classification result is no target pathogen or at least one type of target pathogen, and the classification model is obtained by training a machine learning model.
[0009] Optionally, extracting spectral reflectance from the hyperspectral image of the target edible meat includes:
[0010] Correcting the hyperspectral image of the target edible meat according to a correction formula to obtain a corrected hyperspectral image;
[0011] Extracting spectral reflectance from the rectified hyperspectral image;
[0012] The correction formula is expressed as:
[0013] Among them, I is the hyperspectral image after correction, I0 is the hyperspectral image before correction, W is the hyperspectral image of the whiteboard, and D is the hyperspectral image of the blackboard.
[0014] Optionally, a bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method is used to extract a characteristic wavelength from the spectral reflectance, specifically including:
[0015] Preprocessing the spectral reflectance; the preprocessing is a first preprocessing method, a second preprocessing method, a third preprocessing method or a fourth preprocessing method, the first preprocessing method is to sequentially perform multivariate scattering correction, SG smoothing and second-order derivative processing on the spectral reflectance, the second preprocessing method is to sequentially perform standard normal variable, SG smoothing and second-order derivative processing on the spectral reflectance, the third preprocessing method is to sequentially perform multivariate scattering correction, SG smoothing and first-order derivative processing on the spectral reflectance, and the fourth preprocessing method is to sequentially perform standard normal variable, SG smoothing and first-order derivative processing on the spectral reflectance;
[0016] The bootstrapped soft shrinkage algorithm or the variable iterative space shrinkage method is used to extract the characteristic wavelength from the preprocessed spectral reflectance.
[0017] Optionally, the edible meat comprises pork.
[0018] Optionally, the multiple target pathogens are Escherichia coli, Pasteurella, Streptococcus and Haemophilus parasuis.
[0019] Optionally, the machine learning model is a random forest, an extreme learning machine, a long short-term memory network, or a back propagation neural network;
[0020] When the machine learning model is the back propagation neural network, training the back propagation neural network to obtain a classification model specifically includes:
[0021] Using the training set to train the back propagation neural network to obtain a trained back propagation neural network;
[0022] Using a genetic algorithm to optimize the parameters of the trained back propagation neural network to obtain the classification model;
[0023] The training set includes input data and label data, the input data is the characteristic wavelength of the edible meat sample, and the label data is the target pathogen type inoculated into the edible meat sample.
[0024] In a second aspect, the present application provides a device for synchronously detecting multiple pathogens in edible meat, the device comprising:
[0025] A spectral reflectance extraction module, used for extracting spectral reflectance from a hyperspectral image of target edible meat;
[0026] A characteristic wavelength extraction module, used to extract the characteristic wavelength from the spectral reflectance by using a bootstrap soft shrinkage algorithm or a variable iterative space shrinkage method;
[0027] The target pathogen detection module is used to input the characteristic wavelength into a classification model and output classification results of multiple target pathogens; the classification result is no target pathogens or at least one type of target pathogens, and the classification model is obtained by training a machine learning model.
[0028] In a third aspect, the present application provides a computer device comprising: 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 steps of any of the above-described methods for simultaneous detection of multiple pathogens in edible meat.
[0029] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for simultaneous detection of multiple pathogens in edible meat.
[0030] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for simultaneous detection of multiple pathogens in edible meat.
[0031] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0032] The present application provides a method, device, equipment, medium and product for simultaneous detection of multiple pathogens in edible meat. The method extracts characteristic wavelengths from spectral reflectance by adopting a bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method; the characteristic wavelengths are input into a classification model, and the classification results of multiple target pathogens are output, thereby realizing simultaneous online detection of multiple pathogens, thereby improving the efficiency of pathogen detection in edible meat. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of a flow chart of a method for simultaneous detection of multiple pathogens in edible meat provided in one embodiment of the present application;
[0035] Figure 2 A graph showing the original average spectral reflectance of fresh pork inoculated with different strains of bacteria provided in an embodiment of the present application;
[0036] Figure 3 This is a visualization effect diagram of PCA dimensionality reduction of the original spectrum of pure strains provided in one embodiment of the present application;
[0037] Figure 4 This is a PCA dimension reduction visualization effect diagram of the original spectrum of the inoculated bacteria on pork provided in one embodiment of the present application;
[0038] Figure 5 This is a spectral visualization effect diagram after preprocessing using MSC-SGS-2nd Der provided in an embodiment of the present application;
[0039] Figure 6 This is a spectral visualization effect diagram after preprocessing using SNV-SGS-2nd Der provided in one embodiment of the present application;
[0040] Figure 7 Provided for one embodiment of the present application is a spectral visualization effect diagram after preprocessing using MSC-SGS-1st Der;
[0041] Figure 8 This is a spectral visualization effect diagram after preprocessing using SNV-SGS-1st Der provided in one embodiment of the present application;
[0042] Fig. 9 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0045] The present application provides a method for simultaneous detection of multiple pathogens in edible meat, such as Figure 1 As shown, the method for synchronously detecting multiple pathogens in edible meat includes:
[0046] Step 101: extracting spectral reflectance from the hyperspectral image of target edible meat.
[0047] Step 102: extracting characteristic wavelengths from the spectral reflectance using a bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method.
[0048] Step 103: input the characteristic wavelength into a classification model, and output classification results of multiple target pathogens; the classification result is no target pathogen or at least one type of target pathogen, and the classification model is obtained by training a machine learning model.
[0049] The present application extracts characteristic wavelengths from spectral reflectance by adopting a bootstrap soft shrinkage algorithm or a variable iterative space shrinkage method; the characteristic wavelengths are input into a classification model, and classification results of multiple target pathogens are output, thereby realizing simultaneous online detection of multiple pathogens, thereby improving the efficiency of pathogen detection in edible meat.
[0050] In an exemplary embodiment, the edible meat includes pork, and the multiple target pathogens are Escherichia coli, Pasteurella, Streptococcus and Haemophilus parasuis. The present application aims to explore a new method for qualitative detection of pathogenic microorganisms in pork by combining hyperspectral imaging technology and deep learning methods. Hyperspectral images of fresh pork infected with four target bacteria (Escherichia coli, Pasteurella, Streptococcus and Haemophilus parasuis) were collected, and classified by applying multiple deep learning models through image processing and spectral analysis. The results show that the present application can achieve high-precision classification of pathogenic microorganisms, demonstrating the powerful potential of combining hyperspectral technology with deep learning. The method of the present application is expected to play an important role in the detection of pathogenic microorganisms in the future and provide efficient and accurate theoretical guidance for related fields.
[0051] Fresh pork with a light red color, glossy texture and elasticity was purchased from the supermarket and immediately sent to the experiment in a constant temperature box. The pork samples were evenly trimmed into a size of 2cm×2cm×1cm (length×width×thickness) under a sterile environment and divided into 124 pork samples. The four pathogens selected in this experiment were: Escherichia coli, Pasteurella, Streptococcus and Haemophilus parasuis. Thirty pork samples were inoculated with each strain, of which 4 pork samples were in the control group. Within 10cm of the alcohol lamp, the four bacteria were evenly inoculated on the pork samples in a volume of 200μL. Cultured at room temperature to ensure the adhesion of bacteria on the surface of pork.
[0052] A hyperspectral imager was used to collect hyperspectral images for each pork sample. The hyperspectral imager had a spectral resolution of 1.3 nm, a frame rate of 171 fps, a spectral range of 400-1000 nm, 1600 spatial channels, and 447 spectral channels. Before the formal experiment, the hyperspectral imager was preheated for 20 min to ensure that the light source was stable. A black cap was used to cover the lens to collect blackboard images; the lens cover was opened, a white board was placed, and a standard white board image was collected. SpectrononPro 3 software and ENVI 5.6 software were used for image acquisition and data extraction. By marking the region of interest in the hyperspectral image of each pork sample, the spectral reflectance of each pork sample was extracted from the region of interest, that is, the average original spectral reflectance. Figure 2 The average reflectance spectral curves after each bacterium was inoculated into fresh pork are shown. The spectral trends of all bacterial species are basically the same, but there are differences in the spectral reflectance values. These differences may be due to the different growth and distribution of different bacteria on the pork surface, which may affect the scattering and absorption of light and thus affect the reflectance.
[0053] This application uses principal component analysis (PCA) to visualize the spectral reflectance of pork samples inoculated with different types of pathogens. The PCA algorithm maps high-dimensional data to a low-dimensional space through linear projection. The goal of the PCA algorithm is to maximize the data variance in the low-dimensional representation, thereby using fewer dimensions to represent the data while retaining the characteristics of the original data points as much as possible. The PCA algorithm can convert a large number of original variables into fewer new latent variables, which are called principal components (PCs). Typically, the first 2-3 principal component variables can explain most of the variability in the original data, and therefore, are often used for data dimensionality reduction and visualization analysis. This application visualizes the samples in a three-dimensional principal component space, and PCA can intuitively display the characteristics and clustering trends between samples.
[0054] The results of visual analysis of full-band spectral data by PCA are as follows Figure 3 to- Figure 8 As shown, from Figure 3 As can be seen in the figure, the four different fungi inoculated on the culture medium are clearly grouped. The first three principal components explain 88.19%, 9.65%, and 1.02% of the total variance, respectively. The boundaries between the fungi are relatively clear, but there may be slight overlaps between some fungi, which indicates that these fungi have certain similarities in the principal component space. Figure 4As shown in the figure, PCA analysis was performed on the original spectra of the bacteria inoculated on pork, and the first three principal components explained 89.61%, 9.52% and 0.06% of the total variance, respectively. It can be observed that the samples of the four types of fungi are slightly separated in the principal component space, but there is a serious overlap between the fungi. This overlap may be due to the similar spectral characteristics between the different fungi inoculated on pork, which makes it difficult to completely distinguish samples of different fungi in the principal component space. Figures 5 to 8 The results of PCA visualization of raw spectral reflectance data using different preprocessing methods (including MSC-SGS-2nd Der, SNV-SGS-1st Der, etc.) are shown. By comparison, it can be found that the MSC-SGS-2nd Der preprocessing method has the best classification effect. Although the overlap between groups has improved, there are still some differences. This shows that despite the improvement of the preprocessing method, the spectral characteristics between different fungi still need to be further optimized to improve the accuracy of classification.
[0055] In an exemplary embodiment, step 101 specifically includes: correcting the hyperspectral image of the target edible meat according to a correction formula to obtain a corrected hyperspectral image; and extracting spectral reflectance from the corrected hyperspectral image.
[0056] The correction formula is expressed as:
[0057] Among them, I is the hyperspectral image after correction, I0 is the hyperspectral image before correction, W is the hyperspectral image of the whiteboard, and D is the hyperspectral image of the blackboard.
[0058] In order to extract more effective spectral information and improve the prediction performance of the classification model, the following five preprocessing methods were used: Multiplicative Scatter Correction (MSC), Standard Normal Variate (SNV), Savitzky-Golay Smoothing (SGS), First Derivative (1st Der), and Second Derivative (2nd Der) preprocessing. Different preprocessing methods have different effects. Among them, MSC is used to eliminate the scattering effect caused by particle size, shape or optical path differences, making the spectrum more stable; SNV eliminates the amplitude changes caused by different spectral intensities, making different samples more comparable; SGS is used to smooth the noise in the spectrum and improve the signal-to-noise ratio; 1st Der highlights the subtle changes and peak positions in the spectrum, which helps to detect the features in the spectrum; 2nd Der is used to strengthen the outline and shape of the peak in the spectrum, enhances the slight differences between spectra, and is suitable for analyzing more complex spectral features such as overlapping peaks.
[0059] Since the spectral data after preprocessing still has a strong correlation, it is necessary to extract characteristic variables that are useful for classification. Two feature extraction algorithms were used for verification: Bootstrapping Soft Shrinkage (BOSS) to extract characteristic variables, or Variable Iterative Space Shrinkage Approach (VISSA) to iteratively optimize the position, width and combination of spectral intervals, and finally select a set of wavelengths with the most predictive ability.
[0060] In an exemplary embodiment, step 102 specifically includes: preprocessing the spectral reflectance; the preprocessing is a first preprocessing method, a second preprocessing method, a third preprocessing method or a fourth preprocessing method, the first preprocessing method is to perform multivariate scattering correction, SG smoothing and second-order derivative processing on the spectral reflectance in sequence, the second preprocessing method is to perform standard normal variable, SG smoothing and second-order derivative processing on the spectral reflectance in sequence, the third preprocessing method is to perform multivariate scattering correction, SG smoothing and first-order derivative processing on the spectral reflectance in sequence, and the fourth preprocessing method is to perform standard normal variable, SG smoothing and first-order derivative processing on the spectral reflectance in sequence; using a bootstrap soft shrinkage algorithm or a variable iterative space shrinkage method to extract characteristic wavelengths from the preprocessed spectral reflectance.
[0061] There are many models for classification. Random Forest (RF) is an integrated learning method that builds multiple decision trees and combines their prediction results for classification. Each decision tree is trained on a different subset of samples and features, and the final classification result is determined by a voting mechanism. RF has strong noise resistance and generalization capabilities, and is suitable for processing diverse features in hyperspectral data. Extreme Learning Machine (ELM) is a single hidden layer feedforward neural network. The weights of its hidden layer nodes are randomly generated, and the output weights are quickly calculated by the least squares method. Its training process does not require iterative optimization. Compared with traditional neural networks, ELM has higher computational efficiency and faster training speed, and is particularly suitable for processing large-scale hyperspectral data. Long Short-Term Memory Network (LSTM) is a special recursive neural network designed to process and predict time series data. LSTM contains memory units and multiple gating mechanisms that help the network capture long-term dependencies and avoid the gradient vanishing problem in traditional RNNs. Backpropagation Neural Network (BPNN) is a multi-layer feedforward neural network that includes an input layer, a hidden layer, and an output layer. The prediction results are calculated through forward propagation, and the weights are adjusted using the backpropagation algorithm to minimize the prediction error. In each training, the network updates the weights and biases through the gradient descent method, gradually optimizing the model parameters to improve the classification accuracy. Genetic Algorithm-Backpropagation Neural Network (GA-BPNN) combines genetic algorithms and BP neural networks. Genetic algorithms are used to optimize the weights and structure of BPNN networks, using operations such as natural selection, crossover, and mutation to find the optimal solution. Through the global search capability of genetic algorithms, GA-BPNN can avoid the local optimal problem in BPNN networks and improve classification performance.
[0062] In an exemplary embodiment, the machine learning model is a random forest, an extreme learning machine, a long short-term memory network, or a back propagation neural network.
[0063] When the machine learning model is the back propagation neural network, the back propagation neural network is trained to obtain a classification model, specifically comprising: using a training set to train the back propagation neural network to obtain a trained back propagation neural network; using a genetic algorithm to optimize the parameters of the trained back propagation neural network to obtain the classification model; the training set includes input data and label data, the input data is the characteristic wavelength of the edible meat sample, and the label data is the target pathogen type inoculated with the edible meat sample.
[0064] This application uses the train_test_split function in the scikit-learn library to divide the data set composed of pork samples into training sets and test sets. The proportion of the test set is specified by setting the test_size parameter, and the reproducibility of the division can be guaranteed by the random_state parameter. The purpose of this is to ensure that the performance of the model on different data subsets is representative, so as to better evaluate the generalization ability of the model. The full spectrum data preprocessed by MSC-SGS-2nd Der is trained in a ratio of 4:1, and the five models of RF, ELM, LSTM, BPNN and GA-BPNN are classified respectively, and 10 results are taken as the average result. Table 1 shows the comparison of the results of different machine learning models on the training set and the test set: the BPNN model performs best on the test set, with an accuracy of 91.67%; LSTM performs well on both the training set and the test set, with results of 100.00% and 86.90% respectively; the GA-BPNN model has the lowest accuracy on the test set, which is 72.22%. In general, the BPNN model has the strongest generalization ability, while the generalization abilities of other models are relatively weak.
[0065] Table 1 Classification results of the model based on the full-band spectrum
[0066]
[0067] The BOSS and VISSA algorithms were used to extract characteristic variables from the spectral data preprocessed by MSC-SGS-2nd Der. The BOSS algorithm used 5-fold cross validation and 1000 bootstrap iterations to screen out 43 characteristic wavelengths, accounting for 18.6% of the total wavelengths. The VISSA algorithm had a maximum number of latent variables of 10, 10-fold cross validation, and 1000 binary matrix samples, selecting 91 characteristic variables, accounting for 39.3% of the total spectrum.
[0068] Table 2 shows the classification results of modeling based on the characteristic wavelengths selected by the BOSS and VISSA algorithms. As can be seen from Table 2, for the LSTM model, the test set accuracy based on the VISSA algorithm is the best, which is 100%; for the BPNN model, the test set accuracy based on the BOSS and VISSA algorithms is 83.33% and 91.67% respectively; for the GA-BPNN model, the test set accuracy based on the BOSS and VISSA algorithms is 91.67%, which is 19.45% higher than the 72.22% of the full wavelength. Overall, the feature screening of different algorithms has a significant impact on the classification accuracy of the model, and some algorithms significantly improve the detection effect of the classification model.
[0069] Table 2 Model classification results based on characteristic bands
[0070]
[0071]
[0072] Conclusion: This application reveals the application potential of hyperspectral imaging technology combined with deep learning in pathogen detection. By optimizing the pretreatment method and feature screening algorithm, the classification accuracy of pathogen detection was significantly improved. The feature screening algorithm effectively enhanced the classification performance of each model, especially the GA-BPNN model based on the BOSS algorithm, which significantly improved its accuracy. Overall, the combination of hyperspectral imaging technology with appropriate data processing and feature selection strategies provides an effective solution for the accurate detection of pathogens in pork. Future research should further explore the application of this method in other food safety fields, and optimize algorithms and techniques to improve detection efficiency and accuracy. This innovative method provides a more efficient and economical solution for food safety testing, and provides strong support for research and practice in related fields.
[0073] Based on the same inventive concept, the embodiment of the present application also provides a device for synchronously detecting multiple pathogens in edible meat for implementing the method for synchronously detecting multiple pathogens in edible meat involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the device for synchronously detecting multiple pathogens in edible meat provided below can refer to the limitations of the method for synchronously detecting multiple pathogens in edible meat above, and will not be repeated here.
[0074] In an exemplary embodiment, the present application provides a device for synchronously detecting multiple pathogens in edible meat, comprising:
[0075] The spectral reflectance extraction module is used to extract the spectral reflectance from the hyperspectral image of the target edible meat.
[0076] The characteristic wavelength extraction module is used to extract the characteristic wavelength from the spectral reflectance by adopting a bootstrap soft shrinkage algorithm or a variable iterative space shrinkage method.
[0077] The target pathogen detection module is used to input the characteristic wavelength into a classification model and output classification results of multiple target pathogens; the classification result is no target pathogens or at least one type of target pathogens, and the classification model is obtained by training a machine learning model.
[0078] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data on the simultaneous detection of multiple pathogens in edible meat. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for simultaneous detection of multiple pathogens in edible meat is implemented.
[0079] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0080] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned embodiments of the method for simultaneous detection of multiple pathogens in edible meat.
[0081] In an exemplary embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in the above-mentioned embodiments of the method for simultaneous detection of multiple pathogens in edible meat.
[0082] 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, stored data, displayed data, 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 relevant data must comply with relevant regulations.
[0083] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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 may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0084] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a data processing logic of a programmable logic device, etc., but is not limited thereto.
[0085] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.
[0086] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for simultaneous detection of multiple pathogens in edible meat, characterized in that: The method for synchronously detecting multiple pathogens in edible meat comprises: extracting spectral reflectance from a hyperspectral image of target edible meat; Extracting characteristic wavelengths from the spectral reflectance using a bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method; The characteristic wavelength is input into a classification model, and classification results of multiple target pathogens are output; the classification result is no target pathogen or at least one type of target pathogen, and the classification model is obtained by training a machine learning model.
2. The method for simultaneous detection of multiple pathogens in edible meat according to claim 1, characterized in that: Extracting spectral reflectance from the hyperspectral image of the target edible meat includes: Correcting the hyperspectral image of the target edible meat according to a correction formula to obtain a corrected hyperspectral image; Extracting spectral reflectance from the rectified hyperspectral image; The correction formula is expressed as: Among them, I is the hyperspectral image after correction, I0 is the hyperspectral image before correction, W is the hyperspectral image of the whiteboard, and D is the hyperspectral image of the blackboard.
3. The method for simultaneous detection of multiple pathogens in edible meat according to claim 1, characterized in that: A bootstrapped soft shrinkage algorithm or a variable iterative space shrinkage method is used to extract a characteristic wavelength from the spectral reflectance, specifically including: Preprocessing the spectral reflectance; the preprocessing is a first preprocessing method, a second preprocessing method, a third preprocessing method or a fourth preprocessing method, the first preprocessing method is to sequentially perform multivariate scattering correction, SG smoothing and second-order derivative processing on the spectral reflectance, the second preprocessing method is to sequentially perform standard normal variable, SG smoothing and second-order derivative processing on the spectral reflectance, the third preprocessing method is to sequentially perform multivariate scattering correction, SG smoothing and first-order derivative processing on the spectral reflectance, and the fourth preprocessing method is to sequentially perform standard normal variable, SG smoothing and first-order derivative processing on the spectral reflectance; The bootstrapped soft shrinkage algorithm or the variable iterative space shrinkage method is used to extract the characteristic wavelength from the preprocessed spectral reflectance.
4. The method for simultaneous detection of multiple pathogens in edible meat according to claim 1, characterized in that: The edible meat includes pork.
5. The method for simultaneous detection of multiple pathogens in edible meat according to claim 1, characterized in that: The multiple target pathogens are Escherichia coli, Pasteurella, Streptococcus and Haemophilus parasuis.
6. The method for simultaneous detection of multiple pathogens in edible meat according to claim 1, characterized in that: The machine learning model is a random forest, an extreme learning machine, a long short-term memory network, or a back propagation neural network; When the machine learning model is the back propagation neural network, training the back propagation neural network to obtain a classification model specifically includes: Using the training set to train the back propagation neural network to obtain a trained back propagation neural network; Using a genetic algorithm to optimize the parameters of the trained back propagation neural network to obtain the classification model; The training set includes input data and label data, the input data is the characteristic wavelength of the edible meat sample, and the label data is the target pathogen type inoculated into the edible meat sample.
7. A device for synchronously detecting multiple pathogens in edible meat, characterized in that: The device for synchronously detecting multiple pathogens in edible meat comprises: A spectral reflectance extraction module, used for extracting spectral reflectance from a hyperspectral image of target edible meat; A characteristic wavelength extraction module, used to extract the characteristic wavelength from the spectral reflectance by using a bootstrap soft shrinkage algorithm or a variable iterative space shrinkage method; The target pathogen detection module is used to input the characteristic wavelength into a classification model and output classification results of multiple target pathogens; the classification result is no target pathogens or at least one type of target pathogens, and the classification model is obtained by training a machine learning model.
8. A computer device comprising: 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 method for simultaneous detection of multiple pathogens in edible meat according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for simultaneous detection of multiple pathogens in edible meat according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for simultaneous detection of multiple pathogens in edible meat according to any one of claims 1 to 6 is implemented.