Sleep assisting method and device and electronic equipment

By acquiring and updating dynamic sleep assessment and question-and-answer knowledge graphs, it guides the generation and interaction of sleep assistance programs, solves the problem of improving users' sleep quality, and achieves personalized sleep assistance effects.

CN120708796APending Publication Date: 2025-09-26SHANGHAI TONGJI HOSPITAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510787351.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

How to improve users' sleep quality and increase their subjective well-being.

Method used

By obtaining the target user's dynamic sleep assessment knowledge graph and dynamic sleep question-and-answer knowledge graph, we guide the generation and interaction process of sleep assistance plans, and update and adjust the knowledge graph based on sleep effect data and interaction data to provide personalized sleep assistance plans.

Benefits of technology

It improves the user's sleep quality, increases subjective well-being, and provides a sleep assistance solution that better meets user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708796A_ABST
    Figure CN120708796A_ABST
Patent Text Reader

Abstract

The invention discloses a sleep assistance method and device and electronic equipment, and the method comprises the steps: obtaining a dynamic sleep evaluation knowledge graph and a dynamic sleep question and answer knowledge graph of a target user, and enabling the dynamic sleep evaluation knowledge graph to be used for guiding the generation process of a sleep assistance scheme, the dynamic sleep question-answer knowledge graph is used for guiding the interaction process of sleep knowledge questions and answers; in the process of executing the sleep assistance scheme, obtaining sleep effect data based on the sleep assistance scheme, and obtaining interaction data based on the dynamic sleep question and answer knowledge graph; updating the dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph based on the sleep effect data and the interaction data; and based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph, adjusting the sleep assistance scheme. The sleep quality of the user can be effectively improved, and the subjective happiness is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sleep assistance technology, and in particular to a sleep assistance method, device and electronic equipment. Background Art

[0002] In today's society, sleep quality has become a crucial indicator of health and quality of life. Humans spend approximately one-third of their lives sleeping, which helps restore physical strength and energy. High-quality sleep is essential for tissue repair and regeneration, as well as strengthening the immune system. Therefore, improving sleep quality is a pressing issue. Summary of the Invention

[0003] The present invention provides a sleep assistance method, which aims to effectively improve the user's sleep quality and increase subjective well-being.

[0004] To achieve the above objectives, the present invention provides a sleep assistance method, which comprises:

[0005] Obtaining a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph for the target user, wherein the dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance plan, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer;

[0006] During the execution of the sleep assistance program, obtaining sleep effect data based on the sleep assistance program, and obtaining interaction data based on the dynamic sleep question-and-answer knowledge graph;

[0007] Based on the sleep effect data and the interaction data, updating the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph;

[0008] The sleep assistance program is adjusted based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

[0009] Optionally, obtaining a dynamic sleep question-and-answer knowledge graph of a target user includes:

[0010] Acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data;

[0011] Extracting question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data;

[0012] Constructing a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data;

[0013] Based on the first sleep knowledge data and the historical question and answer data of the target user, the sleep question and answer knowledge graph is updated to obtain a dynamic sleep question and answer knowledge graph.

[0014] Optionally, constructing a sleep question-and-answer knowledge graph based on the question-and-answer entities, the relationship data, and the attribute data includes:

[0015] For the two question-and-answer entities, construct a relationship triplet based on the two question-and-answer entities and the relationship data between the two question-and-answer entities;

[0016] For one of the question-and-answer entities, construct an attribute triple by combining the question-and-answer entity and the attribute data corresponding to the question-and-answer entity;

[0017] Based on the relationship triples and the attribute triples, a sleep question-and-answer knowledge graph is constructed.

[0018] Optionally, the interactive process of the sleep knowledge question and answer session includes:

[0019] Acquire voice and / or text input data of the target user;

[0020] Performing emotion recognition on the input data to obtain the current emotional state of the target user;

[0021] Based on the current emotional state of the target user, selecting a target interaction strategy corresponding to the current emotional state;

[0022] Based on the target interaction strategy, the interactive process of the sleep knowledge question and answer is executed.

[0023] Optionally, obtaining interactive data based on the dynamic sleep question-and-answer knowledge graph includes:

[0024] Performing entity recognition on the input data to obtain target question-answer entities contained in the input data;

[0025] Linking the target question-answering entity to the question-answering entity in the dynamic sleep question-answering knowledge graph and performing disambiguation processing;

[0026] Based on the target question-and-answer entity, path deduction is performed in the dynamic sleep question-and-answer knowledge graph to obtain a path deduction result;

[0027] generating output data based on the path derivation result, wherein the output data is used to answer the input data;

[0028] Based on the input data and the output data, interactive data based on the dynamic sleep question-and-answer knowledge graph is obtained.

[0029] In a second aspect, an embodiment of the present invention further provides a sleep aid device, comprising:

[0030] A first acquisition module is used to acquire a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph of a target user. The dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance program, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer.

[0031] a second acquisition module, configured to acquire sleep effect data based on the sleep assistance program and interactive data based on the dynamic sleep question-and-answer knowledge graph during the execution of the sleep assistance program;

[0032] An updating module, configured to update the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph based on the sleep effect data and the interaction data;

[0033] An adjustment module is used to adjust the sleep assistance program based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

[0034] Optionally, the first acquisition module includes:

[0035] an acquisition submodule, configured to acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data;

[0036] a first processing submodule, configured to extract question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data;

[0037] A second processing submodule is configured to construct a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data;

[0038] The third processing submodule is configured to update the sleep question and answer knowledge graph based on the first sleep knowledge data and the historical question and answer data of the target user to obtain a dynamic sleep question and answer knowledge graph.

[0039] Optionally, the second processing submodule includes:

[0040] A first processing unit is configured to construct a relationship triplet from the two question-and-answer entities and the relationship data between the two question-and-answer entities for the two question-and-answer entities;

[0041] A second processing unit is configured to construct an attribute triple from the question-and-answer entity and attribute data corresponding to the question-and-answer entity for the question-and-answer entity;

[0042] The third processing unit is used to construct a sleep question-and-answer knowledge graph based on the relationship triples and the attribute triples.

[0043] Optionally, the device further includes:

[0044] A third acquisition module is used to obtain voice and / or text input data of the target user;

[0045] A first processing module is configured to perform emotion recognition on the input data to obtain the current emotional state of the target user;

[0046] A second processing module is configured to select a target interaction strategy corresponding to the current emotional state of the target user based on the current emotional state of the target user;

[0047] The third processing module is configured to execute the sleep knowledge question and answer interaction process based on the target interaction strategy.

[0048] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned sleep assistance method when executed by the processor.

[0049] The technical solution of the sleep assistance method of the present invention obtains a dynamic sleep assessment knowledge graph and a dynamic sleep question and answer knowledge graph of the target user. The dynamic sleep assessment knowledge graph is used to guide the generation process of the sleep assistance plan, and the dynamic sleep question and answer knowledge graph is used to guide the interactive process of the sleep knowledge question and answer. During the execution of the sleep assistance plan, sleep effect data based on the sleep assistance plan and interactive data based on the dynamic sleep question and answer knowledge graph are obtained. Based on the sleep effect data and interactive data, the dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph are updated. Based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph, the sleep assistance plan is adjusted. During the execution of the sleep assistance plan, the present invention updates the dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph according to the sleep effect data of the sleep assistance plan and the interactive data based on the dynamic sleep knowledge question and answer graph, and uses the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph to adjust the sleep assistance plan, which can improve the user's sleep quality and increase subjective well-being. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1A schematic diagram of a sleep assistance method according to an embodiment of the present invention;

[0051] Figure 2 A schematic structural diagram of a sleep aid device provided by an embodiment of the present invention;

[0052] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0054] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0055] It should also be noted that when an element is referred to as being "fixed on" or "disposed on" another element, it may be directly on the other element or there may be an intermediate element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or there may be an intermediate element.

[0056] In addition, the descriptions of "first", "second", etc. in the present invention are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0057] See Figure 1 , Figure 1 FIG. 1 is a flow chart of a sleep assistance method provided by an embodiment of the present invention. The sleep assistance method includes the following steps:

[0058] Step S10: Obtain the target user's dynamic sleep assessment knowledge graph and dynamic sleep question-and-answer knowledge graph.

[0059] In this embodiment, the knowledge graph is a structured knowledge representation framework based on a semantic network, constructing a domain knowledge system through nodes (entities / concepts) and edges (attributes / relationships). Through entity extraction, relationship reasoning, and semantic linking, knowledge graph technology can systematically construct a sleep diagnosis and treatment knowledge network, resolving information silos and logical gaps.

[0060] The above dynamic sleep assessment knowledge graph is used to guide the generation process of sleep assistance solutions.

[0061] The dynamic sleep assessment knowledge graph is constructed based on a sleep database. This database includes key sleep indicators, sleep performance, and classifications. It is also used to assess and improve a user's sleep quality. The dynamic sleep assessment knowledge graph for the target user includes data on the user's sleep habits, environmental factors, and physiological indicators. The dynamic sleep assessment knowledge graph is dynamically updated and can continuously learn and evolve over time.

[0062] Specifically, the dynamic sleep assessment knowledge graph can be constructed by constructing a sleep knowledge database based on the first sleep knowledge data. After the sleep knowledge database is updated, the sleep assessment knowledge graph is updated using target users' satisfaction ratings, resulting in a dynamic sleep assessment knowledge graph. The first sleep knowledge data includes sleep knowledge data collected from sleep assistance guidelines, research literature, monographs, clinical practice data, user feedback, and related materials. The first sleep knowledge data includes medical sleep knowledge data, which can be understood as validated and standardized sleep knowledge data from medical research and clinical practice. The sleep knowledge database, constructed based on the sleep knowledge data, includes key sleep-related indicators, sleep performance, and classifications, such as sleep cycles, factors affecting sleep quality, common sleep problems, and their solutions. The satisfaction rating can be understood as a user's evaluation of a product, service, or experience based on their feelings and expectations. For example, it can be emotional feedback or expectation feedback. User satisfaction scores are a direct indicator of product or service effectiveness. The sleep assessment knowledge graph can be adjusted or updated according to the user's satisfaction score to obtain a dynamic sleep knowledge graph to ensure that the dynamic sleep knowledge graph can more accurately reflect user needs.

[0063] The above-mentioned sleep assessment knowledge graph is used to evaluate the user's sleep condition and improve the user's sleep quality. It is also used to guide the generation process of sleep assistance programs.

[0064] The above dynamic sleep assessment knowledge graph is dynamically updated and can continue to learn and evolve over time.

[0065] Furthermore, as time goes by and technology develops, new sleep research literature, user feedback, etc. will continue to emerge. Therefore, it is necessary to regularly check and update the sleep knowledge database to ensure that the information in the sleep knowledge database is up to date.

[0066] The above-mentioned dynamic sleep assessment knowledge graph can be optimized and improved based on direct feedback from users, providing users with more accurate and personalized suggestions for improving sleep quality.

[0067] The above dynamic sleep question and answer knowledge graph is used to guide the interactive process of sleep knowledge question and answer.

[0068] The dynamic sleep Q&A knowledge graph is constructed based on a sleep database and all sleep questions and answers. It can be updated based on user questions and answers, providing more accurate suggestions and answers for improving sleep quality.

[0069] Furthermore, based on the target user's dynamic sleep assessment knowledge graph and dynamic sleep question-and-answer knowledge graph, it is possible to analyze the key factors affecting the target user's sleep quality, identify the target user's sleep problems, and determine a sleep assistance plan for the target user based on the target user's sleep problems. The above-mentioned sleep assistance plan is a plan to help improve sleep quality, including improving the sleeping environment, adjusting lifestyle habits, and other methods to improve the user's sleep quality.

[0070] Step S20: During the execution of the sleep assistance program, sleep effect data based on the sleep assistance program is obtained, as well as interaction data based on the dynamic sleep question-and-answer knowledge graph.

[0071] In this embodiment, during the execution of the sleep assistance program, the sleep effect data of the sleep assistance program and the interaction data based on the dynamic sleep question and answer knowledge graph can be obtained, which can analyze the key factors affecting the sleep quality of the target user, identify the sleep problems that the target user encounters during sleep, and design a sleep assistance program based on the sleep problems that the target user encounters during sleep.

[0072] The above sleep effect data includes sleep quality, duration and other effect data, which are used to evaluate the effectiveness of sleep assistance programs.

[0073] The above-mentioned interactive data includes users' answers, questions, feedback and other data on sleep problems.

[0074] Step S30: Based on the sleep effect data and the interaction data, the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph are updated.

[0075] In this embodiment, the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph can be continuously improved and updated through sleep effect data and interaction data to improve the accuracy of sleep quality assessment and provide more targeted answers and suggestions.

[0076] Step S40: Adjust the sleep assistance plan based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

[0077] In this embodiment, the sleep assistance program can be adjusted based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph, and a sleep assistance program that better meets user needs can be provided, such as adjusting the sleeping environment, improving sleeping habits, and other programs.

[0078] These adjustments can be understood as a process of modifying and optimizing sleep assistance solutions based on the updated Dynamic Sleep Assessment Knowledge Graph and Dynamic Sleep Q&A Knowledge Graph. By adjusting these solutions, we can provide sleep assistance solutions that better meet user needs and improve sleep quality, such as those that adjust the sleeping environment and improve sleeping habits.

[0079] In this embodiment, during the execution of a sleep assistance program, the effectiveness of the current sleep assistance program can be evaluated based on the target user's subjective and objective sleep data, possible problems or deficiencies can be identified, and the sleep assistance program can be adjusted accordingly. For example, if the target user's subjective and objective sleep data show that the user frequently wakes up late at night, the room temperature or lighting can be adjusted, or pre-bedtime activities can be altered. By personalizing the sleep assistance program, the present invention allows users to more effectively improve their sleep conditions, thereby enhancing sleep quality.

[0080] In this embodiment, a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph of a target user are obtained. The dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance plan, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer. During the execution of the sleep assistance plan, sleep effect data based on the sleep assistance plan and interactive data based on the dynamic sleep question-and-answer knowledge graph are obtained. Based on the sleep effect data and interactive data, the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph are updated. Based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph, the sleep assistance plan is adjusted. During the execution of the sleep assistance plan, the present invention updates the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph based on the sleep effect data of the sleep assistance plan and the interactive data based on the dynamic sleep knowledge question-and-answer graph, and uses the updated dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph to adjust the sleep assistance plan, which can effectively improve the user's sleep quality and increase subjective well-being.

[0081] It is understandable that in the specific implementation of this application, user data, sleep data, medical data and other related data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training and use of various models need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0082] Optionally, in the step of constructing a sleep assessment knowledge graph based on a sleep knowledge database, key sleep data can be extracted from the sleep knowledge database based on prior knowledge; text preprocessing can be performed on the key sleep data to obtain preprocessed text; entity recognition and relationship extraction can be performed on the preprocessed text to obtain sleep entity pairs; and a sleep assessment knowledge graph can be constructed based on the sleep entity pairs.

[0083] In an embodiment of the present invention, the key sleep data includes sleep impact data, sleep performance and classification data, sleep intervention data, and sleep prognosis data. The sleep impact data can be understood as data that affects sleep, such as the impact of environmental factors and lifestyle habits on sleep. The sleep performance and classification data are used to describe and categorize different sleep states. The sleep intervention data is used to determine intervention measures to improve or regulate sleep. The sleep prognosis data is used to predict future sleep status.

[0084] Each sleeping entity pair consists of a principal entity, a guest entity, and the relationship between the principal and guest entities. The principal entity can be understood as the primary object of interest in the sleeping entity pair, an independent entity; the guest entity can be understood as another entity that has some relationship with the principal entity. The relationship between the principal and guest entities can be causal, collaborative, or anything else.

[0085] The above-mentioned prior knowledge can be understood as the knowledge or experience that has been accumulated and widely recognized to improve sleep quality before research or application.

[0086] This text preprocessing involves standardizing and time-normalizing the raw text data. Standardization unifies the text into a single format, for example, "can't sleep" → "difficulty falling asleep," "3 o'clock" → "03:00." Time normalization unifies the time format, for example, "two weeks" → 14 days, "last month" → 2025-01-01 to 2025-01-31, etc.

[0087] The entity recognition process can be understood as the process of identifying and classifying entities from text. Entities include time, place, task, event, etc.

[0088] The above-mentioned relationship extraction process can be understood as a process of identifying the relationship between entities in the text.

[0089] The above sleep assessment knowledge graph is used to guide the generation process of sleep assistance plans, and is also used as a knowledge graph for evaluating users' sleep conditions and improving their sleep quality.

[0090] In this embodiment, the present invention obtains preprocessed text by performing preprocessing such as denoising, word segmentation, and standardization, and performs entity recognition and relationship extraction on the preprocessed text to obtain sleep entity pairs. Based on the sleep entity pairs, a sleep assessment knowledge graph is constructed, which helps to deeply analyze how to improve sleep quality.

[0091] Optionally, in the step of obtaining a dynamic sleep question and answer knowledge graph for the target user, first sleep knowledge data and second sleep knowledge data may be obtained; question and answer entities, corresponding relationship data between question and answer entities, and attribute data corresponding to the question and answer entities may be extracted from the first sleep knowledge data and the second sleep knowledge data; a sleep question and answer knowledge graph may be constructed based on the question and answer entities, the relationship data, and the attribute data; and the sleep question and answer knowledge graph may be updated based on the sleep knowledge database and the historical question and answer data of the target user to obtain a dynamic sleep question and answer knowledge graph.

[0092] In this embodiment, the first sleep knowledge data is medical sleep knowledge data.

[0093] The second sleep knowledge data includes interactive sleep knowledge data. This interactive sleep knowledge data can be understood as sleep knowledge related to user interaction, such as the user's sleep habits, questions, and needs. This interactive sleep knowledge data can be obtained through user Q&A, search history, and other methods.

[0094] The above question-and-answer entities can be understood as basic nodes in the knowledge graph, representing specific objects or concepts in the question-and-answer data, including core concepts, practice methods, emotion types, etc.

[0095] The relationship data corresponding to the question and answer entities above represents the connection between the question and answer entities and is used to describe the semantic association between the question and answer entities. The relationship data can be causal relationships, etc.

[0096] The attribute data corresponding to the question-and-answer entities are used to describe the characteristics of the question-and-answer entities or the corresponding relationships between question-and-answer entities. The attribute data corresponding to the question-and-answer entities are additional information about the question-and-answer entities or the corresponding relationships between question-and-answer entities.

[0097] The above-mentioned sleep question and answer knowledge graph can help users instantly obtain targeted answers based on their questions.

[0098] In this embodiment, question-and-answer entities, the corresponding relationship data between question-and-answer entities, and the attribute data corresponding to the question-and-answer entities can be extracted from the first sleep knowledge data and the second sleep knowledge data, and a sleep question-and-answer knowledge graph can be constructed based on the question-and-answer entities, the relationship data, and the attribute data, so as to more effectively organize and manage sleep question-and-answer knowledge.

[0099] The sleep Q&A knowledge graph includes a user's question dataset, a corresponding answer dataset, and a sleep knowledge database. This knowledge graph allows users to instantly access targeted answers to their questions. Through structured knowledge associations, it covers the entire user lifecycle, from learning to practice, and provides data support for subsequent updates.

[0100] The above historical question and answer data can be understood as data on questions about sleep raised by users in the past period of time and the corresponding answers.

[0101] The above dynamic sleep Q&A knowledge graph can answer users' questions about sleep and provide personalized suggestions for improving sleep quality.

[0102] The above dynamic sleep question-and-answer knowledge graph is dynamically updated and can continue to learn and evolve over time.

[0103] In this embodiment, a sleep question and answer knowledge graph can be constructed based on the sleep knowledge database and the second sleep knowledge data, and the sleep question and answer knowledge graph can be updated through the sleep knowledge database and the historical question and answer data of the target user to obtain a dynamic sleep question and answer knowledge graph, which can effectively provide the target user with personalized suggestions for improving sleep quality, thereby improving the user's sleep quality.

[0104] Optionally, in the step of constructing a sleep question and answer knowledge graph based on question and answer entities, relationship data and attribute data, for two question and answer entities, a relationship triple can be constructed by combining the two question and answer entities and the relationship data between the two question and answer entities; for one question and answer entity, an attribute triple can be constructed by combining the question and answer entity and the attribute data corresponding to the question and answer entity; and a sleep question and answer knowledge graph can be constructed based on the relationship triple and the attribute triple.

[0105] In this embodiment, the above-mentioned relationship triples can be understood as triples consisting of "entity 1 - relationship - entity 2" or "entity - attribute - value". For example, it can be a relationship triple consisting of "entity 1 is anxiety" - "relationship is common symptoms" - "entity 2 is overthinking".

[0106] The above attribute triplet can be understood as consisting of a question-and-answer entity, the attribute data corresponding to the question-and-answer entity, and the corresponding attribute value, which is used to describe the characteristics of the question-and-answer entity.

[0107] In this embodiment, by constructing a relationship triple for two question-and-answer entities and the relationship data between the two question-and-answer entities, and constructing an attribute triple for one question-and-answer entity and the attribute data corresponding to the one question-and-answer entity, and using the relationship triples and attribute triples to construct a sleep question-and-answer knowledge graph, when a user asks a question, relevant answers can be quickly found from the sleep question-and-answer knowledge graph, thereby improving the accuracy and efficiency of the answer.

[0108] Optionally, in the steps of the interactive process of the sleep knowledge question and answer, voice type and / or text type input data of the target user can be obtained; emotion recognition is performed on the input data to obtain the current emotional state of the target user; based on the current emotional state of the target user, a target interaction strategy corresponding to the current emotional state is selected; and based on the target interaction strategy, the interactive process of the sleep knowledge question and answer is executed.

[0109] In this embodiment, the input data may be user questions, requirements, feedback, and other data.

[0110] Emotion recognition can be understood as the process of identifying a user's emotional state by analyzing voice and / or text input data. Emotion recognition can be performed on voice and / or text input data using a sentiment classification model. This sentiment classification model can be a sentiment analysis model built using deep learning or machine learning, such as an LSTM-based sentiment analysis network or DeepMoji. Sentiment analysis models can automatically detect and identify human emotional states, such as happiness, anxiety, and frustration.

[0111] The above-mentioned current emotional state can be happiness, anxiety, depression, etc.

[0112] The target interaction strategy described above selects a corresponding interaction strategy based on the target user's current emotional state. Specifically, if the target user's current emotional state is anxious or depressed, soothing language and a slower, gentler speech rate may be selected as the target interaction strategy; if the target user's current emotional state is stable, clear, natural speech may be selected as the target interaction strategy. It should be noted that the interaction strategy can be dynamically adjusted based on the target user's current emotional state, ensuring the smoothness and emotional coherence of the interaction process. More specifically, when the emotional state is anxious, the speech rate is reduced by 30%, and soothing words are inserted, such as "Please try deep breathing. I will help you complete the exercise." When the emotional state is calm, the speech rate is maintained at a neutral rate, and technical answers, such as "The principles of sleep cycles," are prioritized. When the emotional state is depressed, a professional intervention process is triggered, and a preset mindfulness guidance audio is played.

[0113] In this embodiment, the present invention can perform emotion recognition based on the voice type and / or text type input data of the target user to obtain the current emotional state of the target user, and select a target interaction strategy corresponding to the current emotional state through the current emotional state of the target user. By utilizing the target interaction strategy, an interactive process of sleep knowledge questions and answers is executed, which can better meet the needs of users, improve user experience, and help improve the quality of sleep of users.

[0114] Optionally, in the step of obtaining interactive data based on the dynamic sleep question and answer knowledge graph, entity recognition is performed on the input data to obtain the target question and answer entity contained in the input data; the target question and answer entity is linked to the question and answer entity in the dynamic sleep question and answer knowledge graph, and disambiguation processing is performed; based on the target question and answer entity, path deduction is performed in the dynamic sleep question and answer knowledge graph to obtain a path deduction result; based on the path deduction result, output data is generated; based on the input data and the output data, interactive data based on the dynamic sleep question and answer knowledge graph is obtained.

[0115] In this embodiment, the output data is used to respond to the input data.

[0116] The above input data is voice-type and / or text-type input data of the target user.

[0117] Entity recognition can be understood as the process of identifying and classifying sleep-related entities from input data. NER technology can be used to identify sleep-related entities from input data. NER technology is used to identify entities with specific meanings in text, such as names of people, places, organizations, and proper nouns. For example, in the sentence "I always can't sleep at night, what should I do?", the word "can't sleep" is identified as a sleep-related entity.

[0118] Disambiguation can be understood as a technique for identifying and determining the different meanings of the same word in different contexts. For example, for the "XX drug" entity, it links to specific drug nodes in the knowledge graph and distinguishes different types of XX drugs.

[0119] The above path derivation can be understood as the process of finding the path from question to answer by analyzing the relationships and attributes between target question and answer entities in the dynamic sleep question and answer knowledge graph.

[0120] In one possible embodiment, suppose a user enters a question: "How can I improve my sleep quality?" By performing entity recognition on "How can I improve my sleep quality?", the "sleep quality" entity can be identified and linked to the relevant questions and solutions about sleep quality in the dynamic sleep question-and-answer knowledge graph. Then, path deduction is performed in the dynamic sleep question-and-answer knowledge graph to find the corresponding solutions for improving sleep quality. Finally, output data is generated, such as: "You can try solutions such as deep breathing exercises and adjusting your daily routine to improve your sleep quality.

[0121] In this embodiment, entity recognition is performed on the input data to obtain the target question and answer entity contained in the input data, and the target question and answer entity is linked to the question and answer entity in the dynamic sleep question and answer knowledge graph, and disambiguation processing is performed. The target question and answer entity is used to perform path deduction in the dynamic sleep question and answer knowledge graph to obtain a path deduction result. Output data is generated through the path deduction result, and based on the input data and the output data, the interaction number based on the dynamic sleep question and answer knowledge graph is obtained. The interaction data of the dynamic sleep question and answer knowledge graph can better understand the user's needs and provide more accurate and personalized answers.

[0122] In another possible embodiment, the target user's satisfaction with each question-answer pair can be determined based on the sleep effect data and the interaction data; for a question-answer pair, if the satisfaction is greater than or equal to the threshold, the confidence weight of the knowledge corresponding to the question-answer pair in the dynamic sleep question-answer knowledge graph is increased; if the user satisfaction is less than the threshold, the intention and emotional tendency of the target user's question is re-analyzed, and the knowledge in the dynamic sleep question-answer knowledge graph is optimized in combination with professional opinions; if an unknown question is detected, the unknown question is automatically marked, the unknown question is answered in combination with professional opinions, and the dynamic sleep question-answer knowledge graph is updated; the dynamic sleep question-answer knowledge graph is regularly optimized as a whole to remove knowledge with low confidence or low usage.

[0123] In an embodiment of the present invention, each question-answer pair includes at least one input data and one output data.

[0124] The above sleep effect data is based on the sleep assistance program. The sleep effect data includes sleep quality, duration and other effect data, which are used to evaluate the effect of the sleep assistance program.

[0125] The above-mentioned interactive data is interactive data based on the dynamic sleep question and answer knowledge graph, and the above-mentioned interactive data includes data such as users' answers, questions, and feedback on sleep issues.

[0126] The above satisfaction level is used to measure the satisfaction level of each question-answer pair. The user's satisfaction level for each question-answer pair can be determined by analyzing sleep performance data and interaction data.

[0127] The above confidence weight is an indicator to measure the credibility of the question and answer pair. The higher the confidence weight of the question and answer pair, the more likely the question and answer pair is to be accepted by users.

[0128] This overall optimization can be understood as a comprehensive adjustment and improvement to the dynamic sleep Q&A knowledge graph, including optimizations in confidence weights, knowledge structure, and other aspects. Regularly optimizing the dynamic sleep Q&A knowledge graph ensures that the information provided to users is up-to-date and highly accurate.

[0129] In one possible embodiment, when an unknown question is encountered, it needs to be automatically marked as "unknown question". When handling the unknown question, it needs to be answered in combination with the opinions of professionals. Then, after answering the unknown question, the question and answer of the unknown question need to be added to the dynamic sleep question and answer knowledge graph, which helps to continuously enrich and improve the knowledge base, improving its accuracy and practicality.

[0130] In a possible embodiment, the satisfaction level can be set to 6 levels from 0 to 5, and the satisfaction threshold is 3. When the satisfaction level of the question and answer pair is 4, the satisfaction level is greater than or equal to the satisfaction threshold, and the confidence weight of the knowledge corresponding to the question and answer pair in the dynamic sleep question and answer knowledge graph is increased by 20%; when the satisfaction level of the question and answer pair is 1, the satisfaction level is less than the satisfaction threshold, and the intention and emotional tendency of the target user's question are re-analyzed, and the knowledge in the dynamic sleep question and answer knowledge graph is optimized in combination with the opinions of professionals; when an unknown question is detected, the unknown question is independently marked, the unknown question is answered in combination with professional opinions, and the dynamic sleep question and answer knowledge graph is updated; the dynamic sleep question and answer knowledge graph is regularly optimized as a whole, low-confidence or low-usage knowledge is removed, and the structure of the knowledge graph is optimized.

[0131] In this embodiment, the present invention updates and optimizes the knowledge in the dynamic sleep question and answer knowledge graph by analyzing the target user's satisfaction, question intention and emotional tendency, as well as professional opinions, thereby improving the accuracy and efficiency of the dynamic sleep question and answer knowledge graph and enhancing the user's sleep quality and user experience satisfaction.

[0132] like Figure 2 As shown, Figure 2 A sleep aid device provided by an embodiment of the present invention includes:

[0133] The first acquisition module 201 is used to obtain a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph of a target user. The dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance program, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer.

[0134] A second acquisition module 202 is configured to acquire sleep effect data based on the sleep assistance program and interactive data based on the dynamic sleep question-and-answer knowledge graph during the execution of the sleep assistance program;

[0135] An updating module 203 is configured to update the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph based on the sleep effect data and the interaction data;

[0136] The adjustment module 204 is configured to adjust the sleep assistance program based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph.

[0137] Optionally, the first acquisition module 201 includes:

[0138] an acquisition submodule, configured to acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data;

[0139] a first processing submodule, configured to extract question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data;

[0140] A second processing submodule is configured to construct a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data;

[0141] The third processing submodule is configured to update the sleep question and answer knowledge graph based on the first sleep knowledge data and the historical question and answer data of the target user to obtain a dynamic sleep question and answer knowledge graph.

[0142] Optionally, the second processing submodule includes:

[0143] A first processing unit is configured to construct a relationship triplet from the two question-and-answer entities and the relationship data between the two question-and-answer entities for the two question-and-answer entities;

[0144] A second processing unit is configured to construct an attribute triple from the question-and-answer entity and attribute data corresponding to the question-and-answer entity for the question-and-answer entity;

[0145] The third processing unit is used to construct a sleep question-and-answer knowledge graph based on the relationship triples and the attribute triples.

[0146] Optionally, the device further includes:

[0147] A third acquisition module is used to obtain voice and / or text input data of the target user;

[0148] A first processing module is configured to perform emotion recognition on the input data to obtain the current emotional state of the target user;

[0149] A second processing module is configured to select a target interaction strategy corresponding to the current emotional state of the target user based on the current emotional state of the target user;

[0150] The third processing module is configured to execute the sleep knowledge question and answer interaction process based on the target interaction strategy.

[0151] Optionally, the second obtaining module 202 includes:

[0152] A fourth processing submodule is configured to perform entity recognition on the input data to obtain a target question-answer entity contained in the input data;

[0153] a fifth processing submodule, configured to link the target question-and-answer entity to the question-and-answer entity in the dynamic sleep question-and-answer knowledge graph and perform disambiguation processing;

[0154] A sixth processing submodule is configured to perform path deduction in the dynamic sleep question-and-answer knowledge graph based on the target question-and-answer entity to obtain a path deduction result;

[0155] a seventh processing submodule, configured to generate output data based on the path derivation result, wherein the output data is used to answer the input data;

[0156] An eighth processing submodule is configured to obtain interactive data based on the dynamic sleep question-and-answer knowledge graph based on the input data and the output data.

[0157] like Figure 3 As shown, an embodiment of the present invention further provides an electronic device, including a processor, and the processor can execute any one of the above sleep assistance methods.

[0158] Specifically, the system includes a processor 301, a memory 302, and a computer program for executing the control method of the intelligent toy, which is stored in the memory 302 and can be run on the processor 301, wherein:

[0159] The processor 301 runs the computer program for the sleep assistance method stored in the memory 302 and performs the following steps:

[0160] Obtaining a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph for the target user, wherein the dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance plan, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer;

[0161] During the execution of the sleep assistance program, obtaining sleep effect data based on the sleep assistance program, and obtaining interaction data based on the dynamic sleep question-and-answer knowledge graph;

[0162] Based on the sleep effect data and the interaction data, updating the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph;

[0163] The sleep assistance program is adjusted based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

[0164] Optionally, the processor 301 executes the step of obtaining a dynamic sleep question-and-answer knowledge graph of a target user, including:

[0165] Acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data;

[0166] Extracting question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data;

[0167] Constructing a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data;

[0168] Based on the first sleep knowledge data and the historical question and answer data of the target user, the sleep question and answer knowledge graph is updated to obtain a dynamic sleep question and answer knowledge graph.

[0169] Optionally, the processor 301 constructs a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data, including:

[0170] For the two question-and-answer entities, construct a relationship triplet based on the two question-and-answer entities and the relationship data between the two question-and-answer entities;

[0171] For one of the question-and-answer entities, construct an attribute triple by combining the question-and-answer entity and the attribute data corresponding to the question-and-answer entity;

[0172] Based on the relationship triples and the attribute triples, a sleep question-and-answer knowledge graph is constructed.

[0173] Optionally, the sleep knowledge question-and-answer interaction process executed by the processor 301 includes:

[0174] Acquire voice and / or text input data of the target user;

[0175] Performing emotion recognition on the input data to obtain the current emotional state of the target user;

[0176] Based on the current emotional state of the target user, selecting a target interaction strategy corresponding to the current emotional state;

[0177] Based on the target interaction strategy, the interactive process of the sleep knowledge question and answer is executed.

[0178] Optionally, the acquiring of interactive data based on the dynamic sleep question-and-answer knowledge graph performed by the processor 301 includes:

[0179] Performing entity recognition on the input data to obtain target question-answer entities contained in the input data;

[0180] Linking the target question-answering entity to the question-answering entity in the dynamic sleep question-answering knowledge graph and performing disambiguation processing;

[0181] Based on the target question-and-answer entity, path deduction is performed in the dynamic sleep question-and-answer knowledge graph to obtain a path deduction result;

[0182] generating output data based on the path derivation result, wherein the output data is used to answer the input data;

[0183] Based on the input data and the output data, interactive data based on the dynamic sleep question-and-answer knowledge graph is obtained.

[0184] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The computer storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0185] The above disclosure is merely a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A sleep aid method, characterized in that: The method comprises: Obtaining a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph for the target user, wherein the dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance plan, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer; During the execution of the sleep assistance program, obtaining sleep effect data based on the sleep assistance program, and obtaining interaction data based on the dynamic sleep question-and-answer knowledge graph; Based on the sleep effect data and the interaction data, updating the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph; The sleep assistance program is adjusted based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

2. The sleep assistance method according to claim 1, characterized in that: The step of obtaining a dynamic sleep question-and-answer knowledge graph of a target user includes: Acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data; Extracting question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data; Constructing a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data; Based on the first sleep knowledge data and the historical question and answer data of the target user, the sleep question and answer knowledge graph is updated to obtain a dynamic sleep question and answer knowledge graph.

3. The sleep assistance method according to claim 2, characterized in that: The step of constructing a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data includes: For the two question-and-answer entities, construct a relationship triplet based on the two question-and-answer entities and the relationship data between the two question-and-answer entities; For one of the question-and-answer entities, construct an attribute triple by combining the question-and-answer entity and the attribute data corresponding to the question-and-answer entity; Based on the relationship triples and the attribute triples, a sleep question-and-answer knowledge graph is constructed.

4. The sleep assistance method according to any one of claims 1 to 3, characterized in that: The interactive process of the sleep knowledge question and answer session includes: Acquire voice and / or text input data of the target user; Performing emotion recognition on the input data to obtain the current emotional state of the target user; Based on the current emotional state of the target user, selecting a target interaction strategy corresponding to the current emotional state; Based on the target interaction strategy, the interactive process of the sleep knowledge question and answer is executed.

5. The sleep assistance method according to claim 4, characterized in that: The acquiring of interactive data based on the dynamic sleep question-and-answer knowledge graph includes: Performing entity recognition on the input data to obtain target question-answer entities contained in the input data; Linking the target question-answering entity to the question-answering entity in the dynamic sleep question-answering knowledge graph and performing disambiguation processing; Based on the target question-and-answer entity, path deduction is performed in the dynamic sleep question-and-answer knowledge graph to obtain a path deduction result; generating output data based on the path derivation result, wherein the output data is used to answer the input data; Based on the input data and the output data, interactive data based on the dynamic sleep question-and-answer knowledge graph is obtained.

6. A sleep aid device, characterized in that: The sleeping aid device comprises: A first acquisition module is used to acquire a dynamic sleep assessment knowledge graph and a dynamic sleep question-and-answer knowledge graph of a target user. The dynamic sleep assessment knowledge graph is used to guide the generation process of a sleep assistance program, and the dynamic sleep question-and-answer knowledge graph is used to guide the interactive process of sleep knowledge question-and-answer. a second acquisition module, configured to acquire sleep effect data based on the sleep assistance program and interactive data based on the dynamic sleep question-and-answer knowledge graph during the execution of the sleep assistance program; An updating module, configured to update the dynamic sleep assessment knowledge graph and the dynamic sleep question-and-answer knowledge graph based on the sleep effect data and the interaction data; An adjustment module is used to adjust the sleep assistance program based on the updated dynamic sleep assessment knowledge graph and the dynamic sleep question and answer knowledge graph.

7. The sleeping aid device according to claim 6, wherein: The first acquisition module includes: an acquisition submodule, configured to acquire first sleep knowledge data and second sleep knowledge data, wherein the first sleep knowledge data is medical sleep knowledge data, and the second sleep knowledge data includes interactive sleep knowledge data; a first processing submodule, configured to extract question-and-answer entities, corresponding relationship data between question-and-answer entities, and attribute data corresponding to the question-and-answer entities from the first sleep knowledge data and the second sleep knowledge data; A second processing submodule is configured to construct a sleep question-and-answer knowledge graph based on the question-and-answer entity, the relationship data, and the attribute data; The third processing submodule is configured to update the sleep question and answer knowledge graph based on the first sleep knowledge data and the historical question and answer data of the target user to obtain a dynamic sleep question and answer knowledge graph.

8. The sleeping aid device according to claim 7, wherein: The second processing submodule includes: A first processing unit is configured to construct a relationship triplet from the two question-and-answer entities and the relationship data between the two question-and-answer entities for the two question-and-answer entities; A second processing unit is configured to construct an attribute triple from the question-and-answer entity and attribute data corresponding to the question-and-answer entity for the question-and-answer entity; The third processing unit is used to construct a sleep question-and-answer knowledge graph based on the relationship triples and the attribute triples.

9. The sleeping aid device according to any one of claims 6 to 8, characterized in that The device further comprises: A third acquisition module is used to obtain voice and / or text input data of the target user; A first processing module is configured to perform emotion recognition on the input data to obtain the current emotional state of the target user; A second processing module is configured to select a target interaction strategy corresponding to the current emotional state of the target user based on the current emotional state of the target user; The third processing module is configured to execute the sleep knowledge question and answer interaction process based on the target interaction strategy.

10. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the sleep assistance method according to any one of claims 1 to 5 are implemented.