Sleep monitoring method based on large language model
Through the sleep monitoring method based on large language models, the complex and expensive problems of traditional sleep monitoring methods are solved, and high-precision, personalized and real-time sleep monitoring and analysis are achieved, improving the quality of sleep and quality of life of users.
Patent Information
- Application Number
- CN202411986680.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-06-06
AI Technical Summary
Traditional sleep monitoring methods rely on expensive and complex polysomnography devices, making it difficult to achieve high-precision, personalized, real-time and comprehensive sleep monitoring and analysis.
Using a sleep monitoring method based on large language models, we use NLP search engine to coordinate user queries, build multi-dimensional user profiles, and generate analysis reports to provide personalized suggestions and abnormal sleep event detection and alarms.
It realizes higher-precision sleep phase recognition and abnormal event detection, provides personalized sleep improvement suggestions, improves sleep quality and quality of life, and prevents health problems through real-time monitoring and feedback.
Smart Images

Figure CN120093213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of language model sleep monitoring, and in particular to a sleep monitoring method based on a large language model. Background Art
[0002] Sleep is a key process for the body to recover and recharge, and is essential for physical and mental health. However, the accelerated pace of modern life, increased work pressure, and bad living habits have led to more and more people facing sleep problems. Therefore, the monitoring and management of sleep quality is particularly important. Traditional sleep monitoring methods mainly rely on professional equipment such as polysomnography (PSG), which is accurate but expensive and complicated to operate. Polysomnography (PSG) is a highly integrated medical device that can continuously and synchronously collect, record and analyze multiple physiological and pathological parameters throughout the night. These parameters usually include: Electroencephalogram (EEG): used to understand sleep structure, objectively evaluate sleep conditions, and distinguish different sleep stages (such as deep sleep, light sleep, REM sleep, etc.). Electrooculogram (EOG): Helps distinguish REM sleep (i.e. dreaming period) by monitoring eye movements. Electromyography (EMG): Records limb movements and helps diagnose certain sleep disorders, such as rapid eye movement sleep behavior disorder (RBD) and restless legs syndrome. Oral and nasal airflow: Monitors the presence or absence of respiratory airflow to determine whether there is sleep apnea and hypoventilation. Respiratory effort: Assess chest and abdominal activity to help determine the nature of respiratory problems (central or obstructive). Oxygen saturation: Monitors the oxygen content in the blood to assess the impact of apnea on the body. Electrocardiogram (ECG): Records changes in heart rate and ECG waveforms, and analyzes the relationship between abnormal waveforms and sleep. PSG equipment can provide detailed and accurate sleep data. Although PSG equipment is highly accurate and reliable, it is usually expensive. This is mainly because PSG equipment integrates a variety of high-precision sensors and data processing systems, which requires a higher manufacturing cost. In addition, the operation of PSG equipment is relatively complicated and requires professional technicians to install, debug and maintain it. During the monitoring process, the full participation of sleep technicians is also required to ensure the accuracy and completeness of the data.
[0003] With the improvement of computing power and the increase of data volume, the performance of large language models continues to improve, providing strong support for applications in various industries. Sleep monitoring technology has become an important part of the health industry. In order to further improve the intelligence level of this industry, sleep monitoring methods based on large language models have high application prospects. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a sleep monitoring method based on a large language model, which utilizes advanced artificial intelligence technology and data analysis methods to provide higher precision, more personalized, more real-time and more comprehensive sleep monitoring and analysis services, significantly improving the user's sleep quality and quality of life.
[0005] The present invention provides a sleep monitoring method based on a large language model, which specifically includes the following steps: S1. Build a user health data set to collect and preprocess data, and identify and classify sleep stages; S2, using NLP search engines to coordinate user queries, perform user query processing and similarity analysis; S3, build multi-dimensional user profiles, perform multimodal data integration and similarity graph construction; S4. Generate analysis reports, use large speech models (LLM) to provide personalized suggestions, and detect and alarm abnormal sleep events.
[0006] Furthermore, the data set in S1 includes collected user ID and data date index, wearable device data and sleep stage data.
[0007] Furthermore, the data collection and preprocessing in S1 includes: Data source: Wearable devices collect real-time dynamic sleep data such as the user's heart rate, breathing rate, body movement, sleep environment noise, and light intensity; Data preprocessing: including data cleaning, removing noise and outliers, standardizing unified formats and units, and feature extraction to extract features useful for sleep stage classification.
[0008] Furthermore, the sleep stage identification and classification in S1 includes: The pre-trained large language model LLM is used for data processing and pattern recognition to identify different sleep stages, including light sleep, deep sleep, and REM sleep.
[0009] Combined with machine learning algorithms, it improves classification accuracy and detects abnormal sleep events, including sleep apnea and periodic limb movements.
[0010] Furthermore, the user query processing and similarity analysis in S2 are specifically as follows: the user inputs a query request through the query interface, the request is parsed by the NLP search engine, key information such as user ID and date are extracted, and the historical sleep data of the relevant user is quickly retrieved by using the established index and data structure; Build intra- and inter-user similarity graphs, discover similar user groups based on users’ historical sleep data and behavior patterns, and integrate feature importance scores.
[0011] Furthermore, the parsing of the request by the NLP search engine in S2 specifically includes: S21. It is necessary to collect text data containing sleep health information and perform feature extraction and keyword extraction; S22, perform topic modeling and sentiment analysis; S23, perform entity recognition and relationship extraction: identify and extract the relationship between entities in the text; S24. Fine-tune pre-trained models such as BERT and GPT. For tasks that require more detailed processing, use sequence annotation models to identify each sleep stage in the text. S25. Integrate the extracted key information and features to form a structured data representation, and use statistical analysis or machine learning models to analyze the integrated data.
[0012] Furthermore, the S3 is specifically: multimodal data integration: integrating the user's physiological data, including heart rate, breathing, behavioral data and possible text data, including user feedback and diaries, using NLP technology to extract themes and patterns related to sleep health, and constructing a multidimensional user profile; Similarity graph construction: Using the LLM model, cosine similarity is used to quantify the similarity between users and based on days to form intra- and inter-user similarity graphs.
[0013] Furthermore, S4 is specifically as follows: Graphical report: intuitively displays sleep data in the form of charts, including sleep stage duration distribution chart, heart rate and breathing frequency change chart, etc. Text report: contains detailed sleep analysis, including overall sleep quality score, duration and distribution of each sleep stage, number of awakenings and cause analysis, abnormal sleep event record, etc.
[0014] Furthermore, S4 also includes: personalized suggestions: using LLM to generate personalized sleep improvement suggestions based on the user's historical data and individual characteristics, including work and rest schedule adjustment, sleep environment optimization, diet adjustment, and psychological relaxation training.
[0015] Furthermore, S4 also includes: abnormal sleep event detection and alarm: the system monitors the user's sleep data in real time, and once abnormal events such as sleep apnea and periodic limb movements are detected, a warning is immediately sent to the user through a mobile application or other user interface.
[0016] The beneficial effects of the present invention are: High data analysis accuracy: The present invention uses a large language model (LLM) to analyze and process the collected sleep data. Compared with traditional simple algorithms, the language model can more accurately identify and distinguish different sleep stages, such as light sleep, deep sleep, and rapid eye movement (REM) sleep. The model can analyze complex physiological signal changes and extract potential sleep problems, such as sleep apnea and periodic limb movements.
[0017] Personalized analysis and suggestions: The present invention can provide personalized sleep analysis and improvement suggestions based on the user's historical sleep data and individual differences. For example, the system can propose specific sleep optimization plans based on the user's living habits and sleep patterns, such as adjusting the work and rest schedule, improving the sleep environment, and dietary recommendations. Personalized analysis and suggestions help users better understand and improve their sleep conditions.
[0018] Real-time monitoring and feedback: The system of the present invention can monitor the user's sleep status in real time and issue a warning in time when abnormal conditions are found. For example, when a user is detected to have a long period of apnea or abnormal heart rate fluctuation, the system can notify the user or his family through a mobile phone application or other means to take timely measures. This real-time monitoring and feedback mechanism helps prevent serious health problems.
[0019] Comprehensive data report: The analysis report generation module of the present invention can generate a detailed sleep analysis report, which includes the user's overall sleep quality score, the duration distribution of each sleep stage, the number of awakenings and the reason analysis. The report can also graphically display the changing trend of sleep data to help users intuitively understand their sleep status. The comprehensive data report not only provides detailed analysis results, but also provides users with scientific sleep improvement suggestions.
[0020] Convenient and easy to use: The system of the present invention is simple in design. Users only need to install the corresponding device on the bed with a smart wearable device (smart watch) to automatically collect and analyze sleep data. Through the mobile phone application, users can view their sleep reports and improvement suggestions at any time without complicated operation steps. This convenient and easy-to-use design greatly improves the user experience and acceptance.
[0021] Personalization and precision: LLM can process a large amount of user data, including physiological indicators (such as heart rate, breathing rate), behavioral data, and possible text data (such as user feedback, diary). Through comprehensive analysis of these data, LLM can generate highly personalized sleep improvement suggestions to meet the specific needs of different users.
[0022] Intelligence and Automation: This method realizes the automatic collection, processing and analysis of sleep data, reducing the need for manual intervention. At the same time, LLM can monitor the user's sleep data in real time. Once an abnormal event (such as sleep apnea, periodic limb movement) is detected, it can immediately trigger an alarm mechanism, improving the timeliness and accuracy of monitoring.
[0023] Comprehensiveness and multi-dimensionality: The sleep quality monitoring method based on LLM not only focuses on the identification and classification of sleep stages, but also covers multiple aspects such as user query processing, similarity analysis, and multi-dimensional user profile construction. This comprehensive and multi-dimensional analysis method helps to gain a deeper understanding of the user's sleep pattern and health status.
[0024] Scalability and flexibility: With the continuous development and improvement of LLM technology, the sleep quality monitoring method based on LLM also has high scalability and flexibility. The model parameters can be adjusted and optimized according to actual needs to meet the needs of different user groups and monitoring scenarios.
[0025] User-Friendliness: By generating graphical reports and text reports, and providing personalized sleep improvement suggestions, this method can intuitively display the user's sleep data and analysis results, enhancing the user's experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Schematic diagram of a sleep monitoring method based on a large language model. DETAILED DESCRIPTION
[0027] The following is combined with Figure 1 The preferred embodiments of the present invention are described in detail so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0028] This sleep monitoring method based on large language models (LLM) and wearable devices provides users with comprehensive sleep health management and personalized improvement suggestions by integrating multiple data sources and advanced algorithm technology. The following is a detailed analysis and supplement of this method: A sleep monitoring method based on a large language model specifically comprises the following steps: S1. Build a user health data set to collect and preprocess data, and identify and classify sleep stages; The dataset includes the collected user ID and data date index, wearable device data, and sleep stage data.
[0029] Data collection and preprocessing include: Data source: Wearable devices collect real-time dynamic sleep data such as the user's heart rate, breathing rate, body movement, sleep environment noise, and light intensity; Data preprocessing: including data cleaning, removing noise and outliers, standardizing unified formats and units, and feature extraction to extract features useful for sleep stage classification.
[0030] Sleep stage recognition and classification include: The pre-trained large language model LLM is used for data processing and pattern recognition to identify different sleep stages, including light sleep, deep sleep, and REM sleep.
[0031] Combined with machine learning algorithms, it improves classification accuracy and detects abnormal sleep events, including sleep apnea and periodic limb movements.
[0032] S2, using NLP search engines to coordinate user queries, perform user query processing and similarity analysis; The user query processing and similarity analysis are as follows: the user inputs the query request through the query interface, the request is parsed by the NLP search engine, key information such as user ID and date are extracted, and the historical sleep data of the relevant user is quickly retrieved using the established index and data structure; Build intra- and inter-user similarity graphs, discover similar user groups based on users’ historical sleep data and behavior patterns, and integrate feature importance scores.
[0033] S3, build multi-dimensional user profiles, perform multimodal data integration and similarity graph construction; Multimodal data integration: Integrate the user's physiological data, including heart rate, breathing, behavioral data and possible text data, including user feedback and diaries, use NLP technology to extract themes and patterns related to sleep health, and build a multidimensional user profile; Similarity graph construction: Using the LLM model, cosine similarity is used to quantify the similarity between users and based on days to form intra- and inter-user similarity graphs.
[0034] S4. Generate analysis reports, use large speech models (LLM) to provide personalized suggestions, and detect and alarm abnormal sleep events.
[0035] Graphical report: intuitively displays sleep data in the form of charts, including sleep stage duration distribution, heart rate and breathing rate change charts, etc.; Text report: contains detailed sleep analysis, including overall sleep quality score, duration and distribution of each sleep stage, number of awakenings and reasons analysis, abnormal sleep event records, etc.
[0036] Personalized suggestions: LLM generates personalized sleep improvement suggestions based on the user's historical data and individual characteristics, including adjustments to work and rest schedules, optimization of the sleep environment, dietary adjustments, and psychological relaxation training.
[0037] Abnormal sleep event detection and alarm: The system monitors the user's sleep data in real time. Once abnormal events such as sleep apnea and periodic limb movements are detected, a warning will be immediately sent to the user through the mobile application or other user interface.
[0038] In the process of constructing the similarity graph in S3, the main goal is to use the large language model (LLM) and the multimodal data of users to quantify the similarity between users and based on days, and form the internal and inter-user similarity graphs accordingly. Specifically, the similarity graph construction process: Data integration: First, integrate multiple data sources of users, including physiological data (such as heart rate, breathing rate), behavioral data (such as body movement), and possible text data (such as user feedback, diary, etc.). These data are pre-processed using NLP technology to extract key information and features related to sleep health.
[0039] Feature extraction: Extract features useful for similarity assessment from the integrated data. These features may include but are not limited to: average heart rate, respiratory rate, deep sleep time percentage, REM sleep time percentage, abnormal sleep event frequency, etc.
[0040] Similarity calculation: Use the LLM model or a specific similarity measurement algorithm (such as cosine similarity, Pearson correlation coefficient, etc.) to calculate the similarity between users and between users on different days. When calculating similarity, the importance and weight of different features can be considered to more accurately reflect the similarity between users.
[0041] 1. Calculation of similarity between users: 1. Data Preparation Feature selection: First, extract key features from each user's sleep data, such as average sleep time, deep sleep ratio, REM sleep ratio, stability of sleep time, etc.; Data standardization: Ensure that all features are on the same scale for fair comparison. This usually involves scaling the feature values to between 0 and 1 or to have the same standard deviation.
[0042] 2. Similarity measurement method Cosine similarity: Calculates the cosine angle between two user feature vectors. It is suitable for measuring the similarity in direction without considering the length of the vector (that is, the absolute size of the feature value). Pearson correlation coefficient: measures the linear correlation between two user feature vectors. It takes into account the distribution and trend of data points and performs central processing (i.e., subtracting the mean).
[0043] Euclidean distance (or conversion to similarity): Directly calculate the Euclidean distance between two feature vectors, and then convert it to similarity in some way (such as taking the inverse and normalizing it). But note that Euclidean distance measures differences rather than similarities.
[0044] Using the selected similarity measure, calculate the similarity of all user pairs.
[0045] 2. Calculation of Similarity between Users on Different Days 1. Data preparation: For a single user, organize their sleep data by day and extract the same features as above.
[0046] 2. Similarity metric: Use the same metric as for inter-user similarity (cosine similarity, Pearson correlation coefficient, etc.). The difference is that now the comparison is between different days of the same user, not between different users.
[0047] 3. Implement the calculation: For each user, calculate the similarity of all his days.
[0048] If some features are missing on some days, they need to be processed by interpolation or ignoring these features. Outlier processing: For extremely abnormal values, they need to be cleaned or smoothed first to avoid excessive impact on similarity calculation.
[0049] Feature selection: The selection of features for similarity calculation depends on the specific application scenario and goal. Experiments are needed to determine which features best reflect the similarity between users or days.
[0050] Similarity graph generation: Based on the similarity calculation results, similarity graphs are generated using graphical tools. These graphs can be displayed in the form of network graphs, heat maps, or scatter plots. In the internal similarity graph, nodes represent users, edges represent similarities between users, and the thickness or color of the edges can indicate the strength of the similarity. In the inter-user similarity graph, the similarity between different users can be displayed to help users find groups with similar sleep patterns to themselves. The day-based similarity graph can show the changes in users' sleep patterns at different time points, as well as the similarities between these changes.
[0051] The present invention specifically also includes: data acquisition: collecting the user's physiological signals through wearable devices, such as electroencephalogram (EEG), electrocardiogram (ECG), electrooculogram (EOG), electromyogram (EMG) and breathing and body movement data.
[0052] Signal preprocessing: Perform preprocessing steps such as filtering, denoising, and standardization on the collected signals to improve signal quality.
[0053] Feature extraction: Extract useful features from the preprocessed signal, which are usually related to different sleep stages, such as frequency, amplitude, power spectral density, etc.
[0054] Model training: Use machine learning algorithms (such as support vector machines, random forests, neural networks, etc.) to train a classification model that can classify sleep stages into light sleep, deep sleep, REM sleep, etc. based on the extracted features.
[0055] LLM-assisted analysis: LLM is used to process user-provided text data (such as sleep diaries, health status descriptions, etc.) to extract additional information that may be related to sleep stages. This information can be input into the classification model as features or used to verify and explain the model's results.
[0056] Stage Recognition: Feed real-time or historical data into a trained model to identify the current sleep stage.
[0057] Anomaly detection: Abnormal feature definition: First, define which changes or combinations of physiological signal features indicate abnormal events, such as sleep apnea (abnormally low or paused breathing rate), periodic limb movements (electromyography shows regular abnormal activity), etc.
[0058] Threshold setting: Set appropriate thresholds or detection rules for each abnormal feature to determine when to trigger an abnormal alert.
[0059] Real-time monitoring: Monitor the user's physiological signals in real time and calculate relevant feature values.
[0060] Anomaly detection: Compare the calculated feature values with preset thresholds or rules to detect whether there are abnormal events.
[0061] LLM Assisted Interpretation: If an abnormal event is detected, LLM is used to provide possible explanations, suggestions, or further inspection guidance. For example, LLM can generate personalized suggestions or explain the possible causes of abnormal events based on the user's historical data and current situation.
[0062] Alarm and feedback: Once an abnormal event is detected, a warning is immediately sent to the user through a mobile application, smart watch or other user interface, and necessary suggestions or guidance are provided.
[0063] The present invention uses an NLP (Natural Language Processing) search engine to coordinate user queries. Through preprocessing with NLP technology to extract key information and features related to sleep health, the following specific steps can be followed: First, it is necessary to collect text data containing sleep health information. This data may come from users' sleep monitoring reports, health questionnaires, medical literature, online forums, or social media, etc. Remove noise: Delete irrelevant content in the text, such as advertisements, links, duplicate information, etc. Formatting unification: Format the text into a unified format for subsequent processing. Missing value processing: Process or fill in missing sleep health data.
[0064] Then perform text preprocessing. Word segmentation: Split the text into words or phrases, which is a basic step in NLP processing. Stop word removal: Remove common but meaningless words in the text, such as "de", "shi", etc. Stemming / lemmatization: Restore words to their basic forms, which helps to unify the vocabulary representation. Part-of-speech tagging: Tag the part of speech of each word in the text, which helps to understand the role of the word in the sentence.
[0065] Then perform feature extraction. Keyword extraction: Use algorithms such as TF-IDF, TextRank, etc. to extract keywords in the text. These keywords are usually closely related to sleep health. Topic modeling: Through topic model algorithms such as LDA (Latent Dirichlet Allocation), identify potential topics in the text, such as "sleep quality", "sleep disorders", etc. Sentiment analysis: Analyze the sentiment tendency in the text, such as positive (e.g., "feel very sleepy"), negative (e.g., "insomnia last night"), or neutral, which helps to understand the user's sleep feelings.
[0066] Then perform entity recognition. Named Entity Recognition (NER): Identify named entities in the text, such as disease names (e.g., "insomnia"), drug names (e.g., "sleeping pills"), etc. These entities are directly related to sleep health. Relationship extraction: Identify and extract the relationships between entities in the text, such as "User A has insomnia and is taking sleeping pills".
[0067] Use pre-trained models: Utilize pre-trained models such as BERT, GPT, etc. for fine-tuning to extract more complex sleep health features. Sequence labeling: For tasks that require more detailed processing (such as sleep staging), a sequence labeling model (such as BiLSTM-CRF) can be used to identify each sleep stage in the text.
[0068] Integrate the extracted key information and features to form a structured data representation.
[0069] Analyze the integrated data using statistical analysis or machine learning models to discover potential sleep health patterns and associations. Present the analysis results to users in an easy-to-understand way, such as generating sleep health reports, charts, or visualization interfaces. Provide personalized suggestions and make improvement recommendations based on the user's sleep health data.
[0070] Through the above steps, NLP technology can effectively extract key information and features related to sleep health from a large amount of text data, providing strong support for subsequent health management and intervention. Through the above steps, NLP search engines can coordinate user queries, understand user intent, and return accurate, relevant and useful search results.
[0071] The present invention provides comprehensive sleep health management and personalized improvement suggestions by utilizing a large language model (LLM) or a specific similarity measurement algorithm (such as cosine similarity, Pearson correlation coefficient, etc.) to analyze user sleep data and calculate the similarities between users and between users on different days.
[0072] LLM's text generation capabilities are used to generate personalized, easy-to-understand improvement suggestions. LLM can generate customized suggestion texts based on the user's specific situation and needs to improve user acceptance and execution rate. Collect user feedback on improvement suggestions and evaluate their effectiveness and satisfaction. Based on the feedback results, continuously adjust and optimize the similarity measurement algorithm, health assessment criteria, and improvement suggestion strategy. Form a closed-loop feedback mechanism to continuously improve system performance and user experience.
[0073] The sleep monitoring method based on large language models can be widely used in the following aspects: Personal health management: Users can check their sleep status in real time and get improvement suggestions through mobile phone apps and other terminal devices.
[0074] Medical institutions: Medical institutions can use this method to conduct remote sleep monitoring and diagnosis of patients, thereby improving diagnosis and treatment efficiency and service quality.
[0075] Health industry: Sleep monitoring technology has become an important part of the health industry. The sleep monitoring method based on large language models will further enhance the intelligence level of the industry.
[0076] Personalization: Able to provide personalized sleep monitoring and improvement suggestions based on the user's specific situation.
[0077] Convenience: Users can monitor and query their sleep anytime and anywhere through mobile devices such as mobile phones.
[0078] Intelligence: Use the intelligent analysis and reasoning capabilities of large language models to improve monitoring accuracy and reliability. Example
[0079] Users establish user health data sets by completing questionnaires, importing physical examination data, and entering smart wearable devices for the first time. The wearable devices worn by users, such as wearable smart watches, include heart rate sensors, breathing sensors, body motion sensors, noise sensors, and light sensors. These sensors monitor the user's physiological indicators and environmental conditions during sleep in real time. Wearable devices such as smart watches transmit the collected data to the user's smartphone via Bluetooth connection, with a data transmission frequency of once every 15 minutes to ensure the real-time and continuity of the data.
[0080] The user wears the wearable device for 7 consecutive days to monitor sleep. Before going to sleep every night, after the device is connected, the sensor starts to collect data in real time, including: Heart rate data: collected at a frequency set by the user to record the user's heart rate changes; Respiratory rate data: collects data at a frequency set by the user and records the user's breathing rhythm and frequency; Body movement data: collected at a frequency set by the user, recording the number and amplitude of the user's body movements during sleep; Noise data: Collect data at a frequency set by the user to record the noise level in the sleeping environment; Light intensity data: collected at a frequency set by the user to record changes in light intensity in the sleeping environment.
[0081] After data collection is completed, the data is transmitted to the data processing module in the smartphone for preprocessing. The preprocessing steps of this module are as follows: Filtering: Filter the heart rate, respiratory rate, and body movement data to remove high-frequency noise and ensure data purity. For example, a low-pass filter is used to remove high-frequency interference and retain meaningful physiological signals.
[0082] Denoising: Denoising is performed on noise and light intensity data to eliminate environmental interference. The noise data uses an average filtering algorithm to smooth out changes in environmental noise. The light data uses a sliding average to reduce data fluctuations caused by changes in ambient light.
[0083] Normalization: All processed data are normalized to convert the data to a uniform scale for subsequent analysis. The normalization process involves mapping the data to the [0,1] interval so that the data of different physiological indicators are comparable.
[0084] After data preprocessing, the data is input into a large language model for analysis. This model is based on a pre-trained deep neural network model that can identify and classify the user's sleep stages and detect potential abnormal sleep events. Identify different sleep stages, including light sleep, deep sleep, REM sleep, etc. Specifically, the large language model LLM model receives the processed heart rate, breathing rate and body movement data, and combines the noise and light data to identify the user's sleep stage. Output the stage division of light sleep, deep sleep and rapid eye movement (REM) sleep. The model accurately identifies the user's transition from light sleep to deep sleep by analyzing indicators such as the gradual decrease in the user's heart rate, the stability of breathing, and the reduction of body movement. For example, in the data analysis of one night, the model identified that the user was in the light sleep stage for the first 30 minutes after falling asleep, and then entered the deep sleep stage, which lasted for 2 hours and 20 minutes. After that, the user's heart rate rose slightly and the breathing rate fluctuated, which the model identified as the REM sleep stage, which lasted about 1 hour. The model also detected several abnormal sleep events, such as sleep apnea and periodic limb movements.
[0085] The present invention found in the continuous monitoring data that the user's heart rate and breathing rate suddenly stopped for about 10 seconds on a certain day, and then returned to normal. The model detected that this might be a sleep apnea event. This event was then marked and recorded in the report.
[0086] After the data analysis is completed, the system can generate a detailed sleep analysis report, which is reflected in the graphical report and text report in the smartphone software connected to the wearable device.
[0087] The graphical report shows the distribution of the user's sleep stages every night. The chart clearly shows the duration of light sleep, deep sleep and REM sleep and their distribution throughout the night. Heart rate and breathing rate change chart: The report shows the changes in the user's heart rate and breathing rate throughout the night, which can intuitively reflect the user's physiological responses in different sleep stages.
[0088] The text report describes the sleep quality score for each night, including the overall sleep time, the distribution of the duration of each sleep stage, the number of awakenings and their possible causes. The report also records abnormal sleep events, such as the aforementioned sleep apnea, and provides possible impacts and suggestions for these events.
[0089] The personalized suggestions section provides suggestions for improving sleep quality based on the user's historical sleep data. For example, the report suggests that users consider adjusting the height of their pillow or trying a side sleeping position after a sleep apnea event.
[0090] The system also has a remote data transmission function. After the user's data is processed locally, it will be uploaded to the cloud server regularly. The cloud server further analyzes the data and optimizes the large language model based on the model's performance. The optimized model can be pushed to the user's device through software updates to ensure that the system continues to maintain efficient and accurate monitoring capabilities.
[0091] Users can provide feedback through the mobile application and report their subjective sleep experience to online professionals, which will be used by professionals to provide personalized advice that is completely tailored to the user.
[0092] Any example of the present invention can be used as an independent technical solution or combined with other examples. All patents and publications mentioned in the specification of the present invention indicate that these are public technologies in the field and can be used in the present invention. All patents and publications cited here are also listed in the references, just like each publication is specifically cited separately. The present invention here can be implemented in the absence of any element or elements, one limitation or multiple limitations, and this limitation is not specifically stated here. The terms and expressions used here are descriptive methods, but not limited by them. There is no intention to indicate that these terms and explanations described in this book exclude any equivalent features, but it can be known that any appropriate changes or modifications can be made within the scope of the present invention and the claims. It can be understood that the embodiments described in the present invention are embodiments and features in some embodiments, and any person skilled in the art can make some changes and variations based on the essence of the present invention, and these changes and variations are also considered to belong to the scope of the present invention and the scope limited by the independent claims and the appended claims.
Claims
1. A sleep monitoring method based on a large language model, characterized in that: The specific steps include: S1. Build a user health data set to collect and preprocess data, and identify and classify sleep stages; S2, using NLP search engines to coordinate user queries, perform user query processing and similarity analysis; S3, build multi-dimensional user profiles, perform multimodal data integration and similarity graph construction; S4. Generate analysis reports, use large speech models (LLM) to provide personalized suggestions, and detect and alarm abnormal sleep events.
2. A sleep monitoring method based on a large language model according to claim 1, characterized in that: The data set in S1 includes the collected user ID and data date index, wearable device data and sleep stage data.
3. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The data collection and preprocessing in S1 include: Data source: Wearable devices collect real-time dynamic sleep data such as the user's heart rate, breathing rate, body movement, sleep environment noise, and light intensity; Data preprocessing: including data cleaning, removing noise and outliers, standardizing unified formats and units, and feature extraction to extract features useful for sleep stage classification.
4. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The sleep stage identification and classification in S1 includes: Use the pre-trained large language model LLM for data processing and pattern recognition to identify different sleep stages, including light sleep, deep sleep, and REM sleep; Combined with machine learning algorithms, it improves classification accuracy and detects abnormal sleep events, including sleep apnea and periodic limb movements.
5. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The user query processing and similarity analysis in S2 are specifically as follows: the user inputs a query request through the query interface, the request is parsed by the NLP search engine, key information such as user ID and date are extracted, and the historical sleep data of the relevant user is quickly retrieved by using the established index and data structure; Build intra- and inter-user similarity graphs, discover similar user groups based on users’ historical sleep data and behavior patterns, and integrate feature importance scores.
6. A sleep monitoring method based on a large language model according to claim 5, characterized in that: The request parsing by the NLP search engine in S2 specifically includes: S21, performing feature extraction and keyword extraction based on the collected text data containing sleep health information; S22, perform topic modeling and sentiment analysis; S23, perform entity recognition and relationship extraction: identify and extract the relationship between entities in the text; S24. Fine-tune pre-trained models such as BERT and GPT. For tasks that require more detailed processing, use sequence annotation models to identify each sleep stage in the text. S25. Integrate the extracted key information and features to form a structured data representation, and use statistical analysis or machine learning models to analyze the integrated data.
7. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The S3 is specifically: multimodal data integration: integrating the user's physiological data, including heart rate, breathing, behavioral data and possible text data, including user feedback and diaries, using NLP technology to extract themes and patterns related to sleep health, and constructing a multidimensional user profile; Similarity graph construction: Using the LLM model, cosine similarity is used to quantify the similarity between users and based on days to form intra- and inter-user similarity graphs.
8. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The S4 is specifically as follows: Graphical report: intuitively displays sleep data in the form of charts, including sleep stage duration distribution chart, heart rate and breathing frequency change chart, etc. Text report: contains detailed sleep analysis, including overall sleep quality score, duration and distribution of each sleep stage, number of awakenings and cause analysis, abnormal sleep event record, etc.
9. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The S4 also includes: Personalized suggestions: using LLM to generate personalized sleep improvement suggestions based on the user's historical data and individual characteristics, including adjustment of work and rest schedule, optimization of sleep environment, diet adjustment and psychological relaxation training.
10. The sleep monitoring method based on a large language model according to claim 1, characterized in that: The S4 also includes: abnormal sleep event detection and alarm: the system monitors the user's sleep data in real time, and once abnormal events such as sleep apnea and periodic limb movements are detected, a warning is immediately sent to the user through a mobile application or other user interface.