Method for collecting snore by earphone, storage medium and earphone

By analyzing sleep state and detecting snoring, and utilizing a graded triggering mechanism and a lightweight model, low-power snoring acquisition is achieved, solving the problems of high power consumption and data redundancy in existing headphone snoring acquisition, and improving acquisition accuracy and efficiency.

CN121774458APending Publication Date: 2026-04-03JIANGXI RUISHENG ELECTRONIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing headphones consume high power and have redundant data when collecting snoring sounds, resulting in low processing efficiency.

Method used

By analyzing sleep state, detecting snoring, and directional data acquisition, and using a hierarchical triggering mechanism, audio signals from the user's mouth and nose are collected. Combined with a lightweight neural network and a gradient boosting decision tree model, power consumption is reduced and acquisition accuracy is improved.

Benefits of technology

It effectively reduces frequent false triggers in snoring sound acquisition, reduces data acquisition redundancy and audio data processing complexity, improves the accuracy and efficiency of snoring sound acquisition, and reduces the power consumption of the headphone snoring sound acquisition function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121774458A_ABST
    Figure CN121774458A_ABST
Patent Text Reader

Abstract

The invention discloses a method for collecting snore through an earphone, a storage medium and the earphone. The method comprises the steps that whether sleep analysis is triggered at the current time or not is detected; if yes, the earphone collects an environment audio signal, a posture signal and a heart rate signal; determining whether to start a sleep collection mode based on the environment audio signal, the posture signal, the heart rate signal and a preset sleep analysis model; if yes, the earphone collects an environment audio signal, and target features are extracted from the environment audio signal; based on the target feature and a preset snore event model, whether snore collection is started or not is determined; and if yes, directionally collecting audio signals at the mouth and nose of the user. According to the method, the function of collecting the snore of the user with low power consumption is achieved by analyzing the sleeping state of the user, detecting the snore and directionally collecting the snore through a grading triggering mechanism, frequent false triggering of snore collection is reduced, the redundancy of snore data collection and the complexity of processing are reduced, and the accuracy and efficiency of snore collection are improved; and the power consumption of the earphone snore acquisition function is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of headphone technology, and in particular to a method for collecting snoring sounds using headphones, a storage medium, and headphones. Background Technology

[0002] With the continuous development of electronic technology, users have increasingly higher demands for headphone functionality. Existing headphones have been developed with health monitoring functions, such as heart rate monitoring and sleep quality analysis. For headphones equipped with sleep quality analysis, they typically monitor the user's snoring during sleep. In current technology, headphones usually directly collect ambient audio signals and analyze all audio signals to extract the user's snoring. This method of snoring acquisition has high power consumption, redundant data, and low processing efficiency.

[0003] Therefore, it is necessary to provide a method for collecting snoring sounds with headphones, a storage medium, and headphones to solve the above-mentioned problems. Summary of the Invention

[0004] In view of the shortcomings of the existing technology, the present invention provides a method, storage medium and earphone for collecting snoring sound with an earphone, which can effectively solve the problems of excessive power consumption, redundant data collection and low processing efficiency in earphone snoring sound collection.

[0005] To achieve the above objectives, a first aspect of the present invention provides a method for collecting snoring sounds using an earphone, the steps of which include:

[0006] Detect whether the current time has triggered sleep analysis;

[0007] If so, the headphones will collect ambient audio signals, posture signals, and heart rate signals;

[0008] Based on environmental audio signals, posture signals, heart rate signals, and a preset sleep analysis model, it is determined whether to activate the sleep data collection mode.

[0009] If so, the headphones collect ambient audio signals and extract target features from the ambient audio signals;

[0010] Based on the target characteristics and the preset snoring event model, determine whether to start snoring collection;

[0011] If so, then the audio signal from the user's mouth and nose will be collected in a specific direction.

[0012] In one implementation, the step of detecting whether the current time triggers sleep analysis includes:

[0013] Obtain the user-preset specific time information and the current time information;

[0014] Determine whether the current time information falls within a specific time period;

[0015] If so, then a sleep analysis will be triggered.

[0016] In one implementation, the steps of the headphones acquiring ambient audio signals, user posture signals, and heart rate signals include:

[0017] Based on a preset acquisition cycle, the headphones acquire ambient audio signals, posture signals, and heart rate signals.

[0018] In one implementation, the step of determining whether to activate the sleep data acquisition mode based on environmental audio signals, posture signals, heart rate signals, and a preset sleep analysis model includes:

[0019] Based on the preset extraction time, several noise intensity features, posture features, and heart rate features are extracted from the environmental audio signal, posture signal, and heart rate signal, respectively.

[0020] Based on several noise intensity features, posture features, and heart rate features, aggregated features are obtained;

[0021] The sleep analysis model outputs the probability of a sleep event based on aggregated features;

[0022] Based on the probability of falling asleep, determine whether to initiate sleep data collection.

[0023] In one implementation, the step of obtaining aggregated features based on several noise intensity features, posture features, and heart rate features includes:

[0024] By fusing noise intensity features, posture features, and heart rate features from the same time period, a comprehensive feature is obtained.

[0025] Aggregate the features to obtain aggregated features.

[0026] In one implementation, the step of the sleep analysis model outputting the probability of a sleep event based on aggregated features includes:

[0027] Input the aggregated features into the sleep analysis model;

[0028] The sleep analysis model analyzes aggregated features to obtain several specific scores;

[0029] Calculate the average of several specific scores to obtain the target score;

[0030] Map the target score and output the probability of falling asleep.

[0031] In one implementation, the step of the headphones acquiring ambient audio signals and extracting target features from the ambient audio signals includes:

[0032] The headphones collect ambient audio signals and convert them into an audio spectrum.

[0033] Based on the preset target bandwidth, the target spectrum is obtained from the audio spectrum;

[0034] Extract target features from the target spectrum.

[0035] In one implementation, the step of determining whether to initiate snoring acquisition based on target features and a preset snoring event model includes:

[0036] Input the target features into the snoring event model;

[0037] Based on a pre-defined reasoning process, the snoring event model analyzes the target characteristics and obtains the total score.

[0038] Convert the total score and output the probability of snoring events;

[0039] Based on the probability of snoring events, determine whether to initiate snoring sound collection.

[0040] A second aspect of the present invention provides a computer-readable storage medium comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for collecting snoring sounds with headphones as described above.

[0041] A third aspect of the present invention provides an earphone including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the earphone method for collecting snoring as described above.

[0042] The beneficial effects of this invention are as follows: by analyzing the user's sleep state, detecting and directionally collecting snoring sounds, and using a hierarchical triggering mechanism, the function of collecting snoring sounds during the user's sleep can be realized with low power consumption. This can effectively reduce the frequent false triggering of snoring sound collection, reduce the redundancy of snoring sound data collection and the complexity of audio data processing, improve the accuracy and efficiency of snoring sound collection, and reduce the power consumption of the headphone snoring sound collection function. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating the method for collecting snoring sounds using headphones, as disclosed in an embodiment of the present invention.

[0044] Figure 2 This is a schematic diagram of the module structure of the earphone disclosed in an embodiment of the present invention. Detailed Implementation

[0045] In this invention, the terms "set up," "equipped with," and "connected" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, elements, or components. Those skilled in the art can understand the specific meaning of these terms in this invention according to the specific circumstances.

[0046] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0047] Furthermore, in addition to indicating direction or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in certain situations to indicate a dependency or connection. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.

[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0049] The following is the content of the first aspect of the present invention:

[0050] Please refer to Figure 1 In this embodiment, the steps of the method for collecting snoring sounds using headphones include:

[0051] S1. Check if the current time triggers sleep analysis;

[0052] S2. If so, the headphones will collect ambient audio signals, posture signals, and heart rate signals.

[0053] Among them, sleep analysis is the detection and analysis of the user's sleep state. Several devices are set inside the headphones, including but not limited to a microphone array, a posture sensor and a heart rate sensor. The microphone array can be used to acquire the ambient audio signal of the scene in which the headphones are currently located. The posture sensor can be used to acquire the posture signal corresponding to the user's current posture state, including but not limited to lying down, walking and running. The heart rate sensor is used to acquire the heart rate signal of the user's current state.

[0054] Before triggering the collection of snoring sounds during a user's sleep, it's necessary to determine if the user is currently asleep. Therefore, sleep analysis is required. This can be achieved by obtaining the current time information to determine whether to initiate sleep detection and analysis. Specifically, sleep analysis can be initiated based on a pre-set fixed trigger time or a trigger time set by the user according to their own usage needs. It's easy to understand that, at a general level, human sleep patterns follow certain regularities; therefore, a fixed trigger time period for sleep analysis can be set internally within the headphones. At an individual level, each person's sleep time varies; therefore, one or more trigger time periods can be set according to the user's specific needs to trigger sleep analysis within those specific time periods. This can be selected based on the actual design requirements.

[0055] After triggering sleep analysis, the headphones activate the microphone array, posture sensor, and heart rate sensor to acquire ambient audio signals, the user's current posture signal, and the user's current heart rate signal for subsequent sleep analysis. It's easy to understand that ambient audio signals, posture signals, and heart rate signals all reflect the user's current state to varying degrees. By comprehensively analyzing these signals, the accuracy of subsequent sleep analysis can be improved.

[0056] S3. Based on environmental audio signals, posture signals, heart rate signals and a preset sleep analysis model, determine whether to activate the sleep data collection mode;

[0057] S4. If so, the headphones collect ambient audio signals and extract target features from the ambient audio signals;

[0058] S5. Based on the target features and the preset snoring event model, determine whether to start snoring collection;

[0059] S6. If so, then collect audio signals from the user's mouth and nose.

[0060] The sleep analysis model is a pre-trained model used to analyze and determine whether the user is asleep, and it outputs the probability of sleep events. The sleep acquisition mode is a low-power operating mode where the headphones collect the user's snoring while the user is asleep. Target features are the characteristic information of environmental audio signals corresponding to the frequency band of snoring features. The snoring event model is a pre-trained model used to analyze whether the user is snoring, and it outputs the probability of snoring events. Directional acquisition is a method of acquiring audio signals from the user's mouth and nose using beamforming of the microphone array within the headphones for relatively precise acquisition.

[0061] In addition to ensuring the accuracy of model inference and analysis, it is also necessary to ensure that the model has relatively low power consumption to achieve continuous monitoring during the user's sleep process. Specifically, the sleep analysis model can use lightweight neural networks (MLP), lightweight gradient boosting decision trees (LightGBM), and similarly, the snoring event model can also use lightweight neural networks (MLP), lightweight gradient boosting decision trees (LightGBM), etc., and the choice can be made according to the actual design requirements.

[0062] After obtaining environmental audio signals, posture signals, and heart rate signals, these signals are preprocessed. Corresponding feature information is extracted from each of these preprocessed signals. This feature information is then fused based on preset weights and input into a sleep analysis model. The model analyzes the input feature information according to preset inference logic, outputting sleep event probabilities. Based on these probabilities, it determines whether to activate the sleep data collection mode. Specifically, the sleep data collection mode is activated when the sleep event probability meets preset requirements; otherwise, it is not activated.

[0063] After the sleep acquisition mode is triggered, the microphone array inside the earphones acquires ambient audio signals, preprocesses the obtained ambient audio signals, and converts them into the desired audio spectrum. Specifically, the ambient audio signals can undergo short-time Fourier transform or Mel-transform to obtain the desired audio spectrum. After obtaining the audio spectrum, the desired target features can be extracted from the audio spectrum based on the distribution pattern of snoring characteristics.

[0064] After obtaining the target features, they are input into a pre-set snoring event model. The snoring event model then processes and analyzes the target features according to pre-set reasoning and analysis logic to output snoring event probabilities. Based on these probabilities, it is then determined whether to initiate snoring data collection. Specifically, when the snoring event probability meets preset requirements, audio signals from the user's mouth and nose are collected.

[0065] Understandably, by analyzing the user's sleep state, detecting and directionally collecting snoring sounds, and utilizing a graded triggering mechanism, the function of collecting snoring sounds during sleep with low power consumption can be achieved. This can effectively reduce frequent false triggers of snoring sound collection, reduce the redundancy of snoring sound data collection and the complexity of audio data processing, improve the accuracy and efficiency of snoring sound collection, and reduce the power consumption of the headphone snoring sound collection function.

[0066] Furthermore, in a preferred embodiment, step S1 of detecting whether the current time triggers sleep analysis includes:

[0067] S11. Obtain the user-preset specific time information and the current time information;

[0068] S12. Determine whether the current time information is within a specific time information;

[0069] S13. If so, then trigger sleep analysis.

[0070] Among them, the specific time information refers to the trigger time period for sleep analysis that the user has preset according to their own usage needs.

[0071] During actual use of the headphones, users may experience special sleep periods such as naps. Users can pre-set specific trigger time periods according to their own needs to trigger sleep analysis and detection during those specific time periods.

[0072] Specifically, the system obtains the specific time information and the current time information pre-set inside the earphone, and then compares the current time information with the start and end times of the specific time information. If the current time information is detected to be within the specific time information, the sleep analysis is triggered.

[0073] Understandably, allowing users to set their own trigger time can better meet user needs and address real-world usage scenarios. At the same time, by using time-based detection to trigger sleep analysis, sleep analysis trigger detection is achieved in a relatively simple way, reducing the power consumption of the headphones.

[0074] Furthermore, in a preferred embodiment, step S2, in which the headphones acquire ambient audio signals, the user's posture signals, and heart rate signals, includes:

[0075] Based on a preset acquisition cycle, the headphones acquire ambient audio signals, posture signals, and heart rate signals.

[0076] After triggering sleep analysis, the headphones acquire a preset data acquisition cycle and activate the microphone array, posture sensor, and heart rate sensor accordingly to periodically acquire ambient audio signals, posture signals, and heart rate signals. The specific acquisition cycle can be determined through testing and is not limited here.

[0077] It is understandable that a user's sleep state is a continuous state. After triggering sleep analysis, by periodically acquiring environmental audio signals, posture signals, and heart rate signals, it can better adapt to the scenario after the user enters a sleep state. This can effectively avoid the continuous operation of various components in the headphones, reduce the redundancy of the collected data, and reduce the power consumption of the headphones.

[0078] Furthermore, in one embodiment, step S3, which determines whether to activate the sleep acquisition mode based on environmental audio signals, posture signals, heart rate signals, and a preset sleep analysis model, includes:

[0079] S31. Based on the preset interception time, extract several noise intensity features, posture features and heart rate features from the environmental audio signal, posture signal and heart rate signal respectively.

[0080] S32. Based on several noise intensity features, posture features, and heart rate features, aggregated features are obtained;

[0081] S33. The sleep analysis model outputs the probability of sleep events based on aggregated features;

[0082] S34. Based on the probability of falling asleep, determine whether to start sleep data collection.

[0083] Among them, noise intensity features are the energy intensity characteristics of noise in the current ambient audio, which can be used to represent the noise level of the current environment. Posture features are the characteristic information of the user's current posture, which can be used to identify the characteristics of the current posture. Heart rate features are the heart rate performance of the user in the current state. Aggregated features are the feature information obtained by fusing several noise intensity features, posture features, and heart rate features according to a preset method and weights. Sleep event probability is the probability that the user is currently asleep, output by the sleep analysis model.

[0084] After acquiring the environmental audio signal, posture signal, and heart rate signal, preprocessing is performed on each of them. Then, based on the preset truncation duration, the preprocessed environmental audio signal, posture signal, and heart rate signal are segmented. This truncation duration can be set according to the duration of acquiring the environmental audio signal, posture signal, and heart rate signal, and can be adjusted according to actual design requirements. No limitation is made here.

[0085] After segmenting the environmental audio signal, posture signal, and heart rate signal, the required noise intensity features, posture features, and heart rate features are extracted from each signal. Specifically, features extracted from the environmental audio signal to constitute noise intensity features include, but are not limited to, environmental noise level, noise stability, low-frequency energy proportion, and zero-crossing rate, which can be selected according to the actual design requirements. Features extracted from the posture signal to constitute posture features include, but are not limited to, motion intensity, static proportion, posture stability, and rollover detection, which can be selected according to the design requirements. Features extracted from the heart rate signal to constitute heart rate features include, but are not limited to, average heart rate, heart rate decline trend, and heart rate stability, which can be selected according to the actual design requirements.

[0086] After obtaining several noise intensity features, posture features, and heart rate features, these features are fused according to preset weights and methods to obtain the aggregated features needed for sleep analysis. Specifically, the degree of influence of noise intensity features, posture features, and heart rate features on the user's sleep state analysis differs. It is easy to understand that posture features and heart rate are more indicative of whether a user is asleep than noise intensity features. Noise intensity features can assist in sleep analysis assessment to some extent; therefore, their weights differ. The weights for fusing noise intensity features, posture features, and heart rate features can be adjusted according to actual testing and analysis sensitivity design requirements, and are not limited here.

[0087] In a preferred embodiment, step S32, which obtains the aggregated features based on several noise intensity features, posture features, and heart rate features, includes:

[0088] S321. Combine noise intensity features, posture features, and heart rate features from the same time period to obtain comprehensive features;

[0089] S322. Combine and synthesize features to obtain aggregated features.

[0090] The user's sleep state is a continuous state. In order to reduce the analysis error and better reflect the continuous nature of the analysis, after acquiring the ambient audio signal, posture signal and heart rate signal, the ambient audio signal, posture signal and heart rate signal are segmented based on the preset interception time to obtain ambient audio signal, posture signal and heart rate signal of several time segments. Then, several corresponding noise intensity features, posture features and heart rate features are obtained from the corresponding ambient audio signal, posture signal and heart rate signal.

[0091] After obtaining noise intensity features, posture features, and heart rate features, the noise intensity features, posture features, and heart rate features of the same time period are fused according to preset weights to obtain comprehensive features. Then, the obtained comprehensive features are aggregated to obtain aggregated features.

[0092] Understandably, by using a method that integrates noise intensity features, posture features, and heart rate features from the same time period to obtain comprehensive features, and then aggregating several comprehensive features to obtain aggregated features, it is possible to better reflect the characteristics of sleep continuity, improve the smoothness of feature information, reduce the impact of abrupt changes in feature information on sleep analysis, and to a certain extent improve the accuracy of the probability of sleep events output by the subsequent sleep analysis model.

[0093] Furthermore, after obtaining the aggregated features, the aggregated features are input into the sleep analysis model, which outputs the probability of a sleep event based on the aggregated features. In one embodiment, step S33, where the sleep analysis model outputs the probability of a sleep event based on the aggregated features, includes:

[0094] S331. Input the aggregated features into the sleep analysis model;

[0095] S332. The sleep analysis model analyzes aggregated features to obtain several specific scores;

[0096] S333. Calculate the average of several specific scores to obtain the target score;

[0097] S334. Map the target score and output the probability of falling asleep.

[0098] The specific score is the corresponding score output by the sleep analysis model after analyzing local information in the comprehensive features. The target score is the overall score output by the sleep analysis model after analyzing the comprehensive features.

[0099] Specifically, after processing noise intensity features, posture features, and heart rate features to obtain comprehensive features, these aggregated features are input into the sleep analysis model. Since the comprehensive features are time-based and composed of multiple features, the sleep analysis model performs multiple local inference analyses on the aggregated features, limited by the aggregation nodes, and outputs corresponding specific scores to continuously infer the probability of the user's current sleep state within a target time period. After obtaining several specific scores, the average of these scores is calculated to obtain the target score. Finally, a preset activation function is used to map and transform the target score, thereby obtaining the probability of falling asleep.

[0100] It is understandable that a user's sleep state is a continuous process, not an instantaneous state. By using a sleep analysis model to perform inference analysis on aggregated features, smooth inference analysis of feature information across multiple time periods can be achieved. This can effectively reduce the instantaneous misjudgment of the sleep analysis model and improve the output accuracy of the sleep analysis model. While maintaining relatively high analysis accuracy, it can effectively optimize the computational load of inference, thereby reducing the power consumption of the headphones.

[0101] After obtaining the probability of falling asleep, the system determines whether to activate the sleep data collection mode based on this probability. Specifically, when the probability of falling asleep meets the preset criteria, it indicates that the user is likely currently asleep, and therefore the sleep data collection mode is activated. When the probability of falling asleep does not meet the preset criteria, it indicates that the user is very likely currently not asleep, and therefore the sleep data collection mode is not activated.

[0102] It is understandable that by utilizing multi-feature information and a sleep analysis model to detect whether the user is asleep, the accuracy and efficiency of sleep state detection are greatly improved while ensuring relatively low computational load, reducing false triggering of subsequent sleep acquisition modes, and reducing the power consumption of the headphones to some extent.

[0103] Furthermore, in one embodiment, step S4, in which the headphones acquire ambient audio signals and extract target features from the ambient audio signals, includes:

[0104] S41. The headphones collect ambient audio signals and convert them into an audio spectrum.

[0105] S42. Based on the preset target bandwidth, obtain the target spectrum from the audio spectrum;

[0106] S43. Extract target features from the target spectrum.

[0107] The target bandwidth is the frequency band containing the characteristic frequencies of snoring. The target spectrum is the spectrum corresponding to the target bandwidth extracted from the audio spectrum. The target feature is the audio feature information extracted from the target spectrum.

[0108] After triggering the sleep acquisition mode, the earphones activate their microphone array to acquire ambient audio signals from the current environment. The pre-processed ambient audio signals are then converted into an audio spectrum. After obtaining the audio spectrum, a preset target bandwidth is acquired. Based on this target bandwidth, the desired spectrum is extracted from the audio spectrum. Following the acquisition of the target spectrum, and considering the audio characteristics of snoring and the need for low power consumption, the required target features are extracted from the target spectrum. Specifically, the required feature information can be extracted from multiple aspects, such as the spectral envelope shape, harmonic characteristics, energy characteristics, and spectral complexity characteristics of the audio spectrum, to serve as target features.

[0109] Understandably, by extracting the target spectrum from the ambient audio spectrum and combining it with the characteristics of snoring and low power consumption requirements, the method of extracting target features from the target spectrum ensures the adaptability and accuracy of the target features used for snoring recognition, while significantly reducing the amount of data processing and thus reducing the power consumption of the headphones.

[0110] Furthermore, in one embodiment, step S5, which determines whether to initiate snoring acquisition based on target features and a preset snoring event model, includes:

[0111] S51. Input the target features into the snoring event model;

[0112] S52. Based on the preset reasoning process, the snoring event model analyzes the target characteristics and obtains the total score.

[0113] S53. Convert the total score and output the probability of snoring events;

[0114] S54. Based on the probability of snoring events, determine whether to start snoring collection.

[0115] After acquiring the target features, these features are input into the snoring event model. The model then performs reasoning analysis on the target features according to a pre-defined inference process to obtain the required total score. Specifically, the snoring event model sequentially analyzes the target features based on several pre-set decision tree nodes within the model to obtain several sub-scores. After obtaining these sub-scores, they are summed to obtain the total score. This total score is then transformed to obtain the probability of the snoring event.

[0116] After obtaining the probability of snoring events, the system determines whether to start snoring collection based on the probability of snoring events. When the probability of snoring events meets the preset requirements, it means that the user is currently snoring and snoring directional collection can be started. When the probability of snoring events does not meet the preset requirements, it means that the user is not currently snoring.

[0117] Understandably, by setting up a snoring event model to infer and analyze target features, the accuracy of snoring recognition is improved. At the same time, the dual simplification of target features and snoring recognition model can effectively reduce the amount of data processing and processing difficulty, reduce the chip's computing power consumption, and thus reduce the power consumption of the headphones.

[0118] In summary, this application, through user sleep state analysis, snoring detection and directional acquisition, and utilizing a hierarchical triggering mechanism, achieves low-power acquisition of snoring during user sleep. This effectively reduces frequent false triggers of snoring acquisition, reduces redundancy in snoring data acquisition and complexity in audio data processing, improves the accuracy and efficiency of snoring acquisition, and reduces the power consumption of the headphone snoring acquisition function.

[0119] The following is the content of the second aspect of the present invention:

[0120] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for collecting snoring sounds using headphones.

[0121] The following is the content of the third aspect of the present invention:

[0122] A third aspect of the present invention provides an earphone, such as Figure 2 As shown, the earphone includes a memory 10, a processor 20, and a method program instruction 30 for earphone snoring acquisition stored in the memory 10 and executable on the processor 20. When the method program instruction 30 for earphone snoring acquisition is executed by the processor 20, the aforementioned method for earphone snoring acquisition is implemented.

[0123] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is typically used to control the overall operation of the headphones. In this embodiment, the processor is used to run program code stored in a readable storage medium or to process data.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0125] The above are merely specific embodiments of this application. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for collecting snoring sounds with headphones, characterized in that, include: Detect whether the current time has triggered sleep analysis; If so, the headphones will collect ambient audio signals, posture signals, and heart rate signals; Based on the environmental audio signals, posture signals, heart rate signals, and a preset sleep analysis model, determine whether to activate the sleep data collection mode; If so, the headphones collect ambient audio signals and extract target features from the ambient audio signals; Based on the target features and the preset snoring event model, determine whether to start snoring acquisition; If so, then the audio signal from the user's mouth and nose will be collected in a specific direction.

2. The method for collecting snoring sound with headphones according to claim 1, characterized in that, The step of detecting whether the current time triggers sleep analysis includes: Obtain the user-preset specific time information and the current time information; Determine whether the current time information is within the specific time information; If so, then a sleep analysis will be triggered.

3. The method for collecting snoring sounds with headphones according to claim 1, characterized in that, The steps for the headphones to acquire ambient audio signals, user posture signals, and heart rate signals include: Based on a preset acquisition cycle, the headphones acquire ambient audio signals, posture signals, and heart rate signals.

4. The method for collecting snoring sound with headphones according to claim 1, characterized in that, The step of determining whether to activate the sleep data collection mode based on the environmental audio signals, posture signals, heart rate signals, and a preset sleep analysis model includes: Based on a preset extraction duration, several noise intensity features, posture features, and heart rate features are extracted from the environmental audio signal, posture signal, and heart rate signal, respectively. Based on several of the aforementioned noise intensity features, posture features, and heart rate features, aggregated features are obtained; The sleep analysis model outputs the probability of a sleep event based on the aggregated features; Based on the probability of falling asleep, determine whether to initiate sleep data collection.

5. The method for collecting snoring sounds with headphones according to claim 4, characterized in that, The step of obtaining the aggregated features based on several noise intensity features, posture features, and heart rate features includes: The noise intensity features, posture features, and heart rate features from the same time period are respectively fused to obtain a comprehensive feature; The aggregated features are obtained by combining the comprehensive features.

6. The method for collecting snoring sounds with headphones according to claim 4, characterized in that, The steps of the sleep analysis model to output the probability of a sleep event based on the aggregated features include: The aggregated features are input into the sleep analysis model; The sleep analysis model analyzes the aggregated features and obtains several specific scores; Calculate the average of several specific scores to obtain the target score; Map the target score and output the probability of falling asleep.

7. The method for collecting snoring sounds with headphones according to claim 1, characterized in that, The step of the earphone acquiring ambient audio signals and extracting target features from the ambient audio signals includes: The headphones collect ambient audio signals and convert the ambient audio signals into an audio spectrum. Based on a preset target bandwidth, the target spectrum is obtained from the audio spectrum; Extract target features from the target spectrum.

8. The method for collecting snoring sound with headphones according to claim 1, characterized in that, The step of determining whether to initiate snoring acquisition based on the target features and a preset snoring event model includes: The target features are input into the snoring event model; Based on a preset reasoning process, the snoring event model analyzes the target features to obtain a total score; Convert the total score and output the probability of snoring events; Based on the probability of snoring events, determine whether to initiate snoring sound collection.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for collecting snoring sounds with headphones as described in any one of claims 1 to 8.

10. A pair of headphones, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for collecting snoring sounds with headphones as described in any one of claims 1 to 8.