Personalized sleep aiding system and method based on artificial intelligence

By collecting users' sleep videos and ECG signals, and using graph neural network technology to extract sleep stage features and respiratory waveforms, the problem of existing systems being unable to assess whether respiratory status meets standards is solved. This enables precise adjustment of the sleep environment in a personalized sleep aid system, thereby improving sleep quality.

CN121003758APending Publication Date: 2025-11-25YONGBAO JIAFU (SHANGHAI) IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511183681.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing AI-based sleep monitoring systems cannot comprehensively assess whether a user's breathing status meets the standards, or the relationship between breathing status and sleep quality, resulting in an inability to adjust sleep environment parameters in a timely manner.

Method used

By collecting users' sleep videos and ECG signals, graph neural network technology is used to extract sleep stage features. Combined with QRS complex wave information in ECG signals, the respiratory target achievement coefficient and sleep state quality coefficient are calculated, and sleep environment parameters are dynamically adjusted.

Benefits of technology

It enables precise assessment of users' breathing status and sleep quality, dynamically adjusts the sleep environment, and improves sleep quality and the effectiveness of personalized sleep aid services for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121003758A_ABST
    Figure CN121003758A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sleep-aiding monitoring, in particular to a personalized sleep-aiding system and method based on artificial intelligence. The method comprises the steps that multi-source data such as sleep videos and ECG signals of a user are collected, the advanced graph neural network technology is used for conducting feature extraction and analysis on the sleep videos, the sleep stage of the user is accurately determined, meanwhile, QRS complex wave information in the ECG signals is extracted to obtain a breathing oscillogram of the user, the breathing standard reaching coefficient is calculated, and the sleep stage of the user is determined. The sleep state parameter is combined to calculate the sleep state quality coefficient, finally, the sleep environment parameter of the user is dynamically adjusted according to the respiration standard coefficient and the sleep state quality coefficient, personalized sleep aiding service is provided for the user, and therefore the sleep quality of the user is improved, and the sleep condition of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of sleep monitoring, in particular to an individualized sleep-aiding system and method based on artificial intelligence. BACKGROUND

[0002] Existing sleep monitoring systems based on artificial intelligence mostly focus on sleep stage division and sleep quality evaluation, and there is relatively little research on how to dynamically adjust sleep environment parameters according to real-time sleep state of users to improve sleep quality.

[0003] Some devices require users to wear complex sensors, which not only brings discomfort to users, but also may affect the natural sleep state of users. Moreover, for the collected sleep data, there is a lack of effective feature extraction and analysis methods, making it difficult to fully mine the information related to sleep contained in the data.

[0004] In terms of sleep respiration, sleep respiratory disorders are one of the important factors affecting sleep quality. Currently, sleep respiration monitoring mainly relies on professional medical equipment, which is usually expensive and complex to operate, and is not suitable for long-term use in a home environment. Moreover, existing respiration monitoring methods can only provide basic information such as respiration rate, and cannot comprehensively evaluate whether the user's respiration state meets the standard and the relationship between the respiration state and sleep quality.

[0005] Therefore, there is an urgent need for a power transaction login management system and method based on multi-dimensional identity verification to solve the above problems. SUMMARY

[0006] The purpose of the present application is to provide an individualized sleep-aiding system and method based on artificial intelligence, which aims to solve the problem that traditional sleep-aiding systems can only provide basic information such as respiration rate, cannot comprehensively evaluate whether the user's respiration state meets the standard, and cannot adjust the user's sleep environment parameters in a timely manner due to the relationship between the respiration state and sleep quality.

[0007] The purpose of the present application can be achieved by the following technical solutions: On the one hand, an individualized sleep-aiding system based on artificial intelligence, the system comprising: a sleep stage determination unit for collecting sleep videos of users during sleep, obtaining first representations of feature nodes of all sleep video segments based on graph neural networks, performing feature alignment processing on all first representations and aggregating to obtain final representations, and determining the sleep stage of the user based on the final representations; a sleep data acquisition unit for acquiring ECG signals and sleep state parameters of the user in the sleep stage; The breathing target assessment unit is used to extract information of the QRS complex wave in the ECG signal, extract the user's breathing waveform based on the QRS complex wave information, and calculate the user's breathing target coefficient based on the breathing waveform and the preset breathing waveform of the user's sleep stage. The sleep quality assessment unit is used to calculate the user's sleep quality coefficient based on sleep state parameters and sleep state parameter indicators of the user's current sleep stage. The sleep environment parameter adjustment unit is used to adjust the user's sleep environment parameters based on the breathing target coefficient and the sleep state quality coefficient.

[0008] Furthermore, obtaining the first representation of the feature nodes of all sleep video segments based on the graph neural network specifically includes the following process: Graph neural networks use fully connected graphs express, This represents the number of nodes in the graph neural network, and its value is the same as that in the sleep video clip. This represents the number of edges in the graph neural network. When all sleep video clips are input into a graph neural network, the node features and edge features at the graph center are given by the following formula: ; ; in, Sleep video clip Input the node features at the center of the graph in the graph neural network. Sleep video clip Sleep video clips After being input into a graph neural network, the graph center edge features between them... and These represent two different multilayer perceptrons used to perform node and edge calculations in graph neural networks. This indicates the extraction of sleep state image features from sleep video clips; Based on the node features and edge features of the graph center, fully connected graphs are deleted according to their importance. The edge features in the graph are used to obtain the fully connected graph to be processed. The node features are passed multiple times between the transport layers of the graph neural network. During the transmission process, information is passed with adjacent nodes, and the first representation of the feature nodes of all sleep video segments is obtained through information transmission.

[0009] Furthermore, based on the node features and edge features of the graph center, fully connected graphs are deleted according to their importance. The edge features in the graph are used to obtain the fully connected graph to be processed. Specifically, the process includes the following: The edge centrality is defined as the average of the centrality scores of two adjacent nodes as follows: ; wherein, is the centrality of the edge feature , which is used to represent the importance of the influence between two connected nodes, represents the Euclidean distance of the node from the node closest to the center of the graph, represents the Euclidean distance of the node from the node closest to the center of the graph; The importance degree of each edge feature is calculated according to the centrality of each edge feature: set to reduce the influence of dense nodes, and after normalization, the value is converted into an importance degree by a conversion formula; According to the importance degree value of each edge feature from small to large, a sorting sequence is generated, and the first M edge features in the sorting sequence are deleted to obtain a full connection graph to be processed , wherein M is a preset number.

[0010] Further, the feature alignment processing and aggregation of all first representations to obtain the final representation specifically include the following processes: Let the first representation be an input sample, for each first representation , regard as a positive sample, and randomly select several image representations inconsistent with the combined category of the input sample from the training batch as a negative sample, to obtain an attribute negative sample set of the input sample , use the contrast learning method to reduce the distance between and the positive sample , and increase the distance between and the negative sample ; The first representation after the feature alignment processing is aggregated as follows: ; wherein, represents the final representation, represents the graph-level multi-layer perception operation, represents the aggregation operation, represents the first representation.

[0011] Further, the information of the QRS complex in the ECG signal is extracted specifically as follows: the data points within 0.1s before and after each R peak are cut out and recorded as the information of the QRS complex.

[0012] Further, the extracting of the user's respiratory waveform based on the information of the QRS complex includes the following steps: Step 1, the information of the QRS complex is used to detect the position of the QRS wave peak by using the Pan-Tompkins algorithm, and the time sequence of the QRS wave peak is obtained; Step 2, the R peak amplitude of each QRS wave is extracted, and the interval between adjacent R peaks is calculated; Step 3, the width, slope or principal component analysis dimensionality reduction feature of the QRS wave is extracted, and low-pass filtering is performed, wherein the cutoff frequency is 0.5 Hz, corresponding to the respiratory frequency range 0.1~0.5 Hz, and the filtered signal is the respiratory waveform.

[0013] Further, the calculation of the user's respiratory compliance coefficient based on the respiratory waveform and the preset respiratory waveform of the user's sleep stage includes the following steps: The respiratory waveform and the preset respiratory waveform of the user's sleep stage are plotted in the same rectangular coordinate system, the area of the respiratory waveform above the preset respiratory waveform and the area enclosed by the preset respiratory waveform are calculated, and then the area enclosed by the respiratory waveform and the X-axis is calculated. The ratio of the two areas is called the respiratory ratio value; The respiratory difference value represents the acute angle formed by the first intersection of the respiratory waveform and the preset respiratory waveform, and the product value obtained after data normalization between the length of the line segment above the preset respiratory waveform and the respiratory waveform; The difference between the calculated product value and the preset product value, and the difference between the respiratory ratio value and the preset respiratory ratio threshold value are calculated; The sum of the two differences is called the respiratory compliance coefficient.

[0014] Further, the calculation of the user's sleep state quality coefficient based on the sleep state parameter and the sleep state parameter index of the user's sleep stage includes the following steps: The sleep state parameter includes the sleep duration, the number of body movements, the respiratory frequency and the heart rate corresponding to the user's sleep stage, and the sleep state parameter index includes the preset sleep duration, the preset number of body movements, the preset respiratory frequency and the preset heart rate; obtaining first sleep stage sleep quality information, second sleep stage sleep quality information to Bth sleep stage sleep quality information; wherein, the first sleep stage sleep quality information comprises a first sleep duration redundancy, a first body movement frequency redundancy, a first respiration rate difference value and a first heart rate difference value; the Bth sleep stage sleep quality information comprises a Bth sleep duration redundancy, a Bth body movement frequency redundancy, a Bth respiration rate difference value and a Bth heart rate difference value; wherein, the sleep duration redundancy is the difference value between the sleep duration of the user in the sleep stage and the preset sleep duration, the body movement frequency redundancy is the difference value between the body movement frequency of the user in the sleep stage and the preset body movement frequency, the respiration rate difference value is the difference value between the respiration rate of the user in the sleep stage and the preset respiration rate, and the heart rate difference value is the difference value between the heart rate of the user in the sleep stage and the preset heart rate; adding the first sleep duration redundancy, the first body movement frequency redundancy, the first respiration rate difference value and the first heart rate difference value after normalization to obtain the first sleep state quality characteristic value; until the Bth sleep state quality characteristic value is calculated; taking the average of the first sleep state quality characteristic value to the Bth sleep state quality characteristic value as the sleep state quality coefficient of the user.

[0015] Further, adjusting the sleep environment parameters of the user based on the respiration standard coefficient and the sleep state quality coefficient specifically includes the following process: determining whether the respiration standard coefficient exceeds the preset respiration standard coefficient threshold value, if not, determining that the current sleep environment parameters of the user do not meet the sleep requirements, adjusting the sleep environment parameters of the user, if yes, determining that the current sleep environment parameters of the user meet the sleep requirements, and not adjusting the sleep environment parameters of the user; determining whether the sleep state quality coefficient exceeds the preset sleep state quality coefficient threshold value, if not, determining that the current sleep environment parameters of the user do not meet the sleep requirements, adjusting the sleep environment parameters of the user, if yes, determining that the current sleep environment parameters of the user meet the sleep requirements, and not adjusting the sleep environment parameters of the user; wherein, the sleep environment parameters of the user include the environmental temperature, the environmental humidity and the frequency of the sleep-aiding audio.

[0016] On the other hand, a personalized sleep-aiding method based on artificial intelligence, the method comprising: collecting sleep videos of the user during sleep, obtaining first representations of feature nodes of all sleep video segments based on graph neural networks, performing feature alignment processing on all first representations and aggregating to obtain a final representation, and determining the sleep stage of the user based on the final representation; obtaining ECG signals and sleep state parameters of the user in the sleep stage; The information of the QRS complex wave in the ECG signal is extracted, the respiratory waveform of the user is extracted based on the information of the QRS complex wave, and the respiratory standard coefficient of the user is calculated based on the respiratory waveform and a preset respiratory waveform of the sleep stage in which the user is located; The sleep state quality coefficient of the user is calculated based on the sleep state parameter and a sleep state parameter index of the sleep stage in which the user is located. The sleep environment parameter of the user is adjusted based on the respiratory standard coefficient and the sleep state quality coefficient.

[0017] Compared with the prior art, the present application has the following advantages: The present application collects the sleep video and ECG signal and other multi-source data of the user, uses advanced graph neural network technology to extract and analyze the features of the sleep video, accurately determines the sleep stage of the user, extracts the QRS complex wave information in the ECG signal to obtain the respiratory waveform of the user, calculates the respiratory standard coefficient, combines the sleep state parameter to calculate the sleep state quality coefficient, and finally dynamically adjusts the sleep environment parameter of the user according to the respiratory standard coefficient and the sleep state quality coefficient, thereby providing personalized sleep aid service for the user, improving the sleep quality of the user, and improving the sleep condition of the user. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.

[0019] Figure 1 is a system block diagram of an artificial intelligence-based personalized sleep aid system according to an embodiment of the present application; Figure 2 is a work flow diagram of an artificial intelligence-based personalized sleep aid system according to an embodiment of the present application; Figure 3 is a work flow diagram of an artificial intelligence-based personalized sleep aid method according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0021] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more example embodiments. In the following description, numerous specific details are provided to give a thorough understanding of example embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the techniques of the disclosure can be practiced without one or more of the specific details, or

[0022] The embodiment provides an artificial intelligence-based personalized sleep-aiding system, Figure 1 is a system block diagram of an artificial intelligence-based personalized sleep-aiding system according to an embodiment of the present application, as shown in the figure, the system comprises: Figure 1 a sleep stage determination unit configured to collect sleep videos of a user during sleep, obtain first representations of feature nodes of all sleep video segments based on a graph neural network, perform feature alignment processing on all the first representations and aggregate the first representations to obtain final representations, and determine a sleep stage in which the user is based on the final representations; a sleep data acquisition unit configured to acquire an ECG (Electrocardiogram) signal and a sleep state parameter of the user in the sleep stage; a breathing compliance judgment unit configured to extract information of a QRS complex wave in the ECG signal, extract a breathing waveform of the user based on the information of the QRS complex wave, and calculate a breathing compliance coefficient of the user based on a preset breathing waveform of the sleep stage and the breathing waveform; a sleep state quality evaluation unit configured to calculate a sleep state quality coefficient of the user based on the sleep state parameter and a sleep state parameter index of the sleep stage in which the user is; a sleep environment parameter adjustment unit configured to adjust a sleep environment parameter of the user based on the breathing compliance coefficient and the sleep state quality coefficient.

[0023] To sum up, the present application collects sleep videos and ECG signals and other multi-source data of a user, extracts and analyzes features of the sleep videos by using advanced graph neural network technology, accurately determines a sleep stage of the user, extracts QRS complex wave information in the ECG signal to obtain a breathing waveform of the user, calculates a breathing compliance coefficient, calculates a sleep state quality coefficient in combination with a sleep state parameter, and finally dynamically adjusts a sleep environment parameter of the user according to the breathing compliance coefficient and the sleep state quality coefficient, thereby providing personalized sleep-aiding services for the user, improving sleep quality of the user, and improving sleep conditions of the user.

[0024] It is worth noting that the modules of the system can be in communication connection with each other. ​

[0025] In some embodiments, obtaining the first representation of all the sleep video segment feature nodes based on the graph neural network specifically comprises the following process: The graph neural network uses a full connection graph represents, represents the number of nodes of the graph neural network, and the value is the same as the sleep video segment, represents the number of edges of the graph neural network, When all the sleep video segments are input into the graph neural network, the node features and the edge features of the graph center are given by the following formula: ; ; wherein, is the sleep video segment input into the graph neural network, is the sleep video segment and the sleep video segment input into the graph neural network, the edge features between them, and respectively represent two different multi-layer perceptrons for performing the calculation of the nodes and the edges in the graph neural network, represents sleep state image feature extraction on the sleep video segment; According to the importance degree, the edge features in the full connection graph are deleted, and the full connection graph to be processed is obtained based on the node features and the edge features of the graph center, the node features are transmitted between the transmission layers of the graph neural network multiple times, and information is transmitted with adjacent nodes in the transmission process, and the first representation of all the sleep video segment feature nodes is obtained through the information transmission.

[0026] Further, according to the importance degree, the edge features in the full connection graph are deleted, and the full connection graph to be processed is obtained based on the node features and the edge features of the graph center, and the process specifically comprises the following process: The edge centrality is defined as the average value of the centrality scores of two adjacent nodes as follows: ; wherein, is the edge feature , which is used to represent the importance influence between two connected nodes, represents the Euclidean distance of the node from the node of the graph center, represents the Euclidean distance of the node from the node of the graph center; According to the centrality of each edge feature, the importance degree of each edge feature is calculated: set To reduce the impact of dense nodes, after normalization processing, the value is converted into the importance degree through the conversion formula, and the conversion formula is as follows: ; Wherein, is a hyperparameter, which aims to control the overall probability of deleting edges; is the maximum value of , is the average value of , , used to limit the maximum value of the probability, is the importance degree of each edge feature, and min represents the minimum value operation; According to the importance degree value of each edge feature from small to large, a sorting sequence is generated, the first M edge features in the sorting sequence are deleted, and a full connection graph to be processed is obtained , wherein M is a preset number.

[0027] In some embodiments, the feature alignment processing is performed on all first representations, and the final representation is obtained by aggregation, which specifically includes the following process: The first representation is denoted as an input sample, and for each first representation , the is regarded as a positive sample, and a plurality of image representations inconsistent with the combined category of the input sample are randomly selected from the training batch is regarded as a negative sample, and an attribute negative sample set of the input sample is obtained , the distance between and the positive sample is narrowed, and the distance between and the negative sample is widened, wherein the loss function is as follows: ; wherein, is a temperature control coefficient, which controls the weight of the most similar negative sample in the loss; The first representation after the feature alignment processing is aggregated: The READOUT function and a graph-level multi-layer perception are used to perform the following graph-level mapping: ; Wherein, denotes the final representation, denotes a graph-level multi-layer perception operation, denotes an aggregation operation, denotes the first representation.

[0028] It is worth mentioning that the information of the QRS complex in the extracted ECG signal specifically includes: data points within 0.1 s before and after each R peak are cut out and recorded as the information of the QRS complex.

[0029] In some embodiments, Figure 2 is a workflow diagram of an artificial intelligence-based personalized sleep aid system according to an embodiment of the present application, as Figure 2 As shown, the extraction of the user's respiratory waveform based on the information of the QRS complex specifically includes the following processes: The Pan-Tompkins algorithm is used to detect the position of the QRS peak based on the information of the QRS complex, and the time sequence of the QRS peak is obtained; The R peak amplitude of each QRS wave is extracted, and the interval between adjacent R peaks is calculated; The width, slope or principal component analysis dimensionality reduction feature of the QRS wave is extracted, and low-pass filtering is performed, and the filtered signal is the respiratory waveform.

[0030] Among them, the cut-off frequency of low-pass filtering is usually 0.5 Hz, corresponding to the respiratory frequency range of 0.1~0.5 Hz, In some embodiments, the calculation of the user's respiratory compliance coefficient based on the respiratory waveform and the preset respiratory waveform of the sleep stage in which the user is located specifically includes the following processes: The respiratory waveform and the preset respiratory waveform of the sleep stage in which the user is located are plotted in the same rectangular coordinate system, the area of the respiratory waveform above the preset respiratory waveform and the area enclosed by the preset respiratory waveform are calculated, and then the area enclosed by the respiratory waveform and the X-axis is calculated. The ratio of the two areas is recorded as the respiratory difference value; The respiratory difference value represents the acute angle formed by the first intersection of the respiratory waveform and the preset respiratory waveform, and the product value obtained after data normalization processing between the length of the line segment above the preset respiratory waveform and the respiratory waveform; The difference between the calculated product value and the preset product value, and the difference between the respiratory difference value and the preset respiratory difference threshold value are calculated; The sum of the two differences is recorded as the respiratory compliance coefficient.

[0031] In some embodiments, the calculation of the user's sleep state quality coefficient based on the sleep state parameter and the sleep state parameter index of the sleep stage in which the user is located specifically includes the following processes: The sleep state parameter includes the sleep duration, the number of body movements, the respiratory frequency and the heart rate corresponding to the sleep stage in which the user is located, and the sleep state parameter index includes the preset sleep duration, the preset number of body movements, the preset respiratory frequency and the preset heart rate. obtaining first sleep stage sleep quality information, second sleep stage sleep quality information to Bth sleep stage sleep quality information; wherein, the first sleep stage sleep quality information comprises a first sleep duration redundancy, a first body movement frequency redundancy, a first respiration frequency difference value and a first heart rate difference value; the Bth sleep stage sleep quality information comprises a Bth sleep duration redundancy, a Bth body movement frequency redundancy, a Bth respiration frequency difference value and a Bth heart rate difference value; wherein, the sleep duration redundancy is the difference value between the sleep duration of the user in the sleep stage and the preset sleep duration, the body movement frequency redundancy is the difference value between the body movement frequency of the user in the sleep stage and the preset body movement frequency, the respiration frequency difference value is the difference value between the respiration frequency of the user in the sleep stage and the preset respiration frequency, and the heart rate difference value is the difference value between the heart rate of the user in the sleep stage and the preset heart rate; adding the first sleep duration redundancy, the first body movement frequency redundancy, the first respiration frequency difference value and the first heart rate difference value after normalization to obtain the first sleep state quality characteristic value; until the Bth sleep state quality characteristic value is calculated; taking the average of the first sleep state quality characteristic value to the Bth sleep state quality characteristic value as the sleep state quality coefficient of the user.

[0032] In some embodiments, adjusting the user sleep environment parameters based on the respiration compliance coefficient and the sleep state quality coefficient specifically includes the following process: determining whether the respiration compliance coefficient exceeds the preset respiration compliance coefficient threshold, if not, determining that the current sleep environment parameters of the user do not meet the sleep requirements, adjusting the user sleep environment parameters, if yes, determining that the current sleep environment parameters of the user meet the sleep requirements, and not adjusting the user sleep environment parameters; determining whether the sleep state quality coefficient exceeds the preset sleep state quality coefficient threshold, if not, determining that the current sleep environment parameters of the user do not meet the sleep requirements, adjusting the user sleep environment parameters, if yes, determining that the current sleep environment parameters of the user meet the sleep requirements, and not adjusting the user sleep environment parameters; wherein, the user sleep environment parameters include the environmental temperature, the environmental humidity and the frequency of the sleep-aiding audio.

[0033] In some embodiments, the present application also provides a personalized sleep-aiding method based on artificial intelligence, Figure 3 is a workflow diagram of a personalized sleep-aiding method based on artificial intelligence according to an embodiment of the present application, as Figure 3 shown, the method comprises the following steps: Step S301: collecting sleep videos of the user during sleep, obtaining first representations of all sleep video segment feature nodes based on graph neural network, performing feature alignment processing on all first representations and aggregating to obtain final representations, and determining the sleep stage of the user based on the final representations; Step S302: Obtain the ECG signal and sleep state parameters of the user in the sleep stage; Step S303: Extract the information of the QRS complex wave in the ECG signal, extract the respiratory waveform of the user based on the information of the QRS complex wave, and calculate the respiratory compliance coefficient of the user based on the respiratory waveform and the preset respiratory waveform of the user in the sleep stage; Step S304: Calculate the sleep state quality coefficient of the user based on the sleep state parameters and the sleep state parameter index of the user in the sleep stage; Step S305: Adjust the sleep environment parameters of the user based on the respiratory compliance coefficient and the sleep state quality coefficient.

[0034] The above embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, the above embodiments can be realized in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state disk.

[0035] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0036] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.

[0037] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the embodiments of the device described above are merely schematic, and the division of the units is merely logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0038] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to the actual needs to achieve the purposes of the embodiments of the present application.

[0039] The above describes only the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A personalized sleep aid system based on artificial intelligence, characterized in that, The system includes: The sleep stage determination unit is used to collect sleep videos of the user during sleep, obtain the first representation of the feature nodes of all sleep video segments based on a graph neural network, perform feature alignment processing on all first representations and aggregate them to obtain the final representation, and determine the user's sleep stage based on the final representation. The sleep data acquisition unit is used to acquire the ECG signal and sleep state parameters of the user's current sleep stage. The breathing target assessment unit is used to extract information of the QRS complex wave in the ECG signal, extract the user's breathing waveform based on the QRS complex wave information, and calculate the user's breathing target coefficient based on the breathing waveform and the preset breathing waveform of the user's sleep stage. The sleep quality assessment unit is used to calculate the user's sleep quality coefficient based on sleep state parameters and sleep state parameter indicators of the user's current sleep stage. The sleep environment parameter adjustment unit is used to adjust the user's sleep environment parameters based on the breathing target coefficient and the sleep state quality coefficient.

2. The personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, Obtaining the first representation of feature nodes for all sleep video segments based on a graph neural network specifically includes the following process: Graph neural networks use fully connected graphs express, This represents the number of nodes in the graph neural network, and its value is the same as that in the sleep video clip. This represents the number of edges in the graph neural network. When all sleep video clips are input into a graph neural network, the node features and edge features at the graph center are given by the following formula: ; ; in, Sleep video clip Input the node features at the center of the graph in the graph neural network. Sleep video clip Sleep video clips After being input into a graph neural network, the graph center edge features between them... and These represent two different multilayer perceptrons used to perform node and edge calculations in graph neural networks. This indicates the extraction of sleep state image features from sleep video clips; Based on the node features and edge features of the graph center, fully connected graphs are deleted according to their importance. The edge features in the graph are used to obtain the fully connected graph to be processed. The node features are passed multiple times between the transport layers of the graph neural network. During the transmission process, information is passed with adjacent nodes, and the first representation of the feature nodes of all sleep video segments is obtained through information transmission.

3. The personalized sleep aid system based on artificial intelligence according to claim 2, characterized in that, Based on the node features and edge features of the graph center, fully connected graphs are deleted according to their importance. The edge features in the graph are used to obtain the fully connected graph to be processed. Specifically, the process includes the following: Edge centrality is defined as the average of the centrality scores of two adjacent nodes, as shown in the following formula: ;in, Edge features The centrality of a node is used to represent the influence of importance between two connected nodes. Represents a node Euclidean distance from the node at the center of the graph. Represents a node The Euclidean distance from the node at the center of the graph; The importance of each edge feature is calculated based on its centrality: [Settings are missing from the original text] To mitigate the impact of dense nodes, after normalization, the values ​​are converted into importance levels using a transformation formula. The edges are sorted in ascending order of importance, generating a sorted sequence. The first M edges are then removed from the sorted sequence to obtain the fully connected graph to be processed. , where M is the preset number.

4. The personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, The process of feature alignment and aggregation of all first representations to obtain the final representation includes the following steps: Let the first representation be denoted as the input sample. For each first representation... ,Will Treating them as positive samples, several images that do not match the combined categories of the input samples are randomly selected from the training batch. Treating them as negative samples, we obtain the set of negative sample attributes of the input sample. Using comparative learning to narrow the gap Compared with positive samples Increase the distance between them and the negative samples. The distance between them; The first representation after feature alignment is then aggregated. The final representation is obtained by performing graph-level mapping using the READOUT function and a graph-level multilayer perceptron.

5. A personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, Extracting information from the QRS complex in an ECG signal specifically involves extracting data points within 0.1 seconds before and after each R peak and recording them as information from the QRS complex.

6. The personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, Extracting a user's respiratory waveform based on QRS complex waveforms specifically includes the following process: Step 1: Based on the information of the QRS composite wave, the Pan-Tompkins algorithm is used to detect the position of the QRS peak and obtain the time series of the QRS peak; Step 2: Extract the peak amplitude of the R peak for each QRS wave and calculate the interval between adjacent R peaks; Step 3: Extract the width and slope of the QRS wave or the features after dimensionality reduction by principal component analysis, and perform low-pass filtering. The filtered signal is the respiratory waveform.

7. The personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, The user's respiratory compliance coefficient is calculated based on the respiratory waveform and the preset respiratory waveform of the user's current sleep stage. The process includes the following: The breathing waveform and the preset breathing waveform of the user's current sleep stage are plotted together in the same rectangular coordinate system. The area enclosed by the image above the preset breathing waveform and the preset breathing waveform is calculated. Then the area enclosed by the breathing waveform and the X-axis is calculated. The ratio of the two areas is recorded as the abnormal noise multiplier value. The respiratory difference value represents the acute angle formed by the first intersection of the respiratory waveform and the preset respiratory waveform. It is then normalized to obtain the product value between the length of the line segment of the respiratory waveform above the preset respiratory waveform. The difference between the product value and the preset product value, and the difference between the abnormal noise magnification value and the preset abnormal noise magnification threshold are calculated. The sum of the differences between the two is recorded as the respiratory target achievement coefficient.

8. The personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, The calculation of a user's sleep quality coefficient based on sleep state parameters and sleep state parameter indicators of the user's current sleep stage includes the following process: Sleep state parameters include the sleep duration, number of body movements, respiratory rate, and heart rate corresponding to the user's current sleep stage. Sleep state parameter indicators include preset sleep duration, preset number of body movements, preset respiratory rate, and preset heart rate. The system obtains sleep quality information for the first sleep stage, the second sleep stage, and up to the Bth sleep stage. The first sleep stage sleep quality information includes a first sleep duration redundancy, a first body movement count redundancy, a first respiratory rate difference, and a first heart rate difference. The Bth sleep stage sleep quality information includes a Bth sleep duration redundancy, a Bth body movement count redundancy, a Bth respiratory rate difference, and a Bth heart rate difference. The sleep duration redundancy is the difference between the user's current sleep stage duration and a preset sleep duration; the body movement count redundancy is the difference between the user's current sleep stage number of body movements and a preset number of body movements; the respiratory rate difference is the difference between the user's current sleep stage respiratory rate and a preset respiratory rate; and the heart rate difference is the difference between the user's current sleep stage heart rate and a preset heart rate. The first sleep duration redundancy, the first body movement redundancy, the first respiratory rate difference, and the first heart rate difference are normalized and then summed to obtain the first sleep state quality characteristic value; this process continues until the B sleep state quality characteristic value is obtained. The average value of the first sleep state quality feature value to the Bth sleep state quality feature value is taken as the user's sleep state quality coefficient.

9. A personalized sleep aid system based on artificial intelligence according to claim 1, characterized in that, Adjusting user sleep environment parameters based on respiratory achievement coefficient and sleep quality coefficient includes the following process: Determine whether the breathing target coefficient exceeds the preset breathing target coefficient threshold. If not, determine that the user's current sleep environment parameters do not meet the sleep requirements and adjust the user's sleep environment parameters. If yes, determine that the user's current sleep environment parameters meet the sleep requirements and do not adjust the user's sleep environment parameters. If the sleep quality coefficient exceeds the preset sleep quality coefficient threshold, the system determines that the user's current sleep environment parameters do not meet the sleep requirements and adjusts the user's sleep environment parameters. If the user's current sleep environment parameters meet the sleep requirements, the system does not adjust the user's sleep environment parameters. The user's sleep environment parameters include ambient temperature, ambient humidity, and the frequency of the sleep-aid audio.

10. A personalized sleep aid method based on artificial intelligence, characterized in that, A personalized sleep aid system based on artificial intelligence, applicable to any one of claims 1 to 9, comprising: The system collects sleep videos of users during sleep, obtains the first representation of feature nodes of all sleep video segments based on graph neural networks, performs feature alignment processing on all first representations and aggregates them to obtain the final representation, and determines the user's sleep stage based on the final representation. Acquire the ECG signal and sleep state parameters of the user's current sleep stage; Extract the QRS complex information from the ECG signal, extract the user's respiratory waveform based on the QRS complex information, and calculate the user's respiratory target achievement coefficient based on the respiratory waveform and the preset respiratory waveform of the user's sleep stage. The sleep quality coefficient of a user is calculated based on sleep state parameters and sleep state parameter indicators of the user's current sleep stage. Adjust user sleep environment parameters based on respiratory compliance coefficient and sleep quality coefficient.