CN110179436B - Snore sampling method and terminal equipment - Google Patents

Snore sampling method and terminal equipment Download PDF

Info

Publication number
CN110179436B
CN110179436B CN201910275299.4A CN201910275299A CN110179436B CN 110179436 B CN110179436 B CN 110179436B CN 201910275299 A CN201910275299 A CN 201910275299A CN 110179436 B CN110179436 B CN 110179436B
Authority
CN
China
Prior art keywords
audio signal
value
snore
audio
human body
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910275299.4A
Other languages
Chinese (zh)
Other versions
CN110179436A (en
Inventor
宋雨
贺超
李育高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Chuangda Yunrui Intelligent Technology Co ltd
Original Assignee
Shenzhen Chuangda Yunrui Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Chuangda Yunrui Intelligent Technology Co ltd filed Critical Shenzhen Chuangda Yunrui Intelligent Technology Co ltd
Priority to CN201910275299.4A priority Critical patent/CN110179436B/en
Publication of CN110179436A publication Critical patent/CN110179436A/en
Application granted granted Critical
Publication of CN110179436B publication Critical patent/CN110179436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/145Measuring characteristics of blood in vivo, e.g. gas concentration, pH value; Measuring characteristics of body fluids or tissues, e.g. interstitial fluid, cerebral tissue
    • A61B5/14542Measuring characteristics of blood in vivo, e.g. gas concentration, pH value; Measuring characteristics of body fluids or tissues, e.g. interstitial fluid, cerebral tissue for measuring blood gases
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4803Speech analysis specially adapted for diagnostic purposes
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Molecular Biology (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Public Health (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physiology (AREA)
  • Dentistry (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Optics & Photonics (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention is suitable for the technical field of computers, and provides a snore sampling method and equipment, wherein the snore sampling method comprises the following steps: acquiring a sleep index value detected by sleep monitoring equipment; determining whether an audio signal needs to be recorded currently or not based on the sleep index value; if the audio signal needs to be recorded, starting an audio recording function; secondly, if an audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value. The method and the device determine whether the audio signal needs to be recorded or not at present based on the sleep index value, avoid continuously recording the audio signal for a long time, reduce the power consumption of snore sampling, extract the snore sample from the recorded audio signal based on the short-time energy value of the audio signal, and improve the snore sampling efficiency.

Description

Snore sampling method and terminal equipment
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a snore sampling method and terminal equipment.
Background
Snoring, which is medically known as snoring, snoring and sleep apnea syndrome, is a ubiquitous sleep phenomenon that causes severe hypoxia to the brain and blood due to repeated sleep apnea caused by snoring, resulting in hypoxemia, and thus inducing certain respiratory diseases, cardiovascular diseases and the like. Therefore, the snore sample is obtained by recording the time point and the severity of the occurrence of the snore in the sleeping process, and the method has important significance for the snorer to know the health condition of the snore.
At present, the extraction of snore samples needs to record the sleeping audio of snorers all night and then analyze the recorded audio to obtain the snore samples. Because the recording process usually consumes a large amount of energy, and the storage of the whole recorded audio occupies a large amount of storage space, the power consumption of the whole processing process is huge, and the processing efficiency is low. Therefore, how to provide a snore sampling method with low power consumption and high efficiency is a problem to be solved urgently.
Disclosure of Invention
In view of this, embodiments of the present invention provide a snore sampling method and a terminal device, so as to solve the problems of high power consumption and low efficiency in a snore sampling process in the prior art.
The first aspect of the embodiment of the invention provides a snore sampling method, which comprises the following steps:
acquiring a sleep index value detected by sleep monitoring equipment;
determining whether an audio signal needs to be recorded currently or not based on the sleep index value;
if the audio signal needs to be recorded, starting an audio recording function;
and if the audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value.
Preferably, the starting an audio recording function if an audio signal needs to be recorded, and acquiring a short-time energy value of the audio signal if the audio signal is detected, and extracting snore samples from the audio signal based on the short-time energy value, includes:
if the audio signal is not detected within the first predefined time length, the audio recording function is closed;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
Preferably, the sleep index value includes an energy value of the audio signal, a blood oxygen value of the human body, and a body movement value of the human body.
Preferably, the determining whether recording of an audio signal is currently required based on the sleep index value includes:
if the energy value of the audio signal is larger than a preset snore energy threshold value, determining whether the body motion value of the human body is zero, otherwise, judging that the audio signal does not need to be recorded currently;
if the body motion value of the human body is zero, determining whether the blood oxygen value of the human body is larger than a preset blood oxygen value threshold value, otherwise, judging that the audio signal does not need to be recorded currently;
and if the blood oxygen value of the human body is smaller than or equal to the preset blood oxygen value threshold value, judging that the audio signal is required to be recorded currently, otherwise, judging that the audio signal is not required to be recorded currently.
Preferably, said extracting a snore sample from said audio signal based on said short-time energy value comprises:
dividing the audio signal into a sound audio segment and a non-sound audio segment according to a preset sound audio signal energy threshold and the short-time energy value;
respectively calculating the low-frequency energy ratio of all the voiced audio segments;
and if the low-frequency energy ratio of the continuous sound audio frequency fragment is detected to be larger than the predefined snore low-frequency energy ratio and the audio time length of the continuous sound audio frequency fragment is in the predefined snore time length range, extracting the continuous sound audio frequency fragment and identifying the continuous sound audio frequency fragment as a snore sample.
A second aspect of an embodiment of the present invention provides a snore sampling device, including:
the acquisition module is used for acquiring a sleep index value detected by the sleep monitoring equipment;
the determining module is used for determining whether the audio signal needs to be recorded currently or not based on the sleep index value;
the audio signal recording module is used for starting an audio recording function if the audio signal needs to be recorded;
and the extraction module is used for acquiring the short-time energy value of the audio signal if the audio signal is detected, and extracting the snore sample from the audio signal based on the short-time energy value.
Preferably, between the determining module and the audio signal recording module, the method includes:
the judging module is used for closing the audio recording function if the audio signal is not detected within the first predefined time length;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
Preferably, the sleep index value comprises an energy value of an audio signal, a blood oxygen value of a human body and a body movement value of the human body; the determining module includes:
the first judgment unit is used for determining whether the body motion value of the human body is zero or not if the energy value of the audio signal is larger than a preset snore energy threshold value, and otherwise, judging that the audio signal does not need to be recorded currently;
the second judgment unit is used for determining whether the blood oxygen value of the human body is greater than a preset blood oxygen value threshold value or not if the body motion value of the human body is zero, and otherwise, judging that the audio signal does not need to be recorded currently;
and the third judging unit is used for judging that the audio signal is required to be recorded currently if the blood oxygen value of the human body is less than or equal to a preset blood oxygen value threshold value, and otherwise, judging that the audio signal is not required to be recorded currently.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the method when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, which stores a computer program, characterized in that, when the computer program is executed by a processor, the computer program implements the steps of the method as described above.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: firstly, acquiring a sleep index value detected by sleep monitoring equipment; then determining whether the audio signal needs to be recorded currently or not based on the sleep index value; if the audio signal needs to be recorded, starting an audio recording function; secondly, if an audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value. The method and the device determine whether the audio signal needs to be recorded or not at present based on the sleep index value, avoid continuously recording the audio signal for a long time, reduce the power consumption of snore sampling, extract the snore sample from the recorded audio signal based on the short-time energy value of the audio signal, and improve the snore sampling efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart of the implementation of the snore sampling method provided by the embodiment of the invention;
FIG. 2 is a schematic diagram of an implementation flow of S102 in FIG. 1;
FIG. 3 is a schematic diagram of the process of FIG. 1 for extracting a snore sample from the audio signal based on the short-time energy value;
FIG. 4 is a schematic diagram of the snore sampling apparatus provided by the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples. As shown in fig. 1, an implementation flow of the snore sampling method provided by the embodiment of the invention is shown, and the details are as follows:
s101, acquiring a sleep index value detected by sleep detection equipment;
in the sleeping process, snoring in most of time cannot be known by a person, the severity of snoring cannot be judged, and due to the fact that snoring stops sleep breathing repeatedly, brain and blood are seriously anoxic, hypoxemia is formed, and certain respiratory system diseases, cardiovascular diseases and the like are induced. Therefore, the snore sampling is carried out according to the occurrence time point and the severity degree of the snore event in the sleeping process, and the snore sampling is very important for judging the physical health of the snore patient. In the snore sampling process of the scheme, a sleep index value needs to be acquired firstly. Specifically, the sleep index value includes, but is not limited to, an energy value of an audio signal, a blood oxygen value of a human body, and a body movement value of the human body. In the embodiment, the sleep state of the human body is detected by the sleep detection device to obtain the sleep index value. The specific mode may be that the sleep detection device receives an instruction for acquiring a sleep index value sent by the snore sampling device to perform sleep index value detection, or the detection function of the sleep detection device may be started by an operator before the operator sleeps to perform sleep index value detection. Therefore, the snore sampling equipment is prevented from continuously recording the snore for a long time, the power consumption of the snore recording process is reduced, and the snore storage space is saved.
Alternatively, the sleep monitoring device may be a safety detection device that may be in direct contact with the head of a human body, such as a sleep monitoring pillow, a head wearable device, or the like. Specifically, because the values of the body motion value and the blood oxygen value of the human body are basically fixed within a short time, the energy consumption of the whole equipment is low by detecting the body motion value and the blood oxygen value of the human body under the condition of a short preset time interval, and the energy consumption can be ignored. The audio energy acquisition module acquires audio signals within a preset time period (for example, within 1 second), judges the audio energy once at regular time intervals (the regular time intervals are very small, for example, 0.1 second), and accumulates and adds the judgment results of each time to obtain the energy of the audio signals. The judgment of short-time data is adopted, the occupation of the embedded equipment (audio energy acquisition module) on the memory is reduced, and the working efficiency is improved.
Further, the sleep monitoring device may send the detected sleep index value, the audio signal energy, the human blood oxygen value, and the human body movement value to the snore sampling device.
S102, determining whether the audio signal needs to be recorded currently or not based on the sleep index value.
Because the audio signal recording function needs to be started, enough electric quantity needs to be available, and the audio signal recording function is started for a long time, a large amount of unnecessary electric energy is consumed, in the scheme, a sleep index value is firstly obtained, and whether the audio signal needs to be recorded at present is determined based on the sleep index value.
It can be understood that if the snore sampling device is in a charging state or the battery of the snore sampling device has sufficient electric quantity, the function of recording the audio signal can be directly started without energy conservation. Specifically, S102 may include:
s201, if the energy value of the audio signal is larger than a preset snore energy threshold value, determining whether the body motion value of the human body is zero, otherwise, judging that the audio signal does not need to be recorded currently.
The snore is a rough breath sound emitted by a person in a sleep state, and has the same frequency as a normal breath sound emitted by the person in the sleep state in an audio frequency spectrum, but the volume (audio energy) of the sound is higher than the normal breath sound, so that when the energy of the breath sound emitted by the person in the sleep state reaches a certain threshold, the sound may be a snore sound, and may also be a high volume breath sound emitted when the body is in a reverse collision, therefore, in this embodiment, it is first necessary to determine the magnitude relationship between the energy value of the audio signal and a preset snore energy threshold, and if the energy value of the audio signal is greater than the preset snore energy threshold, the body movement value of the person needs to be further determined.
S202, if the body motion value of the human body is zero and the blood oxygen value of the human body is larger than a preset blood oxygen value threshold value, judging that the audio signal does not need to be recorded currently.
Generally, in a state where a person snores, body movement does not occur, and therefore, the body movement value of the human body is further determined for accuracy of determination, but the body movement value of the human body cannot be directly evaluated as an index of the physical health of the human body, and therefore, it is necessary to determine the blood oxygen value of the human body. It can be understood that if the body motion value of the human body is not zero, it indicates that the body motion occurs, and it can be determined that the snoring state is not currently in the snoring state, and therefore, if the body motion value of the human body is not zero, it is determined that the audio signal does not need to be recorded currently.
And S203, if the body motion value of the human body is zero and the blood oxygen value of the human body is less than or equal to the preset blood oxygen value threshold value, judging that the audio signal needs to be recorded currently.
The influence of snoring on the blood oxygen value of the human body is obvious, and the severity of snoring can be determined according to the change of the blood oxygen value of the human body. Studies have shown that if the blood oxygen level of a human is below a certain level, e.g. 70%, during sleep, a risk may occur. Therefore, in the snore determination process, the blood oxygen value of the human body is one of the most important indexes. And if the blood oxygen value of the human body is greater than or equal to the preset blood oxygen value threshold, judging that the audio signal needs to be recorded at present, and sending early warning information to perform health early warning after the blood oxygen value is lower than the preset risk threshold.
S103, if the audio signal needs to be recorded, the audio recording function is started.
Optionally, since the audio signal recording function needs to be started, enough power is needed, and turning on the audio signal recording function for a long time wastes a large amount of power, in this embodiment, in order to further reduce power consumption, after S103 and before S104, the method may further include:
if the audio signal is not detected within the first predefined time length, the audio recording function is closed;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
Typically, the second predefined time period is a time period preset according to the snore time period, and the second predefined time period is greater than at least one snore time period and is usually an integral multiple of the snore time period. For example, assuming that the snore time is 3 seconds, the second predefined time is greater than 3n seconds, n, 1, the first predefined time is usually much shorter than the second predefined time, and assuming that in an embodiment, the second predefined time is 30 seconds, the first predefined time may be preset to 5 seconds, specifically, the first predefined time may be preset according to an actual requirement, which is not limited herein.
S104, if the audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value.
In particular, due to the nature of the audio signal, in the short time range of 10-30ms, the characteristic can be regarded as a quasi-steady-state process, i.e. with short-time characteristics. Wherein the short-time energy value of the audio signal is defined as: setting the audio time domain signal as X (1), and obtaining the k frame audio signal as X after windowing and framing processingk(m) then Xk(m) satisfies the following formula:
Xx(m)=w(m)x(k+m)
wherein m is greater than or equal to 0 and less than or equal to N-1, and w (m) is a window function:
w (m) 1, m 0- (N-1); w (m) is 0, and m is other values;
where K is 0,1T, 2T, …, N is the frame length, and T is the frame shift length.
Suppose that the K-th frame audio signal Xk(m) short-term energy EkExpressed, then its calculation formula is as follows:
Figure GDA0002142094780000071
the extracting snore samples from the audio signal based on the short-time energy value comprises:
s301, dividing the audio signal into a sound audio segment and a non-sound audio segment according to a preset sound audio signal energy threshold and the short-time energy value.
Specifically, if the short-time energy value of the obtained K-th frame audio signal is greater than a preset voiced audio signal energy threshold, determining that the K-th frame audio signal is a voiced audio signal; otherwise, determining the K-th frame audio signal as a sound-free audio segment.
And S302, respectively calculating the low-frequency energy ratio of all the voiced audio segments.
Specifically, respectively obtaining the energy ratios of the low-frequency audio signals of all the voiced audio segments includes: calculating the frequency of an audio signal in a sound audio clip, and dividing a low-frequency signal in the sound audio clip into a plurality of audio segments; calculating the energy of each divided audio segment, wherein the audio signal of which the frequency of the audio signal in the audio frequency segment is lower than or equal to the preset frequency is determined as a low-frequency signal;
s303, determining the weight of each audio segment obtained by division, and carrying out weighted average on the energy of each audio segment to obtain the energy of the low-frequency signal in the audio segment.
Specifically, the step of calculating the energy of each divided audio segment includes:
according to the formula
Figure GDA0002142094780000081
Calculating the energy of each audio segment obtained by division;
wherein e (g) represents the energy of the g-th audio segment, klow (g) represents the lower boundary corresponding to the g-th audio segment, and khigh (g) represents the upper boundary corresponding to the g-th audio segment; x (K) is an audio signal of the current voiced audio segment, N is a frame length of an audio frame, K is 0,1T, 2T, …;
further, the step of performing weighted average on the energy of each audio segment to obtain the energy of the low-frequency signal in the voiced audio segment includes:
according to the formula
Figure GDA0002142094780000082
Acquiring the energy of low-frequency signals in the audio clip; wherein E islowRepresenting the energy of the low-frequency signal, f (g) being the weight of the g-th audio pieceThe value, L, is the number of divided audio segments.
And if the low-frequency energy ratio of the continuous sound audio frequency fragment is detected to be larger than the predefined snore low-frequency energy ratio and the audio time length of the continuous sound audio frequency fragment is in the predefined snore time length range, extracting the continuous sound audio frequency fragment and identifying the continuous sound audio frequency fragment as a snore sample.
Furthermore, the snore sampling method provided by the scheme can obtain the maximum decibel value of the snore sample after the snore sample is extracted, and store the maximum decibel value of the snore sample, so that the storage space can be further saved, and the snore sampling performance can be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
According to the analysis, the snore sampling method provided by the invention comprises the steps of firstly, obtaining a sleep index value detected by sleep monitoring equipment; then determining whether the audio signal needs to be recorded currently or not based on the sleep index value; if the audio signal needs to be recorded, starting an audio recording function; secondly, if an audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value. The snore sampling method can reduce the power consumption of snore sampling and improve the snore sampling efficiency.
Fig. 4 is a system diagram of the snore sampling system provided by the invention. As shown in fig. 4, the snore sampling device 4 of this embodiment includes: the device comprises an acquisition module 410, a determination module 420, an audio signal recording module 430 and an extraction module 440. Wherein the content of the first and second substances,
an obtaining module 410, configured to obtain a sleep index value detected by a sleep monitoring device;
a determining module 420, configured to determine whether an audio signal needs to be recorded currently based on the sleep index value;
the audio signal recording module 430 is configured to start an audio recording function if the audio signal needs to be recorded;
the extracting module 440 is configured to, if an audio signal is detected, obtain a short-time energy value of the audio signal, and extract a snore sample from the audio signal based on the short-time energy value.
Optionally, in another embodiment, the snore sampling device 40, between the determining module 420 and the audio signal recording module 430, includes a determining module (the determining module is not shown in fig. 4) configured to turn off the audio recording function if no audio signal is detected within a first predefined time period;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
Optionally, the sleep index value comprises an energy value of the audio signal, a blood oxygen value of the human body and a body movement value of the human body; the determining module 420 includes:
the first judgment unit is used for determining whether the body motion value of the human body is zero or not if the energy value of the audio signal is larger than a preset snore energy threshold value, and otherwise, judging that the audio signal does not need to be recorded currently;
the second judgment unit is used for determining whether the blood oxygen value of the human body is greater than a preset blood oxygen value threshold value or not if the body motion value of the human body is zero, and otherwise, judging that the audio signal does not need to be recorded currently;
and the third judging unit is used for judging that the audio signal is required to be recorded currently if the blood oxygen value of the human body is less than or equal to a preset blood oxygen value threshold value, and otherwise, judging that the audio signal is not required to be recorded currently.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as a snore sample sampling program, stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps of the above-mentioned embodiments of snore sampling methods, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functionality of the various modules/units in the above-described sample sampling device embodiments, such as the functionality of the modules 410 to 440 shown in fig. 5.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into an acquisition module, a determination module, an audio signal recording module, and an extraction module (module in a virtual device), and the specific functions of each module are as follows:
the acquisition module is used for acquiring a sleep index value detected by the sleep monitoring equipment;
the determining module is used for determining whether the audio signal needs to be recorded currently or not based on the sleep index value;
the audio signal recording module is used for starting an audio recording function if the audio signal needs to be recorded;
and the extraction module is used for acquiring the short-time energy value of the audio signal if the audio signal is detected, and extracting the snore sample from the audio signal based on the short-time energy value.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. It will be understood by those skilled in the art that fig. 5 is merely an example of a terminal device 5 and does not constitute a limitation of the terminal device 5 and may include more or less components than those shown, or some components may be combined, or different components, for example, the terminal device may also include input output devices, communication access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 51 may be an internal storage unit of the terminal device 5, for example, the storage 51 is a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of communication units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (7)

1. A snore sampling method is characterized by comprising the following steps:
acquiring a sleep index value detected by sleep monitoring equipment, wherein the sleep index value comprises an energy value of an audio signal, a blood oxygen value of a human body and a body movement value of the human body;
determining whether an audio signal needs to be recorded currently or not based on the sleep index value;
if the audio signal needs to be recorded, starting an audio recording function;
if an audio signal is detected, acquiring a short-time energy value of the audio signal, and extracting a snore sample from the audio signal based on the short-time energy value;
the determining whether recording of the audio signal is currently required based on the sleep index value includes:
if the energy value of the audio signal is larger than a preset snore energy threshold value, determining whether the body motion value of the human body is zero, otherwise, judging that the audio signal does not need to be recorded currently;
if the body motion value of the human body is zero, determining whether the blood oxygen value of the human body is larger than a preset blood oxygen value threshold value, otherwise, judging that the audio signal does not need to be recorded currently;
and if the blood oxygen value of the human body is smaller than or equal to the preset blood oxygen value threshold value, judging that the audio signal is required to be recorded currently, otherwise, judging that the audio signal is not required to be recorded currently.
2. The snore sampling method of claim 1, wherein the step of, after the audio recording function is turned on if an audio signal is to be recorded, and before the step of, if an audio signal is detected, obtaining a short-time energy value of the audio signal and extracting a snore sample from the audio signal based on the short-time energy value, comprises:
if the audio signal is not detected within the first predefined time length, the audio recording function is closed;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
3. The snore sampling method of claim 1, wherein said extracting a snore sample from the audio signal based on the short-time energy value comprises:
dividing the audio signal into a sound audio segment and a non-sound audio segment according to a preset sound audio signal energy threshold and the short-time energy value;
respectively calculating the low-frequency energy ratio of all the voiced audio segments;
and if the low-frequency energy ratio of the continuous sound audio frequency fragment is detected to be larger than the predefined snore low-frequency energy ratio and the audio time length of the continuous sound audio frequency fragment is in the predefined snore time length range, extracting the continuous sound audio frequency fragment and identifying the continuous sound audio frequency fragment as a snore sample.
4. A snore sampling device, comprising:
the acquisition module is used for acquiring a sleep index value detected by the sleep monitoring equipment;
the determining module is used for determining whether the audio signal needs to be recorded currently or not based on the sleep index value;
the audio signal recording module is used for starting an audio recording function if the audio signal needs to be recorded;
the extraction module is used for acquiring a short-time energy value of the audio signal if the audio signal is detected, and extracting a snore sample from the audio signal based on the short-time energy value;
the sleep index value comprises an energy value of an audio signal, a blood oxygen value of a human body and a body movement value of the human body; the determining module includes:
the first judgment unit is used for determining whether the body motion value of the human body is zero or not if the energy value of the audio signal is larger than a preset snore energy threshold value, and otherwise, judging that the audio signal does not need to be recorded currently;
the second judgment unit is used for determining whether the blood oxygen value of the human body is greater than a preset blood oxygen value threshold value or not if the body motion value of the human body is zero, and otherwise, judging that the audio signal does not need to be recorded currently;
and the third judging unit is used for judging that the audio signal is required to be recorded currently if the blood oxygen value of the human body is less than or equal to a preset blood oxygen value threshold value, and otherwise, judging that the audio signal is not required to be recorded currently.
5. The snore sampling device of claim 4, wherein the determining module and the audio signal recording module, between each other, comprises:
the judging module is used for closing the audio recording function if the audio signal is not detected within the first predefined time length;
if the audio signal is detected within a first predefined time length, recording the audio signal within a second predefined time length, wherein the first predefined time length is less than the second predefined time length.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 3 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201910275299.4A 2019-04-04 2019-04-04 Snore sampling method and terminal equipment Active CN110179436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910275299.4A CN110179436B (en) 2019-04-04 2019-04-04 Snore sampling method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910275299.4A CN110179436B (en) 2019-04-04 2019-04-04 Snore sampling method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110179436A CN110179436A (en) 2019-08-30
CN110179436B true CN110179436B (en) 2021-11-19

Family

ID=67714017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910275299.4A Active CN110179436B (en) 2019-04-04 2019-04-04 Snore sampling method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110179436B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113724737A (en) * 2021-08-30 2021-11-30 康键信息技术(深圳)有限公司 Method and device for monitoring sleep state, electronic equipment and storage medium
CN115134702A (en) * 2022-06-30 2022-09-30 歌尔股份有限公司 Earphone control method and device, earphone and computer readable storage medium
CN116115198A (en) * 2023-04-19 2023-05-16 深圳启脉科技有限公司 Low-power consumption snore automatic recording method and device based on physiological sign

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340869A (en) * 2005-12-20 2009-01-07 皇家飞利浦电子股份有限公司 System and method for reducing snoring and/or sleep apnea of sleeping person
CN105708419A (en) * 2016-01-27 2016-06-29 乐普(北京)医疗器械股份有限公司 Wrist-type snoring monitoring therapeutic apparatus
CN105708487A (en) * 2016-01-14 2016-06-29 中山佳维电子有限公司 Snoring detection control method for human body snoring detection device
CN106163462A (en) * 2014-01-22 2016-11-23 恩坦蒂有限公司 For detection and the method and system of correction of snoring
CN106669031A (en) * 2016-12-21 2017-05-17 北京品驰医疗设备有限公司 Snoring sleep apnea prevention system
CN109350075A (en) * 2018-09-18 2019-02-19 深圳和而泰数据资源与云技术有限公司 A kind of sound of snoring detection method, device and readable storage medium storing program for executing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9044136B2 (en) * 2007-02-16 2015-06-02 Cim Technology Inc. Wearable mini-size intelligent healthcare system
US9241635B2 (en) * 2010-09-30 2016-01-26 Fitbit, Inc. Portable monitoring devices for processing applications and processing analysis of physiological conditions of a user associated with the portable monitoring device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340869A (en) * 2005-12-20 2009-01-07 皇家飞利浦电子股份有限公司 System and method for reducing snoring and/or sleep apnea of sleeping person
CN106163462A (en) * 2014-01-22 2016-11-23 恩坦蒂有限公司 For detection and the method and system of correction of snoring
CN105708487A (en) * 2016-01-14 2016-06-29 中山佳维电子有限公司 Snoring detection control method for human body snoring detection device
CN105708419A (en) * 2016-01-27 2016-06-29 乐普(北京)医疗器械股份有限公司 Wrist-type snoring monitoring therapeutic apparatus
CN106669031A (en) * 2016-12-21 2017-05-17 北京品驰医疗设备有限公司 Snoring sleep apnea prevention system
CN109350075A (en) * 2018-09-18 2019-02-19 深圳和而泰数据资源与云技术有限公司 A kind of sound of snoring detection method, device and readable storage medium storing program for executing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于小波熵的鼾音信号去噪处理;张引红,李全禄;《计算机工程与应用》;20111231;第47卷(第30期);全文 *

Also Published As

Publication number Publication date
CN110179436A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN110179436B (en) Snore sampling method and terminal equipment
EP2962637B1 (en) Human motion status monitoring method and device
US8296274B2 (en) Considering multiple lookups in bloom filter decision making
CN107595245A (en) A kind of dormancy management method, system and terminal device
CN108388912A (en) Sleep stage method based on multisensor feature optimization algorithm
WO2021248882A1 (en) Methods and apparatuses for constructing sleep state detection model and for detecting sleep state
Barata et al. Automatic recognition, segmentation, and sex assignment of nocturnal asthmatic coughs and cough epochs in smartphone audio recordings: observational field study
CN103006182B (en) Household preliminary detecting system of SAHS (Sleep Apnea Hypopnea Syndrome)
CN108697328B (en) Snore identification method and snore stopping device
Alencar et al. Dynamics of snoring sounds and its connection with obstructive sleep apnea
CN209186698U (en) A kind of epilepsy early warning device based on FPGA
WO2021051944A1 (en) Automatic sleep aid music pushing method and apparatus, computer device, and storage medium
CN114176521B (en) Sleep staging method and device based on radar information and terminal
Oletic et al. System‐level power consumption analysis of the wearable asthmatic wheeze quantification
CN111291328B (en) Transient event identification method, system and equipment based on fine slope
CN114839556A (en) Power battery abnormality detection method, power battery abnormality detection device, storage medium, and electronic device
CN106821336A (en) Sleep monitor method and system
CN109542021A (en) A kind of sensor weak signal data acquisition method and device
CN113164101B (en) Respiratory arrest detection system, method, computing device and storage medium
JPWO2019116830A1 (en) Cognitive decline judgment system
CN110151182B (en) Apnea type identification method and device
Joseph et al. A low complexity on-chip ECG data compression methodology targeting remote health-care applications
CN109887526B (en) Method, device, equipment and storage medium for detecting physiological state of ewe
CN107456211B (en) Snore detection method, system and terminal equipment
CN117648026B (en) I2C master-slave chip switching method and system based on watch wearing application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant