Intelligent barking stopping method, device and computer readable storage medium

CN120036250BActive Publication Date: 2026-09-08SHENZHEN CITY LIAONA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410416710.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2026-09-08
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

但是,现有的止吠装置都是针对宠物叫声进行识别,即,都是简单的基于有声音即是或判断声音的大小作为判断依据;并且,这种传统声音识别系统往往无法真实的识别判断是否为真实的狗叫声,只能简单的判断是否存在高分贝值声音存在,从而极其容易造成机器的误判断而执行错误的惩罚,以此反而引起宠物的过激反应,危害宠物的安全

Benefits of technology

[0015] The aforementioned intelligent anti-barking method, device, and computer-readable storage medium provide a technical solution for accurately recognizing dog barks on resource-constrained embedded microcontroller systems through optimized machine learning models and signal processing techniques. Compared with existing technologies, it can identify actual dog barks in scenarios other than isolated barks, and can identify whether the bark is from a dog wearing the intelligent anti-barking device. It can also assist in analyzing the ambient noise level to determine if barking is present, reducing misjudgments and punishments caused by inaccurate recognition, and avoiding excessive reactions from pets. Furthermore, this device reduces reliance on powerful computing resources, lowers the overall system cost, and improves its feasibility and adoption in practical applications. It truly eliminates the need for a connection between the embedded microcontroller system and a PC or cloud, enabling standalone operation of the data model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120036250B_ABST
    Figure CN120036250B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent barking stopping method, device and computer readable storage medium, its method runs in embedded terminal worn on pet body, wherein, preset pet barking model is built-in in embedded terminal;The method comprises: sound acquisition, the sound decibel value of the environmental noise around pet is obtained;Model comparison, if the sound decibel value is greater than preset decibel value, then the collected sound is compared with pet barking model and the comparison result is output;Output punishment, if the comparison result is greater than preset punishment value, then trigger punishment module, stop pet barking.The technical scheme of the present application, through machine learning model and signal processing technology, can realize high-accuracy dog barking recognition on the limited resource embedded system;At the same time, reduce the dependence on powerful computing resources, without connecting with PC end or cloud, realize the single machine operation of data model, improve the feasibility and popularization rate in practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of barking suppression devices, and more particularly to an intelligent barking suppression method, device, and computer-readable storage medium. Background Technology

[0002] With the increasing prevalence of pet dogs in urban residential areas, frequent or prolonged barking has become a significant problem disrupting people's daily lives. Currently, anti-barking devices worn on pets are available on the market, using disciplinary actions to quiet the barking. However, existing anti-barking devices primarily rely on recognizing the sound of a dog's bark; they simply judge based on the presence or volume of sound. Furthermore, these traditional sound recognition systems often fail to accurately identify whether the sound is genuine, merely judging the presence of high-decibel noise. This makes them highly susceptible to misjudgment and incorrect punishment, potentially triggering an overreaction from the pet and endangering its safety. Summary of the Invention

[0003] To overcome the shortcomings of the prior art, embodiments of the present invention provide an intelligent barking prevention method, device, and computer-readable storage medium.

[0004] A smart anti-barking method operates in an embedded terminal worn by a pet, wherein the embedded terminal has a built-in preset pet barking model; the embedded terminal also has a punishment module, which is used to stimulate the pet and stop it from barking; the smart anti-barking method includes the following steps:

[0005] S1, Sound Acquisition, obtains the decibel value of the noise in the pet's surrounding environment;

[0006] S2, Model comparison: If the sound decibel value is greater than the preset decibel value, the collected sound is compared with the pet barking model and the comparison result is output.

[0007] S3, Output penalty: If the comparison result is greater than the preset penalty value, the penalty module is triggered.

[0008] A smart anti-barking device includes an embedded terminal as used in the smart anti-barking method described above; the embedded terminal includes:

[0009] A sound acquisition and detection module is used to acquire ambient noise around the pet, and after ADC conversion, input it to the pet barking model for comparison.

[0010] The punishment module includes any one or more of the following: an electric shock module, a vibration module, and a sound stimulation module.

[0011] A power module, comprising a charging circuit and a voltage regulator circuit; the charging circuit is used to charge the lithium battery inside the embedded terminal, and the voltage regulator circuit is used to provide a regulated voltage to the embedded terminal;

[0012] The display module is used to display the working status of the embedded terminal.

[0013] The button module includes a power button, a mode button, and an intensity button; the power button is used to control the power on and off of the embedded terminal; the mode button is used to select the current punishment module; and the intensity button is used to control the intensity level of the punishment module.

[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described intelligent barking prevention method.

[0015] The aforementioned intelligent anti-barking method, device, and computer-readable storage medium provide a technical solution for accurately recognizing dog barks on resource-constrained embedded microcontroller systems through optimized machine learning models and signal processing techniques. Compared with existing technologies, it can identify actual dog barks in scenarios other than isolated barks, and can identify whether the bark is from a dog wearing the intelligent anti-barking device. It can also assist in analyzing the ambient noise level to determine if barking is present, reducing misjudgments and punishments caused by inaccurate recognition, and avoiding excessive reactions from pets. Furthermore, this device reduces reliance on powerful computing resources, lowers the overall system cost, and improves its feasibility and adoption in practical applications. It truly eliminates the need for a connection between the embedded microcontroller system and a PC or cloud, enabling standalone operation of the data model. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a framework diagram of an intelligent barking prevention method and device according to an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] In one embodiment, such as Figure 1 As shown, an intelligent anti-barking method and an intelligent anti-barking device are provided. The intelligent anti-barking device includes an embedded terminal worn on the pet and a PC or cloud-based platform for creating intelligent barking models. The intelligent anti-barking method runs on the embedded terminal, i.e., an embedded microcontroller system.

[0020] Specifically, the embedded microcontroller system uses ARM Cortex-M, including:

[0021] Sound acquisition module: Collects external sounds, converts them using an ADC, and then inputs them into the in8 model for inference and comparison.

[0022] Wearing detection module: Detects whether this device is worn around the dog's neck. If it is worn correctly, it sends a Y signal; if it is not worn correctly, it sends an N signal.

[0023] Sound detection module: detects the volume of ambient noise, with a judgment threshold of 65 dB (i.e., the preset decibel value). If it is greater than 65 dB, a Y signal is sent to proceed to the next step of output punishment; if it is less than 65 dB, an N signal is sent.

[0024] Display module: Displays the current operating status, such as power on, power off, and current mode.

[0025] Power module: Composed of a charging circuit and a voltage regulator circuit, which respectively charge the internal lithium battery of the device and provide a regulated voltage for the entire system.

[0026] Discipline module: Used to stimulate the pet and stop it from barking. It includes any one or more of the following: electric shock module, vibration module, and sound stimulation module. The electric shock module generates an electrostatic shock upon receiving a drive command; the vibration module generates a vibration cue upon receiving a drive command; and the sound stimulation module generates an audible or ultrasonic cue upon receiving a drive command, with a frequency range of 1.25kHz-30kHz.

[0027] Button module: includes power button, mode button, intensity button, which respectively control the power on and off of the device, the working mode (i.e. the output punishment method) and the intensity level in that mode.

[0028] The intelligent anti-barking method mainly includes the following process:

[0029] S1, Sound Acquisition, obtains the decibel value of the noise in the pet's surrounding environment;

[0030] S2, Model Comparison: If the sound decibel value is greater than the preset decibel value, such as 65dB, the collected sound will be compared with the pet barking model and the comparison result will be output.

[0031] S3 outputs the penalty; if the comparison result is greater than the preset penalty value, the penalty module is triggered.

[0032] Specifically, the workflow of an embedded terminal is as follows:

[0033] When the corresponding power button in the button module is pressed, the power-on command is transmitted to the power module to start the system's regulated power supply, with a regulated voltage of 3.3V. After the regulated 3.3V flows to the ARM Cortex-M and powers on, the ARM Cortex-M initializes and completes the power-on process. When the power button is pressed again, a power-off command is sent to the ARM Cortex-M, which then sends a power-off command to the power module to shut down the entire system.

[0034] After normal power-on, the wear detection module automatically detects whether the device is worn around the pet's neck. If it is worn correctly, a working command is sent to the ARM Cortex-M, which then turns on the power switch to power on the sound acquisition and detection module and start working. If it is not worn correctly, a power-off command is sent to the ARM Cortex-M, and the entire device will be powered off after 30 seconds by default. The default power-off time can be flexibly set in advance.

[0035] The mode button on the button module is used to adjust the device's operating mode to sound stimulation mode, vibration mode, or electric shock mode. The intensity button on the button module allows setting the intensity level for each of these three modes. Simultaneously, the display module shows the current operating mode, intensity level, and battery level, providing a clear understanding of the device's current operating status and enabling timely adjustments.

[0036] The sound acquisition and detection module is operational. When a dog barks, it detects whether the current sound level exceeds 65 dB. If it does, it sends a command to the ARM Cortex-M module. The ARM Cortex-M module compares the input sound signal with a preset intelligent barking model and outputs the comparison result. The comparison result is then compared with a preset punishment value, triggering the punishment module. The preset punishment value is 0.9. When the comparison result is greater than or equal to 0.9, a dog bark is detected. At this point, according to the current operating mode settings, the corresponding trigger command is output to the three warning modules to execute the corresponding warning or punishment.

[0037] 1) When the comparison result is ≥0.9, the ARM Cortex-M sends a trigger sound warning command to the sound stimulation module to execute a buzzer alarm. The alarm sound frequency will increase with the number of triggers, with a frequency range of 1.25K-30KHZ. The execution intensity is set according to the system settings after power-on.

[0038] 2) When the comparison result is ≥0.9, the ARM Cortex-M sends a vibration warning command to the vibration module to execute the vibration alarm. The intensity of the execution is set according to the system settings after power-on.

[0039] 3) When the comparison result is ≥0.9, the ARM Cortex-M sends a trigger electric shock warning command to the electric shock module to execute electrostatic pulse impact punishment. The intensity of the punishment is set according to the system power-on settings.

[0040] 4) When the comparison result is <0.9, the ARM Cortex-M will not perform any action, but will continue to analyze and calculate the next sound electrical signal and output the comparison result.

[0041] The intelligent anti-barking device also includes a PC or cloud platform, which is used to create pet barking models, specifically including the following steps:

[0042] S01, Audio Acquisition: Recording various dog barks and background sounds in various situations using high-definition recording equipment.

[0043] S02, Data Preprocessing: The collected dog barking and background sound audio are edited for 1 second, noise is reduced, dynamic range is compressed, and converted to WAV format with a sampling rate of 16kHz. The dog barking is labeled as "dog" and the noise is labeled as "noise". The data is then classified into training set, validation set and test set.

[0044] S03, Feature Extraction: Mel Frequency Energy (MFE) is used as a feature to extract features from the sound signal. Since the audio for feature extraction is a dog bark, MFE is particularly suitable for feature extraction of non-human speech. This makes MFE more suitable for deploying the resulting intelligent barking model onto an embedded microcontroller system for real-time recognition in some real-time computing or resource-constrained applications.

[0045] S04, Model Training: A convolutional neural network was built using Keras, and TensorFlow was used to train the pet barking model on the extracted feature data. First, a CNN model was built; then, training data labeled "dog" and "noisy" was used to train the model. Simultaneously, validation data was used to monitor performance during training to avoid overfitting.

[0046] S05, Model Evaluation: Use a test set to evaluate model performance and understand how the model performs on new, unseen data. Based on the model's performance, layers can be added or removed, and parameters such as the number of neurons can be adjusted to obtain the optimal-performing model.

[0047] S06, Output Results: Visualize the prediction results for the new data. The visualization output includes tables and distribution charts, and is in byte-based format with values ​​ranging from 0.0000 to 1. For example, after inputting a sample, if the result of the sound comparison is 1 (greater than 0.9, where 0.9 is an approximation value in the visualization output), it is determined to be a dog barking sound.

[0048] Furthermore, in the S03 feature extraction stage, the feature extraction process is as follows:

[0049] S031, pre-emphasis, increases the signal strength in the high-frequency range using the following formula: Where x(n) is the original signal, y(n) is the pre-emphasized signal, and α is the pre-emphasis coefficient, which is greater than or equal to 0.9;

[0050] S032, Framing and Window Function: The pre-emphasized signal is divided into frames, and a window function, such as a Hamming window, is applied to each frame to reduce signal discontinuities at frame boundaries.

[0051] S033, Fast Fourier Transform, applies Fast Fourier Transform (FFT) to each frame to obtain the spectrum of the signal. For each frame of signal x(n), apply FFT to obtain the spectrum X(k), where k is the frequency index;

[0052] S034, Mel filter bank, applies a set of Mel filter banks to the FFT result. Each filter is mapped to a specific frequency region on the Mel scale to simulate the auditory characteristics of the human ear; each filter covers a specific frequency range; the relationship between the Mel frequency fmel and the actual frequency f is expressed by the following formula:

[0053] ;

[0054] S035, Energy Calculation: Calculates the energy output of each Mel filter. The MFE directly uses these energy values ​​as features without further logarithmic transformation or discrete cosine transform (DCT). The output energy Em of each filter is calculated by summing the squares of the filter outputs, as shown in the following formula:

[0055]

[0056] Where Em is the output energy of the m-th filter, X(k) is the spectrum obtained by Fast Fourier Transform, Hm(k) is the frequency response of the m-th Mel filter, and the summation is performed on all frequencies k covered by the filter.

[0057] Furthermore, after obtaining the intelligent barking model, the process also includes compressing, converting, and deploying the model to an embedded terminal, specifically including:

[0058] S07, Model Compression and Conversion: Quantize the pet barking model and compress it into a dataset that runs on an embedded terminal. Quantization is a technique to reduce model size by reducing the precision of numerical values ​​in the model, making the model more suitable for running on resource-constrained embedded microcontroller systems. For example, converting a TensorFlow model to a TensorFlow Lite model.

[0059] S08, Model Deployment, converts the dataset into a C language array format and downloads it to the embedded terminal. That is, in order to use the converted in8 model on the embedded microcontroller system, the model file also needs to be converted into a C array format. For example, this can be achieved using the xxd tool in TensorFlow Lite Micro; the converted C array is then included in the embedded microcontroller system code, allowing direct access to the model data.

[0060] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the intelligent barking prevention method described in the above method embodiment. To avoid repetition, it will not be described again here.

[0061] The intelligent barking prevention method, device, and computer-readable storage medium provided by this invention enable high-accuracy dog ​​bark recognition even on resource-constrained embedded microcontroller systems through optimized machine learning models and signal processing techniques. At the same time, it reduces reliance on powerful computing resources and lowers system costs. It truly eliminates the need for connection between the embedded microcontroller system and a PC or cloud, enabling stand-alone operation of the data model and improving its feasibility and popularity in practical applications.

[0062] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A smart anti-barking method operating on a smart anti-barking device, characterized in that, The intelligent anti-barking device includes an embedded terminal; the embedded terminal has a built-in preset pet barking model; the embedded terminal also has a punishment module, which is used to stimulate the pet and stop it from barking; the intelligent anti-barking method includes the following steps: S1, Sound Acquisition, obtains the decibel value of the noise in the pet's surrounding environment; S2, Model comparison: If the sound decibel value is greater than the preset decibel value, the collected sound is compared with the pet barking model and the comparison result is output. S3, Output penalty: If the comparison result is greater than the preset penalty value, the penalty module is triggered. The embedded terminal includes: A sound acquisition and detection module is used to acquire ambient noise around the pet, and after ADC conversion, input it to the pet barking model for comparison. The punishment module includes any one or more of the following: an electric shock module, a vibration module, and a sound stimulation module. A power module, comprising a charging circuit and a voltage regulator circuit; the charging circuit is used to charge the lithium battery inside the embedded terminal, and the voltage regulator circuit is used to provide a regulated voltage to the embedded terminal; A display module is used to display the working status of the embedded terminal; The button module includes a power button, a mode button, and an intensity button; the power button is used to control the power on and off of the embedded terminal; the mode button is used to select the current punishment module; and the intensity button is used to control the intensity level of the punishment module. The intelligent anti-barking device also includes a PC or cloud platform, which is used to create the pet barking model. Creating the pet barking model includes the following steps: S01, Audio Acquisition: Audio recording of various dog barks and background sounds using high-definition recording equipment; S02, Data preprocessing: The barking and background sounds are edited, denoised, and have their dynamic range compressed for a preset duration, and converted into WAV format files with a preset sampling rate; The barking and background sounds are divided into different sound tags and classified into training set, validation set, and test set; S03, Feature extraction: Feature extraction is performed on the data after data preprocessing using Mel frequency energy; S04, Model training: Convolutional neural networks are constructed using Keras, and TensorFlow is used to train the data after feature extraction to obtain the pet barking model; S05, Model Evaluation: Evaluate the performance of the pet barking model using the test set, obtain the performance of the pet barking model on new and unseen data, add or delete layers to the pet barking model, and adjust the parameters of the pet barking model. S06, Results Output: For each input sample, a visual results output is created; The feature extraction also includes: S031, pre-emphasis, increases the signal strength in the high-frequency range using the following formula: Where x(n) is the original signal, y(n) is the pre-emphasized signal, and α is the pre-emphasis coefficient, which is greater than or equal to 0.9; S032, Framing and Window Function: The pre-emphasized signal is divided into frames, and a window function is applied to each frame; S033, Fast Fourier Transform, applies Fast Fourier Transform to each frame to obtain the spectrum of the signal. For each frame of signal x(n), the spectrum X(k) is obtained, where k is the frequency index. S034, Mel filter bank, applies a set of Mel filter banks to the results of the Fast Fourier Transform, with each filter mapped to a specific frequency region on the Mel scale; each filter covers a specific frequency range; the relationship between the Mel frequency fmel and the actual frequency f is expressed by the following formula: ; S035, Energy Calculation: Calculates the energy output of each Mel filter. The output energy Em of each filter is calculated by summing the squares of the filter outputs, as shown in the following formula: Where Em is the output energy of the m-th filter, X(k) is the spectrum obtained by the fast Fourier transform, Hm(k) is the frequency response of the m-th Mel filter, and the summation is performed on all frequencies k covered by the filter.

2. The intelligent barking prevention method operating on an intelligent barking prevention device as described in claim 1, characterized in that, The punishment module includes any one or more of an electric shock module, a vibration module, and a sound stimulation module; the electric shock module is used to generate an electrostatic shock after receiving a driving command; the vibration module is used to generate a vibration prompt after receiving a driving command; the sound module is used to generate a sound or ultrasound prompt after receiving a driving command, and the frequency range generated by the sound stimulation module is 1.25KHZ-30KHZ.

3. The intelligent barking prevention method operating on an intelligent barking prevention device as described in claim 1 or 2, characterized in that, Before S1, it also includes: S0, Wearing detection: Automatic detection is performed after the embedded terminal is powered on. If the embedded terminal is detected to be worn on the pet, proceed to S1; if the embedded terminal is not detected to be worn correctly on the pet, the device will automatically shut down after a predetermined time.

4. The intelligent barking prevention method operating on an intelligent barking prevention device as described in claim 1, characterized in that, The embedded terminal also includes: The wear detection module is used to detect whether the smart anti-barking device is correctly worn around the pet's neck.

5. The intelligent barking prevention method operating on an intelligent barking prevention device as described in claim 1, characterized in that, Following S04, it also includes: S07, Model Compression and Conversion: The pet barking model is quantized and compressed into a dataset running on the embedded terminal. S08, Model Deployment: Convert the dataset into a C language array format and download it to the embedded terminal.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent barking prevention method as described in claim 1, which operates on an intelligent barking prevention device.

Citation Information

Patent Citations

  • Pet bark stopping device and method based on convolutional neural network

    CN108157219A

  • Barking stopper control device with noise reduction function and method thereof

    CN115777567A