Algorithm for online detection of microbial signals
The candidate signal threshold is determined by sliding window analysis and iterative n-sigma method, combined with Gaussian peak estimation method, which solves the accuracy and real-time problems of microbial signal detection in high-noise environment with existing technology, and achieves fast and accurate microbial signal detection. Detection and counting.
Patent Information
- Application Number
- CN202411142170.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing online microbial detection algorithms are difficult to quickly and accurately extract effective signals when dealing with environmental noise and high data traffic, and cannot meet real-time requirements, especially in complex data baselines and high-noise environments, which are prone to missed detections.
Provides an algorithm for online detection of microbial signals. It determines the candidate signal threshold through sliding window analysis and iterative n-sigma method, calculates the peak shape width using the Gaussian peak estimation method, and uses the characteristics of signals appearing in pairs for secondary confirmation to achieve Matching and counting of scattering and fluorescence data.
It achieves rapid and accurate detection and matching of microbial signals in high-noise environments, reduces the missed detection rate, and can count and characterize microbial units under real-time conditions.
Smart Images

Figure CN118656710A
Abstract
Description
Technical Field
[0001] The invention relates to an algorithm for online detection of microorganism signals. Background Art
[0002] Excessive bacteria and fungi in the atmosphere and water environment are harmful microbial particles that threaten human health and safety. The latest national standard "GB37488-2019 Microbial Indicators and Limit Requirements for Public Places" clearly stipulates the total number of indoor air bacteria in public places: For places with sleep and rest needs, the total number of indoor air bacteria should not be greater than 1500 CFU / m³ or 20 CFU / dish, and the total number of indoor air bacteria in other public places should not be greater than 4000 CFU / m³ or 40CFU / dish. YY0572-2015 "Water for Hemodialysis and Treatment-related Use" stipulates that the total number of bacteria in dialysis water should not exceed 100 CFU / ml, and the endotoxin content should not exceed 0.25EU / ml. USP <1231> The FDA stipulates that the monitoring frequency of pharmaceutical water systems should ensure that the system remains under control and continues to produce water of acceptable quality.
[0003] Microorganisms contain fluorophores such as riboflavin, nicotinamide adenine dinucleotide phosphate and tryptophan, which emit intrinsic fluorescence when excited. When the sampled liquid is irradiated with laser, the active particles (microorganism units) and inactive particles (non-microorganism units) in the liquid emit scattered light.
[0004] The online microbial particle counter uses the above principle to illuminate the sample to be tested with a laser, detects scattered light and fluorescence at the same time, uses a photoelectric conversion device to convert the optical signal into an electrical signal, and uses a data acquisition card to collect the electrical signal data. It can count the microbial units in the sample in real time, thereby achieving the purpose of detecting whether the environment meets safety standards.
[0005] The data processed by the data acquisition card is transmitted to the host computer in real time. A set of algorithms is needed to quickly and accurately capture the peak signal of the scattering data and the peak signal of the fluorescence data, and compare the two signals to obtain the number of microorganisms in real time.
[0006] Due to environmental noise, thermal noise of electronic devices and other reasons, the scattering data and fluorescence data used as algorithm inputs have a certain degree of noise. In addition, since online microbial detection equipment has high real-time requirements and large data flow (up to millions of sampling points per second), the algorithm is required to process a large amount of data in a short period of time, extract the effective signal from the background noise in real time, and pair the two signals to distinguish between active particles and inactive particles. At the same time, it is also necessary to estimate the peak height and peak width of the peak signal for further analysis of microbial characteristics.
[0007] Conventional methods for quickly detecting peak signals either require the input of hyperparameters such as peak threshold for search (hyperparameter threshold method), or use the a priori assumption that the signal data volume accounts for less than 0.3% of the total data volume (n-sigma method), thereby using the data mean plus several times the data standard deviation as the signal threshold. The hyperparameter threshold method cannot adapt to complex data baseline conditions, and the n-sigma rule is prone to missed detection when the number of signals is large. However, some methods with wider applicability and higher accuracy, such as Gabor filtering method (reference: Nguyen, N.: Huang, H.: Oraintara, S.; Vo, A. Peak detection in mass spectrometry by Gabor filters and envelope analysis. J. Bioinf. Comput. Biol. 2009, 7. 547-569.), k-means clustering method (reference: Mehta, SS; Sheta, DA; Lingayat, NS; Chouhan, VS K-Means algorithm for the detection and delineation of QRS-complexes in electrocardiogram. IRBM 2010, 31, 48-54.), etc., cannot meet the real-time requirements. Summary of the invention
[0008] In order to solve the problems existing in the use of the prior art, the present invention combines the characteristics of online detection of microbial signal data and provides an algorithm that adapts to the characteristics of the data. It does not require the input of additional hyperparameters to realize the detection, matching, and peak-to-peak width estimation of scattering data peak signals and fluorescence data peak signals, so as to achieve the purpose of real-time counting of microbial units in the tested environment and analyzing their characteristics, thereby realizing an algorithm for online detection of microbial signals.
[0009] The technical solution of the present invention to solve the existing problems is: an algorithm for online detection of microbial signals, the main program steps are as follows: 1) parameter initialization, initializing the parameters used for the data of the main program of the algorithm for online detection of microbial signals, the initialization includes the sliding window length, the step length of a single movement of the sliding window, the data of the main program is data in a specific signal format, the data in the specific signal format is two groups of floating-point data, the number of data in each group is greater than 2000 and less than 100,000; 2) judging whether the current sliding window has moved to the end of the data, if so, the program ends, if not, the program continues; 3) searching for candidate signals for scattered data, analyzing the scattered data in a sliding window, selecting candidate signals, and obtaining the starting position and the ending position of each candidate signal; 4) searching for candidate signals for fluorescent data, analyzing the fluorescent data in a sliding window, selecting candidate signals, and obtaining the starting position and the ending position of each candidate signal; 5) Extract detailed information of candidate signals of scattering data, analyze candidate signals of scattering data, and calculate the peak intensity and peak width of each candidate signal; 6) Extract detailed information of candidate signals of fluorescence data, analyze candidate signals of fluorescence data, and calculate the peak intensity and peak width of each candidate signal; 7) Calculate the matching matrix, compare candidate signals of scattering data and candidate signals of fluorescence data in pairs, and generate a matching matrix; 8) Count microbial signals, and obtain the number of microbial signals according to the results of the matching matrix; 9) Slide the window backward by one step; 10) Return to step 2); As a further optimization, it also includes a candidate signal search procedure, the steps are as follows: 1) mean filtering; 2) iterative n-sigma method to determine the candidate signal threshold; 3) find the data that continuously exceeds the candidate signal threshold.
[0010] As a further optimization, the mean filter is used for the scattering data in a sliding window in step 3) of the main program and the fluorescence data in a sliding window in step 4) of the main program according to the following formula: Perform mean filtering to reduce data noise;
[0011] in, represents the original data value at i, represents the data value at position i after filtering, n represents the filter kernel size, and in this algorithm, n is 5; The iterative n-sigma method for determining the candidate signal threshold includes, first, according to the following formula Calculate the first set of baseline values and initial values of the noise standard deviation of the data after mean filtering and smoothing.
[0012] Where base represents the data baseline value, std represents the noise standard deviation value, and the formula middle represents the value of the data at position i after mean filtering, and n represents the total number of data. After obtaining the above initial value, the following formula is used Two thresholds are calculated,
[0013] in represents the upper threshold, represents the lower threshold, base and std represent the baseline value and noise standard deviation calculated above respectively; remove all data exceeding the upper and lower thresholds, and calculate according to the above formula Then calculate the second set of baseline values and noise standard deviation; compare the values of the first and second sets of noise standard deviations. If the first set of noise standard deviations divided by the second set of noise standard deviations is less than 1.1, then use the first set of baseline values and noise standard deviations as the baseline values and standard deviations of the input data; and if the first set of noise standard deviations divided by the second set of noise standard deviations is greater than 1.1, then use the formula Calculate two thresholds and repeat the above steps until the noise standard deviation value calculated for the N-1th group divided by the noise standard deviation value for the Nth group is less than 1.1, and use the baseline value and noise standard deviation value of the N-1th group as the baseline value and standard deviation value of the input data; or stop the comparison when the number of repetitions exceeds 10; Use the baseline value and standard deviation value of the input data according to the following formula determining a candidate signal threshold;
[0014] Wherein, threshold represents the signal threshold, base represents the baseline value, and std represents the noise standard deviation; the said finding data that continuously exceeds the candidate signal threshold includes starting from the starting position of the data in the sliding window, sequentially comparing whether the current value of the data in the sliding window exceeds the step 2 of the candidate signal finding procedure) according to the formula The candidate signal threshold is determined by calculation. If it is exceeded, the position of the current value of the data in the sliding window is recorded, and this position is used as the starting position to compare the next data. If 7 or more consecutive data exceed the threshold, the last position exceeding the threshold is recorded as the end position, and the entire continuous data exceeding the threshold is regarded as a candidate signal.
[0015] As a further optimization, steps 3) and 4) in the main program share the same program module to search for candidate signal programs; steps 5) and 6) in the main program share the same program module to extract detailed information of candidate signals.
[0016] As a further optimization, a procedure for extracting detailed information of candidate signals is also included, and the procedure for extracting detailed information of candidate signals includes: 1) finding the peak value of the candidate signal; 2) calculating the full width at half maximum of the candidate signal; 3) calculating the peak width of the candidate signal by Gaussian peak estimation method.
[0017] As a further optimization, the search for the candidate signal peak includes finding the maximum value between the starting position and the ending position of the candidate signal as the peak value of the candidate signal, and taking the position of the maximum value as the peak position; the calculation of the candidate signal half-maximum full width includes the following formula: Calculate half-peak threshold ,
[0018] formula , peak represents the peak value in the step of finding the candidate signal peak, base represents the baseline value calculated in the iterative n-sigma method to determine the candidate signal threshold program, and then, the first value less than the peak position is found from the left and right ends respectively. The position number of the value, the absolute value of the difference between the two numbers is recorded as the half-maximum full width fwhm; The Gaussian peak estimation method for calculating the peak width of the candidate signal includes assuming that the candidate signal is a Gaussian peak, according to the Gaussian distribution formula, the expression of the half-maximum full width fwhm is like,
[0019] expression middle, The standard deviation of the Gaussian distribution is 13.5%, which is the peak width. as follows
[0020] expression middle, represents the standard deviation in Gaussian distribution. From the above two equations, we can deduce that fwhm and width have the following relationship ,
[0021] According to the relation , the width can be calculated as the peak width of the candidate signal from the fwhm obtained in the step of calculating the half-maximum full width of the candidate signal.
[0022] As a further optimization, it also includes a matching matrix calculation program; step 7) in the main program step calculates the matching matrix program, the steps are as follows: first, initialize a matrix of m rows and n columns in the sliding window, where m is the number of scattered data candidate signals and n is the number of fluorescence data candidate signals; then, calculate whether each scattered data candidate signal overlaps with the fluorescence data candidate signal, if the i-th scattered data candidate signal overlaps with the j-th fluorescence data candidate signal, then assign 1 to the i-th row and j-th column of the matching matrix, otherwise assign 0; wherein, the method for judging whether the two signals overlap is: if (A) the ending position number of the scattered data candidate signal is greater than the starting position number of the fluorescence data candidate signal and less than the ending position number of the fluorescence data candidate signal, or if (B) the ending position number of the fluorescence data candidate signal is greater than the starting position number of the scattered data candidate signal and less than the ending position number of the scattered data candidate signal, then it is determined that the two signals overlap, except for the above (A) and (B), the two signals do not overlap.
[0023] As a further optimization, a microbial signal counting program is also included. Step 8) of the main program steps is a microbial signal counting program, which counts the number of microbial signals by matching the results of the matrix program.
[0024] As a further optimization, the steps of the microbial signal counting program are as follows: First, starting from the columns of the matching matrix obtained by the matching matrix calculation program, when the first value greater than 0 is found in the jth column and the i-th row, it means that a microbial signal has been found, and then stop searching the column, and write the peak intensity and peak width of the jth fluorescence data candidate signal and the peak intensity and peak width of the i-th scattering data candidate signal to the output.
[0025] As a further optimization, if the matching matrix in the jth column does not find a value greater than 0, then based on the found candidate signal of the fluorescence data, a secondary confirmation is performed on whether there is a peak in the scattering data near it. The specific steps are as follows.
[0026] First, a sliding window inspection window is initialized, and the starting and ending positions of the data in the inspection window are set to the starting and ending positions of the candidate signal of the fluorescence data. The scattering data is searched in this inspection window to see if there is a peak feature. If a peak feature is found, it is considered that a microbial signal is found. If no peak feature is found in the inspection window, the inspection window is expanded and the above steps are repeated until the peak feature is found in the inspection window or the repetition number exceeds 3 times.
[0027] Among them, the method for retrieving peak shape features is to take a sliding window with a length of 6 and a step size of 3, slide it in the inspection window successively, and calculate the data mean in the sliding window each time; if the data mean of the first sliding window is less than the data mean of the second sliding window, and the data mean of the second sliding window is less than the data mean of the third sliding window, and the data mean of the third sliding window is greater than the data mean of the fourth sliding window, and the data mean of the fourth sliding window is greater than the data mean of the fifth sliding window, then it is considered that there is a peak shape feature in the inspection window.
[0028] Compared with the prior art, the present invention has the following beneficial effects: 1. A set of algorithms adapted to the characteristics of online detection of microbial signal data is provided to realize the detection, matching, and peak-to-peak width estimation of scattering data peak signals and fluorescence data peak signals, so as to achieve the purpose of real-time counting of microbial units in the tested environment and analyzing their characteristics.
[0029] 2. An algorithm for quickly determining the threshold of candidate signals is provided: the iterative n-sigma method, which does not require the input of additional hyperparameters and can handle data with different baseline levels, noise levels, and the proportion of effective signals.
[0030] 3. An algorithm is provided to quickly calculate the signal peak value and estimate the signal peak width under high noise level: Gaussian peak estimation method.
[0031] 4. The scattering signal and fluorescence signal of microorganisms in online detection of microbial signal data appear in pairs, providing an effective signal secondary confirmation method, which can effectively reduce the missed detection rate of microbial signals at a higher noise level. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the main program flow of the present invention.
[0033] Figure 2 It is a schematic diagram of the process flow of searching for candidate signals of the present invention.
[0034] Figure 3 It is a schematic diagram of the program flow of extracting detailed information of candidate signals of the present invention. DETAILED DESCRIPTION
[0035] This implementation case is an algorithm for online detection of microbial signals, see Figure 1 The main program steps are as follows: 1) Parameter initialization, initializing the parameters used by the data of the main program of the algorithm for online detection of microbial signals, the initialization includes the sliding window length and the step size of a single movement of the sliding window. The data of the main program is data in a specific signal format, and the data in the specific signal format is two groups of floating-point data, and the number of data in each group is greater than 2000 and less than 100,000.
[0036] 2) Determine whether the current sliding window has moved to the end of the data. If so, the program ends; if not, the program continues.
[0037] 3) Find candidate signals of scattered data, analyze the scattered data in a sliding window, select candidate signals, and obtain the starting and ending positions of each candidate signal.
[0038] 4) Find candidate signals of fluorescence data, analyze the fluorescence data in a sliding window, select candidate signals, and obtain the starting position and ending position of each candidate signal.
[0039] 5) Extract detailed information of candidate signals of scattering data, analyze the candidate signals of scattering data, and calculate the peak intensity and peak width of each candidate signal.
[0040] 6) Extract detailed information of the candidate fluorescence data signals, analyze the candidate fluorescence data signals, and calculate the peak intensity and peak width of each candidate signal.
[0041] 7) Calculate the matching matrix, compare the candidate signals of the scattering data and the candidate signals of the fluorescence data pairwise, and generate a matching matrix.
[0042] 8) Microbial signal counting: the number of microbial signals is obtained based on the results of the matching matrix.
[0043] 9) The sliding window moves backward by one step.
[0044] 10) Go back to step 2).
[0045] As a further optimization, steps 3) and 4) in the main program share the same program module to find the candidate signal program. Also included is the candidate signal program, see Figure 2 , the steps are as follows: 1) Mean filtering; 2) Iterative n-sigma method to determine the candidate signal threshold; 3) Find the data that continuously exceeds the candidate signal threshold.
[0046] The mean filter is used for the scattering data in a sliding window in step 3) of the main program and the fluorescence data in a sliding window in step 4) of the main program according to the following formula: Perform mean filtering to reduce data noise;
[0047] in, represents the original data value at i, represents the data value at position i after filtering, n represents the filter kernel size, and in this algorithm, n is set to 5.
[0048] The iterative n-sigma method for determining the candidate signal threshold includes firstly using the following formula: Calculate the first set of baseline values and initial values of the noise standard deviation of the data after mean filtering and smoothing.
[0049] Where base represents the data baseline value, std represents the noise standard deviation value, and the formula middle represents the value of the data at position i after mean filtering, and n represents the total number of data. After obtaining the above initial value, the following formula is used Two thresholds are calculated,
[0050] in represents the upper threshold, represents the lower threshold, base and std represent the baseline value and noise standard deviation calculated above respectively; remove all data exceeding the upper and lower thresholds, and calculate according to the above formula Then calculate the second set of baseline values and noise standard deviation; compare the values of the first and second sets of noise standard deviations. If the first set of noise standard deviations divided by the second set of noise standard deviations is less than 1.1, then use the first set of baseline values and noise standard deviations as the baseline values and standard deviations of the input data; and if the first set of noise standard deviations divided by the second set of noise standard deviations is greater than 1.1, then use the formula After calculating two thresholds, repeat the above steps until the noise standard deviation value calculated for the N-1th group divided by the noise standard deviation value for the Nth group is less than 1.1, and then use the baseline value and noise standard deviation value for the N-1th group as the baseline value and standard deviation value for the input data; or stop the comparison when the number of repetitions exceeds 10 times.
[0051] The baseline value and standard deviation value of the input data are calculated as follows: determining a candidate signal threshold;
[0052] Among them, threshold represents the signal threshold, base represents the baseline value, and std represents the noise standard deviation; The method of finding data that continuously exceeds the candidate signal threshold includes starting from the starting position of the data in the sliding window and sequentially comparing whether the current value of the data in the sliding window exceeds step 2 of the candidate signal search procedure) according to the formula The candidate signal threshold is determined by calculation. If it is exceeded, the position of the current value of the data in the sliding window is recorded, and this position is used as the starting position to compare the next data. If 7 or more consecutive data exceed the threshold, the last position exceeding the threshold is recorded as the end position, and the entire continuous data exceeding the threshold is regarded as a candidate signal.
[0053] The main program steps 5) and 6) share the same program module, the program for extracting detailed information of candidate signals. Since the peak width required for calculating microbial characteristics is usually the peak width at 13.5% peak intensity (hereinafter referred to as 13.5% peak width), but due to the influence of data noise, the signal at 13.5% peak width is often submerged in the noise. Therefore, the peak width can be calculated by Gaussian peak estimation method.
[0054] See also Figure 3 As a further optimization, a procedure for extracting detailed information of candidate signals is also included, wherein the procedure for extracting detailed information of candidate signals includes: 1) Find the candidate signal peak; 2) Calculate the candidate signal half-maximum full width; 3) Calculate the candidate signal peak width using the Gaussian peak estimation method.
[0055] As a further optimization, the search for the candidate signal peak includes finding the maximum value among the values between the starting position and the ending position of the candidate signal as the peak value peak of the candidate signal, and taking the position of the maximum value as the peak position.
[0056] The calculation of the candidate signal half-maximum full width includes the following formula: Calculate half-peak threshold :
[0057] formula In the above, peak represents the peak value in the step of finding the candidate signal peak, and base represents the baseline value calculated in the procedure of determining the candidate signal threshold by the iterative n-sigma method. Then, the first value less than the peak position is found from both ends. The absolute value of the difference between the two numbers is recorded as the half-maximum full width fwhm.
[0058] The Gaussian peak estimation method for calculating the peak width of the candidate signal includes assuming that the candidate signal is a Gaussian peak. According to the Gaussian distribution formula, the expression of the half-maximum full width fwhm is like,
[0059] expression middle, Represents the standard deviation in a Gaussian distribution.
[0060] 13.5% peak width expression as follows
[0061] expression middle, represents the standard deviation in Gaussian distribution. From the above two equations, we can deduce that fwhm and width have the following relationship ,
[0062] According to the relation , the width can be calculated as the peak width of the candidate signal from the fwhm obtained in the step of calculating the half-maximum full width of the candidate signal.
[0063] As a further optimization, a matching matrix calculation program is also included; step 7) of the main program steps is to calculate the matching matrix program, the steps are as follows: First, a matrix with m rows and n columns in the sliding window is initialized, where m is the number of candidate signals for scattered data and n is the number of candidate signals for fluorescence data. Then, each candidate signal for scattered data and the candidate signal for fluorescence data are calculated to see if they overlap. If the i-th candidate signal for scattered data overlaps with the j-th candidate signal for fluorescence data, the i-th row and j-th column of the matching matrix are assigned a value of 1, otherwise, a value of 0 is assigned. Among them, m, n, i, and j in the m-th row, n-th column, i-th candidate signal for scattered data and j-th candidate signal for fluorescence data are all arbitrary values.
[0064] The method for determining whether the two signals overlap is as follows: if (A) the ending position number of the candidate signal for scattered data is greater than the starting position number of the candidate signal for fluorescent data and less than the ending position number of the candidate signal for fluorescent data, or (B) the ending position number of the candidate signal for fluorescent data is greater than the starting position number of the candidate signal for scattered data and less than the ending position number of the candidate signal for scattered data, then it is determined that the two signals overlap. Except for the above cases (A) and (B), the two signals do not overlap.
[0065] As a further optimization, it also includes a microbial signal counting program, step 8 in the main program step) microbial signal counting program, which counts the number of microbial signals by matching the matrix program results. In order to reduce the missed detection rate of microbial signals, the implementation case of the present invention also provides an effective signal secondary confirmation method to capture potential signals covered by noise.
[0066] As a further optimization, the steps of the microbial signal counting procedure are as follows: First, starting from the columns of the matching matrix obtained by the matching matrix calculation program, when the first value greater than 0 is found in the jth column and the i-th row, it means that a microbial signal has been found, and then the search for the column is stopped, and the peak intensity and peak width of the jth fluorescence data candidate signal and the peak intensity and peak width of the i-th scattering data candidate signal are written to the output.
[0067] The prior condition that the fluorescence data signal must be generated by microorganisms can be used to conduct a secondary confirmation method of effective signals, and based on the found fluorescence data candidate signal, a secondary confirmation is performed on whether there is a peak in the scattering data near it.
[0068] As a further optimization, if the matching matrix in the jth column does not find a value greater than 0, then based on the candidate signal of the fluorescence data found, a secondary confirmation is performed on whether there is a peak in the scattering data near it. The specific steps are as follows: First, a sliding window inspection window is initialized, and the starting and ending positions of the data in the inspection window are set to the starting and ending positions of the candidate signal of the fluorescence data. The scattering data is searched in this inspection window to see if there is a peak feature. If a peak feature is found, it is considered that a microbial signal is found. If no peak feature is found in the inspection window, the inspection window is expanded and the above steps are repeated until the peak feature is found in the inspection window or the repetition number exceeds 3 times.
[0069] Among them, the method for retrieving peak shape features is to take a sliding window with a length of 6 and a step size of 3, slide it in the inspection window successively, and calculate the data mean in the sliding window each time; if the data mean of the first sliding window is less than the data mean of the second sliding window, and the data mean of the second sliding window is less than the data mean of the third sliding window, and the data mean of the third sliding window is greater than the data mean of the fourth sliding window, and the data mean of the fourth sliding window is greater than the data mean of the fifth sliding window, then it is considered that there is a peak shape feature in the inspection window.
Claims
1. An algorithm for online detection of microbial signals, characterized in that: The main program steps are as follows: 1) Parameter initialization, initializing the parameters used by the data of the main program of the algorithm for online detection of microbial signals, including the length of the sliding window and the step length of a single movement of the sliding window. The data of the main program is data in a specific signal format, and the data in the specific signal format is two groups of floating-point data, and the number of data in each group is greater than 2000 and less than 100,000; 2) Determine whether the current sliding window has moved to the end of the data. If so, the program ends; if not, the program continues; 3) Find candidate signals of scattered data, analyze the scattered data in a sliding window, select candidate signals, and obtain the starting and ending positions of each candidate signal; 4) Find candidate signals of fluorescence data, analyze the fluorescence data in a sliding window, select candidate signals, and obtain the starting position and ending position of each candidate signal; 5) Extract detailed information of candidate signals of scattering data, analyze the candidate signals of scattering data, and calculate the peak intensity and peak width of each candidate signal; 6) Extract detailed information of candidate fluorescence data signals, analyze the candidate fluorescence data signals, and calculate the peak intensity and peak width of each candidate signal; 7) Calculate the matching matrix, compare the candidate signals of the scattering data and the candidate signals of the fluorescence data pairwise, and generate a matching matrix; 8) Microbial signal counting, the number of microbial signals is obtained according to the results of the matching matrix; 9) The sliding window moves backward by one step; 10) Go back to step 2).
2. The algorithm for online detection of microbial signals according to claim 1, characterized in that: It also includes a procedure for finding candidate signals. The steps are as follows: 1) Mean filtering; 2) Iterative n-sigma method to determine the candidate signal threshold; 3) Find the data that continuously exceeds the candidate signal threshold.
3. The algorithm for online detection of microbial signals according to claim 2, characterized in that: The mean filter is used for the scattering data in a sliding window in step 3) of the main program and the fluorescence data in a sliding window in step 4) of the main program according to the following formula: Perform mean filtering to reduce data noise; in, represents the original data value at i, represents the data value at position i after filtering, n represents the filter kernel size, and in this algorithm, n is 5; The iterative n-sigma method for determining the candidate signal threshold includes, first, according to the following formula Calculate the first set of baseline values and initial values of the noise standard deviation of the data after mean filtering and smoothing. Where base represents the data baseline value, std represents the noise standard deviation value, and the formula middle represents the value of the data at position i after mean filtering, and n represents the total number of data. After obtaining the above initial value, the following formula is used Two thresholds are calculated, in represents the upper threshold, represents the lower threshold, base and std represent the baseline value and noise standard deviation calculated above respectively; remove all data exceeding the upper and lower thresholds, and calculate according to the above formula Then calculate the second set of baseline values and noise standard deviation; compare the values of the first and second sets of noise standard deviations. If the first set of noise standard deviations divided by the second set of noise standard deviations is less than 1.1, then use the first set of baseline values and noise standard deviations as the baseline values and standard deviations of the input data; and if the first set of noise standard deviations divided by the second set of noise standard deviations is greater than 1.1, then use the formula Calculate two thresholds and repeat the above steps until the noise standard deviation value calculated for the N-1th group divided by the noise standard deviation value for the Nth group is less than 1.1, and use the baseline value and noise standard deviation value of the N-1th group as the baseline value and standard deviation value of the input data; or stop the comparison when the number of repetitions exceeds 10; Use the baseline value and standard deviation value of the input data according to the following formula determining a candidate signal threshold; Wherein, threshold represents the signal threshold, base represents the baseline value, and std represents the noise standard deviation; the method of finding data that continuously exceeds the candidate signal threshold includes starting from the starting position of the data in the sliding window, and sequentially comparing whether the current value of the data in the sliding window exceeds step 2 of the candidate signal search procedure) according to the formula The candidate signal threshold is determined by calculation. If it is exceeded, the position of the current value of the data in the sliding window is recorded, and this position is used as the starting position to compare the next data. If 7 or more consecutive data exceed the threshold, the last position exceeding the threshold is recorded as the end position, and the entire continuous data exceeding the threshold is regarded as a candidate signal.
4. The algorithm for online detection of microbial signals according to claim 1, 2 or 3, characterized in that: Steps 3) and 4) of the main program share the same program module to search for candidate signal programs; steps 5) and 6) of the main program share the same program module to extract detailed information of candidate signals.
5. The algorithm for online detection of microbial signals according to claim 2 or 3, characterized in that: It also includes a procedure for extracting detailed information of candidate signals, wherein the procedure for extracting detailed information of candidate signals includes: 1) Find candidate signal peaks; 2) Calculate the full width at half maximum of the candidate signal; 3) Gaussian peak estimation method is used to calculate the peak width of the candidate signal.
6. The algorithm for online detection of microbial signals according to claim 5, characterized in that: The searching for the candidate signal peak value includes finding the maximum value between the starting position and the ending position of the candidate signal as the peak value of the candidate signal, and taking the position of the maximum value as the peak position; the calculating of the candidate signal half-maximum width includes the following formula: Calculate half-peak threshold , formula , peak represents the peak value in the step of finding the candidate signal peak, base represents the baseline value calculated in the iterative n-sigma method to determine the candidate signal threshold program, and then, the first value less than the peak position is found from the left and right ends respectively. The position number of the value, the absolute value of the difference between the two numbers is recorded as the half-maximum full width fwhm; The Gaussian peak estimation method for calculating the peak width of the candidate signal includes assuming that the candidate signal is a Gaussian peak, according to the Gaussian distribution formula, the expression of the half-maximum full width fwhm is like, expression middle, The standard deviation of the Gaussian distribution is 13.5%, which is the peak width. as follows expression middle, represents the standard deviation in Gaussian distribution. From the above two equations, we can deduce that fwhm and width have the following relationship , According to the relation , the width can be calculated as the peak width of the candidate signal from the fwhm obtained in the step of calculating the half-maximum full width of the candidate signal.
7. The algorithm for online detection of microbial signals according to claim 1, characterized in that: It also includes a matching matrix calculation program; step 7) in the main program step, the matching matrix calculation program, the steps are as follows: first, initialize a matrix of m rows and n columns in the sliding window, wherein m is the number of scattered data candidate signals, and n is the number of fluorescence data candidate signals; then, calculate whether each scattered data candidate signal overlaps with the fluorescence data candidate signal, if the i-th scattered data candidate signal overlaps with the j-th fluorescence data candidate signal, then assign 1 to the i-th row and j-th column of the matching matrix, otherwise assign 0; wherein, the method for judging whether the two signals overlap is: if (A) the ending position number of the scattered data candidate signal is greater than the starting position number of the fluorescence data candidate signal and less than the ending position number of the fluorescence data candidate signal, or if (B) the ending position number of the fluorescence data candidate signal is greater than the starting position number of the scattered data candidate signal and less than the ending position number of the scattered data candidate signal, then it is judged that the two signals overlap, except for the above (A) and (B), the two signals do not overlap.
8. The algorithm for online detection of microbial signals according to claim 7, characterized in that: It also includes a microbial signal counting program, step 8 in the main program steps) a microbial signal counting program, which counts the number of microbial signals by matching the matrix program results.
9. The algorithm for online detection of microbial signals according to claim 8, characterized in that: The steps of the microbial signal counting program are as follows: First, starting from the columns of the matching matrix obtained by the matching matrix calculation program, when the first value greater than 0 is found in the jth column and the i-th row, it means that a microbial signal has been found, and then stop searching the column, and write the peak intensity and peak width of the jth fluorescence data candidate signal and the peak intensity and peak width of the i-th scattering data candidate signal to the output.
10. The algorithm for online detection of microbial signals according to claim 9, characterized in that: If the j-th column of the matching matrix does not find a value greater than 0, then based on the found candidate signal of the fluorescence data, a second confirmation is made on whether there is a peak in the scattering data near it. The specific steps are as follows: First, a sliding window inspection window is initialized, and the starting position and ending position of the data in the inspection window are set to the starting position and ending position of the candidate signal of the fluorescence data. In this inspection window, the scattering data is searched for peak features. If the peak feature is found, it is considered that a microbial signal has been found. If the peak feature is not found in the inspection window, the inspection window is expanded and the above steps are repeated until the peak feature is found in the inspection window or the number of repetitions exceeds 3 times; Among them, the method for retrieving peak shape features is to take a sliding window with a length of 6 and a step size of 3, slide it in the inspection window successively, and calculate the data mean in the sliding window each time; if the data mean of the first sliding window is less than the data mean of the second sliding window, and the data mean of the second sliding window is less than the data mean of the third sliding window, and the data mean of the third sliding window is greater than the data mean of the fourth sliding window, and the data mean of the fourth sliding window is greater than the data mean of the fifth sliding window, then it is considered that there is a peak shape feature in the inspection window.
Citation Information
Patent Citations
Method for calibrating biological particle counter and device for calibrating biological particle counter
CN108368473A
Carrier signal detection method based on one-dimensional full convolution neural network
CN109543643A
Time-frequency domain joint narrowband interference suppression method
CN111064495A
Biopolymer analysis method and biopolymer analysis device
CN112513618A
Molecular weight matching method for gene data fragment analysis software
CN118230819A
Cited By
Automatic system of quantitative fluorescence flow cytometer
CN119881365A
