A sulfur dioxide detection system for food cans
By extracting the kinetic fingerprint features of the electrochemical sensor and using a support vector machine classifier, the false positive problem in the detection of sulfur dioxide in canned food was solved, and efficient and accurate sulfur dioxide concentration measurement was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANTAI LIANLEI FOODS
- Filing Date
- 2026-05-18
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies for detecting sulfur dioxide in canned food suffer from false positives, making it difficult to distinguish between natural plant-based background sulfides and artificially added sulfites, resulting in insufficient accuracy of test results. Furthermore, existing equipment is expensive and has a long testing cycle, failing to meet the demand for rapid detection.
By extracting the initial slope, peak time, and decay constant from the time-series current signal of the electrochemical sensor as kinetic fingerprint features, and combining the posterior probability output by the support vector machine classifier to weight the maximum current value, the net concentration of artificially added sulfur dioxide is calculated.
It effectively distinguishes between natural and anthropogenic sulfur dioxide, reduces false positive rates, improves detection accuracy, simplifies equipment costs, and meets the needs of rapid detection.
Smart Images

Figure CN122193359A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of detection technology, and more specifically, to a sulfur dioxide detection system for canned food. Background Technology
[0002] Currently, the mainstream standard method for quantifying sulfites in food is the optimized Monier-Williams method (OMW method). This method converts sulfites in the sample into sulfur dioxide gas through acidification and heating, which is then collected in a hydrogen peroxide solution and quantified by acid-base titration. Reference 1 (Carlos KS, de Jager LS. Comparison of multiple methods for the determination of sulphite in Allium and Brassica vegetables. Food Additives & Contaminants: Part A, 2016, 33(10): 1509–1517) showed that the OMW method produced false positive readings of more than 10 mg / kg sulfur dioxide equivalent for all Allium samples. This is because the acidification and heating conditions drive the thermal decomposition of natural sulfur-containing compounds, releasing collectable sulfur dioxide, which cannot be distinguished from the decomposition of artificially added sulfites at the signal level. Even with the improved double distillation method, the recovery rate of added sulfites in fresh garlic matrix was only 42%. The serious underestimation of the target analyte and the presence of background false positives indicate a fundamental defect in the accuracy of the detection results.
[0003] To avoid the aforementioned interference, the LC-MS / MS method has been introduced into the field of regulatory detection. This method converts sulfite into a stable formaldehyde adduct before quantification by mass spectrometry, thus avoiding the interference of co-elution by volatile sulfides. Reference 2 (Carlos KS, Conrad SM, Handy SM, de Jager LS. Investigation of food products containing garlic or onion for a false positive sulphite response by LC-MS / MS. FoodAdditives & Contaminants: Part A, 2020, 37(5): 723–730) showed that the LC-MS / MS method had a recovery rate of 107-125% for added sulfite and good quantitative accuracy. However, it still detected a certain degree of background false positive response in pure garlic canned products with a high proportion of onion and garlic content. Moreover, this method relies on large-scale liquid chromatography-mass spectrometry instruments, which are expensive and the detection cycle is usually several hours or more, making it difficult to meet the needs of rapid on-site detection.
[0004] Existing sensor-based detection methods, including the pararosaniline hydrochloride spectrophotometric method and electrochemical sensor methods, all utilize the sensor output signal by reading the signal amplitude at a fixed time point and calculating the sulfur dioxide concentration through the linear relationship between amplitude and concentration. This approach only extracts the amplitude information of the signal at a single moment, completely discarding the shape information of the signal over time. In fact, the release of natural plant background sulfides is constrained by enzymatic reaction kinetics, resulting in a slow release rate, a significant induction period, and a slow post-peak decay; while artificially added sulfites decompose rapidly in an acidic detection environment, causing a sharp increase in gas concentration, rapid peaking, and a steep peak shape. The two sources of gas may have similar concentration amplitudes, but their temporal shapes are fundamentally different. Existing technologies do not systematically use the temporal shape characteristics of the sensor response curve for source identification, leading to frequent false positives when dealing with canned garlic and onion samples, necessitating secondary confirmation using LC-MS / MS. Summary of the Invention
[0005] To overcome the aforementioned shortcomings of existing technologies, this invention provides a sulfur dioxide detection system for canned food. It extracts the initial slope, peak time, and decay constant from the time-series current signal of an electrochemical sensor as a kinetic fingerprint. This fingerprint is then combined with the source posterior probability output by a support vector machine classifier, which is weighted to calculate the net concentration of artificially added sulfur dioxide. This solves the technical problem of existing technologies that rely solely on signal amplitude and cannot distinguish between two sources, leading to a large number of false positives.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A sulfur dioxide detection system for canned food includes a kinetic fingerprint extraction module and a response source classification and net concentration extraction module. The kinetic fingerprint extraction module is used to receive discrete time-series current signals output by an electrochemical sensor for the headspace gas of the canned food under test, extract the onset slope, peak time, and decay constant from the time-domain shape of the discrete time-series current signal to form a three-dimensional kinetic fingerprint feature vector, and extract the maximum current value of the discrete time-series current signal. The response source classification and net concentration extraction module uses a support vector machine with a radial basis function as the kernel function as the source classifier. It takes the three-dimensional dynamic fingerprint feature vector as input and outputs the posterior probability that the current sample belongs to the artificially added sulfite decomposition and release type. The product of the posterior probability and the maximum current value is divided by a pre-calibrated linear sensitivity coefficient to obtain the net concentration value of artificially added sulfur dioxide. When the posterior probability is greater than or equal to a preset judgment threshold, the net concentration value is reported as the effective additive sulfur dioxide residual concentration. When the posterior probability is less than the preset judgment threshold, the net concentration value is used as a reference value and marked as significantly affected by natural background interference.
[0007] As a further aspect of the present invention, the maximum current value is the maximum value among all sampling point current values in the discrete time-series current signal from the start time when the sensor comes into contact with the gas to be measured to the end time of sampling; the starting slope is the average rate of change between the current value at the start time and the current value at the time when the current value first reaches 50% of the maximum current value; the peak time is the length of time that the sensor output current takes from the start time to the first time it reaches the maximum current value.
[0008] As a further embodiment of the present invention, the attenuation constant is obtained by: extracting the current attenuation segment data from the moment of maximum current to the moment of sampling end, fitting it using the least squares method according to the exponential attenuation model, and obtaining the time constant in the fitting result as the attenuation constant.
[0009] As a further aspect of the present invention, the source classifier outputs the posterior probability of belonging to category A and the posterior probability of belonging to category B, the sum of which is 1. Category A corresponds to the dominant response of artificially added sulfite decomposition and release, and category B corresponds to the dominant response of natural plant background sulfide release.
[0010] As a further aspect of the present invention, the source classifier converts the decision function value of the support vector machine into the posterior probability of belonging to class A and the posterior probability of belonging to class B using the Platt scaling method. The Platt scaling method achieves the conversion by fitting the sigmoid function parameters on the training dataset after the support vector machine has been trained.
[0011] As a further aspect of the present invention, the radial basis function kernel parameters of the source classifier are determined by performing five-fold cross-validation on the training dataset, and the search range of the kernel parameters is 10. - The search step is a geometric sequence with base 10, from 3 to 103, with a total of 7 candidate values. Finally, the value that maximizes the classification accuracy of the validation set is taken as the kernel parameter.
[0012] As a further aspect of the present invention, the preset judgment threshold is a critical probability value determined based on the training set through cross-validation, which makes the false positive rate lower than a preset target value.
[0013] As a further aspect of the present invention, the linear sensitivity coefficient is obtained by calibrating the electrochemical sensor using a sodium sulfite standard solution of known concentration before the detection system leaves the factory.
[0014] As a further aspect of the present invention, when the dynamic fingerprint extraction module fits the current decay segment data to the exponential decay model, it calculates the determination coefficient of the fitting result. When the determination coefficient is lower than a preset quality threshold, it determines that the quality of the current decay segment data is insufficient, does not output the decay constant, and the detection system outputs a data anomaly prompt.
[0015] Compared with the prior art, the beneficial effects of the sulfur dioxide detection system for canned food of the present invention are as follows: This invention extracts three dynamic parameters—initial slope, peak time, and decay constant—from the time-series current signal of a sensor to construct a three-dimensional feature vector. This vector replaces the single amplitude reading used in existing technologies with the time-domain shape of the signal for discrimination. Because artificially added sulfites decompose rapidly in acidic environments, and natural background sulfides are slowly released under enzymatic action, these two sources exhibit differences of several times to ten times in the aforementioned three dynamic parameters. Furthermore, the maximum current amplitude relied upon by existing technologies highly overlaps between these two sources. Therefore, the feature vector extracted by this invention has the ability to distinguish the source.
[0016] This invention employs a radial basis function support vector machine (RBM) for source identification and uses Platt scaling to map the classifier decision function value to a posterior probability of belonging to an artificially added source. Compared to the hard threshold decision method used in existing technologies, the posterior probability can continuously characterize the confidence level of the current sample belonging to an artificially added source, reducing the misclassification rate of samples in boundary regions.
[0017] This invention uses the posterior probability output by the source classifier as the attribution weight to weight the total current response, and then combines it with the sensitivity coefficient to calculate the net concentration of artificially added sulfur dioxide. Existing technologies, when directly converting the total current amplitude to concentration, include the current contribution from the natural sulfur-containing matrix in the quantitative result; this invention, however, uses probability weighting to separate the net current share attributable to the artificially added source from the total response, making the output concentration closer to the actual amount of sulfur dioxide residue added to the sample, and reducing the interference of the natural matrix on the accuracy of quantification. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the structure of a sulfur dioxide detection system for canned food according to the present invention.
[0019] Figure 2 This is a comparison diagram of the sensor timing current response for two types of source gases in a sulfur dioxide detection system for canned food according to the present invention. Detailed Implementation
[0020] The technical solutions of this embodiment will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0021] Example 1 This invention provides a sulfur dioxide detection system for canned food, consisting of two sequentially executed algorithm modules: a kinetic fingerprint extraction module and a response source classification and net concentration extraction module. For example... Figure 1 As shown, the complete detection process of the system is as follows: the canned food to be tested is opened and sampled; headspace gas is introduced into the electrochemical sensor; after the sensor outputs a discrete-time current signal, it first enters the kinetic fingerprint extraction module to perform feature extraction, and outputs the three-dimensional kinetic fingerprint feature vector F and the maximum current value I. max The three-dimensional dynamic fingerprint feature vector and the maximum current value are then passed to the response source classification and net concentration extraction module to perform source classification and net concentration calculation. The final net concentration value C is then determined by a threshold. net The source type determination conclusion is also included. The two modules are executed sequentially in a single complete detection.
[0022] like Figure 2 As shown, Figure 2 The comparison of the sensor's time-series current response for two types of source gases, category A and category B, is presented. (Observation) Figure 2 It can be observed that the maximum current amplitudes of the two types of signals are highly similar; however, the time-domain shapes of the two types of signals are fundamentally different: the curve of type A rises steeply, reaches its peak rapidly, and then the current decays rapidly after the peak; the curve of type B, on the other hand, has a distinct induction period, rises extremely slowly, has a wide and flat peak, and maintains a high current level at the end of the 120-second sampling window, with very little decay. These phenomena indicate that existing detection methods that rely solely on maximum current amplitude readings cannot effectively distinguish between the two sources due to the high overlap in the amplitudes of the two types of signals, thus generating a large number of false positives. This invention solves this problem by extracting the dynamic characteristics of the time-domain shape of the time-series current signal.
[0023] Specifically, module one extracts the following four quantities sequentially from the discrete-time current signal output by the sensor: maximum current value I max Initial slope k start Peak time t peak And the attenuation constant τ, where the latter three parameters constitute the three-dimensional dynamic fingerprint feature vector F.
[0024] The physical meaning of the maximum current value is the peak intensity of the sensor current during the entire sampling time sequence. The extraction method is to traverse all sampling points in the entire sequence and take the largest current measurement value as the maximum current value. The maximum current value, along with the three-dimensional dynamic fingerprint feature vector, is passed to the response source classification and net concentration extraction module.
[0025] The initial slope, in physical terms, refers to the rate of increase in sensor current from the initial moment to the moment when the current first reaches 50% of its maximum value. It reflects the rate at which the gas being measured causes a change in current during the initial stage of the sensor response. Its calculation formula is as follows: , Where I(t0) is the sensor output current value at time t0, t half The sensor output current value is greater than or equal to 0.5 × I for the first time. max At the appropriate time, k start The unit is amperes per second.
[0026] Depend on Figure 2 It can be clearly seen that the slope of the Category A curve is extremely steep in the initial stage, while the slope of the Category B curve is extremely small in the initial stage due to the obvious induction period. The two types of signals have significant differences in the initial slope, and this parameter is one of the important features for distinguishing the two types of sources.
[0027] The physical meaning of peak time is the length of time it takes for the sensor current to rise from the initial time t0 until it first reaches its maximum current value. Its calculation formula is: , Among them, t max t represents the time when the sensor output current first reaches its maximum value. peak The unit is seconds.
[0028] Depend on Figure 2 It is evident that the Category A curve reaches its peak very quickly, while the Category B curve reaches its peak significantly later due to the long induction period. The peak time is also a key feature for distinguishing between the two sources.
[0029] The physical meaning of the decay constant is the time scale of the exponential decay rate of the sensor current as it enters the decay phase after reaching its peak. A smaller decay constant indicates faster decay, while a larger decay constant indicates slower decay. By extracting the current decay segment data from the peak time to the end of sampling, an exponential decay model is fitted to this segment of data using the least squares method. The exponential decay model is as follows: , In the formula, I(t) is the sensor output current value at time t, and t max The current value at the peak moment is the maximum current value, and τ is the decay constant, expressed in seconds. The time constant in the fitting result is the decay constant.
[0030] Depend on Figure 2 It can be seen that the Category A curve drops rapidly after the peak and has a small decay constant; the Category B curve hardly decays after the peak and remains at a high current level at the end of the 120-second sampling window, with a very large decay constant.
[0031] The system uses a 1-second sampling interval, with a total sampling time of 60 to 120 seconds, corresponding to 60 to 120 sampling points.
[0032] Table 1. Kinetic fingerprint parameters of two types of samples
[0033] As shown in Table 1, Table 1 provides specific examples of extracting kinetic fingerprint parameters from a set of time-series signals for each of the two types of samples: Type A (artificially added sulfite) and Type B (natural plant background sulfides). The values of each parameter and the differences between the two types of samples are analyzed below.
[0034] Regarding the initial slope k startThe initial slope of sample A was 1.4363 μA / s, while that of sample B was 0.1340 μA / s, with sample A being 10.7 times faster than sample B. The technical reason for this difference lies in the fact that artificially added sulfites undergo rapid chemical decomposition in the acidic headspace environment of food cans, instantly releasing a large amount of sulfur dioxide gas, causing a sharp rise in sensor current in the initial stage. In contrast, the release of natural plant background sulfides is constrained by enzymatic reaction kinetics, resulting in a slow release rate and therefore a very gradual rise in current in the initial stage.
[0035] Regarding the peak time t peak The peak time for sample A was 12 seconds, while that for sample B was 70 seconds, making sample B 5.8 times longer than sample A. Sample A had almost no induction period, and the sensor reached its peak response in a very short time. Sample B, on the other hand, had a significant induction period, as the natural background sulfides required a longer enzymatic release process for the sensor current to accumulate to its peak value. The difference in peak time reflects the fundamental difference in release kinetics between the two sources.
[0036] Regarding the attenuation constant τ: the attenuation constant of sample A is 10.63 seconds; the attenuation constant of sample B is 60.01 seconds, which is 5.6 times that of sample A. The extremely large attenuation constant of sample B indicates that natural background sulfides are continuously released throughout the entire sampling window, making it difficult for the current to drop rapidly.
[0037] Regarding the maximum current value I max The measured maximum current for Class A samples is 8.8405 μA, while that for Class B samples is 7.8090 μA. Because the maximum current values for the two types of samples are so close, existing detection methods that rely solely on amplitude readings produce a large number of false positives when dealing with naturally sulfur-containing food samples.
[0038] The response source classification and net concentration extraction module receives the three-dimensional kinetic fingerprint feature vector and maximum current value output by the kinetic fingerprint extraction module, and then performs source classification and net concentration calculation in sequence.
[0039] The training dataset is composed of three-dimensional dynamic fingerprint feature vectors extracted from the sensor time-series current data of known canned food samples with artificially added sulfites (corresponding to category A) and natural sulfur-containing food samples without added sulfites (corresponding to category B). The feature vectors corresponding to each sample are labeled with category A or category B as supervised learning labels.
[0040] The training process is as follows: First, the initial slope k of the three dynamic features is set. start Peak time t peakThe decay constant τ is standardized to eliminate the influence of differences in the dimensions and magnitudes of various features on the classifier; then, a support vector machine with radial basis functions as the kernel function is used as the source classifier, and five-fold cross-validation is performed within a candidate search range of 10 for γ. - The classification accuracy on the validation set is evaluated one by one from γ to 10³ (a geometric sequence with base 10, with a total of 7 candidate values), and the value of γ that maximizes the classification accuracy on the validation set is selected as the optimal kernel parameter. After training, the Platt scaling method is used to convert the decision function values of the support vector machine into probability outputs, obtaining the posterior probability P of class A for each test sample. A And the posterior probability P of category B B The sum of the two is 1, P A The closer the value is to 1, the more likely the sample is to be a response dominated by the decomposition and release of artificially added sulfites.
[0041] The threshold T is determined as follows: On the training dataset, iterate through P... A A candidate threshold is set, with the false positive rate of natural background samples being zero as a constraint, and the minimum P value satisfying this constraint is determined. A The value is used as the preset judgment threshold T. In this embodiment of the invention, the preset judgment threshold is set to 0.70. When the P of the sample to be tested... A When T is greater than or equal to T, the system determines that the artificially added sulfite signal is the dominant source in the sample and reports C. net The effective additive sulfur dioxide residual concentration; when P A When the value is less than T, the system indicates that the natural background interference is significant and does not report the net concentration value.
[0042] The linear sensitivity coefficient S is obtained by calibrating the sensor with a sodium sulfite standard solution of known concentration before it leaves the factory. The unit is amperes per milligram per kilogram. It is used to convert the sensor's net current response value into the corresponding sulfite concentration value. The net concentration value is weighted by the maximum current value with posterior probability as the weight to obtain the net current response value attributed to the artificial addition of sulfite. This value is then divided by the sensitivity coefficient to obtain the net concentration of artificially added sulfur dioxide. The calculation formula is as follows: .
[0043] Example of calculating net concentration value in a complete test: The sensor's factory-calibrated linear sensitivity coefficient S = 0.17 μA / (mg / kg).
[0044] First, the P output from the source classifier A With the maximum current value I max Multiplying these values yields the net current response corresponding to the artificially added sulfite source: P A =0.92 and I maxMultiplying by 8.8405μA, we get 0.92×8.8405=8.1333μA. That is, in the total current response, the net current contribution attributed to the decomposition release of artificially added sulfite is 8.1333μA.
[0045] Then, divide the net current response value by the sensitivity coefficient S to obtain the net concentration C. net Dividing 8.1333 μA by 0.17 μA / (mg / kg) gives 8.1333 ÷ 0.17 = 47.84 mg / kg.
[0046] Due to P in this test A =0.92, which is greater than the preset judgment threshold. The system determines that the artificially added sulfite signal is the dominant source in the sample, and reports that the effective additive sulfur dioxide residual concentration is 47.84 mg / kg.
[0047] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0048] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A sulfur dioxide detection system for canned food, characterized in that, It includes a kinetic fingerprint extraction module and a response source classification and net concentration extraction module; the kinetic fingerprint extraction module is used to receive the discrete time-series current signal output by the electrochemical sensor for the headspace gas of the food can under test, extract the onset slope, peak time and decay constant from the time-domain shape of the discrete time-series current signal to form a three-dimensional kinetic fingerprint feature vector, and extract the maximum current value of the discrete time-series current signal. The response source classification and net concentration extraction module uses a support vector machine with a radial basis function as the kernel function as the source classifier. It takes the three-dimensional dynamic fingerprint feature vector as input and outputs the posterior probability that the current sample belongs to the artificially added sulfite decomposition and release type. The product of the posterior probability and the maximum current value is divided by a pre-calibrated linear sensitivity coefficient to obtain the net concentration value of artificially added sulfur dioxide. When the posterior probability is greater than or equal to a preset judgment threshold, the net concentration value is reported as the effective additive sulfur dioxide residual concentration. When the posterior probability is less than the preset judgment threshold, the net concentration value is used as a reference value and marked as significantly affected by natural background interference.
2. The sulfur dioxide detection system for canned food according to claim 1, characterized in that, The maximum current value is the maximum value among all sampling point current values in the discrete time-series current signal from the start time when the sensor comes into contact with the gas to be measured to the end time of sampling; the starting slope is the average rate of change between the current value at the start time and the current value at the time when the current value first reaches 50% of the maximum current value; the peak time is the length of time that the sensor output current takes from the start time to the first time it reaches the maximum current value.
3. The sulfur dioxide detection system for canned food according to claim 1, characterized in that, The attenuation constant is obtained by extracting the current attenuation segment data from the moment of maximum current to the moment of sampling end, fitting it using the least squares method according to the exponential attenuation model, and obtaining the time constant in the fitting result as the attenuation constant.
4. The sulfur dioxide detection system for canned food according to claim 1, characterized in that, The source classifier outputs the posterior probability of belonging to category A and the posterior probability of belonging to category B, the sum of which is 1. Category A corresponds to the dominant response of artificially added sulfite decomposition and release, and category B corresponds to the dominant response of natural plant background sulfide release.
5. A sulfur dioxide detection system for canned food according to claim 4, characterized in that, The source classifier uses the Platt scaling method to convert the decision function values of the support vector machine into the posterior probabilities of belonging to class A and the posterior probabilities of belonging to class B. The Platt scaling method achieves the conversion by fitting activation function parameters on the training dataset after the support vector machine has been trained.
6. A sulfur dioxide detection system for canned food according to claim 1, characterized in that, The radial basis function kernel parameters of the source classifier are determined by performing five-fold cross-validation on the training dataset, and the search range of the kernel parameters is 10. - The search step is a geometric sequence with base 10, from 3 to 103, with a total of 7 candidate values. Finally, the value that maximizes the classification accuracy of the validation set is taken as the kernel parameter.
7. A sulfur dioxide detection system for canned food according to claim 1, characterized in that, The preset judgment threshold is a critical probability value determined based on the training set through cross-validation, which makes the false positive rate lower than a preset target value.
8. A sulfur dioxide detection system for canned food according to claim 1, characterized in that, The linear sensitivity coefficient was obtained by calibrating the electrochemical sensor using a sodium sulfite standard solution of known concentration before the detection system left the factory.
9. A sulfur dioxide detection system for canned food according to claim 3, characterized in that, When the dynamic fingerprint extraction module fits the current decay segment data to the exponential decay model, it calculates the determination coefficient of the fitting result. When the determination coefficient is lower than the preset quality threshold, it determines that the current decay segment data quality is insufficient, does not output the decay constant, and the detection system outputs a data abnormality prompt.