Classification method and device, equipment and storage medium

By acquiring cardiac impact signals from bedding, extracting feature data, and dividing bed rest time periods, combined with interruption determination models and setting rest time intervals, the problem of insufficient identification of bed rest status and sleep structure in existing technologies is solved, achieving high-precision sleep classification and report generation.

CN121723262APending Publication Date: 2026-03-24DONGGUAN DERUCCI BEDDING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing sleep monitoring technologies cannot accurately identify and classify bed rest status and sleep structure throughout the day, especially fragmented sleep, resulting in insufficient accuracy and precision in identification.

Method used

By acquiring cardiac impact signals from bedding, extracting feature data, dividing a set duration into bed rest time periods based on relative state, determining the category of each time period based on feature data and bed rest time periods, using an interruption determination model to determine whether to split time periods, and making a comprehensive judgment in combination with the set rest time intervals.

Benefits of technology

It improves the accuracy and precision of recognizing bed rest periods, effectively distinguishing between primary sleep, secondary sleep, and wakefulness, and generating structured sleep reports to help users understand and improve their sleep habits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723262A_ABST
    Figure CN121723262A_ABST
Patent Text Reader

Abstract

The invention discloses a classification method and device, equipment and a storage medium. The method comprises the steps that an original signal within a set time length is acquired, and the original signal comprises a heart impact signal of a user on the bedding; feature data are extracted from the ballistocardiogram signal, the feature data comprise a relative state, and the relative state indicates whether the user is located on the bedding or not; on the basis of the relative state, the set duration is divided into at least one bedridden time period, the bedridden time period comprises the time period when the user is located on the bedding, and the continuous duration of leaving the bed in the bedridden time period is smaller than the set duration; and for each bedridden time period, determining the category of the bedridden time period according to the feature data and the bedridden time period. According to the method, the categories to which different bedridden time periods belong can be distinguished in a non-inductive manner, and the recognition precision and accuracy of the categories to which the bedridden time periods belong are 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 classification, and in particular to a classification method, device, equipment and storage medium. BACKGROUND

[0002] Sleep monitoring is a key technology for evaluating sleep quality and diagnosing sleep disorders. Traditionally, it mainly relies on polysomnography, however, such contact monitoring equipment is bulky, complex to wear, and the process is tedious and poor in experience, making it difficult to popularize.

[0003] In recent years, some non-contact sleep monitoring schemes based on piezoelectric sensors, radars, etc. have been proposed. These schemes can generally detect basic parameters such as in / out-of-bed state, heart rate and respiratory rate, and evaluate the sleep quality of users based on these parameters. However, most of the existing schemes lack the ability to identify and stage fragmented sleep throughout the day, and cannot accurately reflect the real bed state and sleep structure of users, resulting in insufficient accuracy and precision in identifying the state of the user's bed time period. SUMMARY

[0004] The present application provides a classification method, device, equipment and storage medium to solve the problem of insufficient accuracy and precision in classifying bed time periods.

[0005] According to an aspect of the present application, a classification method is provided, comprising:

[0006] obtaining an original signal within a set time period, the original signal comprising a user's ballistocardiogram signal on a bedding;

[0007] extracting feature data from the ballistocardiogram signal, the feature data containing a relative state, the relative state indicating whether the user is located on the bedding;

[0008] dividing the set time period into at least one bed time period based on the relative state, the bed time period comprising a time period in which the user is located on the bedding, and the continuous time period of getting off the bed within the bed time period being less than a preset time period;

[0009] For each bed time period, determining the category to which the bed time period belongs according to the feature data and the bed time period.

[0010] According to another aspect of the present application, a classification device is provided, comprising:

[0011] an acquisition module configured to obtain an original signal within a set time period, the original signal comprising a user's ballistocardiogram signal on a bedding;

[0012] extracting a feature data from the ballistocardiogram signal, the feature data containing a relative state, the relative state indicating whether the user is on the bedding;

[0013] dividing the set time length into at least one bed time period based on the relative state, the bed time period including a time period during which the user is on the bedding, and a continuous time length of getting off the bedding in the bed time period being less than a preset time length;

[0014] determining, for each bed time period, a category to which the bed time period belongs according to the feature data and the bed time period.

[0015] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory connected to the at least one processor in communication; wherein,

[0018] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any one of the embodiments of the present application.

[0019] According to another aspect of the present application, a computer readable storage medium is provided, the computer readable storage medium storing computer instructions for enabling a processor to implement the method according to any one of the embodiments of the present application when executed by the processor.

[0020] According to another aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program implementing the method according to any one of the embodiments of the present application when executed by a processor.

[0021] The technical solution of the embodiments of the present application, by acquiring an original signal in a set time length; extracting a feature data from the ballistocardiogram signal; dividing the set time length into at least one bed time period based on the relative state; determining, for each bed time period, a category to which the bed time period belongs according to the feature data and the bed time period, the feature data and the bed time period are comprehensively judged, and the recognition precision and accuracy of the category to which the bed time period belongs in the set time length are improved.

[0022] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.

[0024] Figure 1 is a flow chart of a classification method provided by the embodiment one of the present application;

[0025] Figure 2 is a flow chart of a raw signal acquisition and feature data extraction method provided by the embodiment of the present application;

[0026] Figure 3 is a flow chart of a classification method provided by the embodiment two of the present application;

[0027] Figure 4 is a flow chart of a classification method provided by the embodiment three of the present application;

[0028] Figure 5 is a flow chart of a sleep report generation method provided by the embodiment of the present application;

[0029] Figure 6 is a flow chart of a classification method provided by the embodiment of the present application;

[0030] Figure 7 is a structural schematic diagram of a classification device provided by the embodiment of the present application;

[0031] Figure 8 is a structural block diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the person skilled in the art better understand the present application, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should belong to the scope of protection of the present application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0034] The acquisition, storage, use and processing of data in the technical solution of the present application comply with the relevant provisions of relevant laws and regulations.

[0035] Embodiment one

[0036] Figure 1 is a flowchart of a classification method provided by the first embodiment of the present application. The present embodiment can be applied to the classification of bed time periods. The method can be executed by a classification device, which can be realized in the form of hardware and / or software. The classification device can be configured in an electronic device, which can be a computer, a tablet or a personal digital assistant, etc. As shown in Figure 1 , the method comprises:

[0037] S110, acquiring an original signal within a set time period, the original signal comprising a user's ballistocardiogram on a bedding.

[0038] In the present embodiment, the set time period can be the time period for which sleep classification is required. The set time period can be set by the user, for example, 24 hours. The original signal can be a signal generated by the user during bed time. The original signal is collected by a sensor mounted on the bedding. The original signal can be a signal containing a ballistocardiogram. The sensor corresponding to the signal can be a vibration sensor, for example, a piezoelectric film sensor, etc. The bedding can be a bed mattress, a bed frame or a sofa for the user to rest on. For the sake of convenience, the bedding in the embodiment is taken as a bed mattress as an example.

[0039] Specifically, the sensor on the bed mattress continuously collects the original signal of the user within the set time period and transmits it to the processor of the electronic device for signal processing, which includes but is not limited to filtering, etc. The ballistocardiogram is extracted from the original signal after signal processing. The extraction method can be based on J-wave positioning. The signal segment with stable morphology is extracted as the ballistocardiogram.

[0040] S120, extracting feature data from the ballistocardiogram, the feature data containing a relative state, the relative state indicating whether the user is on the mattress.

[0041] In this embodiment, the feature data can be data reflecting the sleep state of the user. The feature data is extracted from the ballistocardiogram, and a set of data is output every minute, including but not limited to a timestamp, a heart rate, a respiratory rate, and a relative state. The sleep state can be the sleep state of the user. The sleep state can include primary sleep and secondary sleep. The relative state can be a state describing whether the user is on the mattress. The relative state can be determined by whether the ballistocardiogram has readings. The relative state can be, for example, an in-bed state and an out-of-bed state. The in-bed state is a state in which the user is on the bedding, and the out-of-bed state is a state in which the user is not on the bedding. The relative state also includes a timestamp corresponding to the current relative state.

[0042] Specifically, the feature data is extracted from the ballistocardiogram, and the relative state of the user is determined according to whether the ballistocardiogram has readings.

[0043] For example, the time length is set to 24 hours. The original BCG signal of the user in different scenes is continuously collected at a sampling rate of 100 Hz or 500 Hz for 24 hours, and the feature data of each minute is extracted therefrom. Figure 2 is a flowchart of a method for collecting original signals and extracting feature data provided by an embodiment of the present application. As shown in Figure 2 The piezoelectric film sensor mounted in the mattress collects original signals, and after signal preprocessing such as filtering, denoising, and amplification, the ballistocardiogram is obtained. The feature data of each minute is calculated using a sliding window and a specific threshold. The feature data includes a relative state, a heart rate, a respiratory rate, and a body movement index (i.e., an index for evaluating the intensity of physical activity).

[0044] S130, based on the relative state, dividing the set time length into at least one bed time period, the bed time period including a time period in which the user is on the mattress, and the continuous time length of the out-of-bed time period in the bed time period being less than a preset time length.

[0045] In this embodiment, the bed time period can be a time period in which the user is on the mattress. The bed time period can include an out-of-bed time period with a continuous time length less than a preset time length. The set time length includes at least one bed time period.

[0046] Specifically, based on the relative state, time periods that are continuous and have the same relative state are combined into one time period. For a time period in which the relative state indicates that the user is on the mattress, if there is an out-of-bed time period with a continuous time length less than a preset time length in the time period, the out-of-bed time period is ignored, and the time period as a whole is regarded as a bed time period.

[0047] S140, for each bed time period, determining a category to which the bed time period belongs according to the feature data and the bed time period.

[0048] In the embodiment, the category can be a sleep category of the user in the bed time period. The category includes but is not limited to a category indicating that the user is in different sleep states and a category indicating that the user is in a wake state.

[0049] Specifically, for each bed time period, the category of the bed time period is determined according to the feature data and the bed time period. For example, if the feature data in the bed time period shows that the user is in a wake state, it is determined that the bed time period belongs to a category indicating that the user is in a wake state.

[0050] The technical scheme of the embodiment of the application comprises the following steps: acquiring original signals in a set time period; extracting feature data from the ballistocardiogram; dividing the set time period into at least one bed time period based on the relative state; and determining a category to which each bed time period belongs according to the feature data and the bed time period. The feature data and the bed time period are comprehensively judged, so that the recognition accuracy and precision of the category to which the bed time period belongs in the set time period are improved.

[0051] Embodiment two

[0052] Figure 3 is a flowchart of a classification method provided by the second embodiment of the application. The embodiment is optimized on the basis of any of the above embodiments, and mainly comprises the following: a process of determining a bed time period belonging to a first category according to whether the bed time period and a set rest time interval have an intersection, and a process of determining whether to split the bed time period. It should be noted that technical details not described in detail in the embodiment can be referred to the above embodiments. For example, as shown in the figure, the method comprises the following steps. Figure 3

[0053] S210, acquiring original signals in a set time period, the original signals comprising a ballistocardiogram of a user on a mattress.

[0054] S220, extracting feature data from the ballistocardiogram, the feature data comprising a relative state, the relative state indicating whether the user is on the mattress.

[0055] S230, dividing the set time period into at least one bed time period based on the relative state, the bed time period comprising a time period in which the user is on the mattress, and a continuous time period of getting off the bed in the bed time period being less than a preset time period.

[0056] ​S240, inputting the time stamp included in the bed time period and the relative state corresponding to the time stamp into an interruption determination model to determine whether to split the bed time period.

[0057] In the embodiment, the interruption determination model can be a model for determining whether the bed time period needs to be split. The interruption determination model evaluates the sleep continuity of the bed time period based on the time stamp in the bed time period and the relative state corresponding to the time stamp to determine whether the bed time period should be split into multiple bed time periods. The interruption determination model can be a classification decision model or a regression model, which is not limited in the present application. The training method of the model is as follows: a large number of annotated time stamps of bed time periods and their corresponding relative states are input into an untrained model, and the prediction output of the model is continuously close to the true label through iterative optimization, while outputting evaluation indexes such as confidence, when the evaluation index reaches or is better than the preset threshold, it is considered that the model training is completed.

[0058] Specifically, all time stamps in the bed time period and their corresponding relative states are input into the interruption determination model, the interruption determination model detects whether there is an indication of the relative state to determine whether there is a bed leaving time period, if there is a bed leaving time period, whether to split the bed time period is determined according to, for example, the length of the bed leaving time period, the time when the bed leaving time period occurs or the comparison of the sleep state before and after the bed leaving time period.

[0059] Optionally, the interruption determination model determines whether to split the bed time period by the following factors:

[0060] The time window to which the bed leaving event in the bed time period belongs;

[0061] The interruption length, the interruption length includes the duration of the bed leaving event;

[0062] The sleep ratio, the sleep ratio includes the length ratio of the time segment before the bed leaving event and the time segment after the bed leaving event in the bed time period;

[0063] The time window includes different time windows set in advance, and different time windows correspond to different interruption length thresholds and different ratio thresholds.

[0064] In this embodiment, the off-bed event can be an event corresponding to the user leaving the mattress during the bed-lying time period. The off-bed event can be identified according to the relative state. When the relative state indicates the off-bed state, it is determined that the off-bed event occurs at this time. The interruption duration can be the duration of the off-bed event. The interruption duration can be obtained by analyzing the relative state and the corresponding time stamp. The specific calculation method is as follows: the start and end time stamps of a continuous off-bed state are defined as the start and end times of the off-bed event, and the difference between the two is the interruption duration. The sleep ratio can be the sleep duration ratio of the user before and after the off-bed event during the bed-lying time period. The sleep ratio can be obtained according to the calculation ratio of the sleep time segment before the off-bed event and the sleep time segment after the off-bed event. The interruption duration threshold can be a preset time threshold. The interruption duration threshold can be used to determine whether the off-bed event will cause interruption to the bed-lying time period. The interruption duration threshold corresponding to different time windows is different. The ratio threshold can be a preset threshold of the sleep ratio. Different time windows correspond to different ratio thresholds. The interruption duration threshold and the ratio threshold can be set according to experience, or can be obtained by analyzing the historical off-bed events and the sleep data before and after the occurrence of the off-bed events by a deep learning model.

[0065] Specifically, according to the time window to which the off-bed event belongs, the interruption duration, and / or the sleep ratio, a comprehensive judgment is made on whether the bed-lying time period needs to be split. For example, the time window is 0-6 o'clock, 6-12 o'clock, and 12-24 o'clock. If the duration of the off-bed event, i.e., the interruption duration, is 5 minutes in the 0-6 o'clock time window, and the interruption duration threshold corresponding to this time window is 10 minutes, it is determined that this off-bed event does not constitute interruption to the bed-lying time period.

[0066] S250, if yes, splitting the bed-lying time period to obtain a split bed-lying time period.

[0067] Specifically, if the interruption determination model determines that the bed-lying time period needs to be split, the original bed-lying time period is split into multiple independent bed-lying time periods according to the start and end time stamps of the off-bed event.

[0068] S260, determining the continuous sleep duration in the bed-lying time period according to the feature data;

[0069] Specifically, the continuous sleep duration of the user in the bed-lying time period is determined according to the data such as heart rate in the feature data.

[0070] S270, determining whether the bed-lying time period intersects with a set rest time interval;

[0071] In this embodiment, the set rest time interval can be a preset time interval for judging the sleep state of the user. The set rest time interval can be set according to the human circadian rhythm and the general work and rest habits.

[0072] Specifically, according to the start and end times of the bed-lying time period, it is determined whether the bed-lying time period intersects with the set rest time interval.

[0073] S280, if the bed-lying time period intersects with the set rest time interval, it is determined that the bed-lying time period belongs to the first category when the duration of continuously lying in bed is greater than a first threshold value and / or the duration of continuously sleeping is greater than a second threshold value, and the operation ends.

[0074] In this embodiment, the duration of continuously lying in bed can be the duration of the user lying on the mattress. The duration of continuously lying in bed can be determined according to the relative state and its corresponding timestamp. The first threshold value can be a preset threshold value of the duration of continuously lying in bed. The second threshold value can be a preset threshold value of the duration of continuously sleeping. The first threshold value and the second threshold value can be used together to determine the category to which the bed-lying time period belongs, or one of them can be used alone. The first threshold value and the second threshold value can be set according to experience or using a deep learning method based on historical sleep data. The first category can be one of the categories to which the bed-lying time period belongs. In the bed-lying time period belonging to the first category, the user is in a main sleep state. The main sleep can be the most important and longest continuous sleep state of the user within 24 hours. The time period in which the main sleep is located usually contains a complete sleep cycle.

[0075] Specifically, if the bed-lying time period intersects with the set rest time interval, the duration of continuously lying in bed is calculated, and if the duration of continuously lying in bed is greater than the first threshold value and / or the duration of continuously sleeping is greater than the second threshold value, the category to which the current bed-lying time period belongs is determined as the first category, i.e., the user is in a main sleep state in the current bed-lying time period.

[0076] S290, if the bed-lying time period does not intersect with the set rest time interval, it is determined that the bed-lying time period belongs to the first category when the duration of continuously lying in bed is greater than a third threshold value and the duration of continuously sleeping is greater than a fourth threshold value.

[0077] In this embodiment, the third threshold value can be a duration threshold value of the bed-lying time period when the bed-lying time period does not intersect with the set rest time interval. The fourth threshold value can be a threshold value of the duration of continuously sleeping when the bed-lying time period does not intersect with the set rest time interval. If the bed-lying time period does not intersect with the set rest time interval, the third threshold value and the fourth threshold value are used together to determine whether the bed-lying time period belongs to the first category. The third threshold value and the fourth threshold value can be set according to experience or using a deep learning method based on historical sleep data. The third threshold value is less than the first threshold value, and the fourth threshold value is less than the second threshold value.

[0078] Specifically, if the bed-lying time period and the set rest time interval do not have an intersection, the duration of staying in bed in the bed-lying time period is calculated, if the duration of staying in bed is greater than a third threshold value and the duration of sleep is greater than a fourth threshold value, the category to which the bed-lying time period belongs is determined as the first category.

[0079] The technical scheme of the embodiment of the present application acquires the original signal in a set time length; extracts feature data from the ballistocardiogram, the feature data containing a relative state; divides the set time length into at least one bed-lying time period based on the relative state; inputs the time stamp included in the bed-lying time period and the relative state corresponding to the time stamp into an interruption determination model to determine whether to split the bed-lying time period; if yes, the bed-lying time period is split to obtain a split bed-lying time period, whether the bed-lying time period needs to be split is determined through the out-of-bed event, the continuity of the bed-lying time period is avoided from being interrupted by the out-of-bed event, and the recognition efficiency of the category to which the bed-lying time period belongs is improved; the duration of sleep in the bed-lying time period is determined according to the feature data; whether the bed-lying time period has an intersection with a set rest time interval is determined; if the bed-lying time period has an intersection with the set rest time interval, when the duration of staying in bed in the bed-lying time period is greater than a first threshold value and / or the duration of sleep is greater than a second threshold value, it is determined that the category to which the bed-lying time period belongs is the first category, the category to which the bed-lying time period belongs is determined according to the duration of sleep and / or the duration of staying in bed, the recognition accuracy and efficiency of the bed-lying time period whose category is the first category are improved; if the bed-lying time period does not have an intersection with the set rest time interval, when the duration of staying in bed in the bed-lying time period is greater than a third threshold value and the duration of sleep is greater than a fourth threshold value, it is determined that the category to which the bed-lying time period belongs is the first category, in the case that the bed-lying time period does not have an intersection with the set rest time interval, an alternative scheme for recognizing main sleep is provided, and the recognition accuracy and robustness of the bed-lying time period whose category is the first category are improved.

[0080] Embodiment three

[0081] Figure 4 is a flowchart of a classification method provided by the third embodiment of the present application, the present embodiment is optimized on the basis of any of the above-mentioned embodiments, and mainly includes: a detailed description of the judgment process of the bed-lying time period whose category is the second category and the third category, and the generation process of the sleep report. It should be noted that the technical details not described in detail in the present embodiment can be referred to the above-mentioned embodiments. As shown in the figure, the method includes: Figure 4

[0082] S310, acquiring the original signal in a set time length, the original signal including the ballistocardiogram of the user on the mattress.​

[0083] S320, extracting feature data from the ballistocardiogram, the feature data containing a relative state indicating whether the user is on the mattress.

[0084] S330, dividing the set time length into at least one bed time period based on the relative state, the bed time period including a time period during which the user is on the mattress, and a continuous off-bed time length in the bed time period being less than a preset time length.

[0085] S340, determining a continuous sleep time length in the bed time period according to the feature data.

[0086] S350, determining that the bed time period belongs to a second category when the continuous on-bed time length in the bed time period is less than the first threshold and greater than a fifth threshold, and the continuous sleep time length is less than the second threshold and greater than a sixth threshold, the second category corresponding to a time period during which light sleep occurs, and performing S390.

[0087] In this embodiment, the fifth threshold can be a lower limit of the continuous on-bed time length for determining that the bed time period belongs to the second category. The fifth threshold is less than the third threshold. The sixth threshold can be a lower limit of the continuous sleep time length for determining that the bed time period belongs to the second category. The sixth threshold is less than the fourth threshold. The second category is one of the categories to which the bed time period belongs. Light sleep can be a sleep state other than deep sleep. Light sleep has a shorter duration than deep sleep. In the bed time period belonging to the second category, the user is in the light sleep state.

[0088] Specifically, if the continuous on-bed time length in the bed time period is less than the first threshold and greater than the fifth threshold, and the continuous sleep time length is less than the second threshold and greater than the sixth threshold, the category to which the bed time period belongs is determined to be the second category.

[0089] S360, determining that the bed time period belongs to a third category when the continuous on-bed time length in the bed time period is greater than a seventh threshold, and the continuous sleep time length is less than the sixth threshold, the third category corresponding to a time period during which the user is in a wake state, and performing S390.

[0090] In this embodiment, the seventh threshold can be a threshold of the continuous on-bed time length for determining whether the user is in the wake state in the bed time period. The seventh threshold is less than the fifth threshold. The third category can be a category indicating that the user is not in the sleep state. In the bed time period belonging to the third category, the user is in the wake state.

[0091] Specifically, if the duration of staying in bed in the bed-lying time period is greater than the seventh threshold value and the duration of continuous sleep is less than the sixth threshold value, it is determined that the category of the bed-lying time period is the third category.

[0092] S370, determining whether the bed-lying time period intersects with the set rest time interval.

[0093] S380, if the bed-lying time period intersects with the set rest time interval, when the duration of staying in bed in the bed-lying time period is greater than the first threshold value and / or the duration of continuous sleep is greater than the second threshold value, it is determined that the category of the bed-lying time period is the first category, and the first category indicates that the corresponding time period is a main sleep time period.

[0094] S390, after the data truncation time point corresponding to the set time length is reached, a sleep report in the set time length is generated, and the sleep report includes one or more of the following:

[0095] the duration of main sleep, the number of secondary sleep, the duration of secondary sleep, the total duration of bed-lying in the set time length, the total duration of sleep in the set time length, the number of getting-out-of-bed events, and the time period of getting-out-of-bed events.

[0096] In this embodiment, the data truncation time point can be a time point for terminating data collection and starting a report generation process. The data truncation time point is generally set to 0 o'clock. For a bed-lying time period that crosses the data truncation time point, the bed-lying time period is split into two independent bed-lying time periods with the data truncation time point as the boundary.

[0097] Specifically, after the data truncation time point is reached, a sleep report in the set time length is generated, and the sleep report includes: the duration of main sleep, the number of secondary sleep, the duration of secondary sleep, the total duration of bed-lying in the set time length, the total duration of sleep in the set time length, the number of getting-out-of-bed events, and the time period of getting-out-of-bed events. Among them, the duration of main sleep is determined by the duration of the bed-lying time period with the first category; the number of secondary sleep is obtained by counting the number of bed-lying time periods with the second category in the set time length; the duration of secondary sleep is the duration corresponding to the bed-lying time period with the second category; the total duration of bed-lying in the set time length is determined by the sum of the durations of all bed-lying time periods in the set time length; the number of getting-out-of-bed events is the total number of getting-out-of-bed events in the set time length; and the time period of getting-out-of-bed events is the time period corresponding to the getting-out-of-bed event.

[0098] Exemplarily, Figure 5is a flowchart of a method for generating a sleep report provided by an embodiment of the present application. The electronic device first determines a bed time period belonging to a first category, calculates its start and end time, total duration, sleep efficiency and latency, etc.; secondly determines a bed time period belonging to a second category, calculates its occurrence number and total duration; then counts the number of off-bed events and the main time period of off-bed events; finally counts the total bed time and total sleep time of all bed time periods within the set time (i.e. 24 hours). The present application does not limit the order of the above data statistics, which can be in a specific order or parallel statistics. Fill the above data into the sleep report, and generate visual charts and sleep structure diagrams based on the above data, generate a sleep summary evaluation within the set time, and report to the customer in the form of a mobile application software interface, a web report and / or a PDF document.

[0099] The technical scheme of the embodiment of the present application acquires the original signal within the set time length; extracts feature data from the ballistocardiogram; divides the set time length into at least one bed time period based on the relative state; determines the continuous sleep time length within the bed time period according to the feature data; determines that the bed time period belongs to the second category when the continuous bed time length is less than the first threshold value and greater than the fifth threshold value within the bed time period, and the continuous sleep time length is less than the second threshold value and greater than the sixth threshold value, determines the bed time period belonging to the second category by comparing the continuous bed time length and the continuous sleep time length with the threshold value, which can effectively identify and evaluate fragmented secondary sleep, distinguish primary sleep from secondary sleep, and improve the identification accuracy and accuracy of secondary sleep; determines that the bed time period belongs to the third category when the continuous bed time length is greater than the seventh threshold value within the bed time period, and the continuous sleep time length is less than the sixth threshold value, determines the bed time period belonging to the third category by the continuous bed time length and the continuous sleep time length, which can effectively identify the wakeful state and improve the identification accuracy of the wakeful state; determines whether the bed time period intersects with the set rest time interval; if the bed time period intersects with the set rest time interval, determines that the bed time period belongs to the first category when the continuous bed time length is greater than the first threshold value within the bed time period, and / or the continuous sleep time length is greater than the second threshold value; generates a sleep report within the set time length after the data truncation time point corresponding to the set time length is reached, reflects the sleep state of the user within the set time length through the sleep report, so as to help the user understand his own sleep structure and improve sleep habits.

[0100] In another embodiment, Figure 6is a flowchart of a classification method provided by an embodiment of the present application. For a bed rest period within a set time, determine its belonging category. If the belonging category of the bed rest period is the first category, determine whether the bed rest period needs to be split according to whether there is a bed leaving event in the bed rest period. If the belonging category of the bed rest period is the second category, it means that there is a sub-sleep in the bed rest period, and the occurrence time and frequency thereof are counted. Finally, the above statistical data of all bed rest periods within the set time are outputted.

[0101] The present application is exemplarily described below, with "nap" representing "sub-sleep", "bed rest segment" representing "bed rest period", "in / out-of-bed state" representing "relative state", "core rest interval" representing "set rest time interval", "in-bed duration" representing "continuous in-bed duration", and "original BCG signal" representing "original signal":

[0102] With the improvement of health awareness, people pay more and more attention to sleep quality. Traditional sleep monitoring is usually carried out in a laboratory environment through polysomnography. This method is complex, costly and interferes with normal sleep, and is not suitable for long-term monitoring in a home environment.

[0103] In recent years, some sleep monitoring schemes based on piezoelectric sensors, radar and other non-contact technologies have been proposed. These schemes can usually detect basic parameters such as in / out-of-bed state, heart rate and respiratory rate. However, most of the existing schemes lack the ability to identify and stage all-weather, especially fragmented sleep. They usually focus on the analysis of night main sleep, while ignoring complex scenarios such as daytime naps and multiple bed leaving events at night, and cannot generate an all-day sleep report that accurately reflects the user's real sleep habits. Therefore, there is an urgent need for a sleep analysis method that can intelligently distinguish between main sleep and nap and handle various complex bed leaving scenarios.

[0104] The present application can overcome the shortcomings of the prior art, and provide a method and system capable of automatically and accurately identifying and staging complex sleep patterns including main sleep, nap and bed leaving events within 24 hours (i.e. within a set time) based on BCG signals, and generating a structured sleep report. This method aims to solve the problems of discomfort, sleep interference and inability to fully classify sleep stages in existing sleep monitoring technologies, and provides a more natural, convenient and accurate sleep quality evaluation scheme for users. Through this method, users can sleep naturally in a home environment without wearing any devices, and can obtain professional sleep stage analysis, thereby helping users understand their sleep structure and improve their sleep habits.

[0105] In one example, the classification method provided by an embodiment of the present application comprises:

[0106] 1. Signal acquisition and preprocessing: The original BCG signals of the user in different scenarios are continuously acquired for 24 hours (i.e., a set time) at a sampling rate of 100 Hz or 500 Hz by a high-sensitivity piezoelectric film sensor arranged under the mattress, and feature data per minute is extracted therefrom, including in / out-of-bed status, heart rate, respiratory rate, and body movement indicators.

[0107] 2. Preliminary division of sleep segments: Based on the in / out-of-bed status feature, all bed-lying segments throughout the day are preliminarily identified.

[0108] 3. Sleep segment classification and main sleep determination: A set of predefined rule sets are applied to analyze the bed-lying segments identified in step 2, classify them as "main sleep", "nap", or "wake-up segment", and determine the start and end times of the main sleep. The core logic of the rule set includes:

[0109] (1) Core sleep determination rule

[0110] Rule 1 (Core period priority): The system prioritizes identifying and locking a continuous bed-lying period that meets the "minimum bed-lying duration" (i.e., the duration of continuous bed-lying is greater than a first threshold) and the "minimum continuous sleep duration" (i.e., the duration of continuous sleep is greater than a second threshold) within the preset "core rest interval", and defines it as the main sleep.

[0111] (2) Sleep boundary elasticity rule

[0112] Rules 2 & 3 (Continuity priority): The start and end points of the main sleep are not strictly limited by the "core rest interval". As long as the condition of continuous sleep is met, its range can be flexibly extended forward and extended backward.

[0113] (3) Sleep continuity interruption determination rule

[0114] Rules 4-11 (Intelligent segmentation logic): The system has a built-in dynamic interruption determination model (i.e., interruption determination model) for handling bed-lying events that occur during continuous bed-lying. This model intelligently determines whether to split a long continuous bed-lying into two independent sleep segments by analyzing the following factors:

[0115] Factor A (Key time window): The specific time of the bed-lying event is located in which preset "key time window" (i.e., time window).

[0116] Factor B (Interruption duration): The duration of bed-lying (i.e., interruption duration).

[0117] Factor C (Sleep proportion): The proportion of sleep segment duration before and after the bed-lying event (i.e., sleep proportion).

[0118] Core logic: In different "key time windows", the system adopts different combinations of "interruption duration threshold" and "sleep proportion threshold" (i.e. proportion threshold) for judgment. For example, in some time windows, only the long interruption duration can trigger segmentation; while in other time windows with higher requirements for sleep continuity, both interruption duration and sleep proportion need to be met.

[0119] (4) Main sleep alternative rule

[0120] Rule 12 (global optimization alternative): If no effective main sleep is found in the "core rest interval", the system will start a global search, and the longest continuous sleep segment in the whole day that meets the "main sleep minimum standard" (i.e. "minimum in-bed duration" (i.e. in-bed duration greater than a third threshold) and "minimum continuous sleep duration" (i.e. continuous sleep duration greater than a fourth threshold)) will be identified as the main sleep. If no segment meets the standard, all day sleep is considered as secondary sleep.

[0121] (5) Segment effectiveness definition rule

[0122] Rules 13 & 14 (effectiveness threshold):

[0123] The secondary sleep segment needs to meet "secondary sleep minimum in-bed duration" (i.e. continuous in-bed duration less than the first threshold and greater than a fifth threshold) and contain actual sleep not less than "secondary sleep minimum continuous duration" (i.e. continuous sleep duration less than the second threshold and greater than a sixth threshold).

[0124] The wake-up segment needs to meet "wake-up state minimum in-bed duration" (i.e. continuous in-bed duration greater than a seventh threshold and continuous sleep duration less than the sixth threshold).

[0125] (6) Data output and processing rule

[0126] Rules 15 & 16 (data specification): The system generates a sleep report according to the preset "data output condition". The calculation and output of all sleep-wake cycles are organized with a preset "daily data cutoff point" (i.e. data cutoff time point) as the boundary.

[0127] 4. Sleep report generation: Based on the classification and judgment results of step 3, calculate and output various sleep parameter indicators including main sleep duration, number and duration of short breaks, sleep segment distribution, total in-bed time, total sleep time, and number of getting out of bed, to form a structured all-day sleep report.

[0128] The present application realizes automatic classification of all-day sleep segments based on BCG signals, and has the following beneficial effects:

[0129] 1. All-weather coverage: capable of processing continuous data within 24 hours, not only analyzing night main sleep, but also effectively identifying and evaluating daytime nap.

[0130] 2. Strong situational adaptability: through a set of refined logical rules, it can accurately handle complex situations such as users getting out of bed multiple times at night and sleep fragmentation, significantly improving sleep staging accuracy.

[0131] 3. Non-invasive, good user experience: using a sensor under the mattress, data is collected without affecting normal sleep, suitable for long-term monitoring at home.

[0132] 4. Rich report content: The generated sleep report not only includes traditional sleep parameters, but also reveals the sleep pattern structure throughout the day, providing more comprehensive data support for health assessment

[0133] Embodiment four

[0134] Figure 7 is a structural schematic diagram of a classification device provided by an embodiment of the application. As shown in Figure 7 , the device includes:

[0135] The acquisition module 410 is configured to acquire an original signal within a set time period, and the original signal includes a ballistocardiogram signal of a user on a bedding.

[0136] The extraction module 420 is configured to extract feature data from the ballistocardiogram signal, and the feature data includes a relative state, and the relative state indicates whether the user is located on the bedding.

[0137] The division module 430 is configured to divide the set time period into at least one bed time period based on the relative state, and the bed time period includes a time period in which the user is located on the bedding, and a continuous time period of getting out of bed in the bed time period is less than a preset time period.

[0138] The determination module 440 is configured to determine, for each bed time period, a category to which the bed time period belongs according to the feature data and the bed time period.

[0139] The technical scheme of the embodiment of the application, through the acquisition module, acquires an original signal within a set time period; the extraction module extracts feature data from the ballistocardiogram signal; the division module divides the set time period into at least one bed time period based on the relative state; and the determination module determines, for each bed time period, a category to which the bed time period belongs according to the feature data and the bed time period. Through comprehensive judgment of the feature data and the bed time period, the recognition accuracy and accuracy of the category to which the bed time period belongs within the set time period are improved.

[0140] In another embodiment, the determination module 440 further includes:

[0141] a first determining unit, configured to determine a continuous sleep duration in the bed time period according to the feature data;

[0142] a second determining unit, configured to determine whether the bed time period intersects with a set rest time interval;

[0143] a third determining unit, configured to determine, if the bed time period intersects with the set rest time interval, that a category to which the bed time period belongs is a first category, the first category indicating that a time period corresponding to the first category is a main sleep time period, when a continuous in-bed duration in the bed time period is greater than a first threshold value and / or the continuous sleep duration is greater than a second threshold value.

[0144] In another embodiment, the determining module 440 further includes:

[0145] a fourth determining unit, configured to determine, if the bed time period does not intersect with the set rest time interval, that the category to which the bed time period belongs is the first category when the continuous in-bed duration in the bed time period is greater than a third threshold value and the continuous sleep duration is greater than a fourth threshold value.

[0146] In another embodiment, the determining module 440 further includes:

[0147] a fifth determining unit, configured to determine that a category to which the bed time period belongs is a second category when the continuous in-bed duration in the bed time period is greater than a fifth threshold value and less than the first threshold value and the continuous sleep duration is greater than a sixth threshold value and less than the second threshold value, the second category corresponding to a time period in which secondary sleep is located.

[0148] In another embodiment, the determining module 440 further includes:

[0149] a sixth determining unit, configured to determine that a category to which the bed time period belongs is a third category when the continuous in-bed duration in the bed time period is greater than a seventh threshold value and the continuous sleep duration is less than the sixth threshold value, the third category corresponding to a time period in which a wake state is located.

[0150] In another embodiment, the apparatus further includes:

[0151] an input module, configured to input a timestamp included in the bed time period and a relative state corresponding to the timestamp to an interruption determining model to determine whether to split the bed time period;

[0152] a splitting module, configured to split the bed time period to obtain a split bed time period if the determination is positive.

[0153] In another embodiment,

[0154] The interrupt determination model determines whether to split the bed time period by the following factors:

[0155] a time window to which the off-bed event in the bed time period belongs;

[0156] an interrupt duration, the interrupt duration including a duration of the off-bed event;

[0157] a sleep ratio, the sleep ratio including a ratio of a time duration of a time segment before the off-bed event to a time segment after the off-bed event in the bed time period;

[0158] The time window includes different preset time windows, different time windows corresponding to different interrupt duration thresholds and different ratio thresholds.

[0159] In another embodiment, the apparatus further includes:

[0160] a generation module configured to generate a sleep report in the set duration after a data cutoff time point corresponding to the set duration is reached, the sleep report including one or more of:

[0161] a duration of main sleep; a number of secondary sleep; a duration of secondary sleep; a total bed time in the set duration; a total sleep time in the set duration; a number of off-bed events; a time period of off-bed events.

[0162] The classification device provided by the embodiments of the present application can perform the classification method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0163] Embodiment five

[0164] Figure 8 is a structural block diagram of an electronic device provided by the embodiments of the present application, as Figure 8 shown, a structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (such as headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0165] As Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a Read-Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores a computer program executable by the at least one processor 11, and the computer program is executed by the at least one processor 11 to enable the at least one processor 11 to perform the method provided by the present application.

[0166] The processor 11 can perform various appropriate actions and processes according to a computer program stored in the Read-Only Memory (ROM) 12 or a computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0167] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, a loudspeaker, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0168] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various special-purpose Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Process (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the method provided by the present application.

[0169] In some embodiments, the methods provided by the present disclosure can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 10 via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11 as described above, one or more steps of the above-described methods can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the methods by way of other hardware, e.g., firmware.

[0170] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a System on Chip (SOC), a Complex Programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0171] Computer programs used to implement the methods provided by the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0172] In the context of the present application, a computer readable storage medium stores computer instructions for causing a processor to implement the methods provided by the present application when executed.

[0173] The present application also provides a computer program product, which includes a computer program, the computer program implements the method provided by the embodiments of the present application when executed by a processor. The computer readable storage medium can be a tangible medium, which can contain or store a computer program for use by or in connection with an instruction execution system, apparatus or device. The computer readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. Alternatively, the computer readable storage medium can be a machine readable signal medium. More specific examples of the machine readable storage medium will include one or more wires, portable computer disks, hard drives, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disks read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0174] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0175] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.

[0176] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. Servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are a host product in the cloud computing service system to solve the defects of great management difficulty and weak business scalability in traditional physical hosts and VPS services.

[0177] The embodiment of the present application further provides a computer program product comprising a computer program which, when executed by a processor, can implement the method provided in any embodiment of the present application.

[0178] The computer program product can be written in one or more programming languages or combinations of languages including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0179] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present application. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, and the present application is not limited in this regard.

[0180] The specific embodiments described above are not intended to limit the scope of the present application. Those skilled in the art will understand that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present application. Any further modifications, equivalents, and / or alternatives come within the scope of the present application as recited by the claims.

Claims

1. A classification method, characterized in that, include: Acquire raw signals within a set time period, the raw signals including the cardiac impact signals of the user on the bedding; Feature data is extracted from the cardiac impact signal, the feature data including a relative state, the relative state indicating whether the user is on the bedding; Based on the relative state, the set duration is divided into at least one bed rest time period, which includes the time period during which the user is on the bedding, and the continuous time spent away from the bed during the bed rest time period is less than the preset duration. For each bed rest period, the category to which the bed rest period belongs is determined based on the feature data and the bed rest period.

2. The method according to claim 1, characterized in that, For each bed rest period, the category to which the bed rest period belongs is determined based on the feature data and the bed rest period, including: Based on the characteristic data, the duration of continuous sleep within the bed rest period is determined; Determine whether the specified bed rest period overlaps with the set rest time interval; If the bed rest period overlaps with the set rest time interval, then if the duration of continuous bed rest within the bed rest period exceeds a first threshold, and / or the duration of continuous sleep exceeds a second threshold, the bed rest period is determined to belong to the first category, where the first category indicates the period in which the main sleep occurs.

3. The method according to claim 2, characterized in that, Also includes: If the bed rest period does not overlap with the set rest time interval, then if the continuous bed rest time within the bed rest period exceeds the third threshold and the continuous sleep time exceeds the fourth threshold, the category of the bed rest period is determined to be the first category.

4. The method according to claim 2, characterized in that, After determining the duration of continuous sleep within the bed rest period based on the aforementioned feature data, the method further includes: If the duration of continuous bed rest within the bed rest period is less than the first threshold but greater than the fifth threshold, and the duration of continuous sleep is less than the second threshold but greater than the sixth threshold, then the bed rest period is determined to belong to the second category, and the time period corresponding to the second category is the time period of the next sleep.

5. The method according to claim 2, characterized in that, After determining the duration of continuous sleep within the bed rest period based on the aforementioned feature data, the method further includes: If the duration of continuous time spent in bed during the bed rest period exceeds the seventh threshold, and the duration of continuous sleep is less than the sixth threshold, then the bed rest period is determined to belong to the third category, and the time period corresponding to the third category is the time period in which the person is awake.

6. The method according to claim 1, characterized in that, After dividing the set duration into at least one bed rest period based on the relative state, the method further includes: The timestamps included in the bed rest period and the relative states corresponding to the timestamps are input into the interruption determination model to determine whether the bed rest period should be split. If so, the bed rest time period is divided into separate bed rest time periods.

7. The method according to claim 6, characterized in that, The interruption determination model determines whether to split the bed rest period based on the following factors: The time window to which the event of leaving the bed during the period of bed rest belongs; Interruption duration, which includes the duration of the bed-leaving event; The sleep ratio includes the proportion of the duration of the time segment before the bed-leaving event to the duration of the time segment after the bed-leaving event within the bed-resting period. The time window includes different preset time windows, each corresponding to a different interruption duration threshold and a different ratio threshold.

8. The method according to claim 1, characterized in that, After determining the category of each bed rest period based on the feature data and the bed rest period, the process further includes: After the data cutoff time point corresponding to the set duration is reached, a sleep report for the set duration is generated, and the sleep report includes one or more of the following: Duration of primary sleep; number of secondary sleeps; duration of secondary sleeps; total bed rest time within the set duration; total sleep time within the set duration; number of times getting out of bed; time period during which time getting out of bed.

9. A sorting device, characterized in that, include: The acquisition module is used to acquire raw signals within a set time period, including the cardiac impact signals of the user on the bedding. An extraction module is used to extract feature data from the cardiac impact signal, the feature data including a relative state indicating whether the user is on the bedding; The segmentation module is used to divide the set duration into at least one bed rest time period based on the relative state. The bed rest time period includes the time period during which the user is on the bedding, and the continuous time spent away from the bed during the bed rest time period is less than the preset duration. The determination module is used to determine the category to which each bed rest time period belongs based on the feature data and the bed rest time period.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the method of any one of claims 1-8.