Pet peculiar smell detection method and device and storage medium

Through the combination of sensor array and adaptive time convolution network model, accurate detection and timely disinfection of pet odors are achieved, the problem of untimely detection in the prior art is solved, and the cleanliness of the pet environment is improved.

CN119249223APending Publication Date: 2025-01-03ZHENGZHOU WINSEN ELECTRONICS TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411301707.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing technology lacks effective technical means in pet odor detection, resulting in the inability to start the disinfection function in time and the expected results cannot be achieved.

Method used

Data is collected using sensor arrays, and sensor signals are compensated through improved linear temperature compensation algorithms and improved weighted adaptive whale optimization algorithms, and adaptive time convolution based on gating convolution layers and sparse strategies (GSA- TCN) network model performs classification and identification of sensor signals to realize timely detection of pet excrement odors.

Benefits of technology

It improves the accuracy and efficiency of pet odor detection, ensures the timely activation of the disinfection function, and effectively solves the problems caused by pet odor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249223A_ABST
    Figure CN119249223A_ABST
Patent Text Reader

Abstract

The invention discloses a pet peculiar smell detection method and device and a storage medium. The pet peculiar smell detection method comprises the following steps: collecting data in a to-be-detected environment in real time through a sensor array; performing temperature compensation on the sensing signal through a weighted linear temperature compensation algorithm and a weighted adaptive whale optimization algorithm; setting a threshold value, comparing the compensated sensor signal amplitude with the set threshold value, and when any sensor signal amplitude is triggered, starting to collect sensor data with a fixed length; inputting the collected sensor data with the fixed length into a self-adaptive time convolution GSA-TCN network model based on a gating convolution kernel rarefaction strategy for classification and identification; when it is judged that the pet excretes peculiar smell, table look-up, interpolation and concentration calculation are carried out according to the maximum value of the sensor data with the fixed length, and the detection result and the concentration value of the environment to be detected are output. The pet peculiar smell can be effectively detected, a series of problems caused by the pet peculiar smell can be solved, and the application scene is wide.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pet odor detection, and in particular to a pet odor detection method, device and storage medium. Background Art

[0002] As the pet market becomes increasingly popular, more and more families are keeping pets. Pets not only bring companionship and happiness to people, but also become important members of the family. However, at the same time, some common problems have also arisen. For example, in a closed environment, the smell of pet excrement will cause discomfort to people and increase the risk of disease. In order to deal with these problems, it is particularly important to clean up pet excrement in a timely manner, which can not only effectively prevent the deterioration of odor in the room, but also reduce the spread of bacteria and viruses. However, there is a lack of effective technical means to determine whether excrement is generated in a timely manner.

[0003] The invention patent with application number 201911318017.0 discloses a pet smart nest with a deodorizing device, including a house and a roof, wherein a detachable pad is provided at the bottom of the house, and an air suction channel is provided on one side of the lower part of the house and above the pad, wherein the air suction channel runs through one side of the house and extends to the outside of the house, and a connecting pipe is connected to the outer end of the air suction channel, and an air pump is installed on the connecting pipe, and one end of the connecting pipe away from the air suction channel is connected to one end of the bottom of the odor absorption cavity, and the side of the odor absorption cavity is fixed in the middle of the outside of the house, and a deodorizing chamber, a sterilizing chamber, a cooling chamber, a filtering chamber and a purification chamber are provided in the odor absorption cavity, wherein the air suction channel is connected to one end of the bottom of the deodorizing chamber, and the upper part of the side of the deodorizing chamber is connected to the side of the sterilizing chamber through a connecting pipe 1. The above invention can improve the efficiency of odor removal and provide a comfortable environment for pets. However, the above invention still lacks effective technical means for odor detection, and the disinfection function cannot be started in time, thereby failing to achieve the expected effect. Summary of the invention

[0004] In view of the technical problem of lack of effective technical means in odor detection, the present invention proposes a pet odor detection method, device and storage medium, which adopts a sensor array to collect data, performs temperature compensation on the sensor signal through an improved linear temperature compensation algorithm and an improved weighted adaptive whale optimization algorithm, and classifies and identifies the sensor signal through an adaptive temporal convolution (GSA-TCN) network model based on a gated convolution layer and a sparsification strategy, so as to timely and effectively detect the odor generated in the pet excrement and solve the pet odor problem.

[0005] In order to achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] A method for detecting pet odors comprises the following steps:

[0007] S1, collecting data in real time in the environment to be detected through a temperature sensor and a sensor array consisting of an air quality sensor and at least one detection sensor;

[0008] The detection sensor is at least one of a hydrogen sulfide sensor, an ammonia sensor, an isovaleric acid sensor, a methyl mercaptan sensor, an acetic acid sensor, a trimethylamine sensor or a VOC sensor.

[0009] S2, temperature compensation is performed on the sensing signals of the air quality sensor and the detection sensor by using a weighted linear temperature compensation algorithm and a weighted adaptive whale optimization algorithm;

[0010] S3, setting a threshold, comparing the signal amplitude of the compensated air quality sensor and the detection sensor with the set threshold, and starting to collect sensor data of the air quality sensor and the detection sensor of a fixed length when any sensor signal amplitude is triggered;

[0011] S4, inputting the fixed-length air quality sensor and the sensor data of the detection sensor collected in step S3 into the adaptive time convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy for classification and recognition;

[0012] S5. When the judgment result of the adaptive time convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy is true, it indicates that there is an odor of pet excrement. Then, according to the maximum value of the sensor data of the fixed-length air quality sensor and the detection sensor, the table is looked up, interpolated, and the concentration is calculated, and the detection result and concentration value of the environment to be detected are output.

[0013] Preferably, the temperature compensation of the sensing signals of the air quality sensor and the detection sensor by the weighted linear temperature compensation algorithm and the weighted adaptive whale optimization algorithm comprises the following steps:

[0014] Step 1: Perform weighted processing on the general linear temperature compensation algorithm to optimize the compensation accuracy in different temperature ranges. The expression is: Y = S-μk (T s -T b ), where Y represents the compensation result, S is the measured voltage value, k is the compensation coefficient, T s is the measured temperature, T b is the reference temperature, μ is the weighting coefficient;

[0015] in, is the mean value of the compensation result Y, and N is the data length of the compensation result Y;

[0016] Step 2: Use the weighted adaptive whale optimization algorithm to optimize the weight coefficient μ, find the optimal solution of the weight coefficient μ, and then get the compensation result Y after temperature compensation.

[0017] Preferably, the weighted adaptive whale optimization algorithm is:

[0018] Surrounding the Prey:

[0019] Bubble net attacks prey:

[0020] Searching for prey:

[0021] in, is the current optimal solution, is the new position at iteration t+1, D is the distance vector of the whale around the prey or in the random search phase, D ′ is the distance scalar of the bubble net attack phase, e bl is the spiral trajectory contraction term, l is a random value, is a random vector, A is the coefficient vector controlling the direction and step length of the whale's movement, b is the parameter controlling the shape of the spiral trajectory, tmax is the maximum number of iterations, and ω(t) is the configured adaptive weight;

[0022] The method of using the weighted adaptive whale optimization algorithm to find the optimal solution of the weight coefficient μ is: by configuring the adaptive weight ω(t) to increase the search speed of the whale group, so that The function converges quickly, and then through continuous iteration

[0023] A·D updates the position of the whale to obtain the optimal solution It is the weighting coefficient μ.

[0024] Preferably, the structure of the adaptive temporal convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy includes: an input layer, a first residual block, a second residual block, a third residual block, a global pooling layer, and a fully connected layer connected in sequence;

[0025] The first residual block, the second residual block, and the third residual block have the same structure and all contain two gated convolutional layers: the first gated convolutional layer and the second gated convolutional layer. The expression of the gated convolutional layer is y gate =g⊙(W*x+b), where b is the bias, ⊙ represents element-wise multiplication, W is the weight, x is the input data, and y is the gate It is the gated convolution output;

[0026] A sparsification mechanism is integrated in the gated convolutional layer: by setting a threshold value threshold for the gating parameter g, when |g| < threshold, it indicates that the corresponding convolutional kernel has a lower importance, and the corresponding convolutional operation can be ignored or the result of the convolution can be set to 0. The pruning operation of the convolutional kernel is expressed as: where is an indicator function. When the condition holds, m takes the value of 1; otherwise, it is 0.

[0027] The sparsification operation is expressed as: y output = y gate ·m, where y output is the output data after the sparsification operation.

[0028] A non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause the computer to execute the above-mentioned pet odor detection method.

[0029] A pet odor detection device includes a temperature sensor, a sensor array composed of an air quality sensor and at least one detection sensor. The temperature sensor, the air quality sensor, and the detection sensor are all installed on a PCB board. A microprocessor is installed on the PCB board. The temperature sensor, the air quality sensor, and the detection sensor are all connected to the microprocessor through the PCB board; the temperature sensor, the air quality sensor, and the detection sensor work independently without affecting each other; the microprocessor uses the above-mentioned pet odor detection method to process the signals collected by the temperature sensor, the air quality sensor, and the detection sensor.

[0030] Preferably, a circuit unit is further provided on the PCB board; the detection sensor and the air quality sensor are respectively connected to the microprocessor through the circuit unit, and the temperature sensor is directly connected to the microprocessor.

[0031] As described above, the detection sensor is at least one of a hydrogen sulfide sensor, an ammonia sensor, an isovaleric acid sensor, a methanethiol sensor, an acetic acid sensor, a trimethylamine sensor, or a VOC sensor.

[0032] Preferably, the type of the microprocessor includes but is not limited to: an application-specific integrated circuit, a system-on-chip, a field-programmable gate array, or a central processing unit.

[0033] Preferably, the type of the detection sensor is at least one of the following: a semiconductor sensor, an electrochemical sensor, a catalytic combustion sensor, or an optical sensor.

[0034] Compared with the prior art, the beneficial effects of the present invention:

[0035] The pet odor detection device proposed in the present invention has the characteristics of low cost, miniaturization, and intelligence. It can effectively detect pet odors, which is conducive to solving a series of problems caused by pet odors and has a wide range of application scenarios. The present invention proposes a weighted linear temperature compensation algorithm and a weighted adaptive whale optimization algorithm to perform temperature compensation on sensor signals, which effectively solves the impact of temperature on sensor signals and improves the accuracy of pet odor detection. In addition, the GSA-TCN network model proposed in the present invention combines the gated convolution layer and the sparsification mechanism on the basis of the traditional TCN. By adaptively adjusting the activation of the convolution kernel and pruning unimportant convolution kernels, the model calculation efficiency is improved and the risk of overfitting is reduced. At the same time, it can achieve efficient and accurate feature extraction and classification when processing complex noise data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 The present invention is a flowchart of the method for detecting pet odor.

[0038] Figure 2 This is a comparison diagram of the sensor signal before and after temperature compensation of the present invention.

[0039] Figure 3 This is a response recovery curve diagram of the sensor of the present invention.

[0040] Figure 4 This is a structural diagram of the adaptive temporal convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy of the present invention.

[0041] Figure 5 The figure is a schematic structural diagram of an embodiment of a device for detecting pet odor of the present invention.

[0042] In the figure, 1-PCB board, 2-temperature sensor, 3-ammonia sensor, 4-hydrogen sulfide sensor, 5-air quality sensor, 6-circuit unit and microprocessor. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Example 1

[0045] like Figure 1 As shown, a method for detecting pet odor is shown. Taking pet cats and pet dogs as examples, pet odor mainly comes from cat and dog excrement. The main odor components in cat and dog excrement include: ammonia, hydrogen sulfide, isovaleric acid, methyl mercaptan, acetic acid, trimethylamine, VOC, etc. Therefore, this embodiment uses ammonia sensors and hydrogen sulfide sensors as detection sensors, including the following steps:

[0046] S1. Real-time data collection in the environment to be detected is carried out through a temperature sensor and a sensor array consisting of an air quality sensor, an ammonia sensor and a hydrogen sulfide sensor.

[0047] The ammonia sensor and hydrogen sulfide sensor are used to detect ammonia and hydrogen sulfide gases respectively. The air quality sensor is used to detect gases including but not limited to benzene, toluene, formaldehyde, ethanol, alkane, paint, etc. The temperature sensor is used to detect the temperature in the environment.

[0048] S2. Temperature compensation is performed on the sensing signals of the air quality sensor and the detection sensor through a weighted linear temperature compensation algorithm and a weighted adaptive whale optimization algorithm.

[0049] The general linear temperature compensation algorithm is based on the linear equation:

[0050] Y=Sk(T s -T b ) (1)

[0051] The measured value S and the measured temperature T s The least squares method is used to fit the compensation coefficient k value, and then the compensated Y value is obtained. However, the overall variance of the Y value obtained in this way is too large, the compensation effect is poor, and the data credibility is low.

[0052] Among them, Y represents the compensation result, S is the measured voltage value, k is the compensation coefficient, T s is the measured temperature, T b is the reference temperature.

[0053] The linear temperature compensation algorithm is weighted to optimize the compensation accuracy in different temperature ranges.

[0054] Specifically, a weighting coefficient μ is added to the linear equation of the general linear temperature compensation algorithm to adjust the compensation coefficient k so that the variance of the compensation result Y is minimized, the credibility of the data is improved, and the anti-interference ability of the sensor data to temperature is further improved.

[0055] The improved equation is:

[0056] Y=S-μk(T s -T b ) (2)

[0057] The process of calculating the weighted coefficient μ is an optimization problem, with the goal of minimizing the variance of the compensation result Y. To find μ:

[0058]

[0059] In formula (3) is the mean value of the compensation result Y, and N is the data length of the compensation result Y.

[0060] The present invention adopts a weighted adaptive whale optimization algorithm (DWOA) to optimize the weighted coefficient and obtain the optimal solution of the weighted coefficient μ to minimize the variance of the compensation signal.

[0061] The weighted adaptive whale optimization algorithm adjusts the position and speed of the whale group and iteratively optimizes the weighting coefficient, thereby improving the stability and accuracy of the compensation algorithm.

[0062] Surrounding the Prey:

[0063]

[0064] Bubble net attacks prey:

[0065]

[0066] Searching for prey:

[0067]

[0068] in, is the current optimal solution, is the new position at iteration t+1, D is the distance vector of the whale around the prey or in the random search phase, D ′ is the distance scalar of the bubble net attack phase, e bl is the spiral trajectory contraction term, l is a random value, is a random vector, A is the coefficient vector that controls the direction and step size of the whale's movement, b is the parameter that controls the shape of the spiral trajectory, tmax is the maximum number of iterations, and ω(t) is the configured adaptive weight.

[0069] By configuring the adaptive weight ω(t), the search speed of the whale group can be improved. The function converges quickly. Then, by continuously iterating formulas (4), (5), and (6) to update the position of the whale, the optimal solution can be obtained. That is μ. The compensation result Y after compensation is further obtained. The compensation effect is as follows Figure 2 shown.

[0070] S3. Set a threshold value, compare the signal amplitudes of the compensated air quality sensor, ammonia sensor, and hydrogen sulfide sensor with the set threshold value, and when any sensor signal amplitude is triggered, start collecting sensor data of the air quality sensor, ammonia sensor, and hydrogen sulfide sensor of a fixed length.

[0071] The first amplitude threshold t1, the second amplitude threshold t2, and the third amplitude threshold t3 are set for triggering detection of compensated signals of the ammonia sensor, the hydrogen sulfide sensor, and the air quality sensor, respectively. When the amplitude of any sensor signal of the ammonia sensor, the hydrogen sulfide sensor, and the air quality sensor is greater than the set threshold, the sensor signals of the ammonia sensor, the hydrogen sulfide sensor, and the air quality sensor are simultaneously recorded.

[0072] A fourth duration threshold t4 is set, and when the recorded signal length reaches the fourth duration threshold t4, the recording is stopped. Figure 3 As shown, S1, S2, S3 correspond to the ammonia sensor signal, hydrogen sulfide sensor signal, and air quality sensor signal, respectively; t1, t2, t3 correspond to the first amplitude threshold, the second amplitude threshold, and the third amplitude threshold, respectively; and t4 is the fourth duration threshold. A single sample of a fixed-length signal collected is represented by S i =[S1,S2,S3],i∈N + .

[0073] S4. Input the fixed-length sensor data of the air quality sensor, ammonia sensor, and hydrogen sulfide sensor collected in step S3 into the adaptive temporal convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy for classification and recognition.

[0074] Temporal convolutional network (TCN) is a neural network model for processing time series data. TCN achieves modeling of long-term dependencies through a combination of causal convolution and dilated convolution. Compared with recurrent neural network (RNN), TCN has the advantages of high parallel computing efficiency and strong ability to capture long-term dependencies. However, when dealing with complex time series tasks, traditional TCN models still have problems such as redundant convolution kernels, high model complexity, and insufficient feature extraction, which leads to limitations in model performance and computing efficiency.

[0075] The basic structure of TCN is as follows:

[0076]

[0077] Where r is the dilation rate, k is the convolution kernel size, w[i] is the convolution kernel weight, x[t] is the input sequence, b is the bias, and y[t a ] is the output data.

[0078] The Adaptive Temporal Convolutional Network Based on Gated Convolution and Sparsification Strategy (GSA-TCN) model is based on the traditional temporal convolutional network (TCN), combining the gated convolution layer and the sparsification mechanism. It improves the computational efficiency of the model and reduces the risk of overfitting by adaptively adjusting the activation of the convolution kernel and pruning unimportant convolution kernels. At the same time, it can achieve efficient and accurate feature extraction and classification when processing complex noisy data.

[0079] The gated convolution layer GatedConv1d is introduced in GSA-TCN. A gated convolution mechanism is added on the basis of the standard convolution layer Conv1d. The weight of each output channel is controlled by adaptively learning the gating parameter g, thereby dynamically changing and realizing fine control of the convolution layer output, as shown in formula (9):

[0080] y gate =g⊙(W*x+b) (9)

[0081] ⊙ represents element multiplication, W is the weight, x is the input data, y gate is the gated convolution output.

[0082] To further optimize the computational efficiency of the network model, the present invention integrates a sparsification mechanism in the gated convolutional layer. By setting a threshold value threshold for the gating parameter g. When |g| < threshold, it indicates that the corresponding convolutional kernel has a lower importance, and the corresponding convolutional operation can be ignored or the result of the convolution can be set to 0, thereby realizing the pruning of the convolutional kernel and network sparsification, and reducing the model complexity.

[0083] The pruning operation of the convolutional kernel is expressed as follows:

[0084]

[0085] is the indicator function. When the condition holds, m takes the value of 1, otherwise it is 0.

[0086] The sparsification operation is expressed as follows:

[0087] y output = y gate ·m (12)

[0088] y output is the output data after the sparsification operation.

[0089] The GSA-TCN network model uses residual blocks to construct the main body of the network. As Figure 4 shown in the overall network structure of the GSA-TCN network model, the structure of the adaptive temporal convolutional GSA-TCN network model based on the gated convolutional kernel sparsification strategy specifically includes, connected in sequence: an input layer, a first residual block, a second residual block, a third residual block, a global pooling layer, and a fully connected layer.

[0090] The present invention adopts three residual blocks in series and sets exponentially increasing dilation coefficients to capture time series features with a wider time range.

[0091] The first residual block, the second residual block, and the third residual block have the same structure, and both contain two gated convolutional layers, namely the first gated convolutional layer and the second gated convolutional layer. The skip connection links add the input data to the output of the second gated convolution to form a residual output to alleviate the problem of gradient disappearance.

[0092] The gated convolution layer controls the output of each convolution kernel through a learnable gating parameter g. The first is the convolution operation, which performs a one-dimensional convolution operation on the input sensor signal. The expansion rate of the convolution kernel will increase exponentially with the increase of network layers. The second is batch normalization, which normalizes the convolution output to speed up convergence. Then comes activation, using the GELU function to activate the batch normalized output. Finally, a gating mechanism and a sparsification strategy are adopted, and the adaptively learned gating parameter g is combined with the convolution output to suppress the output generated by the convolution kernel below the threshold threshold. At the same time, the convolution kernels with |g|≥threshold are pruned to achieve the purpose of sparsification, thereby optimizing the network structure and the amount of computation.

[0093] S5. When the judgment result of the adaptive time convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy is true, it indicates that there is an odor of pet excrement. Then, according to the maximum value of the sensor data of the fixed-length air quality sensor, ammonia sensor, and hydrogen sulfide sensor, the table is looked up, interpolated, and the concentration is calculated, and the detection result and concentration value of the environment to be detected are output.

[0094] The sample set {S1,…S i …S n} is used as the input of the GSA-TCN network model. The GSA-TCN network model determines whether there is a pet excrement odor. If the judgment result shows that there is a pet excrement odor, the maximum value of the sensor data of the air quality sensor, ammonia sensor, and hydrogen sulfide sensor with a fixed length of t4 is used for table lookup, interpolation, and concentration calculation. Finally, the result and concentration value are output together.

[0095] Example 2

[0096] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the pet odor detection method described in Example 1.

[0097] Example 3

[0098] A pet odor detection device comprises a temperature sensor, a sensor array consisting of an air quality sensor and at least one detection sensor, wherein the temperature sensor, the air quality sensor and the detection sensor are all mounted on a PCB board, a microprocessor is mounted on the PCB board, and the temperature sensor, the air quality sensor and the detection sensor are all connected to the microprocessor via the PCB board; the temperature sensor, the air quality sensor and the detection sensor work independently without affecting each other; and the microprocessor processes signals collected by the temperature sensor, the air quality sensor and the detection sensor using the pet odor detection method described in Example 1.

[0099] Furthermore, a circuit unit is also provided on the PCB board. The detection sensor and the air quality sensor are respectively connected to the microprocessor through the circuit unit, and the temperature sensor is directly connected to the microprocessor. The circuit unit includes a filter circuit and an amplifier circuit.

[0100] Further, the detection sensor is at least one of a hydrogen sulfide sensor, an ammonia sensor, an isovaleric acid sensor, a methyl mercaptan sensor, an acetic acid sensor, a trimethylamine sensor or a volatile organic compound (VOC) sensor.

[0101] The detection sensor is used to detect a gas that is a component of pet odor. The air quality sensor is used to detect gases including but not limited to benzene, toluene, formaldehyde, ethanol, alkane, paint, etc. The temperature sensor is used to detect the temperature in the environment. The circuit unit is used to pre-process the sensor signals of the temperature sensor, the air quality sensor, and the detection sensor, and the microprocessor is used to receive and process the sensor signals of the temperature sensor, the air quality sensor, and the detection sensor, and finally output the detection results.

[0102] Furthermore, the type of the detection sensor is at least one of the following: a semiconductor sensor, an electrochemical sensor, a catalytic combustion sensor or an optical sensor.

[0103] Furthermore, the types of the microprocessor include, but are not limited to: an application specific integrated circuit (ASIC), a system on a chip (SoC), a field programmable gate array (FPGA) or a central processing unit (CPU).

[0104] Figure 5 This is an embodiment of a pet odor detection device of the present invention. This embodiment uses an ammonia sensor and a hydrogen sulfide sensor as detection sensors. 1 is a PCB board, 2 is a temperature sensor, 3 is an ammonia sensor, 4 is a hydrogen sulfide sensor, 5 is an air quality sensor, and 6 is a circuit unit and a microprocessor unit. The temperature sensor 2, the ammonia sensor 3, the hydrogen sulfide sensor 4 and the air quality sensor 5 are all welded on the PCB board 1, and are connected to the circuit unit and the microprocessor 6 through the PCB board 1. The temperature sensor 2, the ammonia sensor 3, the hydrogen sulfide sensor 4 and the air quality sensor 5 work independently without affecting each other.

[0105] In the working state, the temperature sensor 2, ammonia sensor 3, hydrogen sulfide sensor 4, and air quality sensor 5 collect data in real time and output them in the form of electrical signals. After the circuit unit performs signal preprocessing such as filtering and amplification, the microprocessor performs analog / digital conversion to form digital signals for processing and outputs the detection results and the concentration value of each odor.

[0106] The pet odor detection device of the present invention can be installed in a cat litter box or other pet excretion places. After the excretion behavior occurs, the sensor array in the pet odor detection device can detect the excrement odor, thereby reporting the excretion results and the concentration of each odor. According to the reported results and odor concentration values, the pet owner can be reminded to clean up the excrement in time through digital display, sound prompts, emails, text messages, or mobile phone APPs to reduce the spread of odors.

[0107] The pet odor detection device described in the present invention can be integrated or configured in air purifiers, air conditioners, and other fresh air system products. By detecting pet odors, strategies such as indoor ventilation and ventilation volume are adopted to keep the indoor smell clean and fresh.

[0108] The pet odor detection device of the present invention can be integrated or configured in a vehicle cabin. By detecting the pet odor in the vehicle cabin, an air conditioning external circulation strategy is adopted to keep the air in the vehicle clean and tidy.

[0109] 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 principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting pet odor, characterized in that: The following steps are involved: S1, collecting data in real time in the environment to be detected through a temperature sensor and a sensor array consisting of an air quality sensor and at least one detection sensor; S2, temperature compensation is performed on the sensing signals of the air quality sensor and the detection sensor by using a weighted linear temperature compensation algorithm and a weighted adaptive whale optimization algorithm; S3, setting a threshold, comparing the signal amplitude of the compensated air quality sensor and the detection sensor with the set threshold, and starting to collect sensor data of the air quality sensor and the detection sensor of a fixed length when any sensor signal amplitude is triggered; S4, inputting the fixed-length air quality sensor and the sensor data of the detection sensor collected in step S3 into the adaptive time convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy for classification and recognition; S5. When the judgment result of the adaptive time convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy is true, it indicates that there is an odor of pet excrement. Then, according to the maximum value of the sensor data of the fixed-length air quality sensor and the detection sensor, the table is looked up, interpolated, and the concentration is calculated, and the detection result and concentration value of the environment to be detected are output.

2. The method for detecting pet odor according to claim 1, characterized in that: The method of performing temperature compensation on the sensing signals of the air quality sensor and the detection sensor by using the weighted linear temperature compensation algorithm and the weighted adaptive whale optimization algorithm comprises the following steps: Step 1: Perform weighted processing on the general linear temperature compensation algorithm to optimize the compensation accuracy in different temperature ranges. The expression is: Y = S-μk (T s -T b ), where Y represents the compensation result, S is the measured voltage value, k is the compensation coefficient, T s is the measured temperature, T b is the reference temperature, μ is the weighting coefficient; in, is the mean value of the compensation result Y, and N is the data length of the compensation result Y; Step 2: Use the weighted adaptive whale optimization algorithm to optimize the weight coefficient μ, find the optimal solution of the weight coefficient μ, and then get the compensation result Y after temperature compensation.

3. The method for detecting pet odor according to claim 2, characterized in that: The weighted adaptive whale optimization algorithm is: Surrounding the Prey: Bubble net attacks prey: Searching for prey: in, is the current optimal solution, is the new position at iteration t+1, D is the distance vector of the whale around the prey or in the random search phase, D ′ is the distance scalar of the bubble net attack phase, e bl is the spiral trajectory contraction term, l is a random value, is a random vector, A is the coefficient vector controlling the direction and step length of the whale's movement, b is the parameter controlling the shape of the spiral trajectory, tmax is the maximum number of iterations, and ω(t) is the configured adaptive weight; The method of using the weighted adaptive whale optimization algorithm to find the optimal solution of the weight coefficient μ is: by configuring the adaptive weight ω(t) to increase the search speed of the whale group, so that The function converges quickly, and then through continuous iteration Update the whale's position to get the optimal solution It is the weighting coefficient μ.

4. The method for detecting pet odor according to claim 3, characterized in that: The structure of the adaptive temporal convolution GSA-TCN network model based on the gated convolution kernel sparsification strategy includes: an input layer, a first residual block, a second residual block, a third residual block, a global pooling layer, and a fully connected layer connected in sequence; The first residual block, the second residual block, and the third residual block have the same structure and all contain two gated convolutional layers: the first gated convolutional layer and the second gated convolutional layer. The expression of the gated convolutional layer is y gate =g⊙(W*x+b), where b is the bias, ⊙ represents element-wise multiplication, W is the weight, x is the input data, and y is the gate It is the gated convolution output; A sparsification mechanism is integrated in the gated convolutional layer: by setting a threshold "threshold" for the gating parameter g, when |g| < threshold, it indicates that the corresponding convolutional kernel has a lower importance, and the corresponding convolutional operation can be ignored or the result of the convolution can be set to 0. The pruning operation of the convolutional kernel is expressed as: where is an indicator function. When the condition holds, m takes the value of 1; otherwise, it takes the value of 0. The sparse operation is expressed as: output =y gate m, y output is the output data after the sparse operation.

5. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the pet odor detection method according to any one of claims 1 to 4.

6. A pet odor detection device, characterized in that: The invention comprises a temperature sensor, a sensor array consisting of an air quality sensor and at least one detection sensor, wherein the temperature sensor, the air quality sensor and the detection sensor are all mounted on a PCB board, a microprocessor is mounted on the PCB board, and the temperature sensor, the air quality sensor and the detection sensor are all connected to the microprocessor through the PCB board; the temperature sensor, the air quality sensor and the detection sensor work independently without affecting each other; and the microprocessor processes the signals collected by the temperature sensor, the air quality sensor and the detection sensor using the pet odor detection method described in any one of claims 1 to 4.

7. The pet odor detection device according to claim 6, characterized in that: The PCB board is also provided with a circuit unit; the detection sensor and the air quality sensor are respectively connected to the microprocessor through the circuit unit, and the temperature sensor is directly connected to the microprocessor.

8. The pet odor detection device according to claim 7, characterized in that: The detection sensor is at least one of a hydrogen sulfide sensor, an ammonia sensor, an isovaleric acid sensor, a methyl mercaptan sensor, an acetic acid sensor, a trimethylamine sensor or a VOC sensor.

9. The pet odor detection device according to claim 8, characterized in that: The types of the microprocessor include, but are not limited to, a dedicated integrated circuit, a system on a chip, a field programmable gate array or a central processing unit.

10. The pet odor detection device according to claim 8 or 9, characterized in that: The detection sensor is of at least one of the following types: a semiconductor sensor, an electrochemical sensor, a catalytic combustion sensor or an optical sensor.

Citation Information

Cited By

  • Deodorization performance detection method for cat litter

    CN120009472A

  • A method for detecting deodorizing performance of cat litter

    CN120009472B

  • Cold source disaster-causing object intelligent identification and early warning method and device integrated with AI algorithm

    CN120125967A

  • Cold source disaster-causing object intelligent identification and early warning method and device integrating AI algorithm

    CN120125967B