Method and system for rapidly identifying mixed bacteria in water body based on transmission spectrum

Through multi-wavelength transmission spectrum and support vector machine algorithm, the problems of low accuracy and poor robustness of water mixed bacteria recognition are solved, and fast and accurate bacteria recognition is achieved, reducing costs and simplifying operations.

CN120404625APending Publication Date: 2025-08-01ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510503959.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing mixed bacteria identification methods in water bodies have problems with low recognition accuracy, poor robustness and slow recognition speed, especially when different bacterial spectral characteristics in mixed bacterial fluids are interfering with each other and influencing noise.

Method used

Multi-wavelength transmission spectroscopy technology combined with support vector machine algorithm is used to prepare bacterial mixed liquids of equal concentrations and different volume ratios, measure their multi-wavelength transmission spectral characteristics, and establish multiple support vector machine models, and use layer-by-layer recognition strategy to identify bacterial species.

Benefits of technology

It realizes rapid and accurate identification of mixed bacteria in water bodies, improves identification accuracy and robustness, reduces costs, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120404625A_ABST
    Figure CN120404625A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of bacterium identification, and particularly relates to a method and system for rapidly identifying mixed bacteria in a water body based on a transmission spectrum, and the method comprises the steps: measuring the multi-wavelength transmission spectrum characteristics of a bacteria mixed solution at the wave band of 210-800 nm, building a plurality of identification models through a support vector machine, and employing a layer-by-layer identification strategy to identify the mixed bacteria in the water body. And the mixed bacteria in the water body can be quickly and accurately identified. The method comprises the following steps: preparing a bacterial mixed solution with equal concentration and different volume ratios, measuring a transmission spectrum of the bacterial mixed solution, carrying out minimum-maximum normalization processing, constructing a plurality of identification models for training, and finally carrying out bacterial type identification on a bacterial solution sample to be detected. According to the method, different types of bacterial mixed solutions with the same concentration and different volume ratios are prepared, the multi-wavelength transmission spectrum characteristics of the bacterial mixed solutions are measured, a plurality of recognition models are established, and a layer-by-layer recognition strategy is adopted, so that the recognition accuracy and robustness are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of bacterial identification, and particularly relates to a method and system for rapidly identifying mixed bacteria in water based on transmission spectra. Background Art

[0002] Existing methods for identifying bacteria and microorganisms in water mainly include biological methods and spectroscopy methods. Biological methods, such as polymerase chain reaction (PCR), enzyme-linked immunosorbent assay (ELISA), and microarray methods, require high-precision detection equipment and professional operators, with high costs and long detection times, which are not conducive to the rapid detection of bacteria and microorganisms in water. Spectroscopy methods, such as fluorescence spectroscopy, Raman spectroscopy, and ultraviolet-visible spectroscopy, can identify bacterial species by analyzing the spectral characteristics of bacterial solutions, and have the advantages of fast detection speed and simple operation. However, existing spectroscopy methods mainly focus on the identification of single bacteria, and there is little research on the identification of mixed bacteria and microorganisms in actual water bodies.

[0003] In the prior art, the methods for identifying mixed bacteria and microorganisms in water have the following defects:

[0004] Low identification accuracy: Due to the mutual interference of the spectral characteristics of different bacteria in the mixed bacterial solution, it is difficult for the identification model to distinguish between mixed bacteria and single bacteria, resulting in low identification accuracy.

[0005] Poor robustness: The existing identification models are sensitive to the noise and overlapping parts in the spectral characteristics and are easily affected by external factors, resulting in unstable identification results and poor robustness.

[0006] Slow identification speed: Existing methods usually adopt a direct identification strategy, directly classifying the mixed bacterial solution into specific bacterial species, which requires processing a large amount of data, resulting in a slow identification speed and being not conducive to practical applications. Summary of the Invention

[0007] The purpose of the present invention is to provide a method and system for rapidly identifying mixed bacteria in water based on transmission spectra to solve the problems of slow identification speed and poor accuracy of the prior art for identifying mixed bacteria in water.

[0008] The present invention achieves the above purpose through the following technical solutions:

[0009] In a first aspect, the present invention provides a method for rapidly identifying mixed bacteria in water based on transmission spectra, the method comprising the following steps:

[0010] S1. Using the optical density value at a wavelength of 600 nm as a calibration value, preparing mixed solutions of different categories of bacteria with equal concentrations and different volume ratios; the bacterial mixed solutions include single-bacteria solutions, two-bacteria mixed solutions, and three-bacteria mixed solutions;

[0011] S2. Measure the multi-wavelength transmission spectra of the bacterial mixture using a preset wavelength band and perform min-max normalization to obtain a sample data set containing different categories of bacterial mixtures and their corresponding spectral characteristics; the preset wavelength band is 210 nm - 800 nm.

[0012] S3. Based on the category of the bacterial mixture, construct multiple recognition models using support vector machines, and train the sample data set on the recognition models to obtain the trained recognition models.

[0013] S4. Based on the trained recognition models, adopt a layer-by-layer recognition strategy to identify the types of bacteria in the sample of the bacterial liquid to be measured.

[0014] Among them, the layer-by-layer recognition strategy is specifically to classify and identify the sample of the bacterial liquid to be measured using the recognition models trained based on different categories of bacterial mixtures in the sample data set.

[0015] Further, the bacterial mixture includes single-species bacterial liquids, as well as two-species mixed bacterial liquids and three-species mixed bacterial liquids mixed in different proportions; the bacteria include any one or more combinations of Escherichia coli, Staphylococcus aureus, Bacillus subtilis, Klebsiella pneumoniae, Salmonella typhimurium, and Streptococcus faecalis.

[0016] Further, step S1 includes:

[0017] S1.1. Measure the spectral characteristics of each single-species bacterium in the range of 200 - 900 nm, select the wavelength band of 210 - 800 nm for average normalization, and use the optical density at 6,000 nm as the calibration value.

[0018] S1.2. Establish a linear relationship between the optical density value and the dilution factor, and calculate the required dilution factor according to the target concentration.

[0019] S1.3. Dilute the single-species bacterial liquid according to the calculated dilution factor to prepare single-species bacterial liquids with equal concentrations.

[0020] S1.4. Mix the single-species bacterial liquids with equal concentrations according to the preset volume ratio to prepare mixed bacterial liquids with different volume ratios.

[0021] Further, step S2 includes: using a UV-visible spectrophotometer with a measurement range of 200 nm - 900 nm, a collection interval of 1 nm, a scanning speed of 6 nm / s, deionized water as the reference, repeating the measurement for each bacterial mixture and taking the average value as the measurement result, and selecting the spectral data in the wavelength band range of 210 nm - 800 nm as the spectral characteristics.

[0022] Further, step S3 includes:

[0023] S3.1. Divide the spectral features into corresponding categories of single bacteria, two-bacteria mixture, and three-bacteria mixture to form a sample dataset with one-to-one correspondence between spectral features and sample categories;

[0024] S3.2. Stratified sampling is performed on the sample dataset to select a training set and a test set;

[0025] S3.3. Establish four support vector machine models, which are respectively used to identify single bacteria, two-bacteria mixture, and three-bacteria mixture samples, and input the training set into the models for training;

[0026] S3.4. Combine the test set, and optimize the support vector machine models through the particle swarm optimization algorithm to obtain four recognition models.

[0027] Further, step S3.3 includes:

[0028] Establish a support vector machine model one, which is used to identify whether the bacterial mixture belongs to single bacteria, two-bacteria mixture, or three-bacteria mixture;

[0029] Establish a support vector machine model two, which is used to identify the specific bacterial species of the single-bacteria liquid;

[0030] Establish a support vector machine model three, which is used to identify the specific bacterial species of the two-bacteria mixture;

[0031] Establish a support vector machine model four, which is used to identify the specific bacterial species of the three-bacteria mixture.

[0032] Further, step S4 includes:

[0033] S4.1. Input the spectral features of the to-be-detected bacterial liquid sample into the recognition model of the corresponding support vector machine model one, and determine the category of the to-be-detected bacterial liquid sample according to the recognition result;

[0034] S4.2. Based on the recognition result, determine the corresponding recognition model, and input the spectral features to obtain the final bacterial recognition result.

[0035] In a second aspect, the present invention proposes a rapid identification system for mixed bacteria in water based on transmission spectra, and the system includes:

[0036] A spectral acquisition module, which is used to measure the multi-wavelength transmission spectrum of the to-be-detected bacterial liquid sample by using a preset wavelength band; the preset wavelength band is 210 nm - 800 nm;

[0037] A data processing module, which is used to perform min-max normalization processing on the multi-wavelength transmission spectrum to obtain spectral features;

[0038] Recognition model module; based on a pre-constructed recognition model and a layer-by-layer recognition strategy, identify the bacterial species in the sample bacterial liquid to be tested;

[0039] Among them, the construction of the recognition model includes:

[0040] Using the optical density value at a wavelength of 600 nm as the calibration value, prepare different types of bacterial mixed liquids with equal concentrations and different volume ratios; the bacterial mixed liquids include single-species bacterial liquids, two-species bacterial mixed liquids, and three-species bacterial mixed liquids, and obtain a sample data set containing different types of bacterial mixed liquids and their corresponding spectral characteristics; according to the types of bacterial mixed liquids, construct multiple recognition models based on the support vector machine, and train the recognition models with the sample data set to obtain the trained recognition models; the support vector machine is any one of SVM, GS-SVM, and PSO-SVM;

[0041] The layer-by-layer recognition strategy is specifically to classify and identify the sample bacterial liquid to be tested using the recognition models trained based on different types of bacterial mixed liquids in the sample data set.

[0042] Further, the recognition model module includes:

[0043] The first construction unit is used to establish the first support vector machine model for identifying whether the bacterial mixed liquid belongs to single-species bacteria, two-species bacteria mixed, or three-species bacteria mixed;

[0044] The second construction unit is used to establish the second support vector machine model for identifying the specific bacterial species in the single-species bacterial liquid;

[0045] The third construction unit is used to establish the third support vector machine model for identifying the specific bacterial species in the two-species bacterial mixed liquid;

[0046] The fourth construction unit is used to establish the fourth support vector machine model for identifying the specific bacterial species in the three-species bacterial mixed liquid.

[0047] The beneficial effects of the present invention are as follows:

[0048] By combining the multi-wavelength transmission spectroscopy technology and the support vector machine algorithm, the present invention realizes the rapid and accurate identification of mixed bacteria in water. Compared with the traditional biological method, the present invention has the advantages of fast detection speed, simple operation, and low cost. By preparing different types of bacterial mixed liquids with equal concentrations and different volume ratios, and measuring their multi-wavelength transmission spectral characteristics, the present invention establishes multiple recognition models and adopts a layer-by-layer recognition strategy, effectively improving the recognition accuracy and robustness. Description of the Drawings

[0049] Figure 1A schematic flowchart of the method for rapid identification of mixed bacteria in water based on transmission spectrum provided by the embodiments of the present application;

[0050] Figure 2 A schematic flowchart of the water body identification method in an example of the specific implementation mode of the present application;

[0051] Figure 3 The transmission spectrum of Staphylococcus aureus bacterial solution in the case part of the specific implementation mode of the present application;

[0052] Figure 4 The transmission spectrum of the mixed bacterial solution of Staphylococcus aureus and Bacillus subtilis in the case part of the specific implementation mode of the present application;

[0053] Figure 5 The transmission spectrum of the mixed bacterial solution of Staphylococcus aureus, Escherichia coli and Bacillus subtilis in the case part of the specific implementation mode of the present application;

[0054] Figure 6 The original spectra of 6 single bacteria measured in the case part of the specific implementation mode of the present application in the 210 - 800 nm band;

[0055] Figure 7 The minimum - maximum normalized spectra of 6 single bacteria measured in the case part of the specific implementation mode of the present application in the 210 - 800 nm band;

[0056] Figure 8 The confusion matrix diagrams of the first - layer identification of water - body bacteria by SVM, GS - SVM and PSO - SVM models in the case part of the specific implementation mode of the present application; (a) SVM; (b) GS - SVM; (c) PSO - SVM;

[0057] Figure 9 The confusion matrix diagrams of the second - layer identification of water - body bacteria by the SVM model in the case part of the specific implementation mode of the present application; (a) single bacteria; (b) two - bacteria mixture; (c) three - bacteria mixture;

[0058] Figure 10 The confusion matrix diagrams of the second - layer identification of water - body bacteria by the GS - SVM model in the case part of the specific implementation mode of the present application; (a) single bacteria; (b) two - bacteria mixture; (c) three - bacteria mixture;

[0059] Figure 11 The confusion matrix diagrams of the second - layer identification of water - body bacteria by the PSO - SVM model in the case part of the specific implementation mode of the present application (a) single bacteria; (b) two - bacteria mixture; (c) three - bacteria mixture. Specific implementation mode

[0060] The following further describes the present application in conjunction with the accompanying drawings. It is necessary to point out here that the following specific embodiments are only used to further illustrate the present application and cannot be construed as limiting the protection scope of the present application. Those skilled in the art can make some non-essential improvements and adjustments to the present application based on the above application content.

[0061] Embodiment 1

[0062] As Figure 1 shown, aiming at the problem that it is difficult to identify mixed bacteria in water bodies, a method for quickly identifying mixed bacteria in water bodies by combining multi-wavelength transmission spectra and support vector machine algorithms is proposed. This embodiment proposes a method for quickly identifying mixed bacteria in water bodies based on transmission spectra. The method includes the following steps:

[0063] S1. Using the optical density value at a wavelength of 600 nm as a calibration value, prepare different types of bacterial mixed solutions with equal concentrations and different volume ratios; the bacterial mixed solutions include single-species bacterial solutions, two-bacterial mixed solutions, and three-bacterial mixed solutions;

[0064] S2. Measure the multi-wavelength transmission spectra of the bacterial mixed solutions using a preset wavelength band and perform min-max normalization processing to obtain a sample data set containing different types of bacterial mixed solutions and their corresponding spectral characteristics; the preset wavelength band is 210 nm - 800 nm;

[0065] S3. Based on the types of bacterial mixed solutions, construct multiple recognition models based on support vector machines, and train the sample data set on the recognition models to obtain the trained recognition models;

[0066] S4. Based on the trained recognition models, adopt a layer-by-layer recognition strategy to identify the types of bacteria in the sample of the bacterial solution to be measured;

[0067] Among them, the support vector machine is any one of SVM, GS-SVM, and PSO-SVM. The layer-by-layer recognition strategy is specifically to classify and identify the sample of the bacterial solution to be measured based on the recognition models trained according to different types of bacterial mixed solutions in the sample data set.

[0068] In a preferred embodiment of the present invention, the bacterial mixed solution includes single-species bacterial solutions, as well as two-bacterial mixed solutions and three-bacterial mixed solutions mixed in different proportions; the bacteria include any one or a combination of Escherichia coli, Staphylococcus aureus, Bacillus subtilis, Klebsiella pneumoniae, Salmonella typhimurium, and Streptococcus faecalis.

[0069] In a preferred embodiment of the present invention, step S1 includes:

[0070] S1.1. Measure the spectral characteristics of each single bacterium in the range of 200 - 900 nm, select the band of 210 - 800 nm for average normalization, and use the optical density at 600 nm as the calibration value;

[0071] S1.2. Establish a linear relationship between the optical density value and the dilution factor, and calculate the required dilution factor according to the target concentration;

[0072] S1.3. Dilute the single - bacterium bacterial liquid according to the calculated dilution factor to prepare single - bacterium bacterial liquids with equal concentrations;

[0073] S1.4. Mix the single - bacterium bacterial liquids with equal concentrations according to the preset volume ratio to prepare mixed bacterial liquids with different volume ratios.

[0074] It should be noted that in this application, the optical density value of the bacterial liquid at 600 nm wavelength is used as the calibration value. Exemplarily, for example, to prepare bacterial liquids of equal - concentration bacteria A and bacteria B. First, perform average normalization on the transmission spectra of bacteria A and bacteria B, and calculate the optical density values OD' A (600) and OD' B (600) of equal - concentration bacteria A and bacteria B at 600 nm. Then calculate the optical density ratio c of the bacterial liquids of equal - concentration bacteria A and bacteria B at 600 nm, as shown in the following formula:

[0075]

[0076] In the above formula, OD A (600) and OD B (600) are the optical density values measured at 600 nm for bacteria A and bacteria B respectively.

[0077] In this application, to ensure the preparation of bacterial liquids of equal - concentration bacteria A and bacteria B, it is required that the optical density ratio of the bacterial liquids of equal - concentration bacteria A and bacteria B at 600 nm is equal to c. To dilute the concentration of bacteria A bacterial liquid to be equal to that of bacteria B bacterial liquid, calculate that the optical density value of bacteria A equal to the concentration of bacteria B at 600 nm is equal to OD″ A (600), and its expression is:

[0078]

[0079] In the above formula, x is the dilution factor of the bacterial liquid.

[0080] In a preferred embodiment of the present invention, step S2 includes: using a UV-visible spectrophotometer with a measurement range of 200 nm - 900 nm, a collection interval of 1 nm, a scanning speed of 6 nm / s, using deionized water as a reference, repeating the measurement of each bacterial mixture three times, taking the average value as the measurement result, and selecting the spectral data in the wavelength range of 210 nm - 800 nm as the spectral features.

[0081] According to the above embodiment, in specific implementation, preparation of equal-concentration bacterial solutions: Measure the spectral features of each single bacterial species in the range of 200 - 900 nm, select the wavelength range of 210 - 800 nm for average normalization, and use the optical density at 600 nm as the calibration value. Establish a linear relationship between the OD600 value and the dilution factor, and calculate the required dilution factor according to the target concentration. Dilute the single bacterial species solution according to the calculated dilution factor to prepare equal-concentration single bacterial species solutions.

[0082] Preparation of mixed bacterial solutions: Mix equal-concentration single bacterial species solutions according to a preset volume ratio to prepare mixed bacterial solutions with different volume ratios, including two-bacterial-species mixed solutions and three-bacterial-species mixed solutions. For example, to prepare a two-bacterial-species mixed solution with a volume ratio of 1:1, mix two equal-concentration single bacterial species solutions according to a volume ratio of 1:1.

[0083] In a preferred embodiment of the present invention, step S3 includes:

[0084] S3.1. Classify the spectral features into corresponding categories of single bacterial species, two-bacterial-species mixture, and three-bacterial-species mixture to form a sample data set with one-to-one correspondence between spectral features and sample categories;

[0085] S3.2. Stratified sampling is performed on the sample data set to select a training set and a test set;

[0086] S3.3. Establish four support vector machine models, which are respectively used to identify single bacterial species, two-bacterial-species mixture, and three-bacterial-species mixture samples, and input the training set into the model for training;

[0087] S3.4. Combine the test set, and optimize the support vector machine model through the particle swarm optimization algorithm to obtain four recognition models.

[0088] In a preferred embodiment of the present invention, step S3.3 includes:

[0089] Establish a support vector machine model one, which is used to identify whether the bacterial mixture belongs to single bacterial species, two-bacterial-species mixture, or three-bacterial-species mixture;

[0090] Establish a support vector machine model two, which is used to identify the specific bacterial species of the single bacterial species solution;

[0091] Build a support vector machine model three for identifying the specific bacterial species in a mixed bacterial solution of two bacteria;

[0092] Build a support vector machine model four for identifying the specific bacterial species in a mixed bacterial solution of three bacteria.

[0093] In the above embodiments, 4 SVM models are respectively built, which are respectively used to identify the types of bacterial mixtures, single bacteria, mixtures of two bacteria, and mixtures of three bacteria.

[0094] In a preferred embodiment of the present invention, step S4 includes:

[0095] S4.1. Input the spectral characteristics of the bacterial solution sample to be measured into the recognition model of the corresponding support vector machine, and determine the category of the bacterial solution sample to be measured according to the recognition result;

[0096] S4.2. Determine the corresponding recognition model based on the recognition result, and input the spectral characteristics to obtain the final bacterial recognition result.

[0097] The layer-by-layer recognition strategy of this application is used to recognize the bacterial solution sample to be measured, specifically including:

[0098] The first layer of recognition: Input the spectral characteristics of the bacterial solution sample to be measured into the trained model one for large-category recognition, that is, distinguish the sample into single bacteria, mixtures of two bacteria, or mixtures of three bacteria.

[0099] The second layer of recognition: According to the result of the first layer of recognition, further label the bacterial species within each large category, and input them again into the trained model within the corresponding large category for the second layer of recognition, and finally output the recognition result of the bacterial species.

[0100] During specific implementation, first perform the first layer of recognition, label all the bacterial samples in the test set with large categories, that is, single bacteria, mixtures of two bacteria, and mixtures of three bacteria, and input them into the trained model to recognize the large categories; then, according to the result of the first layer of recognition, further label the bacterial species within each large category, and input them again into the trained model within the corresponding large category for the second layer of recognition, and finally output the recognition result of the bacterial species.

[0101] Exemplarily, in combination with Figure 2 , the layer-by-layer recognition method (see Figure 2(red dotted line box), first, perform the first - layer recognition (see 2A). Mark all the experimental bacterial samples (dark pink box) into major categories: a single - species bacterium is marked as 1, a mixture of two bacteria is marked as 2, and a mixture of three bacteria is marked as 3. Input the training set into the machine - learning algorithm to establish a bacterial major - category recognition model, and then test the test set to output the recognition result. Then, enter the second - layer recognition (such as 2B). If a certain category of bacterial sample (single - species, two - species, or three - species) has been determined according to the first - layer recognition, the bacterial species within each major category are marked again. Continue to input the training set within the same category into the machine - learning algorithm to establish an in - category bacterial recognition model, and further test the samples accurately recognized in the first - layer recognition. Finally, output the recognition result. This method gradually narrows the range of the bacterial samples to be measured, achieving the purpose of quickly identifying the bacterial species.

[0102] According to the above - mentioned embodiments, the present invention combines transmission spectroscopy and support vector machine (SVM) technology to propose a method for quickly identifying mixed bacteria in water bodies. First, by measuring the transmission spectra of bacterial solutions with different species and mixing ratios, obtain their spectral characteristics. Then, use the particle swarm optimization algorithm (PSO) to optimize the parameters of the SVM model, establish multiple recognition models, which are respectively used to identify single - species bacteria, two - species bacteria mixtures, and three - species bacteria mixtures. Finally, adopt a layer - by - layer recognition strategy, first identify the major category (single - species, two - species, or three - species mixture) of the bacterial mixture, and then further identify the specific bacterial species.

[0103] Based on the same inventive concept, this embodiment proposes a rapid identification system for mixed bacteria in water bodies based on transmission spectroscopy. The system includes:

[0104] A spectral acquisition module, which is used to measure the multi - wavelength transmission spectra of the bacterial solution sample to be measured using a preset wavelength band; the preset wavelength band is 210nm - 800nm;

[0105] A data processing module, which is used to perform min - max normalization processing on the multi - wavelength transmission spectra to obtain spectral characteristics;

[0106] An identification model module; based on the pre - constructed identification model and the layer - by - layer recognition strategy, identify the bacterial species of the bacterial solution sample to be measured;

[0107] Among them, the construction of the identification model includes:

[0108] Taking the optical density value at 600nm wavelength as the calibration value, prepare different - category bacterial mixtures with equal concentrations and different volume ratios; the bacterial mixtures include single - species bacterial solutions, two - species bacterial mixtures, and three - species bacterial mixtures, and obtain a sample data set containing different bacterial mixture categories and corresponding spectral characteristics. According to the bacterial mixture categories, construct multiple recognition models based on particle swarm optimization - support vector machine, and train the recognition models with the sample data set to obtain the trained recognition models;

[0109] The layer-by-layer recognition strategy specifically classifies and identifies the sample bacterial liquid to be tested using an identification model trained based on different categories of bacterial mixed liquid in the sample dataset.

[0110] In a preferred embodiment of the present invention, the identification model module includes:

[0111] The first construction unit is used to establish a support vector machine model one for identifying whether the bacterial mixed liquid belongs to a single type of bacteria, a mixture of two types of bacteria, or a mixture of three types of bacteria;

[0112] The second construction unit is used to establish a support vector machine model two for identifying the specific type of bacteria in the single-type bacteria liquid;

[0113] The third construction unit is used to establish a support vector machine model three for identifying the specific types of bacteria in the two-bacteria mixed liquid;

[0114] The fourth construction unit is used to establish a support vector machine model four for identifying the specific types of bacteria in the three-bacteria mixed liquid.

[0115] It should be noted here that each module in the above identification system corresponds to steps S1 to S4 in implementing the above identification method. The instances and application scenarios realized by multiple modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1.

[0116] To more clearly illustrate the present invention and its advantages, the following will further explain the method provided by the present invention in combination with specific embodiments and relevant parts of the drawings.

[0117] I. Spectrum acquisition and analysis

[0118] The transmission spectra of single-type bacteria (126), two-bacteria mixture (126), and three-bacteria mixture (44) were respectively collected using a UV-Vis spectrophotometer (UV2700) from Shimadzu Corporation, Japan. The measurement range was 200 - 900 nm, the acquisition interval was 1 nm, the scanning speed was 6 nm / s, deionized water was used as the reference, and each sample was measured three times repeatedly, and the average value was taken as the measurement result.

[0119] Figures 3 - 5 The transmission spectra of Staphylococcus aureus liquid, a mixed liquid of Staphylococcus aureus and Bacillus subtilis, and a mixed liquid of Staphylococcus aureus, Escherichia coli, and Bacillus subtilis are shown. It can be seen that there are certain differences in the single-type bacteria, two-bacteria mixture, and three-bacteria mixture liquids, and even the spectral shapes are different. These spectral differences provide a basis for subsequent identification of different types of bacteria.

[0120] By Figure 3It can be seen that the spectral curve has a large noise in the wavelength range of 800 - 900 nm. Figure 4 and Figure 5 There is an aliasing phenomenon in the spectral curves of the two mixed bacteria in the wavelength range of 200 - 210 nm. Therefore, the transmission spectra of bacteria and microorganisms in the wavelength range of 210 - 800 nm are selected for the experiment.

[0121] Figure 6 and Figure 7 Figures and are the original spectra and the spectra after normalization of the minimum and maximum values of the six single bacteria measured in the experiment in the wavelength range of 210 - 800 nm. It can be seen that there are significant differences in the spectral absorption peaks of Escherichia coli, Staphylococcus aureus, and Bacillus subtilis. The positions of the spectral absorption peaks of Klebsiella pneumoniae and Salmonella typhimurium are almost the same, with a high similarity. There are only slight differences in the spectra in the two wavelength ranges of 230 - 261 nm and 300 - 345 nm, and further identification is required with the aid of a machine learning model.

[0122] II. Sample Division

[0123] Stratified sampling is used in this paper, which can better maintain the class ratio and uniform distribution characteristics of the bacterial spectra. The process is as follows: The spectra of bacteria of the same class are sorted in ascending order of concentration. For each of the six single-bacteria solutions with 20 spectra, 10 spectra are selected as training samples (randomly selected 1 spectrum from the intervals A1, A2, A3... A9 and A10), and the remaining 10 spectra are used as test samples. For each of the six two-bacteria mixed solutions with 19 spectra, 10 spectra are selected as training samples (randomly selected 1 spectrum from the intervals B1, B2, B3... B9 and B10), and the remaining 9 spectra are used as test samples. For each of the two three-bacteria mixed solutions with 19 spectra, 10 spectra are selected as training samples (randomly selected 1 spectrum from the intervals C1, C2, C3... C9 and C10), and the remaining 9 spectra are used as test samples, ensuring that the training samples and test samples include the spectral characteristics of bacteria with different concentrations, thereby improving the generalization ability of the model, as shown in Table 1 for the distribution of the training set and test set.

[0124] Table 1 Training Set and Test Set

[0125]

[0126] III. Select the training samples of the normalized transmission spectra in the wavelength range of 210 - 800 nm for training, and establish SVM, GS-SVM, and PSO-SVM recognition models respectively. Table 2 shows the recognition results of water bacteria by the SVM, GS-SVM, and PSO-SVM models using the direct recognition method.

[0127] Table 2 Direct Recognition Results of SVM, GS-SVM, and PSO-SVM

[0128]

[0129]

[0130] Table 3 shows the overall recognition accuracies of three SVM models for bacteria recognition. It can be seen that the overall recognition accuracies of the SVM, GS-SVM, and PSO-SVM models for 132 test samples are 89.39%, 90.91%, and 91.67% respectively. The reason is that although the principles of the SVM, GS-SVM, and PSO-SVM models are similar, there are differences in their parameter optimization methods. The SVM uses default parameters and often fails to achieve optimal performance; the GS-SVM optimizes parameters through grid search but may be limited by the search range and step size; the PSO-SVM algorithm has global search ability and can find a better parameter combination, thus improving the recognition accuracy. In addition, the PSO-SVM model is superior to the GS-SVM and SVM models in terms of the overall precision, recall, and F1-score for bacteria recognition, indicating that the PSO-SVM model also has the best robustness.

[0131] Table 3 Recognition Results of Different Models for Water Bacteria

[0132]

[0133] IV. Layer-by-Layer Recognition Results Based on SVM, GS-SVM, and PSO-SVM Models

[0134] Figure 8 Fig. is the confusion matrix diagram of the first-layer recognition of water bacteria by the SVM, GS-SVM, and PSO-SVM models. From Figure 8 (a), (b), and (c), it can be seen that the SVM, GS-SVM, and PSO-SVM models respectively identify the major categories of bacteria (single species, two-species mixture, or three-species mixture) for 132 test samples, and the overall recognition accuracies are 94.70%, 95.46%, and 96.97% respectively. It can be seen that the PSO-SVM has a higher recognition accuracy for bacteria samples compared with the SVM and GS-SVM.

[0135] Figures 9 - 11 Fig. is the confusion matrix diagram of the second-layer recognition of water bacteria microorganisms by the SVM, GS-SVM, and PSO-SVM models. From Figure 9 it can be seen that the recognition accuracies of the SVM model for single-species bacteria, two-species bacteria mixture, and three-species bacteria mixture samples are 90.74%, 100%, and 100% respectively, indicating that the use of the layer-by-layer recognition algorithm improves the accuracy of the SVM model in recognizing bacteria microorganisms.

[0136] From Figure 10 and Figure 11It can be seen that in the second - layer recognition, the recognition accuracies of the GS - SVM model for single - species bacteria, two - species bacteria mixture, and three - species bacteria mixture samples are 90.91%, 100%, and 100.00% respectively. The recognition accuracies of the PSO - SVM model for single - species bacteria, two - species bacteria mixture, and three - species bacteria mixture are 94.83%, 100%, and 100% respectively. It can be seen that compared with the SVM model, after optimizing the parameters of the support vector machine by the optimization algorithm, both the GS - SVM and PSO - SVM models improve the accuracy of bacteria and microorganism recognition. Among them, the PSO - SVM model has the best recognition effect. A very small number of samples are misrecognized because the spectra of Klebsiella pneumoniae, Salmonella typhimurium, and Streptococcus faecalis are similar and are prone to misjudgment, which affects the recognition accuracy.

[0137] To verify the robustness of the model, the recognition accuracies, precisions, recalls, and F1 - scores of the three models in each layer are calculated, and the results are shown in Table 4. It can be seen that compared with other models, in terms of recognition accuracy, the PSO - SVM has the highest recognition accuracy for bacteria in the first layer and the second layer, which are 96.97% and 97.66% respectively. In addition, for the PSO - SVM model, the precision, recall, and F1 - score values calculated from the recognition results in the first layer and the second layer are higher than those of the other two models. This indicates that the model not only has high accuracy but also good robustness in recognizing water - body bacteria samples.

[0138] Table 4 Comparison of evaluation indexes of water - body bacteria layer - by - layer recognition results of different models

[0139]

[0140] In addition, it can be seen from Table 3 and Table 4 that for the PSO - SVM model, when using the layer - by - layer recognition method, the recognition accuracies, precisions, recalls, and F1 - scores in the first layer and the second layer are all greater than the results of using the direct recognition method. This shows that the PSO - SVM model has better accuracy and robustness when recognizing water - body bacteria layer by layer. The reason is that the layer - by - layer recognition method first conducts large - category recognition to reduce the misclassification of similar samples between large categories, and then conducts small - category recognition, resulting in more accurate recognition.

[0141] According to the above - mentioned embodiments, the transmission spectroscopy technology in the present application can effectively reflect the optical characteristics of bacterial solutions. Different types of bacteria have unique characteristics in the transmission spectrum, providing a basis for bacteria recognition. The SVM technology has good generalization ability and robustness, can effectively process small - sample data, and is suitable for recognizing mixed bacteria in water bodies. The present application uses the PSO algorithm to optimize the parameters of the SVM model, further improving the recognition performance of the model. By adopting the layer - by - layer recognition strategy, first, the large categories (single - species, two - species, or three - species mixture) of the bacterial mixture are recognized, and then the specific bacterial species are further recognized, reducing the misclassification of similar samples between large categories and then conducting detailed recognition, effectively improving the recognition accuracy and speed.

[0142] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0143] In addition, the functional modules in each embodiment of this application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0144] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of this application.

Claims

1. A rapid identification method for mixed bacteria in water based on transmission spectra, characterized in that, The method includes the following steps: S1. Prepare mixed bacterial solutions of different categories with equal concentrations and different volume ratios, using the optical density value at a wavelength of 600 nm as the calibration value; the mixed bacterial solutions include single-species bacterial solutions, two-species mixed bacterial solutions, and three-species mixed bacterial solutions; S2. Measure the multi-wavelength transmission spectra of the mixed bacterial solutions within a preset wavelength band and perform min-max normalization to obtain a sample data set containing different categories of mixed bacterial solutions and their corresponding spectral characteristics; the preset wavelength band is 210 nm - 800 nm; S3. Based on the category of the mixed bacterial solutions, construct multiple recognition models using support vector machines, and train the sample data set on the recognition models to obtain the trained recognition models; S4. Based on the trained recognition models, use a layer-by-layer recognition strategy to identify the types of bacteria in the sample of the bacterial solution to be measured; Among them, the layer-by-layer recognition strategy is specifically to classify and identify the sample of the bacterial solution to be measured using the recognition models trained based on different categories of mixed bacterial solutions in the sample data set.

2. The rapid identification method of water body mixed bacteria based on transmission spectrum according to claim 1, characterized in that: The mixed bacterial solutions include single-species bacterial solutions, as well as two-species mixed bacterial solutions and three-species mixed bacterial solutions mixed in different proportions; the bacteria include any one or a combination of Escherichia coli, Staphylococcus aureus, Bacillus subtilis, Klebsiella pneumoniae, Salmonella typhimurium, and Streptococcus faecalis.

3. A rapid identification method for mixed bacteria in water based on transmission spectrum according to claim 2, characterized in that: Step S1 includes: S1.

1. Measure the spectral characteristics of each single-species bacterium in the range of 200 - 900 nm, select the wavelength band of 210 - 800 nm for average normalization, and use the optical density at 600 nm as the calibration value; S1.

2. Establish a linear relationship between the optical density value and the dilution factor, and calculate the required dilution factor according to the target concentration; S1.

3. Dilute the single-species bacterial solution according to the calculated dilution factor to prepare single-species bacterial solutions with equal concentrations; S1.

4. Mix the single-species bacterial solutions with equal concentrations according to the preset volume ratios to prepare mixed bacterial solutions with different volume ratios.

4. A rapid identification method for mixed bacteria in water based on transmission spectrum according to claim 1, characterized in that: Step S2 includes: Using an ultraviolet-visible spectrophotometer with a measurement range of 200 nm - 900 nm, a collection interval of 1 nm, a scanning speed of 6 nm / s, using deionized water as the reference, repeating the measurement for each mixed bacterial solution and taking the average value as the measurement result, and selecting the spectral data in the wavelength band range of 210 nm - 800 nm as the spectral characteristics.

5. A rapid identification method for mixed bacteria in water based on transmission spectrum according to claim 4, characterized in that: Step S3 includes: S3.

1. Classify the spectral characteristics into corresponding categories of single-species bacteria, two-species mixed bacteria, and three-species mixed bacteria to form a sample data set with a one-to-one correspondence between spectral characteristics and sample categories; S3.

2. Stratified sampling is used to divide the sample data set into a training set and a test set; S3.

3. Establish four support vector machine models, which are respectively used to identify single-species bacteria, two-species mixed bacteria, and three-species mixed bacteria samples, and input the training set into the model for training; S3.

4. Combine the test set, and optimize the support vector machine model through the particle swarm optimization algorithm to obtain four recognition models.

6. The rapid identification method of water body mixed bacteria based on transmission spectrum according to claim 5, characterized in that: Step S3.3 includes: Establish a support vector machine model one for identifying whether the mixed bacterial solution belongs to single-species bacteria, two-species mixed bacteria, or three-species mixed bacteria; Build a support vector machine model two for identifying the specific bacterial species of the single bacterial liquid; Build a support vector machine model three for identifying the specific bacterial species of the two-bacterial mixture; Build a support vector machine model four for identifying the specific bacterial species of the three-bacterial mixture.

7. A rapid identification method for water body mixed bacteria based on transmission spectrum according to claim 6, characterized in that: The support vector machine is any one of SVM, GS-SVM, and PSO-SVM.

8. A rapid identification method for mixed bacteria in water based on transmission spectrum according to claim 6, characterized in that: Step S4 includes: S4.

1. Input the spectral features of the to-be-detected bacterial liquid sample into the recognition model of the corresponding support vector machine model one, and determine the category of the to-be-detected bacterial liquid sample according to the recognition result; S4.

2. Determine the corresponding recognition model based on the recognition result, and input the spectral features to obtain the final bacterial recognition result.

9. A rapid identification system for water mixed bacteria based on transmission spectrum, characterized in that: The system includes: A spectral acquisition module for measuring the multi-wavelength transmission spectrum of the to-be-detected bacterial liquid sample using a preset wavelength band; the preset wavelength band is 210nm - 800nm; A data processing module for performing min-max normalization processing on the multi-wavelength transmission spectrum to obtain spectral features; A recognition model module; based on the pre-constructed recognition model and the layer-by-layer recognition strategy, perform bacterial species recognition on the to-be-detected bacterial liquid sample; Among them, the construction of the recognition model includes: Taking the optical density value at 600nm wavelength as the calibration value, preparing different-category bacterial mixtures with equal concentrations and different volume ratios; the bacterial mixtures include single bacterial liquid, two-bacterial mixture, and three-bacterial mixture, obtaining a sample data set containing different bacterial mixture categories and corresponding spectral features; according to the bacterial mixture categories, construct multiple recognition models based on the support vector machine, and train the recognition models with the sample data set to obtain the trained recognition models; the support vector machine is any one of SVM, GS-SVM, and PSO-SVM; The layer-by-layer recognition strategy is specifically to perform classification recognition on the to-be-detected bacterial liquid sample using the recognition models trained based on different bacterial mixture categories in the sample data set.

10. A rapid identification system for water body mixed bacteria based on transmission spectrum according to claim 9, characterized in that: The recognition model module includes: A first construction unit for building a support vector machine model one for identifying whether the bacterial mixture belongs to a single bacterium, a two-bacterium mixture, or a three-bacterium mixture; A second construction unit for building a support vector machine model two for identifying the specific bacterial species of the single bacterial liquid; A third construction unit for building a support vector machine model three for identifying the specific bacterial species of the two-bacterial mixture; A fourth construction unit for building a support vector machine model four for identifying the specific bacterial species of the three-bacterial mixture.

Citation Information

Cited By

  • Food-borne microorganism detection method and system based on spectrum technology

    CN120818589A

  • Method and system for detecting foodborne microorganisms based on spectroscopy

    CN120818589B