Five-tone audio output adaptive control method and system based on sleep state information

By using a five-tone audio output adaptive control method based on sleep state information, real-time monitoring of EEG information and adaptive adjustment are achieved, solving the problem that audio content cannot be dynamically adjusted in existing technologies, and realizing personalized and precise sleep improvement effects.

CN123148507APending Publication Date: 2026-11-24THE THIRD AFFILIATED HOSPITAL OF ZHEJIANG CHIENSE MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611447192.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-17
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing non-drug sleep improvement methods lack awareness of the user's real-time sleep status, and the audio content cannot be dynamically adjusted according to individual differences and changes in sleep status, resulting in limited improvement effects.

Method used

The five-tone audio output adaptive control method based on sleep state information monitors the instantaneous phase of slow waves from 0.5Hz to 4Hz using real-time EEG information, outputs audio information and acquires sleep state information, and uses an evaluation model to adaptively adjust frequency, rhythm and intensity to form a closed-loop control.

Benefits of technology

It improves the personalization and accuracy of audio output, dynamically adjusts audio content based on the user's real-time EEG information, and enhances the targeting and effectiveness of sleep improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123148507A_ABST
    Figure CN123148507A_ABST
Patent Text Reader

Abstract

This invention discloses a five-tone audio output adaptive control method and system based on sleep state information, comprising: outputting audio information and acquiring first sleep state information when the instantaneous phase of the slow wave (0.5Hz to 4Hz) enters the target phase interval; the audio information is obtained by matching from a five-tone parameter database according to the TCM insomnia type and sleep state; inputting EEG information from the first and second sleep state information into a preset evaluation model to obtain evaluation coefficients; and adaptively adjusting the audio information based on at least one of frequency, rhythm, and intensity according to the comparison result between the evaluation coefficients and the state evaluation threshold; and using the third sleep state information after audio output as the first sleep state information for cyclic adaptive adjustment. This invention combines the TCM insomnia type and sleep stage to determine the audio content, controls the output timing based on the slow wave phase, and adaptively adjusts based on quantitative evaluation, thereby improving the personalization and accuracy of audio output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sleep monitoring and audio output control technology, and in particular to a five-tone audio output adaptive control method and system based on sleep state information. Background Technology

[0002] With the fast pace of life and increasing mental stress, sleep disorders are becoming increasingly common. Difficulty falling asleep, shallow sleep, frequent awakenings, and declining sleep quality seriously affect people's physical and mental health, making the need to improve sleep increasingly urgent.

[0003] Existing sleep improvement methods mainly include medication and non-medication methods. Although medication methods are more effective, they carry the risk of dependence and side effects, and are not suitable for long-term use. Non-medication methods, such as white noise, music, and meditation, are safer and are gradually gaining attention, but their audio content is usually fixed or pre-set.

[0004] The aforementioned non-drug methods lack awareness of the user's real-time sleep status, and the audio content cannot be dynamically adjusted according to individual differences and changes in sleep status, resulting in insufficient targeting. At the same time, there is a lack of objective quantitative evaluation of the improvement effect, making it difficult to adjust subsequent audio output accordingly based on the improvement effect, thus limiting the improvement effect.

[0005] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a five-tone audio output adaptive control method and system based on sleep state information.

[0007] Firstly, the present invention provides a five-tone audio output adaptive control method based on sleep state information, the technical solution of which is as follows: Based on the real-time EEG information of the target person within a preset monitoring period, when the instantaneous phase of the slow wave from 0.5Hz to 4Hz in the real-time EEG information enters the target phase interval, audio information is output to the target person and the first sleep state information including the EEG information is obtained within a specified time period after the audio output; the audio information is the original audio information matched from a pre-prepared five-tone parameter library according to the target person's TCM insomnia type and sleep state. Based on the EEG information in the first sleep state information and the EEG information in the pre-stored second sleep state information, an evaluation coefficient is obtained by inputting a preset evaluation model; the second sleep state information is information obtained within a preset time period during which no audio information is output, used to determine the TCM type of insomnia and the sleep stage. Based on the comparison results between the evaluation coefficient and the state evaluation threshold, the audio information is adaptively adjusted in at least one of frequency, rhythm, and intensity. The adjusted audio information is used to continue outputting, and the third sleep state information within a specified time period after the audio output is obtained. The third sleep state information is used as the first sleep state information, and the step of obtaining the evaluation coefficient is returned. The adaptive adjustment is performed cyclically. All sleep state information includes: image information, sound information, text information, pulse information and EEG information.

[0008] The beneficial effects of the five-tone audio output adaptive control method based on sleep state information of the present invention are as follows: This invention combines the TCM type of insomnia with the sleep stage to determine the audio content, controls the output timing based on slow wave phase, and adaptively adjusts based on quantitative assessment, thereby improving the personalization and accuracy of audio output.

[0009] Secondly, the present invention provides a five-tone audio output adaptive control system based on sleep state information, including a processor and an audio output module, wherein the processor is connected to the audio output module, and the processor is used to execute the five-tone audio output adaptive control method based on sleep state information as described in any of the above schemes.

[0010] The beneficial effects of the five-tone audio output adaptive control system based on sleep state information of the present invention are as follows: The system of the present invention provides a hardware implementation carrier for the above-mentioned five-tone audio output adaptive control method based on sleep state information through the connection and cooperation between the processor and the audio output module. During the execution of the above method, the processor can control the audio output module to output audio information in the target phase range according to the real-time EEG information of the target person, and perform closed-loop adaptive adjustment of the audio information according to the evaluation coefficient, thereby realizing adaptive control of the five-tone audio output.

[0011] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0012] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of the five-tone audio output adaptive control method based on sleep state information according to the present invention. Figure 2This is a schematic diagram of an embodiment of a five-tone audio output adaptive control system based on sleep state information according to the present invention. Detailed Implementation

[0013] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0014] Example 1: like Figure 1 As shown, this embodiment provides a five-tone audio output adaptive control method based on sleep state information, including steps S100 to S400.

[0015] S100. Based on the real-time EEG information of the target person within the preset monitoring period, when the instantaneous phase of the slow wave from 0.5Hz to 4Hz in the real-time EEG information enters the target phase interval, audio information is output to the target person and the first sleep state information including EEG information is obtained within a specified time period after the audio output; the audio information is the original audio information matched from the pre-prepared five-tone parameter library according to the target person's TCM insomnia type and sleep state.

[0016] Specifically, the preset monitoring period is exemplarily a full-night monitoring period at night, the length of which matches the battery life of the head-mounted device of no less than 8 hours, covering the target person's entire sleep process throughout the night. During the preset monitoring period, the head-mounted device continuously collects real-time EEG information from the target person, and analyzes the real-time EEG information to determine the instantaneous phase of the slow waves from 0.5Hz to 4Hz. The specific extraction process of the instantaneous phase can be found in Example 4, and the definition of the target phase interval and the timing constraints of the audio output can be found in Example 5.

[0017] Before the initial output, the audio information is obtained by matching the target person's TCM insomnia type and sleep state from the Five Tones parameter database. For ease of distinction, the audio information obtained directly from the Five Tones parameter database without adaptive adjustment is referred to as the original audio information. The audio information obtained after adaptive adjustment of the original audio information in step S300 still belongs to the audio information referred to in this application, and is the adjusted form of the original audio information. The specific matching process of the original audio information can be found in Example 3.

[0018] When the instantaneous phase enters the target phase interval, audio information is output to the target person. The audio information is output in a triggered manner, and the timing of the output is determined by the target person's own brainwave rhythm, so that the audio output is synchronized with the activity of slow waves from 0.5Hz to 4Hz and the interference with the target person's sleep process is reduced.

[0019] After audio output, first sleep state information, including EEG information, is acquired within a specified time period. The EEG information in the first sleep state information reflects the target person's EEG state after audio output. The specified time period is exemplarily a 30-60 minute period starting from the end of one round of audio output. The length of the specified time period is set based on the following considerations: if the time period is too short, the statistical sample of indicators used for evaluation, such as the proportion of deep sleep stage and sleep latency, will be insufficient, and the evaluation results will be unstable; if the time period is too long, the adjustment of audio information will not be timely, and the closed-loop response speed will decrease.

[0020] S200: Based on the EEG information in the first sleep state information and the EEG information in the pre-stored second sleep state information, input the preset evaluation model to obtain the evaluation coefficient; the second sleep state information is information obtained within a preset time period during which no audio information is output, used to determine the TCM type of insomnia and sleep stage, including image information, sound information, text information, pulse information and EEG information.

[0021] The second sleep state information is pre-stored as the baseline data for the subsequent evaluation process. The preset time period is, for example, a complete nighttime monitoring period before audio output. In one embodiment, the preset time period can also be multiple consecutive nighttime monitoring periods before audio output to improve the stability of the baseline data.

[0022] The acquisition methods of various types of information in the second sleep state information are illustrated as follows: Image information is obtained by acquiring facial and tongue images of the target person through a high-definition camera; sound information is obtained by recording audio of the target person during sleep through a microphone; text information is entered through a human-computer interaction interface in the form of a structured entry form, and the entered entries cover relevant content such as chief complaints and symptoms; pulse information is obtained by acquiring pulse signals of the target person through a pressure sensor array; electroencephalogram (EEG) information is acquired through a head-mounted device worn on the head of the target person, and the signal conditioning and analog-to-digital conversion process at the head-mounted device end can be referred to in Example 8.

[0023] Specifically, the preset evaluation model takes EEG information from two time periods as input and an evaluation coefficient as output. The pre-stored EEG information from the second sleep state corresponds to the baseline time period before audio output, while the EEG information from the first sleep state corresponds to the specified time period after audio output. The preset evaluation model processes the EEG information from both time periods and outputs an evaluation coefficient representing the change in sleep quality after audio output relative to before audio output. This provides a quantitative basis for adaptive adjustment based on the comparison between the evaluation coefficient and the state evaluation threshold. The specific calculation process for the evaluation coefficient can be found in Example 6.

[0024] S300. Based on the comparison results between the evaluation coefficient and the state evaluation threshold, the audio information is adaptively adjusted by at least one of frequency, rhythm, and intensity.

[0025] Specifically, a state evaluation threshold is preset, and the evaluation coefficient is compared with the state evaluation threshold. Based on the comparison result, an adjustment strategy for the audio information is determined. In one embodiment, adaptive adjustment is achieved by applying frequency adjustment coefficient, rhythm adjustment coefficient, and intensity adjustment coefficient to the three parameter dimensions of frequency characteristics, rhythm, and intensity of the audio information, respectively. For specific determination conditions and mechanisms, please refer to Example 7.

[0026] It should be noted that, based on the comparison result between the evaluation coefficient and the state evaluation threshold, the control process enters one of the three scenarios in Example 7: when the evaluation coefficient is greater than 0 and greater than the state evaluation threshold, it enters the maintenance scenario in step S310; when the evaluation coefficient is greater than 0 and less than or equal to the state evaluation threshold, it enters the adaptive adjustment scenario in step S320; and when the evaluation coefficient is less than or equal to 0, it enters the stop output scenario in step S330. These three scenarios are determined by the same comparison result, do not overlap, and collectively cover different value ranges of the evaluation coefficient.

[0027] S400: Continue to output the adjusted audio information, and obtain the third sleep state information within a specified time period after the audio output. Use the third sleep state information as the first sleep state information, return to the step of obtaining the evaluation coefficient, and perform adaptive adjustment in a loop. All sleep state information includes: image information, sound information, text information, pulse information, and EEG information.

[0028] The process of determining the TCM type of insomnia is an intermediate step in the process of matching sleep state information with audio information. The TCM type of insomnia and the sleep stage are pre-determined based on the second sleep state information as benchmark data, which is used to match the audio information from the five-tone parameter library before each round of audio information output. During the cycle, the audio information is updated through adaptive adjustment. The specific process of determining the TCM type of insomnia can be found in Example 2, the specific process of determining the sleep stage can be found in Example 4, and the specific process of matching the audio information from the five-tone parameter library according to the TCM type of insomnia and the sleep stage can be found in Example 3.

[0029] Understandably, before the first execution of step S100, the determination of the TCM type of insomnia, the determination of the sleep stage, and the matching of the original audio information have been completed based on the pre-acquired and stored second sleep state information. The matched audio information is used as the audio information output when the first phase is triggered. After the first output, the audio information is maintained, adjusted, or stopped from being output during the loop according to the comparison result between the evaluation coefficient and the state evaluation threshold. It is not necessary to repeat the determination of the TCM type of insomnia and the initial matching of the five-tone type in each loop.

[0030] It should be noted that in step S400, the current audio information or the adjusted audio information is used to continue outputting, which applies to the maintenance and adjustment scenarios in Embodiment 7. In the case of stopping output, the audio information is stopped and the current closed-loop output process ends, and the subsequent loop of step S400 is not entered. In the maintenance scenario, the audio information itself does not change, and the third sleep state information is still acquired and returned to the evaluation process to continuously monitor changes in sleep state.

[0031] Specifically, when continuing to output the adjusted audio information, the output is still triggered by the instantaneous phase entering the target phase interval, maintaining synchronization with the target person's EEG rhythm. After each round of audio output, the third sleep state information within a specified time period is acquired and returned to step S200 as the first sleep state information, and the process is repeated cyclically for adaptive adjustment. The second sleep state information is pre-stored baseline data, which remains unchanged during the loop, ensuring that each evaluation is based on the baseline data before the audio output.

[0032] It should be noted that a single audio output and a round of audio output for sleep state assessment are concepts at different levels: a single audio output refers to a short audio stimulus output at a phase trigger moment, the duration of which is limited by the temporal constraints in Example 5; a round of audio output refers to the process of continuously executing multiple single audio outputs according to the phase trigger condition under the current audio information. The first sleep state information and the third sleep state information are obtained for the specified time period corresponding to the round of audio output, rather than re-acquiring sleep state information and calculating the evaluation coefficient after each single audio output.

[0033] Through steps S100 to S400 above, audio output, evaluation, and adjustment form a closed-loop control: the audio output is triggered by the instantaneous phase of a slow wave from 0.5Hz to 4Hz entering the target phase range, synchronized with the target person's endogenous EEG rhythm, and the acoustic stimulus is applied to a specific phase of the slow wave activity; the audio information corresponds to the individual situation of the target person; and the various parameters of the audio information are continuously optimized as the target person responds to the actual audio output.

[0034] Example 2: Based on Example 1, this example further explains one of the sources of audio information, namely, the process of determining the TCM type of insomnia based on image information, sound information, text information and pulse information before the first output of audio information.

[0035] Specifically, the various modal data used to determine the TCM type of insomnia are uniformly collected and accessed through a customized dedicated interface, so that various types of data with different data formats and organization methods can be accessed in a unified way for subsequent processing. After access, the collected multimodal data are uniformly cleaned to filter out noisy data and abnormal samples, such as filtering out incomplete image information and sound information that is severely affected by environmental noise, and different preprocessing strategies are adopted for different types of data.

[0036] In one alternative approach, the TCM type of insomnia is determined based on image information, sound information, text information, and pulse information. The determination process includes: firstly, extracting image features based on image information, extracting acoustic features based on sound information, extracting textual semantic features based on text information, and extracting pulse features based on pulse information.

[0037] Specifically, the image information first undergoes preprocessing such as color correction, cropping, resizing, and pixel normalization. Then, features such as tongue color, tongue coating color, and facial color are extracted from the preprocessed image information to obtain image features. In one embodiment, the image features are extracted using a classification model trained on expert-annotated images of physical characteristics as training samples.

[0038] Before extracting acoustic features, the sound information undergoes endpoint detection and noise suppression. Then, acoustic parameters of events such as snoring, sleep talking, teeth grinding, sighing, and abnormal breathing are extracted from the processed sound information to obtain acoustic features. Acoustic parameters include, for example, the frequency of occurrence, duration, and spectral characteristics of the corresponding events.

[0039] The text information is first processed through Chinese word segmentation, stop word filtering, and keyword extraction. The entries in the text information cover the chief complaint, sleep onset, sleep quality, and accompanying symptoms. For example, there are entries for sleep conditions such as difficulty falling asleep, frequent awakenings, vivid dreams, and early awakenings; entries for accompanying symptoms such as palpitations, dizziness, irritability, forgetfulness, poor appetite, and abdominal distension; and quantitative information such as the severity, frequency of occurrence, and duration of each entry.

[0040] Pulse characteristics are extracted from pulse information, and the extracted parameters include pulse rate, pulse amplitude, pulse shape, pulse position, and pulse momentum.

[0041] Among them, the above-mentioned information can be timestamped before feature extraction so that the data of different modalities correspond to each other in the time dimension, which facilitates joint processing at the feature level in the future. For pre-entered information such as structured text entries that do not have continuous time attributes, they can also be used as static features of the corresponding monitoring period for subsequent processing. Time alignment is an optional data organization method and does not require all modal information to be acquired at the same time.

[0042] Furthermore, expert rule features are then extracted using a rule feature extraction model. These expert rule features are used to characterize the degree of conformity between the target individuals and the experiential rules for determining various types of insomnia according to traditional Chinese medicine.

[0043] Specifically, the rules of experience for diagnosis are the standardized expressions of the common experience in categorizing insomnia in the field of Traditional Chinese Medicine (TCM). For example, the rules of experience for diagnosing deficiency of both heart and spleen include symptoms such as frequent dreams and easy awakening, palpitations and forgetfulness, fatigue and weakness, sallow complexion, and loss of appetite. The rules of experience for diagnosing other TCM types of insomnia are similarly composed of standardized expressions of the symptoms, signs, and pulse manifestations of the corresponding type.

[0044] When extracting expert rule features, key features corresponding to the judgment experience rules from textual semantic features, acoustic features, and pulse features are input into the rule feature extraction model. The rule feature extraction model then outputs the degree of conformity between the target person and the rules for each TCM type of insomnia, thus obtaining the expert rule features. For example, when the textual semantic features include items such as frequent dreams and easy awakening, palpitations and forgetfulness, and loss of appetite, these key features correspond to the judgment experience rules for heart and spleen deficiency. Based on this, the rule feature extraction model outputs expert rule features indicating a high degree of conformity between the target person and the judgment experience rules for heart and spleen deficiency. By introducing judgment experience rules, the process of determining the TCM type of insomnia integrates the judgment experience of TCM experts.

[0045] Furthermore, the rule feature extraction model is pre-trained using training samples containing common representational features among different TCM types of insomnia. In one implementation, the pre-training of the rule feature extraction model is completed as a sub-process independent of the main process: training samples are constructed, containing common representational features among different TCM types of insomnia. For example, symptoms such as palpitations, excessive dreaming, easy awakening, and forgetfulness repeatedly appear in multiple TCM types of insomnia, such as deficiency of heart qi, deficiency of both heart and spleen, and disharmony between heart and kidney. The number of training samples corresponding to such common representational features is sufficient. Then, using the common representational features as input and the degree of conformity to the judgment rules of each TCM type of insomnia as a label, the rule feature extraction model is trained.

[0046] In one implementation, the rule feature extraction model is exemplarily implemented using a multi-label classification model. It takes common representational features as input and outputs the degree of conformity between the target individual and the judgment experience rules for each type of insomnia according to Traditional Chinese Medicine (TCM). Since a target individual may simultaneously conform to the judgment experience rules for multiple types of insomnia, the output layer of the multi-label classification model can use a Sigmoid function to output a conformity value between 0 and 1. This multi-label classification model can be, for example, a logistic regression model, a support vector machine model, a decision tree model, a random forest model, a gradient boosting tree model (e.g., XGBoost or LightGBM), or a multilayer perceptron model. In another implementation, the rule feature extraction model can also employ a neural network model containing a feature encoding layer and a classification layer. For example, a Transformer-based pre-trained language model can be used as the feature encoding layer to encode the input, and the classification layer outputs the degree of conformity between the judgment experience rules for each type of insomnia according to TCM. In yet another implementation, the rule feature extraction model can also be implemented without relying on model training. Instead, it can represent the judgment experience rules for each type of insomnia according to TCM as corresponding keyword sets or rule templates, and obtain the degree of conformity between the target individual and the judgment experience rules for each type of insomnia according to TCM by keyword matching or text similarity calculation. Since there are enough training samples corresponding to the common representation features, the above model can be implemented with a structure with a small number of parameters, which can reduce the computational cost while ensuring the effect of expert rule feature extraction, and facilitates its operation in conjunction with the Transformer-based multimodal prediction model.

[0047] The number of specific training samples for a single TCM type of insomnia is limited, exemplarily around several hundred. However, common representational features recur across different TCM types of insomnia, and training samples across types can be used to learn these common representational features. A pre-training rule feature extraction model extracts expert rule features, which are then used to assist in determining the TCM type of insomnia. This alleviates the problem of limited training samples for a single TCM type of insomnia and helps improve the accuracy and generalization ability of the insomnia type determination process.

[0048] Furthermore, acoustic features, textual semantic features, pulse features, and expert rule features are then fused into a first feature set, and image features are used as a second feature set.

[0049] Specifically, acoustic features, textual semantic features, pulse features, and expert rule features all belong to the semantic level description of the symptoms and signs of the target person. They can corroborate each other and are integrated into the first feature set. Image features are intuitive morphological information, which differs from semantic features in terms of data form and representation. Treating them separately as the second feature set can reduce intermodal interference caused by direct mixing of heterogeneous features.

[0050] Furthermore, the TCM type of insomnia is determined based on the first and second feature sets.

[0051] Specifically, the first feature set and the second feature set are input into a Transformer-based multimodal prediction model. A multimodal attention mechanism is used to establish the correlation between the first feature set and the second feature set. The first feature set and the second feature set are fused based on the correlation, and the TCM type of insomnia is determined based on the fusion result.

[0052] In one implementation, the Transformer-based multimodal prediction model includes a feature encoding layer, an attention layer, and an output layer. The feature encoding layer maps various input features into feature vectors. The attention layer establishes the correlation between features based on a multi-head attention mechanism. The output layer outputs the determination result of the TCM type of insomnia based on the fusion result. For example, the multimodal attention mechanism establishes a correlation between tongue color features in image features and items such as sallow complexion and loss of appetite in text semantic features.

[0053] In one implementation, after fusing the first feature set and the second feature set based on the established correlation, the multimodal prediction model outputs the probability of each of the five TCM types of insomnia, and determines the type with the highest probability as the TCM type of insomnia of the target person.

[0054] Among them, the attention mechanism can adaptively establish the correlation between cross-modal features. Compared with the fusion method of directly splicing various features, it reduces the mutual interference between heterogeneous features and improves the accuracy of determining the TCM type of insomnia.

[0055] Through the above process, this embodiment determines the TCM type of insomnia of the target person based on data from multiple modalities, including image information, sound information, text information, and pulse information, and combines expert rule features that incorporate the judgment experience of TCM experts. The TCM type of insomnia is determined based on image information, sound information, text information, and pulse information in the second sleep state information, which serves as the baseline data. The determination result is used to match audio information from the five-tone parameter library before each round of audio information output. For the specific matching process, please refer to Embodiment 3.

[0056] Example 3: Building upon Example 1, this example further explains one of the sources of audio information: the process of matching audio information from the Five Elements parameter database based on the TCM type of insomnia and the sleep stage before the initial output of audio information. The specific process for determining the TCM type of insomnia can be found in Example 2, and the specific process for determining the sleep stage can be found in Example 4; these will not be repeated in this example.

[0057] The system includes a pre-built Five-Tone Parameter Library, which stores the mapping relationship between TCM insomnia types and Five-Tone types, as well as the parameter set associated with each Five-Tone type. The construction of this library is completed independently of the main method flow and is directly invoked during audio information matching. The matching process consists of two steps: first, matching the corresponding Five-Tone type based on the TCM insomnia type; and second, matching audio parameters from the parameter set associated with the matched Five-Tone type based on the sleep stage.

[0058] In one alternative approach, during matching, the corresponding five-tone parameter library is first used to match the insomnia type according to the TCM type of insomnia. The TCM types of insomnia include five types: liver qi stagnation, heart qi deficiency, heart and spleen deficiency, lung and soul disharmony, and heart and kidney disharmony. Among them, liver qi stagnation is matched with the jiao tone, heart qi deficiency is matched with the zhi tone, heart and spleen deficiency is matched with the gong tone, lung and soul disharmony is matched with the shang tone, and heart and kidney disharmony is matched with the yu tone.

[0059] The above mapping relationship is based on the Five Elements theory of Traditional Chinese Medicine: there is a corresponding relationship between the five tones and the five elements and the five internal organs. The Jiao tone belongs to wood and corresponds to the liver, the Zhi tone belongs to fire and corresponds to the heart, the Gong tone belongs to earth and corresponds to the spleen, the Shang tone belongs to metal and corresponds to the lungs, and the Yu tone belongs to water and corresponds to the kidneys. Based on this, five tone types with corresponding five element attributes are set for the five types of TCM insomnia, forming a mapping relationship and storing it in the five tone parameter library.

[0060] Furthermore, based on the sleep stage, audio parameters are matched from the set of parameters associated with the matched five-tone type in the five-tone parameter library. The audio parameters include the dominant frequency range, pitch structure, rhythm parameters, intensity, and timbre type. The matched five-tone type and audio parameters constitute the audio information.

[0061] Specifically, the dominant frequency range, measured in Hertz, characterizes the frequency characteristics of audio information; the pitch structure is a combination of single or multiple tones; the rhythm parameter, measured in beat intervals, characterizes the rhythmic characteristics of audio information; intensity represents the volume; and timbre types, such as natural sounds and instrumental sounds, are used to distinguish the auditory attributes of different sounds. These five types of audio parameters together constitute a multidimensional parameter description of audio information.

[0062] Sleep stages include, for example, wakefulness, light sleep, deep sleep, and REM sleep. The process for determining sleep stages can be found in Example 4. The parameter sets associated with each of the five tone types are set differently according to the sleep stages; that is, the same tone type is associated with multiple parameter sets corresponding to different sleep stages. For example, in the wakefulness or pre-sleep stage, a smooth and continuous tone structure is matched; in the light sleep stage, audio parameters with a lower dominant frequency range and longer rhythm parameter intervals are matched; in the deep sleep stage, audio parameters with lower intensity are matched to reduce the interference of audio output on the deep sleep process.

[0063] For ease of understanding, the table below provides an exemplary structure of the pentatonic parameter library. The table lists examples of instruments and tracks, along with the values ​​of audio parameters, using one of the parameter sets associated with each pentatonic type as an example.

[0064] Table 1:

[0065] It should be noted that the instruments, tracks, and audio parameter values ​​shown in the table are for illustrative purposes only. Other instruments and tracks with corresponding pentatonic attributes can also be used, and this does not constitute a limitation on the content of the pentatonic parameter library. When matching audio parameters, the audio parameters are obtained from the parameter set associated with the matched pentatonic type and corresponding to the sleep stage, based on the determined sleep stage.

[0066] Furthermore, it should be noted that before the initial audio output, a baseline sleep stage is determined based on the EEG information from the second sleep state information. Initial audio parameters are obtained by matching the parameter set corresponding to the baseline sleep stage from the parameter set associated with the matched five-tone type. These initial audio parameters and the matched five-tone type constitute the initial output audio information. In subsequent loops, the audio information is updated based on the initial audio parameters using evaluation and adjustment coefficients, while the matching relationship between the TCM insomnia type and the five-tone type remains unchanged. When the EEG information in the second sleep state information corresponds to multiple time windows, the corresponding time window is determined based on the time position of the initial output time within the baseline monitoring period, and the sleep stage within that time window is used to match the initial audio parameters.

[0067] Therefore, the audio information corresponds to the target person's TCM insomnia type at the level of the five-tone type and is adapted to the target person's sleep stage at the level of audio parameters; the adaptive adjustment of the audio information in the subsequent step S300 is achieved by adjusting the audio parameters through frequency adjustment coefficient, rhythm adjustment coefficient and tone intensity adjustment coefficient in one embodiment, see Example 7.

[0068] Example 4: Based on Example 1, this example further explains the process of determining the sleep stage based on the EEG information in the second sleep state information, and the process of determining the instantaneous phase of the 0.5Hz to 4Hz slow waves in step S100.

[0069] The sleep stage is determined based on EEG information from the second sleep state information, while the instantaneous phase of slow waves (0.5Hz to 4Hz) is determined based on real-time EEG information. Both determination processes are completed using two independent data pathways. The EEG information from the second sleep state information belongs to the baseline data pathway acquired before audio output, and its processing results are used in stages such as matching audio parameters to the five-tone parameter library. The real-time EEG information belongs to the output monitoring data pathway continuously acquired during audio output, used to extract the instantaneous phase of slow waves for phase trigger determination in audio output. The distinction between these two data pathways avoids mutual interference between the two processing methods. The two types of EEG information can use the same or different preprocessing parameters, but their data sources and uses correspond to the baseline evaluation process and the current output process, respectively.

[0070] S110. In an optional manner, when determining the sleep stage, the EEG information in the second sleep state information is first segmented according to a preset time window, and frequency domain features and time domain features are extracted from the EEG information in each time window. The frequency domain features include the relative power of a predefined EEG frequency band, and the time domain features include a stationary index formed by weighting variance, amplitude, and rate of change.

[0071] Specifically, the preset time window is 30 seconds, which is a commonly used window length in sleep stage segmentation: if the window is too long, the time granularity of sleep stage determination becomes coarser; if the window is too short, the number of sample points in a single window is insufficient, and the feature statistics results are unstable. The sampling frequency of EEG information is 256Hz or 512Hz, and with a 30-second time window, a single time window contains 7680 or 15360 sampling points respectively.

[0072] Before segmentation, the EEG information is first denoised and preprocessed: the EEG data is processed by signal conditioning and analog-to-digital conversion at the acquisition end to form discrete EEG time series data. The processing process at the head-mounted device can be found in Example 8. In one embodiment, the body motion information detected by the triaxial accelerometer in the head-mounted device can also be combined to remove the EEG data segments collected during body motion, so as to reduce the impact of body motion artifacts on feature extraction.

[0073] After segmentation, frequency domain features and time domain features are extracted from the EEG information within each time window.

[0074] In terms of frequency domain features, the power spectrum is obtained by performing a fast Fourier transform on the EEG information within each time window. The ratio of the power of a predefined EEG frequency band to the total power of the entire frequency band is determined as the relative power of the corresponding frequency band. The predefined EEG frequency bands include, for example, the δ band (0.5Hz to 4Hz), the θ band (4Hz to 8Hz), the α band (8Hz to 12Hz), and the β band (13Hz to 30Hz), which are used as frequency domain features. The assignment method of the boundary endpoints of each predefined EEG frequency band is preset, and frequency components not included in the corresponding frequency band are not included in the calculation of the relative power of that frequency band.

[0075] In terms of temporal characteristics, the variance, amplitude, and rate of change of EEG information within each time window are calculated, and a stationary index is formed by weighting these three factors. ; Wherein, SI is the stationarity index; Var is the variance of EEG information within the corresponding time window, reflecting the dispersion of signal amplitude; Amp is the amplitude of EEG information within the corresponding time window, reflecting the magnitude of signal amplitude; ROC is the rate of change of EEG information within the corresponding time window, reflecting how quickly the signal changes over time; w1, w2, and w3 are preset weights. The stationarity index is used to compare with the preset stationarity index threshold to characterize the stationarity of the EEG signal within the corresponding time window.

[0076] It should be noted that the dimensions and numerical ranges of variance, amplitude, and rate of change can be different. Before weighted calculation, the three can be normalized according to their respective preset value ranges or statistical benchmarks. The weights w1, w2, and w3 are used to weight the normalized features. Whether to perform normalization and the specific normalization method can be preset according to the dimensions and processing accuracy requirements of the EEG signal.

[0077] Relative power is normalized by the ratio of frequency band power to total power, reducing the differences in EEG amplitude among different target individuals and the interference of noise on features; the stability index characterizes the stability of EEG signals. The combination of these two approaches avoids the one-sidedness of using a single-dimensional feature to represent sleep state; statistical features such as frequency band power have low computational complexity and strong resistance to noise interference, making them suitable for real-time processing scenarios.

[0078] S120. Further, bandpass filtering of the real-time EEG information is performed in the frequency band from 0.5Hz to 4Hz, and instantaneous phase is extracted from the bandpass filtered signal using Hilbert transform.

[0079] Specifically, during the preset monitoring period, real-time EEG information of the target personnel is continuously collected using a head-mounted device. The real-time EEG information is then bandpass filtered in the 0.5Hz to 4Hz frequency band, retaining the slow-wave frequency components. The bandpass-filtered signal x(t) is then subjected to a Hilbert transform to obtain H[x(t)], and an analytical signal is constructed. ; Where x(t) is the signal obtained by bandpass filtering; H[x(t)] is the signal obtained by Hilbert transform of x(t); j is the imaginary unit; and z(t) is the analytic signal. The argument of the analytic signal is the instantaneous phase, which is calculated as follows: ; Where φ(t) is the instantaneous phase of the slow wave from 0.5Hz to 4Hz in the real-time EEG information; arg z(t) represents the argument of the analytic signal z(t); in specific calculations, the atan2 function can be used to determine the quadrant in which the instantaneous phase is located based on the real part x(t) and the imaginary part H[x(t)] of the analytic signal, so as to avoid phase deviation caused by incorrect quadrant judgment.

[0080] The Hilbert transform can obtain a continuous estimate of the slow wave phase from the signal obtained by bandpass filtering. The instantaneous phase changes continuously with time, providing a real-time phase reference for the trigger determination of audio output in step S100.

[0081] S130. Further, based on the frequency domain characteristics and time domain characteristics, the sleep stage corresponding to each time window is determined according to the preset judgment rules.

[0082] Specifically, the preset judgment rules are set based on a combination of frequency domain features and time domain features. For example: when the relative power of the delta band is greater than a first preset value and the stability index is greater than a preset stability index threshold, the corresponding time window is judged to be in deep sleep; when the relative power of the alpha band is greater than a second preset value and the stability index is less than a preset stability index threshold, it is judged to be awake; when the relative power of the theta band is greater than a third preset value and the judgment conditions for deep sleep and awake are not met, it is judged to be in light sleep; when the EEG information in the corresponding time window shows a mixed spectrum containing multiple frequency band components and does not meet the aforementioned judgment conditions, it is judged to be in REM sleep. The first preset value, the second preset value, the third preset value, and the preset stability index threshold can all be set as needed.

[0083] It should be noted that when multiple candidate criteria for sleep stages are met simultaneously within the same time window, the sleep stage corresponding to that time window is determined according to a preset priority. When the criteria for deep sleep, wakefulness, and light sleep are not met, it can be determined as REM sleep based on the mixed spectral characteristics, or its sleep stage can be determined according to preset classification rules. The criteria and priorities can be preset based on EEG signal characteristics and application requirements.

[0084] The above-mentioned criteria correspond to the characteristics of brain electrical activity in different sleep stages: deep sleep is dominated by slow wave activity in the delta band with relatively high stability of the brain electrical signal; in the waking state, alpha band activity accounts for a higher proportion with lower stability of the signal; light sleep has a higher proportion of theta band activity; and REM sleep exhibits a mixed spectrum. By combining these criteria, the sleep stages corresponding to each time window are objectively divided, forming a sleep stage sequence within the time period corresponding to the second sleep state information.

[0085] The sleep stages corresponding to each time window determined in steps S110 and S130 are used in the process of matching audio parameters according to sleep stages in Example 3, and also in the process of calculating the proportion of deep sleep stages in Example 6; the instantaneous phase extracted in step S120 is used in the process of determining the target phase interval in Example 5.

[0086] Example 5: Based on Example 1, this example further explains the definition of the target phase interval in step S100 and the timing constraints of the audio output. Specifically, the instantaneous phase used to determine whether the target phase interval has been entered is the 0.5Hz to 4Hz slow wave instantaneous phase extracted from the real-time EEG information in step S120 of Example 4. The extraction process has been explained in Example 4 and will not be repeated here.

[0087] Among them, the moment when the slow wave from 0.5Hz to 4Hz changes from negative to positive and crosses zero is the rising zero-crossing point, and the target phase interval is the 0° to 30° phase interval with the phase corresponding to the rising zero-crossing point as the 0° phase reference point.

[0088] Specifically, the 0.5Hz to 4Hz slow wave is an oscillating signal that changes continuously with time. Within one oscillation cycle, there are two zero-crossing moments: one where the value changes from negative to positive and the other where it changes from positive to negative and crosses zero. The moment where the value changes from negative to positive and crosses zero is called the rising zero-crossing point. The phase corresponding to the rising zero-crossing point is used as the 0° phase reference point. The phase gradually increases with time from the rising zero-crossing point until the next rising zero-crossing point, completing a 360° phase cycle. The phase reference is thus aligned with a specific moment on the slow wave waveform.

[0089] The target phase range is 0° to 30°, corresponding to a phase angle of 0 to π / 6 radians. During step S100, the instantaneous phase extracted in real time in step S120 is compared with the target phase range. When the instantaneous phase is between 0° and 30° (inclusive), it is determined that the instantaneous phase has entered the target phase range, and audio output is triggered.

[0090] The 0° to 30° phase interval after the zero-crossing point corresponds to the initial stage of the slow wave changing from negative to positive. Audio output is triggered in this interval. The application time of the acoustic stimulus is synchronized with the rise of the slow wave in time. The acoustic stimulus acts on a specific phase of the slow wave activity. At the same time, the zero-crossing point is easy to detect stably and does not rely on the signal amplitude as the basis for judgment, providing a unified and stable phase reference for the determination of instantaneous phase.

[0091] Furthermore, when outputting audio information, the duration of a single audio output does not exceed 500ms, and the interval between two adjacent audio outputs is not less than half the period of a slow wave of 0.5Hz to 4Hz.

[0092] Specifically, this embodiment sets two timing constraints on the audio output. The first constraint is that the duration of a single audio output does not exceed 500ms, which can be exemplarily 200ms, 300ms, or 500ms. If the duration of a single output is too long, the audio output will span the phase period of the slow wave, and some content will be applied to a phase outside the target phase, thus weakening the temporal correspondence between the acoustic stimulus and the rise of the slow wave. This constraint limits each acoustic stimulus to a finite duration, reducing the proportion of content applied to a phase outside the target phase in a single audio output.

[0093] The second constraint is that the interval between two consecutive audio outputs should not be less than half the period of the 0.5Hz to 4Hz slow wave. The period corresponding to the 0.5Hz to 4Hz slow wave is 0.25s to 2s, and half of the period is 0.125s to 1s. The minimum interval between two consecutive audio outputs is determined according to the current slow wave period. For example, if the target person's current slow wave frequency is 1Hz, the interval between two consecutive audio outputs should not be less than 500ms. If the interval is less than half the slow wave period, the frequency of the audio output is too high, and the acoustic stimulation is too dense in time, which can easily induce micro-arousals and cause sleep fragmentation. The interval constraint limits the frequency of the audio output to a level that matches the slow wave rhythm. The two constraints work together to keep the audio output synchronized with the slow wave phase while controlling the interference of the audio output on the target person's sleep process to a low level.

[0094] It should be noted that the target phase interval of 0° to 30° is used to determine the trigger time of a single audio output. After the single audio output is triggered, it continues to output for a preset duration. The duration constraint and interval constraint are used to limit the duration and frequency of a single output, and do not require that the entire duration of the audio signal fall within the target phase interval.

[0095] In step S400, when the adjusted audio information is used to continue outputting during the loop process, each audio output is triggered by the instantaneous phase entering the 0° to 30° phase range, and the duration of a single output and the interval between two adjacent outputs satisfy the above two constraints, so that each audio output in the loop process is kept synchronized with the slow wave phase.

[0096] Example 6: Based on Example 1, this example further explains the process of obtaining evaluation coefficients by inputting a preset evaluation model in step S200. The processing of the preset evaluation model includes three steps: determining the three indicators, calculating the weighted average of the sub-coefficients, and determining the evaluation coefficients. These steps are explained below through steps S210, S220, and S230, respectively.

[0097] S210. Based on the EEG information in the first sleep state information and the EEG information in the second sleep state information, determine the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency within the corresponding time period; wherein, the proportion of deep sleep stage is the proportion of the total duration of the time window determined to be deep sleep stage to the total sleep duration, the relative power of slow waves is the ratio of the power of the 0.5Hz to 4Hz frequency band to the total power of the entire frequency band, and the sleep latency is the time difference between the start time of each time period and the time when the state of wakefulness changes to the state of sleep.

[0098] The three indicators are determined for a specified time period after the audio output corresponding to the first sleep state information and a preset time period before the audio output corresponding to the second sleep state information, respectively. The EEG information within the time period corresponding to the first sleep state information is also segmented, feature extracted, and sleep stage determined in the manner described in Example 4. The sleep stage determination results and frequency domain features of each of the two time periods can be used as the basis for calculating the three indicators.

[0099] Specifically, the percentage of deep sleep is obtained by dividing the total duration of the time window that is determined to be deep sleep by the total sleep duration. The total duration of the time window is calculated by the window length and the number of time windows that are determined to be deep sleep. The total sleep duration is determined by, for example, the sum of the total duration of the time windows that are determined to be light sleep, deep sleep and REM sleep within the corresponding time period. Time windows that are determined to be awake are not included.

[0100] The slow-wave relative power is obtained by performing power spectrum analysis of the EEG information in the slow-wave band within the corresponding time period, and the process is the same as the frequency domain feature extraction process in Example 4. In one embodiment, the ratio of the sum of the power of the 0.5Hz to 4Hz band in each time window within the corresponding time period to the sum of the total power of the entire band is determined as the slow-wave relative power of that time period. Since the 0.5Hz to 4Hz band is the δ band, the average value of the relative power of the δ band in each time window can also be determined as the slow-wave relative power of that time period, and the result of the frequency domain feature extraction process can be directly reused.

[0101] The sleep latency is the time difference between the time window during which the person first transitions from being considered awake to being in a sleep stage (light sleep, deep sleep, or REM sleep) within the corresponding time period (e.g., taking the start time of the transition) and the start time of the corresponding time period. It reflects the speed at which the person falls back asleep after waking up. When the target person is already asleep at the start of the corresponding time period and no transition from being awake to being asleep occurs within that time period, the sleep latency is determined according to a preset missing value handling rule. For example, a preset minimum value is used in the calculation to reduce the negative impact on the sub-coefficient.

[0102] Among them, the three indicators represent sleep quality in the corresponding time period from three aspects: sleep structure, slow wave activity intensity, and sleep onset speed. They complement each other and reduce the one-sidedness of a single indicator when representing sleep quality.

[0103] S220. According to the preset weights, the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency corresponding to the first sleep state information are weighted and calculated to obtain the first sub-coefficient; the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency corresponding to the second sleep state information are weighted and calculated to obtain the second sub-coefficient; wherein, the proportion of deep sleep stage and the relative power of slow waves are positive components, and the sleep latency is an inverse component.

[0104] Specifically, the weighted calculation is performed according to the following formula: ; Where Q is the sub-coefficient; R deep P represents the percentage of deep sleep within the corresponding time period. slow L represents the relative power of the slow wave within the corresponding time period. sleep The first sub-coefficient represents the sleep latency within the corresponding time period; α, β, and γ are the preset weights for each item. The first sub-coefficient, Q, is calculated by substituting the three indicators of the first sleep state information corresponding to the time period into the formula, representing the sleep quality within the specified time period after audio output. The second sub-coefficient, Q, is calculated by substituting the three indicators of the second sleep state information corresponding to the time period into the formula, representing the sleep quality within the baseline time period before audio output. Both sub-coefficients are calculated using the same formula and the same set of preset weights.

[0105] The proportion of deep sleep and the relative power of slow waves are positive components, and their corresponding preset weights are positive. Sleep latency is the negative component, and it participates in the weighting calculation with a negative sign in the formula. The value of the sub-coefficient increases with the improvement of sleep quality; that is, the larger the value of the sub-coefficient, the better the sleep quality in the corresponding time period.

[0106] Among these, the three indicators have different dimensions. If they are directly substituted into the formula for weighted calculation, the indicator with the higher value will dominate the weighted result, leading to an imbalance in the contributions of each component. Therefore, each indicator is normalized to the 0-1 range according to a preset value range before being substituted into the formula to unify the dimensions. The normalized indicators are then substituted into the formula R. deep P slow L sleep The position is used for weighted calculation; the index normalization of the time period corresponding to the first sleep state information and the time period corresponding to the second sleep state information adopts the same preset value range, so that the two sub-coefficients are comparable to each other on the same numerical scale.

[0107] The preset weights are exemplarily set to α=0.4, β=0.4, and γ=0.2. These weights are determined through least-squares fitting based on experimental data collected from 50 insomniacs before and after audio output. The fitting input consists of three indicators determined for each insomniac during corresponding time periods before and after audio output, with the Pittsburgh Sleep Quality Index (PSI) score used as the fitting reference. The fitting result results in a negative correlation coefficient between the sub-coefficient and the PSI score, with an absolute value exceeding 0.82. Since higher PSI scores indicate poorer sleep quality, while higher sub-coefficient values ​​indicate better sleep quality, this negative correlation coefficient indicates a high degree of consistency between the sub-coefficient's representation of sleep quality and the PSI's assessment results. In other embodiments, the preset weights can be set to other values ​​according to application requirements.

[0108] S230. The difference between the first sub-coefficient and the second sub-coefficient is determined as the evaluation coefficient.

[0109] Specifically, the first sub-coefficient corresponds to the sleep quality level during a specified time period after audio output, and the second sub-coefficient corresponds to the sleep quality level during a baseline time period before audio output. The difference between the two is the evaluation coefficient, which represents the change in sleep quality after audio output relative to before audio output: when the evaluation coefficient is greater than 0, it indicates that audio output has brought about an improvement in sleep quality, and the larger the value, the greater the degree of improvement; when the evaluation coefficient is equal to 0, it indicates that the sleep quality level before and after is similar; when the evaluation coefficient is less than 0, it indicates that there is a decline in sleep quality.

[0110] The evaluation coefficient is numerically equivalent to a weighted sum of the changes in the three indicators before and after audio output, and a single value is used to comprehensively reflect the impact of audio output on sleep structure, slow wave activity intensity and sleep onset speed.

[0111] During the loop of step S400, each time the step of obtaining the evaluation coefficient is returned, the first sub-coefficient is recalculated based on the latest obtained first sleep state information, which is converted from the third sleep state information; the second sub-coefficient remains unchanged, still calculated based on the pre-stored second sleep state information. Thus, each evaluation during the loop reflects the change in sleep quality since the most recent audio output relative to the baseline period before the audio output, providing a continuous quantitative basis for the adaptive adjustments made during the loop.

[0112] After the evaluation coefficients are determined, they are compared with the pre-set state evaluation thresholds. The adjustment strategy for the audio information is determined based on the comparison results. The judgment conditions satisfied by the comparison results and the corresponding adjustment strategies can be found in Example 7.

[0113] Example 7: Based on Example 1, this example further explains the process of adaptively adjusting the audio information according to the comparison result of the evaluation coefficient and the state evaluation threshold in step S300. The specific calculation process of the evaluation coefficient can be found in Example 6, and the audio parameters are the audio parameters matched in Example 3. This example will not repeat the above description.

[0114] Specifically, when step S300 is executed, the evaluation coefficient obtained in step S200 is compared with the preset state evaluation threshold. The preset control conditions that the comparison result satisfies include three cases, which correspond to three levels of audio output effect, respectively. These are explained below through steps S310, S320 and S330. Among them, the adaptive adjustment mechanism of audio information and the update process of the state evaluation threshold in step S320 are explained in the following paragraphs.

[0115] S310. When the evaluation coefficient is greater than 0 and greater than the state evaluation threshold, maintain the current audio information.

[0116] Specifically, if the evaluation coefficient is greater than the state evaluation threshold, it indicates that the improvement in sleep quality exceeds the standard set by the state evaluation threshold, and the output effect of the current audio information is significant. At this time, the current audio information is maintained: the five tone types and audio parameters contained in the audio information remain unchanged, and the values ​​of the frequency adjustment coefficient, rhythm adjustment coefficient, and intensity adjustment coefficient remain unchanged; the audio output is still triggered by the instantaneous phase entering the target phase interval, and the timing constraints described in Example 5 are continuously satisfied. At the same time, the maintenance situation does not exit the closed-loop control: the output and monitoring are still performed in the cyclic manner of step S400. After each output, the process returns to step S200 to re-acquire the evaluation coefficient and compare it with the state evaluation threshold. If the evaluation coefficient falls back to the condition of this step in subsequent cycles, the control process will switch to the situation of step S320 or step S330 accordingly.

[0117] S320. When the evaluation coefficient is less than or equal to the state evaluation threshold and greater than 0, the audio information is adaptively adjusted, and the state evaluation threshold is updated according to the preset update factor. The preset update factor ranges from 0.01 to 0.05.

[0118] Specifically, this situation corresponds to a slight improvement in audio output. In this case, two actions are performed: First, the audio parameters in the audio information are adaptively adjusted by the frequency adjustment coefficient, rhythm adjustment coefficient, and intensity adjustment coefficient. The adjustment mechanism is explained in the following paragraphs. Second, the state evaluation threshold is updated according to the preset update factor. The update process is explained in the following paragraphs.

[0119] The adaptive adjustment is achieved through frequency adjustment coefficient, rhythm adjustment coefficient, and intensity adjustment coefficient. The frequency adjustment coefficient acts on the dominant frequency range in the audio parameters, the rhythm adjustment coefficient acts on the rhythm parameter in the audio parameters, and the intensity adjustment coefficient acts on the intensity in the audio parameters.

[0120] Specifically, the three adjustment coefficients correspond one-to-one with the three parameter dimensions in the audio parameters and are independent of each other. Changes in the value of each adjustment coefficient only affect the corresponding parameter dimension and do not affect the other parameter dimensions, nor do they affect the pitch structure and timbre type in the audio parameters.

[0121] Each time the audio information is adaptively adjusted, only one of the three adjustment coefficients needs to be changed, thus decoupling the adjustment dimensions. This allows changes in the output effect to be attributed to the adjusted parameter dimension, making it easier to determine the path for adjusting the audio parameters in a more optimal direction.

[0122] Furthermore, each adjustment coefficient has an initial value of 1, a value range of 0.5 to 1.5, and an adjustment step size of 0.1. Each time the audio information is adaptively adjusted, the adjusted coefficient is increased or decreased by one adjustment step size.

[0123] Specifically, the initial value of each adjustment coefficient is 1, meaning that the audio information is initially output according to the original value of the matched audio parameters. Each time the adjustment coefficient is adjusted, it increases or decreases by an adjustment step of 0.1 based on the current value. For example, when the current value of the emphasis modulation coefficient is 1.0, it will increase to 1.1 or decrease to 0.9 after one adaptive adjustment. After reaching the upper limit of 1.5 or the lower limit of 0.5, it will no longer increase or decrease.

[0124] In one implementation, the adjustment coefficient acts on the corresponding audio parameters in a product manner. That is, the adjusted frequency range, rhythm parameter, and intensity are respectively the product of their original values ​​and the corresponding adjustment coefficient. For example, if the matched frequency range is 110~145Hz and the frequency adjustment coefficient is adjusted from 1.0 to 1.1, the adjusted frequency range is 121~159.5Hz. In other implementations, the adjustment coefficient can also adopt other methods of action, as long as the change in the value of the adjustment coefficient can reflect the change in the value of the corresponding audio parameter.

[0125] It should be noted that for sound intensity expressed in decibels, the sound intensity adjustment coefficient can be applied to the linear sound intensity control value or the normalized sound intensity control value inside the system. The control value is converted into the corresponding decibel value of the output device through a preset sound pressure level mapping relationship. The sound intensity value expressed in decibels in this article is only used to illustrate the adjustment range of the output volume and does not represent a direct multiplication operation on the decibel value.

[0126] The adjustment coefficient and the direction of its increase or decrease during each adaptive adjustment can be determined by using a preset adjustment order and combining the changes of the three indicators before and after the audio output in Example 6. For example, the parameter dimension with a higher correlation to the indicator whose change is not ideal can be selected as the dimension for this adjustment. The above determination method is only an optional implementation method.

[0127] The adjustment step size limits the magnitude of a single adjustment, making the changes in audio parameters between two adjacent audio outputs gradual; the value range limits the magnitude of the cumulative adjustment, ensuring that the adjusted main frequency range, rhythm parameters, and sound intensity are always between 0.5 and 1.5 times the original values ​​obtained from the matching, maintaining the correspondence between audio information and TCM types of insomnia and sleep stages. The adaptive adjustment process remains stable and controllable while continuously optimizing audio parameters.

[0128] Specifically, when updating the state evaluation threshold according to the preset update factor, the state evaluation threshold is updated according to the following formula: ; Among them, T new The updated state evaluation threshold; T oldThe state assessment threshold before the update is defined by η, where η is the preset update factor and ε is the deviation coefficient. The preset update factor ranges from 0.01 to 0.05, and is exemplarily 0.03. The deviation coefficient ranges from 0 to 1 and is used to adjust the update increment of the state assessment threshold; the larger the deviation coefficient, the smaller the update increment of the state assessment threshold. The deviation coefficient is calculated as follows: ; Among them, Q post Q is the first sub-coefficient; pre The second sub-coefficient is calculated using the formula in step S220 of Example 6, based on three indicators corresponding to the time period; T old The threshold value for evaluating the state before the update is used. The difference between the first sub-coefficient and the second sub-coefficient is the evaluation coefficient.

[0129] In step S320, the evaluation coefficient is greater than 0 and does not exceed the state evaluation threshold before the update, and the first sub-coefficient is greater than the second sub-coefficient. The deviation coefficient is determined according to the following non-overlapping conditions.

[0130] When the state evaluation threshold before the update is greater than the second sub-coefficient and the first sub-coefficient is less than the state evaluation threshold before the update, the deviation coefficient is calculated according to the above formula, and the result is greater than 0 and less than 1; when the state evaluation threshold before the update is greater than the second sub-coefficient and the first sub-coefficient is greater than or equal to the state evaluation threshold before the update, the deviation coefficient is set to 1, and the state evaluation threshold remains unchanged; when the state evaluation threshold before the update is less than or equal to the second sub-coefficient, the above formula for calculating the deviation coefficient is not used, the deviation coefficient is set to 0, and the update increment of the state evaluation threshold is equal to the preset update factor.

[0131] Therefore, in step S320, the update increment of the state evaluation threshold is not less than 0 and does not exceed the preset update factor; the larger the deviation coefficient, the smaller the update increment. The updated state evaluation threshold is used for subsequent comparison with the evaluation coefficient. Subsequent loops still follow the judgment conditions of steps S310 to S330 to determine whether to maintain the current audio information, perform adaptive adjustment, or stop outputting audio information. The above update method controls the change range of the judgment standard by limiting the single threshold update increment.

[0132] After completing the adaptive adjustment of audio information and updating the state evaluation threshold, according to step S400, the adjusted audio information is used to continue outputting and returning to step S200 for re-evaluation. The adjustment of audio parameters and the updating of judgment criteria are promoted in synergy in each cycle, and the closed-loop control process is progressively optimized according to the actual response of the target personnel to the audio output.

[0133] S330. When the evaluation coefficient is less than or equal to 0, stop outputting audio information.

[0134] Specifically, if the evaluation coefficient is less than or equal to 0, it indicates that the audio output has not brought about a positive change in sleep quality. At this time, the audio output should be stopped to avoid continuously outputting audio to the target person who has no obvious response to the audio output, thereby reducing the impact of ineffective output on the target person's sleep process.

[0135] The three scenarios in steps S310 to S330 form a complete, non-overlapping coverage of the range of evaluation coefficient values, corresponding to three levels: significant output effect, slight improvement, and no significant effect or degradation, respectively. In the case where the evaluation coefficient is less than or equal to 0, the loop in step S400 will not be entered. The three scenarios, together with the loop process in step S400, constitute a complete closed-loop control logic.

[0136] Furthermore, to illustrate the rationality of the values ​​and settings of each feature in this application, the following briefly describes the situation when the corresponding feature settings are deviated from: If the target phase interval is set to the falling phase interval of the slow wave (e.g., the 150° to 180° phase interval), the audio output may be applied to the falling process of the slow wave, making it difficult to form an effective coupling with the slow wave oscillation. The improvement effect on the proportion of deep sleep stage and the relative power of the slow wave may be weakened. Therefore, this application sets the target phase interval to the 0° to 30° phase interval with the phase corresponding to the rising zero crossing point as the 0° phase reference point, so that the audio output is synchronized with the rising process of the slow wave.

[0137] If the duration of a single audio output exceeds 500ms, the single output may span the phase period of the slow wave, and the time correspondence between the acoustic stimulus and the rise of the slow wave will be diluted. If the interval between two adjacent audio outputs is less than half of the slow wave period, the frequency of audio output is too high, which may increase the interference with the sleep process. Therefore, this application sets the above two timing constraints on audio output.

[0138] If the evaluation coefficient is not obtained and the audio information is not adaptively adjusted, the audio output becomes an open-loop process. The fixed parameters cannot be dynamically optimized according to the actual response of the target person. When the output has no obvious effect or deterioration, it cannot be identified and terminated. Therefore, this application adopts a closed-loop adaptive adjustment based on the comparison result of the evaluation coefficient and the state evaluation threshold, and stops the output when the evaluation coefficient is less than or equal to 0.

[0139] If the adjustment coefficient is greater than 0.5 to 1.5, the audio parameters may deviate from the effective parameter range corresponding to the TCM type of insomnia and sleep stage; if the preset update factor is greater than 0.01 to 0.05, the state assessment threshold may rise too quickly, and the audio output may be in the adjustment phase for a long time. Therefore, this application limits the range of values ​​for each coefficient.

[0140] Example 8: like Figure 2As shown, this embodiment provides a five-tone audio output adaptive control system based on sleep state information, including a processor and an audio output module. The processor is connected to the audio output module and is used to execute the five-tone audio output adaptive control method based on sleep state information provided in any one of Embodiments 1 to 7.

[0141] The processor is the hardware execution unit of the method steps, and the audio output module is the execution component for audio output. During the execution of the method, the processor sends output instructions and audio information to the audio output module, and the audio output module outputs audio to the target personnel according to the content sent by the processor. The two can be connected by wired means or by wireless communication means such as Bluetooth or WiFi. Figure 2 The basic structure of the system is shown. The storage unit, head-mounted device, and various modal data acquisition devices described later are specific implementations based on the basic structure.

[0142] During the execution of the method, the processor acquires second sleep state information and real-time EEG information. It determines the TCM type of insomnia based on image, sound, text, and pulse information, determines the sleep stage based on the EEG information, and matches audio information from a five-tone parameter database based on the TCM type of insomnia and the sleep stage. It determines the instantaneous phase of slow waves from 0.5Hz to 4Hz in the real-time EEG information. When the instantaneous phase enters the target phase interval, it controls the audio output module to output audio information to the target person. Based on the EEG information in the first sleep state information and the pre-stored EEG information in the second sleep state information, it inputs a preset evaluation model to obtain evaluation coefficients. Based on the comparison between the evaluation coefficients and the state evaluation threshold, it adaptively adjusts at least one of the frequency, rhythm, and intensity of the audio information, and controls the audio output module to continue outputting the adjusted audio information. During the loop, it acquires third sleep state information and returns to the evaluation step. The specific implementation process of each step can be found in Examples 2 to 7, and will not be repeated here. Since the duration of the target phase range from 0° to 30° varies from approximately 21ms to 167ms depending on the slow wave period, the processor's determination of the instantaneous phase and control of the audio output module must meet the corresponding real-time requirements.

[0143] In one embodiment, the system further includes a storage unit connected to the processor. Pre-acquired second sleep state information, a five-tone parameter library, state evaluation thresholds, preset weights involved in the preset evaluation model, and the current values ​​of each adjustment coefficient are stored in the storage unit. During the execution of the method, the processor reads the required data from the storage unit and writes updated data generated during the loop into the storage unit. The storage unit can be implemented using magnetic storage media, optical storage media, or semiconductor storage media.

[0144] In one implementation, the system can be integrated into a head-mounted device or consist of a head-mounted device and an external smart terminal. The head-mounted device includes a dry electrode EEG acquisition unit, a signal conditioning and analog-to-digital conversion module, a triaxial accelerometer, and a low-power Bluetooth module. The dry electrode EEG acquisition unit acquires EEG information in real time through dry electrodes placed at different positions on the head, with a sampling frequency of 256Hz or 512Hz. Acquisition can be completed without conductive gel, making it suitable for overnight wear. The signal conditioning and analog-to-digital conversion module amplifies the EEG data, performs preliminary bandpass filtering from 0.5Hz to 30Hz, and performs analog-to-digital conversion, i.e., the head-mounted device-side processing described in Embodiments 1 and 4. The triaxial accelerometer detects body movement information for use in the body movement artifact removal process described in Embodiment 4. The low-power Bluetooth module transmits the EEG data to the external smart terminal in real time, where the processor executes the steps of the method and sends audio information back to the head-mounted device for playback. The head-mounted device has a battery life of at least 8 hours, matching the preset monitoring period of overnight monitoring in Embodiment 1.

[0145] The external smart terminal is, for example, a mobile phone or a tablet computer. The calculation process of the method is completed by the processor in the external smart terminal, which is conducive to the miniaturization and weight reduction of the head-mounted device. The human-computer interaction interface for entering text information can be provided by the external smart terminal. The target personnel complete the text information entry in the form of a structured form. High-definition camera equipment, microphone and pressure sensor array and other acquisition equipment can also be used in conjunction with the external smart terminal. They are connected to the processor through a customized dedicated interface to realize the unified acquisition and access of data from various modalities, which corresponds to the method described in Example 2.

[0146] The processor can be installed in various ways: it can be located locally on the head-mounted device, allowing EEG data to be processed without wireless transmission, suitable for scenarios with high real-time triggering requirements; it can be installed on an external smart terminal; or it can be installed on a server, where the server executes computationally intensive steps in the method (such as the related calculations of the Transformer-based multimodal prediction model in Example 2) and then sends the processing results back, suitable for scenarios with multiple devices accessing and centralized processing. Specifically, the extraction of instantaneous phase and the determination of phase triggering for audio output have high real-time requirements and can be executed by the head-mounted device's local processor or an external processor maintaining a low-latency connection with the head-mounted device; computationally intensive processes such as determining the TCM type of insomnia and model training can be executed by an external smart terminal or server. Regardless of its location, the steps executed by the processor are the same, and the processor can be implemented using a general-purpose processor, microcontroller, embedded chip, or dedicated chip.

[0147] In one embodiment, the audio output module employs a speaker, which can be mounted on a head-mounted device or positioned near the head of the target person when they are lying down. Audio is transmitted to the target person via air conduction, eliminating the need for the target person to wear a sound-producing component. In another embodiment, bone conduction headphones are used, transmitting sound waves through the skull, without blocking or compressing the ear canal, making them suitable for prolonged wear during sleep in a lying position. When outputting audio information, the audio output module can play audio corresponding to instrument and piece examples from a pentatonic parameter library, or it can synthesize audio based on the audio parameters contained in the audio information and output it. In specific implementations, other devices capable of outputting audio information in sound form can also be used.

[0148] Example 9: Building upon Examples 1 to 7, this example uses a target individual suffering from insomnia as an example to illustrate the complete operation of the five-tone audio output adaptive control method based on sleep state information. For instance, the target individual is a middle-aged woman who complains of difficulty falling asleep, frequent dreams and easy awakening, accompanied by palpitations, forgetfulness, fatigue, sallow complexion, and loss of appetite. It should be noted that the specific numerical values ​​involved in this example are illustrative and used to demonstrate the method's operation; they do not constitute a limitation on the values ​​of the corresponding features, nor do they constitute a promise regarding the effectiveness of the method.

[0149] During the method's execution, the second sleep state information of the target individual is first acquired within a preset time period during which no audio information is output. This second sleep state information, acquired during the preset time period without audio output, is used to determine the TCM type and sleep stage of insomnia, including image information, sound information, text information, pulse information, and EEG information. The preset time period is exemplarily a basic monitoring night before audio output, i.e., a complete nighttime monitoring period before audio output as described in Example 1: the target individual wears a head-mounted device to fall asleep, and the head-mounted device, exemplarily, continuously collects EEG information throughout the night at a sampling frequency of 256Hz; before falling asleep, tongue and facial images are acquired using a high-definition camera; during sleep, audio is recorded via a microphone; and the target individual enters sleep status items such as difficulty falling asleep, frequent dreams and easy awakening, as well as accompanying symptoms such as palpitations, forgetfulness, fatigue, sallow complexion, and loss of appetite using a structured form through a human-computer interaction interface, and pulse signals are acquired through a pressure sensor array. These five types of information constitute the second sleep state information and are pre-stored as baseline data.

[0150] It should be noted that the baseline monitoring night is used to acquire second sleep state information in a state where no audio information is output, serving as the benchmark data for subsequent audio output and evaluation processes; the audio output night is used to acquire real-time EEG information, perform phase-triggered output, and obtain first sleep state information. These two types of data can belong to different monitoring periods, or to different stages before and after audio information output within the same monitoring period. The two types of data are recorded and distinguished separately.

[0151] Subsequently, the TCM type of insomnia was determined based on the image, sound, text, and pulse information in the second sleep state information. The sleep stage was determined based on the EEG information in the second sleep state information. Based on the TCM type of insomnia and the sleep stage, audio information was obtained by matching from the Five Tones parameter database.

[0152] The process of determining the TCM type of insomnia is carried out according to the procedure in Example 2: image features such as tongue color, tongue coating color, and facial color are extracted from image information; acoustic features are extracted from sound information; textual semantic features covering the above-mentioned sleep condition items and accompanying symptom items are extracted from text information; and pulse features are extracted from pulse information. The textual semantic features of the target person include items such as frequent dreams and easy awakening, palpitations and forgetfulness, fatigue and weakness, and loss of appetite, which correspond to the empirical rules for judging heart and spleen deficiency. The expert rule features output by the rule feature extraction model correspond to the high degree of conformity between the target person and the empirical rules for judging heart and spleen deficiency. Subsequently, the acoustic features, textual semantic features, pulse features and expert rule features are fused into the first feature set, and the image features are used as the second feature set. After being input into the Transformer-based multimodal prediction model, the multimodal attention mechanism establishes a correlation between the facial color features in the image features and the items such as sallow complexion and loss of appetite in the textual semantic features. In the fusion result, the probability of heart and spleen deficiency is the highest, and heart and spleen deficiency is determined as the TCM type of insomnia of the target person.

[0153] The process of determining sleep stages is carried out according to the procedure in Example 4: the EEG information of the basic monitoring night is divided into segments with a preset time window of 30 seconds, and the frequency domain features and time domain features are extracted to determine the sleep stage corresponding to each time window, so as to obtain the sleep stage sequence of the basic monitoring night, which is used for the calculation of the proportion of deep sleep stage in the process of audio parameter matching and evaluation.

[0154] The audio information matching process is executed according to the procedure in Example 3: the target person's insomnia is classified as heart and spleen deficiency according to traditional Chinese medicine, which is matched with the Gong tone. Then, based on the sleep stage determined by the baseline monitoring night, audio parameters are matched from the parameter set associated with the Gong tone. For example, the matched main frequency range is 110~145Hz, the rhythm parameter is 700~900ms, the intensity is 40~50dB, and the timbre type is plucked string instrument. The Gong tone and the audio parameters constitute the audio information.

[0155] After the audio information matching is completed, step S100 is executed to enter the audio output and closed-loop adjustment process. Based on the real-time EEG information of the target person within the preset monitoring period, the instantaneous phase of the slow waves from 0.5Hz to 4Hz in the real-time EEG information is determined. When the instantaneous phase enters the target phase interval, audio information is output to the target person, and the first sleep state information including EEG information within the specified time period after the audio output is obtained.

[0156] The preset monitoring period is exemplarily the entire monitoring period of the night when the audio is output. The head-mounted device continuously collects real-time EEG information and extracts the instantaneous phase of the slow wave from 0.5Hz to 4Hz in accordance with step S120 in embodiment 4. When the instantaneous phase enters the target phase range of 0° to 30° defined in embodiment 5, the audio information is output, and the output satisfies the timing constraints described in embodiment 5. For example, the duration of a single audio output is 300ms, and when the current slow wave frequency of the target person is 1Hz, the interval between two adjacent audio outputs is not less than 500ms.

[0157] After completing the first round of audio output, the first sleep state information within the corresponding specified time period is obtained. The specified time period is, for example, a period of 30 to 60 minutes from the end of the first round of audio output.

[0158] Then, step S200 is executed, based on the EEG information in the first sleep state information and the pre-stored EEG information in the second sleep state information, inputting the preset evaluation model to obtain the evaluation coefficient. The evaluation process is executed according to the procedure of Example 6: according to step S210, the proportion of deep sleep stage, slow wave relative power and sleep latency in the corresponding time period are determined, and the sleep stage determination results of the basic monitoring night are directly adopted from the results obtained according to the procedure of Example 4; since the target person is already in a sleep state when the audio is output, if there is no transition from a waking state to a sleep state within the specified time period, the sleep latency is determined according to the preset missing value handling rules.

[0159] According to step S220, the first sub-coefficient is obtained by weighting the three indicators corresponding to the first sleep state information according to the preset weights, and the second sub-coefficient is obtained by weighting the three indicators corresponding to the second sleep state information. Among them, the proportion of deep sleep stage and the relative power of slow waves are positive components, and the sleep latency is a negative component. The weighting formula and weights (exemplarily α=0.4, β=0.4, γ=0.2) can be found in step S220 of embodiment 6. According to step S230, the difference obtained by subtracting the second sub-coefficient from the first sub-coefficient is determined as the evaluation coefficient.

[0160] After obtaining the evaluation coefficients, step S300 is executed, whereby at least one of the frequency, rhythm, and intensity of the audio information is adaptively adjusted based on the comparison result between the evaluation coefficients and the state evaluation threshold. The hierarchical control process is executed according to the flow of Example 7.

[0161] For example, in the first round of evaluation, the evaluation coefficient is greater than 0 and greater than the state evaluation threshold. At this time, the current audio information is maintained according to step S310: the five-tone type and audio parameters are not changed, the three adjustment coefficients are kept at the initial value of 1, and the audio output is still triggered by the instantaneous phase entering the 0° to 30° phase range. The output and monitoring are performed in a cyclic manner according to step S400.

[0162] In subsequent rounds, for example, if the evaluation coefficient of a certain round falls back to less than or equal to the state evaluation threshold but greater than 0, then the audio information is adaptively adjusted according to step S320 and the state evaluation threshold is updated according to the preset update factor. Following the adjustment method and rules of the adjustment coefficient described in Example 7, and considering the changes in various indicators, this adjustment selects the intensity modulation coefficient as the adjustment coefficient, increasing it by one adjustment step from 1.0 to 1.1. According to the preset intensity mapping relationship, the output intensity range is, for example, adjusted from 40~50dB to 44~55dB; the frequency adjustment coefficient and rhythm adjustment coefficient remain unchanged at 1, and this adjustment only applies to the intensity parameter dimension.

[0163] The state assessment threshold is updated according to the update formula described in Example 7, with a preset update factor. The preset update factor ranges from 0.01 to 0.05, and is exemplarily 0.03.

[0164] After completing the adaptive adjustment and updating the state evaluation threshold, according to step S400, the adjusted audio information continues to be output and the evaluation step is returned to be executed in a loop. Each round of evaluation is processed according to the judgment conditions of steps S310 to S330. If the evaluation coefficient is less than or equal to 0 in any loop, the output of audio information is stopped. In this example, this situation did not occur in any round of evaluation, and the audio output and adaptive adjustment process continued until the end of the preset monitoring period.

[0165] Through the above process, the various components of the method work synergistically in specific application scenarios: the audio output is synchronized with the target person's endogenous EEG rhythm, and the acoustic stimulation is applied to a specific phase of slow-wave activity; the audio information corresponds to the target person's TCM insomnia type and sleep stage; and the audio parameters are continuously optimized as the target person responds to the audio output.

[0166] Based on the above embodiments, the five-tone audio output adaptive control method and system based on sleep state information provided in this application can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. Each step in the method embodiments can be implemented by a processor executing computer program instructions. The processor can be a general-purpose processor, microcontroller, embedded chip, or dedicated chip, or a processing unit in a general-purpose computer, dedicated computer, or other programmable device. Each component in the system embodiments can be a hardware module, software module, or firmware module, or a combination thereof. For example, the processor can be implemented by a processing chip that executes computer program instructions, the audio output module can be a hardware speaker or bone conduction headphone, and the functions corresponding to the storage unit and each functional unit described in Embodiment 8 can also be implemented by any method or combination thereof, including hardware, software, or firmware.

[0167] When implemented using software, the above embodiments can be implemented in whole or in part as a computer program product. The computer program instructions are stored in a computer-readable storage medium, which can be a magnetic storage medium, an optical storage medium, or a semiconductor storage medium, such as a hard disk, magnetic tape, optical disk, or solid-state drive. It can also be a data storage device such as a server or data center that includes a collection of one or more usable media. In conjunction with the various configurations of the system described in Embodiment 8, the computer-readable storage medium storing the computer program instructions can be disposed in any one of the head-mounted device, an external smart terminal, or a server to support various implementations with the processor disposed in different locations, so that the method steps can be executed on the corresponding processor.

[0168] Furthermore, it should be understood that in the above embodiments, the sequence number of each step does not imply the order of execution; the execution order of each process should be determined by its function and internal logic. For example, in Embodiment 4, the instantaneous phase extraction in step S120 and the segmented feature extraction and sleep stage determination in steps S110 and S130 are executed based on two data pathways: real-time EEG information and EEG information from the second sleep state information, respectively. In Embodiment 7, steps S310, S320, and S330 are parallel control scenarios selected based on comparison results. The above numbering method should not constitute any limitation on the implementation of each process.

Claims

1. A five-tone audio output adaptive control method based on sleep state information, characterized in that, include: Based on the real-time EEG information of the target person within a preset monitoring period, when the instantaneous phase of the slow wave from 0.5Hz to 4Hz in the real-time EEG information enters the target phase interval, audio information is output to the target person and the first sleep state information including the EEG information is obtained within a specified time period after the audio output; the audio information is the original audio information matched from a pre-prepared five-tone parameter library according to the target person's TCM insomnia type and sleep state. Based on the EEG information in the first sleep state information and the EEG information in the pre-stored second sleep state information, an evaluation coefficient is obtained by inputting a preset evaluation model; the second sleep state information is information obtained within a preset time period during which no audio information is output, used to determine the TCM type of insomnia and the sleep stage. Based on the comparison results between the evaluation coefficient and the state evaluation threshold, the audio information is adaptively adjusted in at least one of frequency, rhythm, and intensity. The adjusted audio information is used to continue outputting, and the third sleep state information within a specified time period after the audio output is obtained. The third sleep state information is used as the first sleep state information, and the step of obtaining the evaluation coefficient is returned. The adaptive adjustment is performed repeatedly. All sleep state information includes: image information, sound information, text information, pulse information, and EEG information.

2. The method according to claim 1, characterized in that, The TCM type of insomnia is determined based on the image information, the sound information, the text information, and the pulse information. The determination process includes: Image features are extracted based on the image information, acoustic features are extracted based on the sound information, text semantic features are extracted based on the text information, and pulse features are extracted based on the pulse information. Expert rule features are extracted using a rule feature extraction model. These expert rule features are used to characterize the degree of conformity between the target person and the experiential rules for judging various types of insomnia in traditional Chinese medicine. The acoustic features, the text semantic features, the pulse features, and the expert rule features are fused into a first feature set, and the image features are used as a second feature set. The TCM type of insomnia is determined based on the first feature set and the second feature set.

3. The method according to claim 2, characterized in that, The rule feature extraction model is pre-trained from training samples containing common representational features among different TCM types of insomnia; The step of determining the TCM type of insomnia based on the first feature set and the second feature set includes: inputting the first feature set and the second feature set into a Transformer-based multimodal prediction model, establishing a correlation between the first feature set and the second feature set using a multimodal attention mechanism, fusing the first feature set and the second feature set based on the correlation, and determining the TCM type of insomnia based on the fusion result.

4. The method according to claim 1, characterized in that, The sleep stage is determined based on the EEG information in the second sleep state information, and the instantaneous phase of the 0.5Hz to 4Hz slow waves is determined based on the real-time EEG information. The determination process includes: The EEG information in the second sleep state information is segmented according to a preset time window, and frequency domain features and time domain features are extracted from the EEG information in each time window. The frequency domain features include the relative power of a predefined EEG frequency band, and the time domain features include a stationary index formed by weighting variance, amplitude and rate of change. The real-time EEG information is bandpass filtered in the frequency band from 0.5Hz to 4Hz, and the instantaneous phase is extracted from the bandpass filtered signal using Hilbert transform. Based on the frequency domain features and the time domain features, the sleep stage corresponding to each time window is determined according to the preset judgment rules.

5. The method according to claim 1, characterized in that, The moment when the slow wave from 0.5Hz to 4Hz changes from a negative value to a positive value and crosses zero is the rising zero-crossing point. The target phase interval is the 0° to 30° phase interval with the phase corresponding to the rising zero-crossing point as the 0° phase reference point. When outputting audio information, the duration of a single audio output shall not exceed 500ms, and the interval between two adjacent audio outputs shall not be less than half the period of the 0.5Hz to 4Hz slow wave.

6. The method according to claim 1, characterized in that, The audio information matching process includes: According to the TCM type of insomnia, the corresponding TCM type is matched from the TCM parameter library; the TCM type of insomnia includes five types: liver qi stagnation, heart qi deficiency, heart and spleen deficiency, lung and soul disharmony, and heart and kidney disharmony. Among them, liver qi stagnation is matched with the Jiao tone, heart qi deficiency is matched with the Zhi tone, heart and spleen deficiency is matched with the Gong tone, lung and soul disharmony is matched with the Shang tone, and heart and kidney disharmony is matched with the Yu tone. Based on the sleep stage, audio parameters are matched from the set of parameters associated with the matched five-tone type in the five-tone parameter library. The audio parameters include the dominant frequency range, pitch structure, rhythm parameters, intensity, and timbre type. The matched five-tone type and the audio parameters constitute the audio information.

7. The method according to claim 6, characterized in that, The adaptive adjustment is achieved through a frequency adjustment coefficient, a rhythm adjustment coefficient, and a tone intensity adjustment coefficient; the frequency adjustment coefficient acts on the dominant frequency range of the audio parameters, the rhythm adjustment coefficient acts on the rhythm parameters of the audio parameters, and the tone intensity adjustment coefficient acts on the tone intensity of the audio parameters. The initial value of each adjustment coefficient is 1, the value range is 0.5 to 1.5, and the adjustment step size is 0.

1. Each time the audio information is adaptively adjusted, the adjustment coefficient being adjusted increases or decreases by one adjustment step size.

8. The method according to claim 1, characterized in that, The step of obtaining evaluation coefficients by inputting a preset evaluation model includes: Based on the EEG information in the first sleep state information and the EEG information in the second sleep state information, the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency are determined within the corresponding time period. The proportion of deep sleep stage is the ratio of the total duration of the time window determined to be deep sleep stage to the total sleep duration. The relative power of slow waves is the ratio of the power in the 0.5Hz to 4Hz frequency band to the total power of the entire frequency band. The sleep latency is the time difference between the start time of each time period and the moment when the person transitions from a waking state to a sleep state. According to preset weights, the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency corresponding to the first sleep state information are weighted and calculated to obtain a first sub-coefficient; the proportion of deep sleep stage, the relative power of slow waves, and the sleep latency corresponding to the second sleep state information are weighted and calculated to obtain a second sub-coefficient; wherein, the proportion of deep sleep stage and the relative power of slow waves are positive components, and the sleep latency is an inverse component; The difference between the first sub-coefficient and the second sub-coefficient is determined as the evaluation coefficient.

9. The method according to claim 1, characterized in that, The preset control conditions satisfied by the comparison result include: When the evaluation coefficient is greater than 0 and greater than the state evaluation threshold, the current audio information is maintained. When the evaluation coefficient is less than or equal to the state evaluation threshold and greater than 0, the audio information is adaptively adjusted, and the state evaluation threshold is updated according to a preset update factor, the preset update factor being in the range of 0.01 to 0.

05. When the evaluation coefficient is less than or equal to 0, the audio information output stops.

10. A five-tone audio output adaptive control system based on sleep state information, characterized in that, The device includes a processor and an audio output module, the processor being connected to the audio output module, and the processor being used to execute the five-tone audio output adaptive control method based on sleep state information as described in any one of claims 1 to 9.