Snore recognition method and apparatus, device, and storage medium

By analyzing the envelope characteristics of the audio signal and pillow pressure signal and combining the ambient sound to judge snoring, the complexity and cost problems of existing deep learning algorithms are solved, and efficient and accurate snoring recognition is achieved.

WO2025130979A1PCT designated stage expired Publication Date: 2025-06-26ZHANGZHOU SOLEX SMART HOME CO LTD

Patent Information

Application Number
PCT/CN2024/140602
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-20
Filing Date
2024-12-19
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

In the prior art, the snore recognition method based on deep learning algorithms has problems such as complex calculations, high cost and long development cycle, and it is difficult to achieve productization.

Method used

By obtaining the audio signal and pillow pressure signal, drawing the envelope line, analyzing the associated data of the beginning, midpoint and end point of the envelope, and combining the ambient sound to make snoring sound judgments, reducing the calculation amount and implementation difficulty.

Benefits of technology

It realizes the accuracy and efficiency of snore recognition, reduces storage consumption and development costs, simplifies the development process, and has good industrial practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140602_26062025_PF_FP_ABST
    Figure CN2024140602_26062025_PF_FP_ABST
Patent Text Reader

Abstract

A snore recognition method and apparatus, a device, and a storage medium. The method comprises: acquiring an audio signal within a preset time period (S101); plotting an envelope line on the basis of the audio signal, and acquiring the number of envelopes in the envelope line (S102), wherein each envelope comprises a section of ascending curve and a section of descending curve; acquiring associated data of a starting point, a midpoint and an end point of each envelope (S103), wherein the midpoint is a point with a maximum sound loudness value, and the associated data comprises sound loudness; and performing snore judgment on the audio signal within the preset time period on the basis of the associated data of the starting point, the midpoint and the end point of each envelope; and if the sound loudness of the starting point, the sound loudness of the midpoint and the sound loudness of the end point are all different, and the sound loudness of the midpoint is greater than or equal to a second preset loudness, judging that the audio signal within the preset time period has a snore (S104). The snore is recognized on the basis of the sound loudness of the audio signal, and a recognition algorithm is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Snoring recognition method, device, equipment and storage medium Technical Field

[0001] The present application relates to the technical field of snoring recognition, and in particular to a snoring recognition method, apparatus, device and storage medium. Background Art

[0002] Obstructive sleep apnea-hypopnea syndrome (OSAHS) is a common condition that is often overlooked. It is primarily caused by sleep apnea, hypoventilation, or no ventilation, which can cause daytime sleepiness and recurring apnea episodes. The most notable symptom is snoring during sleep, so snoring recognition can effectively detect possible OSAHS.

[0003] The existing technology generally uses deep learning algorithms to identify snoring. Comparative document 1, "A snoring monitoring method and system based on deep learning algorithm and a corresponding electric bed control method and system" (application number 202110803746.6), discloses the use of a pre-trained deep learning model for deep feature extraction and classification to classify each audio clip into audio slices containing snoring and audio slices that do not contain snoring. Existing deep learning methods learn the characteristics of snoring by learning a large number of different snoring sounds, thereby identifying snoring. However, the processing based on AI algorithms is complex and computationally intensive, the cost is high, and the development cycle is long, which is not conducive to productization. Summary of the Invention

[0004] In order to solve the above technical problems, the present invention provides a snoring recognition method, device, equipment and storage medium. Based on audio signals and pillow pressure signals, snoring is judged by monitoring audio changes and pressure value changes. The computational complexity is smaller than that of deep learning methods and is easy to implement.

[0005] The present invention adopts the following technical solutions:

[0006] In a first aspect, a snoring recognition method includes:

[0007] Acquire audio signals within a preset time period;

[0008] Drawing an envelope based on the audio signal, and obtaining the number of envelopes in the envelope; wherein each envelope includes an ascending curve and a descending curve;

[0009] Obtaining associated data for the start point, midpoint, and end point of each envelope; wherein the midpoint is the point with the maximum sound loudness; the associated data includes the sound loudness;

[0010] Based on the associated data of the starting point, midpoint and end point of each envelope, snoring is judged on the audio signal within the preset time period; if the sound loudness of the starting point, the sound loudness of the midpoint and the sound loudness of the end point are all different, and the sound loudness of the midpoint is greater than or equal to a second preset loudness, it is judged that the audio signal within the preset time period contains snoring.

[0011] Preferably, before drawing the envelope based on the audio signal, the method further includes:

[0012] The audio signal is processed by reducing the sampling rate to obtain a dimensionally reduced audio signal.

[0013] Preferably, the step of drawing an envelope based on the audio signal and obtaining the number of envelopes in the envelope specifically includes:

[0014] Converting the audio signal into sound loudness data, and drawing an initial envelope based on the sound loudness data;

[0015] Extract the extreme points of the sound loudness data and generate a preliminary extreme point array;

[0016] Traverse the extreme point array, mark the three extreme points that meet the "V" shape, and obtain the associated data of the three extreme points; the three extreme points are the starting point, the lowest point, and the end point;

[0017] Based on the preset sound loudness conditions and time conditions, the extreme points that do not meet the conditions are removed;

[0018] Obtain the optimized envelope based on the extreme points after the removal operation;

[0019] Based on the optimized envelope, the number of envelopes is obtained.

[0020] Preferably, after obtaining the associated data of each envelope starting point, midpoint and end point, the method further includes:

[0021] Get the loudness of the ambient sound;

[0022] The step of determining snoring sound on the audio signal within a preset time period based on the associated data of the starting point, midpoint, and end point of each envelope specifically includes:

[0023] Snoring is determined for the audio signal within a preset time period based on the associated data of the starting point, the associated data of the midpoint, the associated data of the end point of each envelope and the sound loudness of the ambient sound.

[0024] Preferably, the snoring judgment of the audio signal within the preset time period based on the associated data of the starting point, the associated data of the midpoint, the associated data of the end point of each envelope and the sound loudness of the ambient sound specifically includes:

[0025] Determining whether the envelope is a valid envelope based on the sound loudness of the ambient sound and the sound loudness of the midpoint of the envelope;

[0026] When the envelope is valid, the sound loudness at the start point and the sound loudness at the end point of the envelope are updated based on the sound loudness of the ambient sound;

[0027] Based on the updated sound loudness of the envelope starting point, the sound loudness of the midpoint, the sound loudness of the end point and the sound loudness of the ambient sound, snoring is determined for the audio signal within the preset time period.

[0028] Preferably, the determining whether the envelope is a valid envelope based on the sound loudness of the ambient sound and the sound loudness of the midpoint of the envelope specifically includes:

[0029] When the sound loudness at the midpoint of the envelope is not greater than the sound loudness of the ambient sound, the envelope is judged to be invalid;

[0030] When the sound loudness at the midpoint of the envelope is greater than the sound loudness of the ambient sound, and the difference between the two is within a first preset loudness, the envelope is determined to be invalid;

[0031] Otherwise, the envelope is determined to be valid.

[0032] Preferably, the associated data further includes a time point; and the updating of the sound loudness at the start point and the end point of the envelope based on the sound loudness of the ambient sound specifically includes:

[0033] When the sound loudness of the starting point of the envelope is less than the sound loudness of the ambient sound VN, find two adjacent points in the envelope; where the sound loudness EVnu of one point is greater than the sound loudness of the ambient sound, the corresponding time point is recorded as ETnu; the sound loudness EVnd of the other point is less than the sound loudness of the ambient sound, the corresponding time point is recorded as ETnd; the intersection of these two points is used as the new starting point, and the time point of the new starting point is ETns = ETnd + (ETnu - ETnd) * (VN - EVnd) / (EVnu - EVnd); the sound loudness of the starting point is updated based on the time point of the new starting point;

[0034] When the sound loudness of the envelope starting point is greater than the sound loudness VN of the ambient sound, find two adjacent points in the envelope;

[0035] The sound loudness EVnu of one point is greater than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnu; the sound loudness EVnd of another point is less than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnd; the intersection of these two points is taken as the new end point, and the time point of the new end point is ETne = ETnd-(ETnd-ETnu)*(VN-EVnd) / (EVnu-EVnd); the sound loudness of the end point is updated based on the time point of the new end point.

[0036] Preferably, the associated data further includes a time point; and the snoring judgment of the audio signal within a preset time period based on the sound loudness at the start point, midpoint, end point, and ambient sound of the updated envelope specifically includes:

[0037] If the sound loudness at the starting point, the sound loudness at the midpoint, and the sound loudness at the end point are all different, and the sound loudness at the midpoint and the sound loudness of the ambient sound are greater than or equal to a second preset loudness, and the time difference between the end point and the starting point is within a first preset time range, it is determined that the audio signal within the preset time period contains snoring.

[0038] Preferably, after determining that the audio signal within the preset time period contains snoring, the method further includes:

[0039] Obtaining a pressure signal exerted by the pillow used by the target subject within a preset time period;

[0040] Determine the amplitude of the pressure signal;

[0041] When the amplitude of the pressure signal exceeds a preset threshold value within a preset period, it is recognized that snoring occurs within the preset period.

[0042] Preferably, when the amplitude of the pressure signal exceeds a preset threshold value within a preset time period, identifying that there is snoring within the preset time period specifically includes:

[0043] When the amplitude of a pressure signal exceeds a preset threshold within a preset time period, the peak position of the audio signal corresponding to that time is marked, and the number of times the amplitude exceeds the preset threshold is marked;

[0044] When the number is greater than or equal to 1, get the time interval between two times;

[0045] When the time interval is within the second preset time range, it is recognized that there is snoring within the preset time period.

[0046] In a second aspect, a snoring recognition device includes:

[0047] An audio signal acquisition module, used to acquire audio signals within a preset time period;

[0048] An envelope number acquisition module is used to draw an envelope line based on the audio signal and obtain the number of envelopes in the envelope line; wherein each envelope includes an ascending curve and a descending curve;

[0049] The sound loudness and time acquisition module is used to obtain the associated data of the starting point, midpoint and end point of each envelope; wherein the midpoint is the point with the maximum sound loudness value; the associated data includes the sound loudness;

[0050] The snoring detection module is configured to detect snoring in the audio signal within a preset time period based on the associated data of the starting point, midpoint, and end point of each envelope; if the sound loudness at the starting point, the sound loudness at the midpoint, and the sound loudness at the end point are all different, and the sound loudness at the midpoint is greater than or equal to a second preset loudness, the audio signal within the preset time period is determined to contain snoring.

[0051] In a third aspect, a snoring recognition and control device includes:

[0052] processor; and

[0053] a memory for storing executable instructions of the processor;

[0054] The processor is configured to perform the snoring recognition method by executing the executable instructions.

[0055] The snoring recognition device is set on a pillow, including: a pillow body, an air pump box, and an air tube set between the pillow body and the air pump box. One or more air bags are set in the pillow body; the air pump box is used to inflate, deflate or maintain pressure in the air bags.

[0056] In a fourth aspect, a computer-readable storage medium stores a computer program, wherein the computer program implements any one of the snore recognition methods when executed by a processor.

[0057] The present invention has the following beneficial effects:

[0058] (1) The present invention collects audio signals in real time and performs dimensionality reduction processing on the collected audio signals, which can greatly reduce storage consumption and retain most of the time domain features;

[0059] (2) Based on the preset sound loudness conditions and time conditions, the present invention removes the extreme points that do not meet the conditions, which can clear the interference clutter and eliminate the interference of wavelet envelope. In combination with the ambient sound, the time node of the audio signal envelope can be better determined;

[0060] (3) The present invention determines snoring based on the associated data of each envelope's starting point, midpoint, and endpoint, as well as the ambient sound loudness, for the audio signal within a preset time period. This greatly improves the accuracy of preliminary recognition through screening and misjudgment analysis.

[0061] (4) When the present invention preliminarily determines that there is snoring based on the audio signal, it further determines the time interval between continuous snoring based on the pressure signal of the pillow, thereby improving the accuracy of recognition.

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] FIG1 is a flow chart of a method for snore recognition based on an audio signal according to an embodiment of the present invention;

[0064] FIG2 is a flow chart of a method for snoring recognition based on audio signals and pressure signals according to an embodiment of the present invention;

[0065] FIG3 is a schematic diagram of an audio signal before and after dimensionality reduction according to an embodiment of the present invention; wherein (a) represents the original signal, and (b) represents the signal after dimensionality reduction;

[0066] FIG4 is a schematic diagram of envelope curves before and after optimization according to an embodiment of the present invention; wherein (a) represents before optimization, and (b) represents after optimization;

[0067] FIG5 is a schematic diagram of an envelope according to an embodiment of the present invention;

[0068] FIG6 is a schematic diagram of ambient sound according to an embodiment of the present invention;

[0069] FIG7 is a schematic diagram of an envelope drawn based on ambient sound according to an embodiment of the present invention;

[0070] FIG8 is a schematic diagram of a pressure signal of a pillow used by a target subject after filtering according to an embodiment of the present invention;

[0071] FIG9 is a schematic diagram of a pillow used by a target subject according to an embodiment of the present invention;

[0072] FIG10 is a block diagram of a snoring recognition device according to an embodiment of the present invention;

[0073] FIG11 is a schematic diagram of the hardware structure of an electronic device for executing a snoring recognition method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0075] In the description of the present invention, it should be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0076] In the description of the present invention, it should be noted that the terms “first” and “second” are only used for descriptive purposes and should not be understood as indicating or implying relative importance.

[0077] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, step identifiers S101, S102, S103, etc. are only used for convenient expression and do not represent the execution order. The corresponding execution order can be adjusted.

[0078] As shown in FIG1 , the present invention provides a snoring recognition method, including:

[0079] S101, obtaining an audio signal within a preset time period;

[0080] S102, drawing an envelope based on the audio signal, and obtaining the number of envelopes in the envelope; wherein each envelope includes an ascending curve and a descending curve;

[0081] S103, obtaining associated data of the start point, midpoint, and end point of each envelope; wherein the midpoint is the point with the maximum sound loudness value; the associated data includes the sound loudness;

[0082] S104: Based on the associated data of the start point, midpoint, and end point of each envelope, the audio signal within the preset time period is judged to be snoring. If the sound loudness at the start point, the sound loudness at the midpoint, and the sound loudness at the end point are all different, and the sound loudness at the midpoint is greater than or equal to a second preset loudness, it is determined that the audio signal within the preset time period contains snoring.

[0083] Steps S101 to S104 of the snoring recognition method of this embodiment can be implemented using an anti-snoring pillow device (the pillow used by the target subject) and / or an intelligent terminal device, as long as these devices have sound collection capabilities (such as a microphone) and / or processor capabilities (such as a microcontroller). Specifically, one terminal can be responsible for sound collection (such as the anti-snoring pillow) and another terminal can be responsible for sound processing (such as a mobile phone), or both collection and processing can be performed by a single terminal, without any specific limitation in this embodiment. Furthermore, the intelligent terminal device can be a mobile phone, tablet computer, wearable device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This embodiment does not impose any restrictions on the specific type of terminal device.

[0084] In this embodiment, in order to further improve the recognition accuracy, after initially determining that there is snoring based on the audio signal, further determination is made in combination with the pressure signal. Specifically, the following steps are also included:

[0085] Obtaining a pressure signal exerted by the pillow used by the target subject within a preset time period;

[0086] Determine the amplitude of the pressure signal;

[0087] When the amplitude of the pressure signal exceeds a preset threshold value within a preset period, it is recognized that snoring occurs within the preset period.

[0088] 2 , the following description will be made by taking the monitoring of the audio signal and the airbag pressure signal (the airbag pressure signal of the pillow used by the target object) within a monitoring interval with a preset time period of 3 seconds as an example.

[0089] Step 1: Select a monitoring interval of 3 seconds to monitor the audio signal and the airbag pressure signal, with a buffer interval of 1 second (the duration of snoring is generally about 1 second to 2 seconds, and the interval between continuous snoring is between 3 and 5 seconds, so the monitoring interval for snoring is selected as 3 seconds).

[0090] Step 2, audio signal dimensionality reduction processing, the collected audio signal is stored at a reduced sampling rate, as shown in Figure 3. Using the reduced-dimensional audio signal for subsequent processing can greatly reduce storage consumption and retain most of the time domain features.

[0091] Specifically, if the sampling rate is reduced to 314 Hz to extract the audio signal, it means that the audio signal is extracted once every 314 points.

[0092] Step 3: Draw an envelope for the audio signal after dimensionality reduction, record the ambient sound, and preliminarily determine whether it is snoring. The specific steps are as follows.

[0093] (1) The audio sampling rate is 16K, and the original audio data volume of 3s is 48K. The original audio data is taken at fixed intervals, reduced to 1K, and finally processed into the sound loudness value (DB).

[0094] (2) Extract the extreme points of the 1K sound loudness data to form a preliminary extreme point array.

[0095] (3) Traverse the extreme point array and mark the three extreme points that meet the "V" shape. The starting point of the "V" shape is recorded as Pns, the corresponding sound loudness is recorded as Vns, and the corresponding time point is recorded as Tns. The lowest point is recorded as Pnm, the corresponding sound loudness is recorded as Vnm, and the corresponding time point is recorded as Tnm. The end point is recorded as Pne, the corresponding sound loudness is recorded as Vne, and the corresponding time point is recorded as Tne.

[0096] (4) When the following conditions are met, remove the lowest point of the "V" shape until the following conditions are no longer met:

[0097] a) When (Tne-Tns) < 400ms, remove the lowest point of the "V" shape;

[0098] b) When

[0099] 400ms≤(Tne-Tns)<1000ms and (Vne-Vnm)≤18db and (Vns-Vnm)≤18db, remove the lowest point of the "V" shape;

[0100] c) When

[0101] 1000ms≤(Tne-Tns)<1400ms and (Vne-Vnm)≤15db and (Vns-Vnm)≤15db, remove the lowest point of the "V" shape;

[0102] d) When

[0103] 1400ms≤(Tne-Tns)<1800ms and (Vne-Vnm)≤12db and (Vns-Vnm)≤12db, remove the lowest point of the "V" shape;

[0104] e) When

[0105] 1800ms≤(Tne-Tns)<2200ms and (Vne-Vnm)≤9db and (Vns-Vnm)≤9db, excluding the lowest point of the "V" shape;

[0106] f) When

[0107] 2200ms≤(Tne-Tns)<2600ms and (Vne-Vnm)≤7db and (Vns-Vnm)≤7db, excluding the lowest point of the "V" shape;

[0108] g) When

[0109] 2600ms≤(Tne-Tns)<3000ms and (Vne-Vnm)≤5db and (Vns-Vnm)≤5db, excluding the lowest point of the "V" shape.

[0110] The schematic diagram of the envelope before and after optimization is shown in Figure 4. The purpose of this operation is to remove interference clutter, eliminate wavelet envelope interference, and combine it with the ambient sound to better determine the time node of the sound signal envelope.

[0111] (5) After step (4), the envelope points (envelope points are the points that make up the envelope line) and envelope line of the 3-second audio data are obtained. The envelope points are traversed, and the total number of envelopes is recorded as n. The starting point, midpoint and end point of each envelope (a curve containing only one rising curve and one falling curve can be regarded as an envelope segment, and continuous rising or continuous falling can be regarded as the same segment, as shown in Figure 5) are marked. The sound loudness corresponding to the starting point is recorded as EVns, and the corresponding time point is recorded as ETns. The sound loudness corresponding to the midpoint is recorded as EVnm, and the corresponding time point is recorded as ETnm. The sound loudness corresponding to the end point is recorded as EVne, and the corresponding time point is recorded as Etne.

[0112] (6) The loudness value of the current sleeping environment sound is recorded as VN. The VN value is determined by the following method: if the number of envelopes contained in the current 3 seconds of audio is less than or equal to 2, and the loudness value fluctuation of the envelope does not exceed 0.8dB, then it can be considered that there is no other sound in the 3 seconds and it belongs to the sleeping environment sound. The average loudness value of the 3 seconds of audio is taken as the VN value. The judgment formula is recorded as n≤2 and (EVnm-EVns)≤0.8dB and (EVnm-EVne)≤0.8dB.

[0113] 6 , the dotted line represents the loudness VN of the ambient sound. Referring to FIG7 , the dotted line represents the determined ambient sound VN.

[0114] By recording the ambient sound, the audio signal can be cut and the number of envelopes, start and end points, and amplitude can be further determined.

[0115] (7) If the loudness value of the sleeping environment sound is not obtained, continue to obtain it without making snoring recognition judgment, and repeat the previous step (6).

[0116] (8) If the loudness value of the sleeping environment sound has been obtained, the starting point, midpoint, and end point of the envelope are further narrowed according to the loudness of the environment sound, as follows.

[0117] When EVnm ≤ VN, this envelope is invalid;

[0118] When EVnm > VN and (EVnm - VN) ≤ 1 db, this envelope is invalid;

[0119] When EVnm > VN and (EVnm - VN) > 1 db, this envelope is valid, and the number of valid envelopes is denoted as EN.

[0120] (9) If EN = 0, update VN and repeat the previous step (8).

[0121] (10) If EN ≠ 0, traverse all envelopes, and recalculate the start and end points of the envelope based on the VN value as follows.

[0122] a) When EVns < VN, it indicates that there is an intersection between the ambient sound and the rising part of this envelope. Find two adjacent points in this envelope, one point is greater than VN, the corresponding sound loudness is denoted as EVnu, the corresponding time point is denoted as ETnu, and one is less than VN, the corresponding sound loudness is denoted as EVnd, the corresponding time point is denoted as ETnd. The intersection of the two adjacent points is used as the new start point, and the time point ETns = ETnd + (ETnu - ETnd) * (VN - EVnd) / (EVnu - EVnd);

[0123] b) When EVns > VN, it indicates that there is an intersection between the ambient sound and the falling part of this envelope. Find two adjacent points in this envelope, one point is greater than VN, the corresponding sound loudness is denoted as EVnu, the corresponding time point is denoted as ETnu, and one is less than VN, the corresponding sound loudness is denoted as EVnd, the corresponding time point is denoted as ETnd. The intersection of the two adjacent points is used as the new end point, and the time point ETne = ETnd - (ETnd - ETnu) * (VN - EVnd) / (EVnu - EVnd).

[0124] (11) Traverse the valid envelopes, and it can be determined whether it is snoring under certain conditions as follows.

[0125] When EVns = EVnm, the start point and the midpoint are the same, indicating that the collected sound is very loud at the beginning and then becomes smaller, and it is judged as interference sound, CN = 1;

[0126] When EVne = EVnm, the midpoint and the end point are the same, indicating that there is still the second half of the collected sound, and the envelope is incomplete. More sound needs to be collected to judge, LN = 1;

[0127] When EVns≠EVnm, EVne≠EVnm, (EVnm-VN)≥Th, S1≤(ETne-ETns)≤S2, it means that the collected sound is suspected to be snoring, HN=1; Th is 5dB. Generally, snoring is at least 5dB louder than the ambient sound. S1 is 500ms, S2 is 1200s. Generally, a snoring sound lasts between 0.5s and 1.2s.

[0128] (12) Final confirmation of snoring is made by judging the values ​​of CN, LN and HN.

[0129] a) When CN = 0, LN = 0, HN = 1, it is considered that there is snoring in the current 3 seconds of audio; otherwise, there is no snoring or there is interference or incomplete envelope;

[0130] b) When CN = 0, LN = 0, and HN = 0, it is considered that there is no other sound in the current 3 seconds, which belongs to the sleeping environment sound. The average loudness value of the audio in the 3 seconds is used to update the VN value;

[0131] c) When CN=0, LN=0, HN=2 appear regularly and continuously, it is considered that the snoring sound of the snorer may contain two envelopes, and self-learning can be used to determine that there is snoring in the 3-second audio.

[0132] The above-mentioned method for extracting audio features determines whether it is snoring by drawing and optimizing the envelope, and analyzes the misjudgment based on the characteristics of the snoring envelope and the periodicity of the snoring, thereby reducing the misjudgment rate.

[0133] Step 4: Perform SG filtering on the airbag pressure signal within the preset time period. SG filtering is short for Savitzky-Golay filtering, which is used for data smoothing. The effect is shown in FIG8 .

[0134] The pillow deformation caused by snoring is generally greater than that during normal breathing. The air pressure amplitude at this time is calculated to determine whether the amplitude of the airbag pressure signal exceeds the threshold. If it exceeds, the next step is entered; otherwise, the process returns to continue monitoring the signal.

[0135] Step 5: Mark the peak position of the audio at this point and record it as Tnum, where num = num + 1. Continue monitoring the signal. This step records the time point with the maximum dB value within the 3-second period as the time of snoring, allowing for subsequent calculation of the interval between two snoring sounds. Continued monitoring here involves detecting whether snoring occurs in the next 3-second period and calculating whether the interval between two snoring sounds meets the threshold. If so, both snoring sounds are considered snoring. Previously, the suspected snoring was determined, and this is reconfirmed here, and num is reset to zero.

[0136] Step 6, when num > 1, calculate r = Tnum1 - Tnum2, and determine whether threshold1 < r < threshold2 holds. If it holds, it is determined as snoring, num is set to 0, and the sound signal is continuously monitored. Here, Tnum2 represents the previous peak position, and Tnum1 represents the next peak position.

[0137] As shown in FIG. 9, it is a schematic diagram of the pillow used by the target object in this embodiment, including a pillow body 901, an air pump box 903, and an air tube 902 disposed between the pillow body 901 and the air pump box 903. One or more air bags are provided inside the pillow body 901. The air pump box 903 is used to inflate, deflate, or maintain pressure in the air bag. The pillow may further include a pressure acquisition module for acquiring the air pressure value in the air bag, that is, the pressure signal.

[0138] As shown in FIG. 10, this embodiment also discloses a snoring recognition device, including:

[0139] An audio signal acquisition module 1001 for acquiring an audio signal within a preset time period;

[0140] An envelope number acquisition module 1002 for drawing an envelope line based on the audio signal and acquiring the number of envelopes in the envelope line; where each envelope includes an ascending curve and a descending curve;

[0141] A sound loudness acquisition module 1003 for acquiring associated data of the starting point, midpoint, and ending point of each envelope; where the midpoint is the point with the maximum sound loudness value; the associated data includes sound loudness;

[0142] A snoring judgment module 1004 for judging snoring of the audio signal within a preset time period based on the associated data of the starting point, midpoint, and ending point of each envelope; if the sound loudness at the starting point, the sound loudness at the midpoint, and the sound loudness at the ending point are all different, and the sound loudness at the midpoint is greater than or equal to the second preset loudness, it is judged that there is snoring in the audio signal within the preset time period.

[0143] Other specific implementations of a snoring recognition device are the same as those of a snoring recognition method, and this embodiment will not be repeated here.

[0144] As shown in FIG. 11, it is a schematic hardware structure diagram of an electronic device 110 for the snoring recognition method provided in this embodiment. As shown in FIG. 11, the electronic device 110 includes:

[0145] One or more processors 1101 and a memory 1102. In FIG. 11, one processor 1101 is taken as an example.

[0146] The processor 1101 and the memory 1102 can be connected through a bus or other means. In FIG. 11, the connection through a bus is taken as an example.

[0147] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the snoring recognition method in the embodiments of this application. Processor 1101 executes the non-volatile software programs, instructions, and modules stored in memory 1102 to execute various functional applications of the terminal device or server and perform data processing, thereby implementing the snoring recognition method in the above-described method embodiments.

[0148] The memory 1102 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated by the use of the snoring recognition device. Furthermore, the memory 1102 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 1102 may optionally include a remote memory device located relative to the processor 1101. Such remote memory device may be connected to the snoring recognition device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0149] The one or more modules are stored in the memory 1102 and, when executed by the one or more processors 1101, perform the snoring recognition method in any of the above method embodiments, for example, execute steps 101 to S104 of the method described above in FIG. 1 to implement the functions of modules 1001-1004 in FIG. 10 .

[0150] The above-mentioned product can execute the method provided in the embodiment of this application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of this application.

[0151] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:

[0152] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communications. These terminals include smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones.

[0153] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0154] (3) Server: A device that provides computing services. The server consists of a microcontroller, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0155] (4) Other electronic devices with data interaction functions.

[0156] An embodiment of the present application provides a non-volatile computer-readable storage medium storing computer-executable instructions. The computer-executable instructions are executed by one or more microcontrollers, such as a processor 1101 in FIG. 11 . This enables the one or more microcontrollers to execute the snoring recognition method in any of the above-described method embodiments, for example, executing steps 101 to 104 of the method in FIG. 1 described above, thereby implementing the functions of modules 1001 to 1004 in FIG. 10 .

[0157] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0158] Through the description of the above embodiments, it can be clearly understood by those skilled in the art that each embodiment can be implemented by means of software plus a general hardware platform, or of course by hardware. It can be understood by those skilled in the art that all or part of the processes in the above embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0159] The above description is merely a preferred embodiment of the present invention; however, the scope of protection of the present invention is not limited thereto. Any person skilled in the art who, within the technical scope disclosed by the present invention, makes equivalent substitutions or modifications based on the technical solutions and improved concepts of the present invention shall be covered by the scope of protection of the present invention. Industrial Applicability

[0160] The present invention provides a snoring recognition method, device, equipment and storage medium. By acquiring an audio signal within a preset time period, obtaining the number of envelopes in the envelope, and judging snoring based on the associated data of the starting point, midpoint and end point of each envelope, the present invention recognizes snoring based on the loudness of the audio signal. The recognition algorithm is simple and the cost is lower than that of AI algorithms, which has good industrial applicability.

Claims

1. A snoring recognition method, characterized in that: include: Acquire an audio signal within a preset time period; Draw an envelope based on the audio signal, and obtain the number of envelopes in the envelope; wherein each envelope includes an ascending curve and a descending curve; Obtaining the associated data of the starting point, midpoint and end point of each envelope; wherein the midpoint is the point with the largest sound loudness value; the associated data includes the sound loudness; Based on the associated data of the starting point, midpoint and end point of each envelope, snoring is judged for the audio signal within the preset time period; if the sound loudness of the starting point, the sound loudness of the midpoint and the sound loudness of the end point are all different, and the sound loudness of the midpoint is greater than or equal to the second preset loudness, it is judged that the audio signal within the preset time period has snoring.

2. The snoring recognition method according to claim 1, characterized in that: Before drawing the envelope based on the audio signal, the method further includes: The sampling rate of the audio signal is reduced to obtain a dimensionally reduced audio signal.

3. The snoring recognition method according to claim 1, characterized in that: Drawing an envelope based on the audio signal and obtaining the number of envelopes in the envelope specifically includes: Convert the audio signal into sound loudness data, and draw an initial envelope based on the sound loudness data; Extract extreme value points of sound loudness data and generate a preliminary extreme value point array; Traverse the extreme point array, mark the three extreme points that satisfy the "V" shape, and obtain the associated data of the three extreme points; the three extreme points are the starting point, the lowest point, and the end point; Based on the preset sound loudness conditions and time conditions, the extreme points that do not meet the conditions are removed; Obtaining the optimized envelope based on the extreme points after the removal operation; Based on the optimized envelope curve, the number of envelopes is obtained.

4. The snoring recognition method according to claim 1, characterized in that: After obtaining the associated data of each envelope starting point, midpoint and end point, the method further includes: Get the loudness of the ambient sound; The step of judging snoring of the audio signal within a preset time period based on the associated data of each envelope starting point, midpoint and end point specifically includes: Snoring is determined for the audio signal within a preset time period based on the associated data of the starting point, the associated data of the midpoint, the associated data of the end point of each envelope and the sound loudness of the ambient sound.

5. The snoring recognition method according to claim 4, characterized in that: The step of judging snoring of the audio signal within a preset time period based on the associated data of the starting point, the associated data of the midpoint, the associated data of the end point of each envelope and the sound loudness of the ambient sound specifically includes: Determining whether the envelope is a valid envelope based on the sound loudness of the ambient sound and the sound loudness of the midpoint of the envelope; When the envelope is valid, the sound loudness at the start point and the sound loudness at the end point of the envelope are updated based on the sound loudness of the ambient sound; Based on the sound loudness at the start point, the midpoint, the end point and the ambient sound of the updated envelope, snoring is determined for the audio signal within a preset time period.

6. The snoring recognition method according to claim 5, characterized in that: The determining whether the envelope is a valid envelope based on the sound loudness of the ambient sound and the sound loudness of the midpoint of the envelope specifically includes: When the sound loudness at the midpoint of the envelope is not greater than the sound loudness of the ambient sound, the envelope is judged to be invalid; When the sound loudness at the midpoint of the envelope is greater than the sound loudness of the ambient sound, and the difference between the two is within a first preset loudness, the envelope is determined to be invalid; Otherwise, the envelope is judged to be valid.

7. The snoring recognition method according to claim 5, characterized in that: The associated data also includes a time point; the updating of the sound loudness of the start point and the end point of the envelope based on the sound loudness of the ambient sound specifically includes: When the sound loudness of the starting point of the envelope is less than the sound loudness VN of the ambient sound, find two adjacent points in the envelope; among them, the sound loudness EVnu of one point is greater than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnu; the sound loudness EVnd of the other point is less than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnd; the intersection of these two points is taken as the new starting point, and the time point of the new starting point is ETns=ETnd+(ETnu-ETnd)*(VN-EVnd) / (EVnu-EVnd); update the sound loudness of the starting point based on the time point of the new starting point; When the sound loudness of the starting point of the envelope is greater than the sound loudness VN of the ambient sound, find two adjacent points in the envelope; where, The sound loudness EVnu of one point is greater than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnu; the sound loudness EVnd of another point is less than the sound loudness of the ambient sound, and the corresponding time point is recorded as ETnd; the intersection of these two points is taken as the new end point, and the time point of the new end point is ETne=ETnd-(ETnd-ETnu)*(VN-EVnd) / (EVnu-EVnd); the sound loudness of the end point is updated based on the time point of the new end point.

8. The snoring recognition method according to claim 5, characterized in that: The associated data also includes a time point; the snoring judgment of the audio signal within a preset time period based on the sound loudness of the updated envelope starting point, the sound loudness of the midpoint, the sound loudness of the end point and the sound loudness of the ambient sound specifically includes: If the sound loudness at the starting point, the sound loudness at the midpoint and the sound loudness at the end point are all different, and the sound loudness at the midpoint and the sound loudness of the ambient sound are greater than or equal to a second preset loudness, and the time difference between the end point and the starting point is within a first preset time range, it is determined that the audio signal within the preset time period contains snoring.

9. The snoring recognition method according to claim 1, characterized in that: After determining that the audio signal within the preset time period contains snoring, the method further includes: Obtaining a pressure signal borne by the pillow used by the target object within a preset period of time; Determine the amplitude of the pressure signal; When the amplitude of the pressure signal exceeds a preset threshold value within a preset period of time, it is recognized that snoring occurs within the preset period of time.

10. The snoring recognition method according to claim 9, characterized in that: When the amplitude of the pressure signal exceeds a preset threshold value within the preset time period, identifying that there is snoring within the preset time period specifically includes: When the amplitude of a pressure signal exceeds a preset threshold within a preset period of time, mark the peak position corresponding to the audio signal at this time, and mark the number of times the amplitude exceeds the preset threshold; When the number is greater than or equal to 1, get the time interval between two times; When the time interval is within the second preset time range, it is recognized that there is snoring within the preset time period.

11. A snoring recognition device, characterized in that: include: An audio signal acquisition module, used to acquire an audio signal within a preset time period; An envelope quantity acquisition module, used for drawing an envelope line based on an audio signal, and acquiring the number of envelopes in the envelope line; wherein each envelope includes an ascending curve and a descending curve; The sound loudness and time acquisition module is used to obtain the associated data of the starting point, midpoint and end point of each envelope; wherein the midpoint is the point with the largest sound loudness value; the associated data includes the sound loudness; The snoring judgment module is used to judge the snoring of the audio signal within the preset time period based on the associated data of the starting point, midpoint and end point of each envelope; if the sound loudness of the starting point, the sound loudness of the midpoint and the sound loudness of the end point are all different, and the sound loudness of the midpoint is greater than or equal to a second preset loudness, it is judged that the audio signal within the preset time period has snoring.

12. A snoring recognition control device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 10 by executing the executable instructions.

13. The snoring recognition device according to claim 12, characterized in that: The snoring recognition device is arranged on a pillow, and comprises: a pillow body, an air pump box, and an air tube arranged between the pillow body and the air pump box. One or more air bags are arranged in the pillow body; the air pump box is used to inflate, deflate or maintain pressure on the air bags.

14. The snoring recognition device according to claim 13, characterized in that: The pillow also includes an air pressure collection module for collecting the air pressure value in the air bag, that is, the pressure signal.

Citation Information

Patent Citations

  • Snore identifying method and system

    CN109350014A

  • Method of characterizing sleep disordered breathing

    CN110234279A

  • Snore detection method and device

    CN116570239A

  • Sleep apnea detection system

    US20130144190A1

  • Classification of Segments of Acoustic Physiological Signal Captured During Sleep Using Phase-Locked Loop Array

    US20140171815A1

Cited By

  • Snore monitoring method and device for sleep apnea pathology identification

    CN120570572A

  • Snoring monitoring method and device for sleep apnea identification

    CN120570572B