A method for detecting the freshness of beef and a computer-readable storage medium

By using a gas sensor array and bias-structured processing to align input signals with non-linear random resonance models, the method stabilizes and enhances beef freshness detection precision by ensuring resonance occurs.

CN119915970BActive Publication Date: 2025-07-15ZHEJIANG FORESTRY UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510390501.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-15
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

In the prior art, nonlinear stochastic resonance models are prone to no resonance due to mismatch in beef freshness detection, resulting in detection failure, affecting detection stability and accuracy.

Method used

The gas sensor array is used to detect volatile gases, and the input signal is matched with the nonlinear stochastic resonance model through metavarious structure processing to ensure the occurrence of resonance, thereby improving the stability and accuracy of detection.

Benefits of technology

By matching the input signal with the nonlinear stochastic resonance model, the situation of no resonance is avoided, and the stability and accuracy of beef freshness detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119915970B_ABST
    Figure CN119915970B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting the freshness of beef and a computer-readable storage medium. It includes the following steps: introducing clean air into the detection chamber for cleaning; after the detection chamber is cleaned, inhaling the volatile gas generated by the beef sample to be detected into the detection chamber, and the gas sensor array in the detection chamber detects the volatile gas and sends the detection data to a computer; the computer performs partial differential structure processing on the detection data to obtain corresponding partial differential structure signals; the computer inputs the partial differential structure signals into a nonlinear stochastic resonance model to obtain corresponding signal-to-noise ratio eigenvalue; the computer determines the freshness of the beef according to the signal-to-noise ratio eigenvalue. The present invention can perform partial differential structure processing on the detection data, so that the input signal input into the nonlinear stochastic resonance model matches the nonlinear stochastic resonance model, avoiding the situation of non-resonance, thereby improving the detection stability and detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of beef detection, and particularly to a method for detecting beef freshness and a computer-readable storage medium. Background Art

[0002] Beef is rich in nutrition and has a good taste, and is deeply loved by consumers. However, beef is easily contaminated and deteriorated. During storage, with the proliferation of microorganisms and a series of physical and chemical changes, the freshness of beef decreases. Abundant nutrients such as proteins, fats, and carbohydrates are utilized by bacteria and enzymes, generating ammonia, hydrogen sulfide, aldehydic acids, aldehydes, ketones, ethyl mercaptan, alcohols, and acidic gases of carboxylic acids. Aldehydes, ketones, esters, and other low-molecular compounds in the metabolites cause beef to produce peculiar smells.

[0003] Currently, an electronic nose is often used to detect the volatile gases produced by beef to obtain detection data, and a nonlinear stochastic resonance model is used to process the detection data to judge the freshness of beef. The nonlinear stochastic resonance model induces the model to reach a resonance state by applying perturbation noise to the model, forcing the energy of the intrinsic noise to transfer to the target signal, so as to achieve the purpose of reducing noise and enhancing the target signal. However, in practical applications, the input signal of the model may not match the nonlinear stochastic resonance model, which easily leads to no resonance, resulting in the failure of the feature extraction process of the nonlinear stochastic resonance model, and thus causing the failure of detecting the freshness of beef. Summary of the Invention

[0004] In order to solve the above technical problems, the present invention provides a method for detecting beef freshness and a computer-readable storage medium, which can perform differential structure processing on detection data, make the input signal of the input nonlinear stochastic resonance model match the nonlinear stochastic resonance model, avoid the situation of no resonance, and thus improve the detection stability and detection accuracy.

[0005] In order to solve the above problems, the present invention is implemented by adopting the following technical solutions:

[0006] A method for detecting beef freshness of the present invention includes the following steps:

[0007] S1: Introduce clean air into the detection chamber for cleaning;

[0008] S2: After the detection chamber is cleaned, inhale the volatile gases generated by the beef sample to be detected into the detection chamber, and the gas sensor array in the detection chamber detects the volatile gases and sends the detection data to the computer;

[0009] S3: The computer performs differential structure processing on the detection data to obtain a corresponding differential structure signal;

[0010] S4: The computer inputs the differential heterogeneous signal into the non-linear stochastic resonance model to obtain the corresponding signal-to-noise ratio eigenvalue;

[0011] S5: The computer determines the freshness of beef based on the signal-to-noise ratio eigenvalue.

[0012] Preferably, the gas sensor array includes 9 gas sensors, namely: the first gas sensor for detecting hydrogen sulfide, the second gas sensor for detecting hydrogen, the third gas sensor for detecting ammonia, the fourth gas sensor for detecting ethanol, the fifth gas sensor for detecting halogen gas, the sixth gas sensor for detecting methane, the seventh gas sensor for detecting propane, the eighth gas sensor for detecting nitrogen oxides, and the ninth gas sensor for detecting carbon dioxide.

[0013] Preferably, the specific steps for the gas sensor array in the detection chamber to detect volatile gases and send the detection data to the computer in step S2 are as follows:

[0014] The first gas sensor generates a response signal s1(t) when in contact with the volatile gas, the second gas sensor generates a response signal s2(t) when in contact with the volatile gas, the third gas sensor generates a response signal s3(t) when in contact with the volatile gas, the fourth gas sensor generates a response signal s4(t) when in contact with the volatile gas, the fifth gas sensor generates a response signal s5(t) when in contact with the volatile gas, the sixth gas sensor generates a response signal s6(t) when in contact with the volatile gas, the seventh gas sensor generates a response signal s7(t) when in contact with the volatile gas, the eighth gas sensor generates a response signal s8(t) when in contact with the volatile gas, the ninth gas sensor generates a response signal s9(t) when in contact with the volatile gas, where t is the detection time. The gas sensor array calculates the mean value of the response signals s1(t), s2(t), s3(t), s4(t), s5(t), s6(t), s7(t), s8(t), s9(t) to obtain the mean value inav(t).

[0015] ,

[0016] The mean value inav(t) is sent to the computer as the detection data.

[0017] Preferably, the formula for performing differential heterogeneous processing on the detection data in step S3 is as follows:

[0018] ,

[0019] ,

[0020] Wherein, inav(t) is the detection data output by the gas sensor array at the detection time t, chinp(t) is the differential isomeric signal corresponding to inav(t), k is an adjustment parameter, A is the signal amplitude of the nonlinear stochastic resonance model, a is the real parameter of the nonlinear stochastic resonance model, and b is the real parameter of the nonlinear stochastic resonance model.

[0021] Preferably, the step S4 includes the following steps:

[0022] S41: The computer inputs the differential isomeric signal chinp(t) as the input signal into the nonlinear stochastic resonance model:

[0023] ,

[0024] ,

[0025] Wherein, x is the motion trajectory of the Brownian particle, V(x) is the standard double-well potential function, A is the signal amplitude, f is the frequency, is the initial phase, N(t) is the intrinsic noise, D is the external noise intensity, is the external noise, and a, b are real parameters;

[0026] S42: The nonlinear stochastic resonance model outputs the signal-to-noise ratio curve SNR(t),

[0027] ,

[0028] Wherein, is the barrier height of the nonlinear stochastic resonance model at time t, and D t is the external noise intensity when resonance occurs in the nonlinear stochastic resonance model at time t;

[0029] S43: Take the maximum value SNR max of the signal-to-noise ratio curve SNR(t) as the signal-to-noise ratio eigenvalue.

[0030] Preferably, the step S5 includes the following steps:

[0031] If W2 < SNR max ≤ W1, it is determined that the beef is freshly cut beef;

[0032] If W3 < SNR max ≤ W2, it is determined that the beef is beef refrigerated for 24 - 48 hours;

[0033] If W4 < SNR max ≤ W3, it is determined that the beef is beef refrigerated for 48 - 72 hours;

[0034] If W5 < SNR max≤W4, it is determined that the beef is beef refrigerated for 72 - 96 hours;

[0035] If the SNR max ≤W5, it is determined that the beef is beef refrigerated for more than 96 hours.

[0036] Preferably, the step S1 includes the following steps:

[0037] Start preheating the gas sensor array in the detection gas chamber for T1 minutes, and at the same time introduce clean air into the detection gas chamber for cleaning. When the response signals generated by all the gas sensors in the gas sensor array are stable, the cleaning is completed.

[0038] Preferably, the method for inhaling the volatile gas generated by the beef sample to be measured into the detection gas chamber in the step S2 is as follows:

[0039] At room temperature, place the beef sample to be measured in a clean and dry beaker and seal it with a sealing film. Let it stand for T2 minutes, insert the detection probe into the beaker, and the detection probe inhales the volatile gas in the top space of the beaker into the detection gas chamber.

[0040] Preferably, the adjustment parameter k is obtained by the following method:

[0041] Establish the following relationship to improve the matching relationship between the input signal and the nonlinear stochastic resonance model, and promote the nonlinear stochastic resonance model to generate resonance:

[0042] ,

[0043] where SNR is the signal-to-noise ratio output when the nonlinear stochastic resonance model generates resonance, int is the input signal, is the barrier height of the nonlinear stochastic resonance model;

[0044] Solve the equation to obtain:

[0045] ,

[0046] where W(.) is the Lambert W function;

[0047] The barrier height in the nonlinear stochastic resonance model needs to be less than or equal to to generate resonance, that is:

[0048] ,

[0049] Solve the equation to obtain:

[0050] ;

[0051] Let ,

[0052] When f(D) has a maximum value f(D) max ,

[0053] ,

[0054] Take f(D) max as the adjustment parameter k, that is .

[0055] A computer-readable storage medium of the present invention stores a computer program thereon, and when the computer program is executed by a processor, the above method is implemented.

[0056] The beneficial effects of the present invention are as follows: A gas sensor array is used to detect the volatile gases generated by the beef sample to be measured. By performing differential structure processing on the detection data output by the gas sensor array, the input signal input to the nonlinear stochastic resonance model is matched with the nonlinear stochastic resonance model, avoiding the situation of non-resonance, thereby improving the detection stability and detection accuracy. Description of the Drawings

[0057] Figure 1 is the flowchart of the embodiment. Specific Embodiments

[0058] The technical solutions of the present invention will be further specifically described below through embodiments and in conjunction with the drawings.

[0059] Embodiment: A method for detecting the freshness of beef in this embodiment, as Figure 1 shown, includes the following steps:

[0060] S1: Start preheating the gas sensor array in the detection gas chamber for T1 minutes, and at the same time introduce clean air into the detection gas chamber for cleaning. After the response signals generated by all gas sensors in the gas sensor array are stable, the cleaning is completed.

[0061] S2: After the detection gas chamber is cleaned, at room temperature, place the beef sample to be measured in a clean and dry beaker and seal it with a sealing film. Let it stand for T2 minutes, insert the detection probe into the beaker, the detection probe inhales the volatile gas in the top space of the beaker into the detection gas chamber, and the gas sensor array in the detection gas chamber detects the volatile gas and sends the detection data to the computer.

[0062] The gas sensor array includes 9 gas sensors, namely: the first gas sensor for detecting hydrogen sulfide, the second gas sensor for detecting hydrogen, the third gas sensor for detecting ammonia, the fourth gas sensor for detecting ethanol, the fifth gas sensor for detecting halogen gas, the sixth gas sensor for detecting methane, the seventh gas sensor for detecting propane, the eighth gas sensor for detecting nitrogen oxides, and the ninth gas sensor for detecting carbon dioxide.

[0063] The first gas sensor is a TGS-825 sensor, the second gas sensor is a TGS-821 sensor, the third gas sensor is a TGS-826 sensor, the fourth gas sensor is a TGS-822 sensor, the fifth gas sensor is a TGS-832 sensor, the sixth gas sensor is a TGS-813 sensor, the seventh gas sensor is a TGS-2610 sensor, the eighth gas sensor is a TGS-2201 sensor, and the ninth gas sensor is a 4N-CO2 sensor.

[0064] The specific steps for the gas sensor array in the detection chamber to detect volatile gases and send the detection data to the computer are as follows:

[0065] When the first gas sensor comes into contact with the volatile gas, it generates a response signal s1(t). When the second gas sensor comes into contact with the volatile gas, it generates a response signal s2(t). When the third gas sensor comes into contact with the volatile gas, it generates a response signal s3(t). When the fourth gas sensor comes into contact with the volatile gas, it generates a response signal s4(t). When the fifth gas sensor comes into contact with the volatile gas, it generates a response signal s5(t). When the sixth gas sensor comes into contact with the volatile gas, it generates a response signal s6(t). When the seventh gas sensor comes into contact with the volatile gas, it generates a response signal s7(t). When the eighth gas sensor comes into contact with the volatile gas, it generates a response signal s8(t). When the ninth gas sensor comes into contact with the volatile gas, it generates a response signal s9(t). Here, t is the detection time. The gas sensor array calculates the mean value of the response signals s1(t), s2(t), s3(t), s4(t), s5(t), s6(t), s7(t), s8(t), and s9(t) to obtain the mean value inav(t).

[0066] ,

[0067] The mean value inav(t) is sent to the computer as the detection data.

[0068] S3: The computer performs partial differential and heterogeneous processing on the detection data to obtain the corresponding partial differential and heterogeneous signal.

[0069] The formula for performing partial differential and heterogeneous processing on the detection data is as follows:

[0070] ,

[0071] ,

[0072] Wherein, inav(t) is the detection data output by the gas sensor array at the detection time t, chinp(t) is the differential isomeric signal corresponding to inav(t), k is an adjustment parameter, A is the signal amplitude of the nonlinear stochastic resonance model, a is the real parameter of the nonlinear stochastic resonance model, and b is the real parameter of the nonlinear stochastic resonance model.

[0073] Under the adiabatic approximation condition, assuming that the signal amplitude is extremely small, in the case where the nonlinear stochastic resonance model has no sufficient energy to drive, the Brownian particles are biased in one potential well, and the signal period is much longer than the relaxation time of the system in some typical potential wells. At this time, the appearance of the periodic driving force causes the potential well function to tilt, ultimately leading to the transition of the Brownian particles from one potential well to another. Since the potential barrier height of the nonlinear stochastic resonance model is , then the following relationship is proposed to improve the matching relationship between the input signal and the nonlinear stochastic resonance model, and to promote the resonance of the nonlinear stochastic resonance model:

[0074] ,

[0075] Wherein, SNR is the signal-to-noise ratio output when the nonlinear stochastic resonance model generates resonance, int is the input signal, is the potential barrier height of the nonlinear stochastic resonance model;

[0076] Solving the equation, we get:

[0077] ,

[0078] Wherein, W(.) is the Lambert W function;

[0079] The potential barrier height in the nonlinear stochastic resonance model needs to be less than or equal to to generate resonance, that is:

[0080] ,

[0081] Solving the equation, we get:

[0082] ,

[0083] Let ,

[0084] When , f(D) has a maximum value f(D) max,

[0085] ,

[0086] Take f(D) max as the adjustment parameter k, that is .

[0087] Then, the following processing of the input signal int can make the input signal match the nonlinear stochastic resonance model:

[0088] .

[0089] S4: The computer inputs the differential heterogeneous signal chinp(t) as the input signal into the nonlinear stochastic resonance model:

[0090] ,

[0091] ,

[0092] where x is the motion trajectory of the Brownian particle, V(x) is the standard double-well potential function, A is the signal amplitude, f is the frequency, is the initial phase, N(t) is the intrinsic noise, D is the external noise intensity, is the external noise, and a and b are real parameters;

[0093] The nonlinear stochastic resonance model outputs the signal-to-noise ratio curve SNR(t),

[0094] ,

[0095] where is the barrier height of the nonlinear stochastic resonance model at time t, and D t is the external noise intensity when resonance occurs in the nonlinear stochastic resonance model at time t;

[0096] Take the maximum value SNR max of the signal-to-noise ratio curve SNR(t) as the signal-to-noise ratio eigenvalue.

[0097] S5: If W2 < SNR max ≤ W1, determine that the beef is freshly cut beef;

[0098] If W3 < SNR max ≤ W2, determine that the beef is beef refrigerated for 24 - 48 hours;

[0099] If W4 < SNR max ≤ W3, determine that the beef is beef refrigerated for 48 - 72 hours;

[0100] If W5 < SNR max ≤ W4, determine that the beef is beef refrigerated for 72 - 96 hours;

[0101] If SNRmax ≤W5, it is determined that the beef is beef refrigerated for more than 96 hours.

[0102] In this solution, the volatile gas generated by the beef sample to be measured is inhaled into the detection gas chamber, and the gas sensor array is used to detect the volatile gas generated by the beef sample to be measured. By performing differential structure processing on the detection data output by the gas sensor array, the input signal of the input nonlinear stochastic resonance model is matched with the nonlinear stochastic resonance model, avoiding the situation of non-resonance, thereby improving the detection stability and detection accuracy.

[0103] For the nonlinear stochastic resonance model, the minimum values of the standard double-well potential function V(x) are located at the two potential wells where . There is a potential barrier between the two potential wells, and the potential barrier is located at where the height is . When the three elements of stochastic resonance are coordinated with each other, the Brownian particle obtains sufficient energy, the potential barrier is reduced, and the Brownian particle can cross the potential barrier and jump from one potential well to another potential well. At this time, the signal-to-noise ratio presents a maximum value. At this time, the intensity of the weak signal is enhanced, so it can be recognized from the strong background noise.

[0104] In this embodiment, A = 1.9, a = 8, b = 4, then k = 4.918 is calculated,

[0105] ,

[0106] The computer inputs the differential structure signal into the nonlinear stochastic resonance model to obtain the corresponding signal-to-noise ratio eigenvalue SNR max ,

[0107] If -0.31 < SNR max ≤ -0.24, it is determined that the beef is freshly cut beef;

[0108] If -0.37 < SNR max ≤ -0.31, it is determined that the beef is beef refrigerated for 24 - 48 hours;

[0109] If -0.44 < SNR max ≤ -0.37, it is determined that the beef is beef refrigerated for 48 - 72 hours;

[0110] If -0.52 < SNR max ≤ -0.44, it is determined that the beef is beef refrigerated for 72 - 96 hours;

[0111] If SNR max ≤ -0.52, it is determined that the beef is beef refrigerated for more than 96 hours.

[0112] A computer-readable storage medium according to this embodiment, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method is implemented.

Claims

1. A method for detecting the freshness of beef, characterized in that, It includes the following steps: S1: Introduce clean air into the detection chamber for cleaning; S2: After the detection chamber is cleaned, inhale the volatile gas generated by the beef sample to be detected into the detection chamber. The gas sensor array in the detection chamber detects the volatile gas and sends the detection data to the computer; S3: The computer performs partial differential structure processing on the detection data to obtain the corresponding partial differential structure signal; S4: The computer inputs the partial differential structure signal into the non-linear stochastic resonance model to obtain the corresponding signal-to-noise ratio eigenvalue; S5: The computer judges the freshness of the beef according to the signal-to-noise ratio eigenvalue; The formula for performing partial differential structure processing on the detection data in step S3 is as follows: , , Where, inav(t) is the detection data output by the gas sensor array at detection time t. The detection data output by the gas sensor array at detection time t is the mean value of the response signals generated by all gas sensors in the gas sensor array at detection time t. chinp(t) is the partial differential structure signal corresponding to inav(t), k is the adjustment parameter, A is the signal amplitude of the non-linear stochastic resonance model, a is the real parameter of the non-linear stochastic resonance model, and b is the real parameter of the non-linear stochastic resonance model; Step S4 includes the following steps: S41: The computer inputs the partial differential structure signal chinp(t) as the input signal into the non-linear stochastic resonance model; , , where x is the motion trajectory of the Brownian particle, V(x) is the standard double-well potential function, A is the signal amplitude, f is the frequency, is the initial phase, N(t) is the intrinsic noise, D is the external noise intensity, is the external noise, and a and b are real parameters; S42: The non-linear stochastic resonance model outputs the signal-to-noise ratio curve SNR(t), , Among them, is the barrier height of the nonlinear stochastic resonance model at time t, and D t is the external noise intensity when resonance occurs in the nonlinear stochastic resonance model at time t; S43: The maximum value SNR of the signal-to-noise ratio curve SNR(t) max is used as the signal-to-noise ratio eigenvalue.

2. The method for detecting the freshness of beef according to claim 1, wherein The gas sensor array includes 9 gas sensors, namely: the first gas sensor for detecting hydrogen sulfide, the second gas sensor for detecting hydrogen, the third gas sensor for detecting ammonia, the fourth gas sensor for detecting ethanol, the fifth gas sensor for detecting halogen gas, the sixth gas sensor for detecting methane, the seventh gas sensor for detecting propane, the eighth gas sensor for detecting nitrogen oxides, and the ninth gas sensor for detecting carbon dioxide.

3. A method for detecting the freshness of beef according to claim 2, characterized in that, The specific steps for the gas sensor array in the detection chamber in step S2 to detect the volatile gas and send the detection data to the computer are as follows: The first gas sensor generates a response signal s1(t) when contacting the volatile gas, the second gas sensor generates a response signal s2(t) when contacting the volatile gas, the third gas sensor generates a response signal s3(t) when contacting the volatile gas, the fourth gas sensor generates a response signal s4(t) when contacting the volatile gas, the fifth gas sensor generates a response signal s5(t) when contacting the volatile gas, the sixth gas sensor generates a response signal s6(t) when contacting the volatile gas, the seventh gas sensor generates a response signal s7(t) when contacting the volatile gas, the eighth gas sensor generates a response signal s8(t) when contacting the volatile gas, the ninth gas sensor generates a response signal s9(t) when contacting the volatile gas. t is the detection time. The gas sensor array calculates the mean value of the response signals s1(t), s2(t), s3(t), s4(t), s5(t), s6(t), s7(t), s8(t), s9(t) to obtain the mean value inav(t), , the mean value inav(t) is sent as the detection data to the computer.

4. A method for detecting the freshness of beef according to claim 1, characterized in that, The step S5 includes the following steps: If W2 < SNR max ≤ W1, determine that the beef is freshly sliced beef; If W3 < SNR max ≤ W2, it is determined that the beef is beef refrigerated for 24 - 48 hours; If W4 < SNR max ≤ W3, determine that the beef is beef refrigerated for 48 - 72 hours; If W5 < SNR max ≤ W4, it is determined that the beef is beef refrigerated for 72 - 96 hours; If the SNR max ≤W5, it is determined that the beef has been refrigerated for more than 96 hours.

5. A method for detecting the freshness of beef according to claim 1, characterized in that, The step S1 includes the following steps: Start preheating the gas sensor array in the detection gas chamber for T1 minutes, and at the same time introduce clean air into the detection gas chamber for cleaning. After the response signals generated by all the gas sensors in the gas sensor array become stable, the cleaning is completed.

6. The method for detecting the freshness of beef according to claim 1, wherein The method of inhaling the volatile gas generated by the beef sample to be measured into the detection gas chamber in the step S2 is as follows: At room temperature, place the beef sample to be measured in a clean and dry beaker and seal it with a sealing film. Let it stand for T2 minutes, insert the detection probe into the beaker, and the detection probe inhales the volatile gas in the top space of the beaker into the detection gas chamber.

7. A method for detecting the freshness of beef according to claim 1, characterized in that, The adjustment parameter k is obtained by the following method: Establish the following relationship to improve the matching relationship between the input signal and the nonlinear stochastic resonance model, and prompt the nonlinear stochastic resonance model to generate resonance: , where SNR is the signal-to-noise ratio output when resonance occurs in the nonlinear stochastic resonance model, int is the input signal, and is the barrier height of the nonlinear stochastic resonance model; Solve the equation to obtain: , where W(.) is the Lambert W function; The barrier height in the nonlinear stochastic resonance model needs to be less than or equal to to generate resonance, that is: , Solve the equation to obtain: , Let , When f(D) has a maximum value f(D) max, , Take f(D) max as the adjustment parameter k, that is .

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Energy detection method based on deviation correction

    CN102710347A

  • Device and method for detecting quality of soybean

    CN103424523A