Sleep data display method and device, electronic equipment and storage medium

By obtaining the parameters of the display date and work and rest set, drawing a sleep data chart, the problem of poor sleep data display effect is solved, complete display and resource optimization are achieved, and the display effect of sleep data is improved.

CN118918213APending Publication Date: 2024-11-08DAYUE INNOVATION (SUZHOU) MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311492921.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the prior art, the display effect of sleep data is poor, and it is impossible to visually display changes in sleep quality, and the data is prone to exceed the range of the chart or occupy a small area, resulting in waste of resources.

Method used

By obtaining the first coordinate parameters of the display date and the second coordinate parameters of the actual work and rest set, a sleep data display chart is drawn to ensure that the data is fully displayed without exceeding the scope and make reasonable use of the display space.

Benefits of technology

It realizes a complete display of sleep data, avoids waste of resources, significantly improves the display effect, and allows users to intuitively understand the changes in sleep quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918213A_ABST
    Figure CN118918213A_ABST
Patent Text Reader

Abstract

The invention discloses a sleep data display method and device, electronic equipment and a storage medium, and relates to the field of data management.The method comprises the steps that in response to an obtained sleep data display request, a first coordinate parameter is obtained according to the display date of the sleep data display request; acquiring a second coordinate parameter according to the suggested work and rest set and the actual work and rest set corresponding to the display date; and drawing a sleep data display chart according to the suggested work and rest set, the actual work and rest set, the first coordinate parameters and the second coordinate parameters. According to the technical scheme, it is ensured that the sleep data of the user does not exceed the display range of the chart, all sleep data related to the user is completely represented, the situation that the sleep data only occupies a small area in the chart is avoided, the display space of the display interface is reasonably utilized, resource waste of the display interface is avoided, and the user experience is improved. And the display effect of the sleep data is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data management, and in particular to a sleep data display method, device, electronic device and storage medium. Background Art

[0002] Sleep is an important physiological activity of the human body. High-quality sleep has a great impact on physical and mental health and work efficiency. Therefore, monitoring sleep quality and displaying it to users in the form of charts has become an important means of health monitoring.

[0003] In the prior art, sleep records usually record various sleep data by handwriting or Excel tables. However, the tabular display of a large amount of original sleep data makes it difficult for users to understand the specific meaning of the data, cannot intuitively display the changes in sleep quality, and cannot achieve scientific sleep management.

[0004] In addition, although some application software can display sleep data, due to the non-fixed nature of sleep data in time series, the sleep data often exceeds the display range of the chart and cannot fully represent the user's sleep quality, or the sleep data only occupies a small area of ​​the display chart, which greatly wastes display resources and has a poor display effect. Summary of the invention

[0005] The present invention provides a sleep data display method, device, electronic device and storage medium to solve the problem of poor display effect of sleep data display charts.

[0006] According to one aspect of the present invention, a sleep data display method is provided, comprising:

[0007] In response to obtaining a sleep data display request, obtaining a first coordinate parameter according to a display date of the sleep data display request;

[0008] Obtaining a second coordinate parameter according to the recommended schedule and the actual schedule corresponding to the display date;

[0009] Draw a sleep data display chart based on the recommended schedule, actual schedule, first coordinate parameter and second coordinate parameter.

[0010] According to another aspect of the present invention, there is provided a sleep data display device, comprising:

[0011] A first parameter acquisition module, configured to, in response to obtaining a sleep data display request, obtain a first coordinate parameter according to a display date of the sleep data display request;

[0012] A second parameter acquisition module, used to acquire a second coordinate parameter according to the recommended work and rest set and the actual work and rest set corresponding to the display date;

[0013] The data drawing execution module is used to draw a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter.

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

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] 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 so that the at least one processor can execute the sleep data display method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sleep data display method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention, in response to obtaining a sleep data display request, obtains a first coordinate parameter according to the display date of the sleep data display request; obtains a second coordinate parameter according to the recommended work and rest set and the actual work and rest set corresponding to the display date; draws a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter. It not only ensures that the user's sleep data will not exceed the display range of the chart, fully represents all sleep data related to the user, but also avoids the sleep data occupying only a small area in the chart, reasonably utilizes the display space of the display interface, avoids the waste of resources of the display interface, and greatly improves the display effect of the sleep data.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1A is a flowchart of a sleep data display method provided according to Embodiment 1 of the present invention;

[0023] Figure 1B is a schematic diagram of the structure of a sleep data display chart provided according to Embodiment 1 of the present invention;

[0024] Figure 1C is a schematic diagram of the structure of a sleep data display chart provided according to Embodiment 1 of the present invention;

[0025] Figure 2 is a flowchart of a sleep data display method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 is a flowchart of a sleep data display method provided according to Embodiment 3 of the present invention;

[0027] Figure 4 is a structural schematic diagram of a sleep data display device provided according to a fourth embodiment of the present invention;

[0028] Figure 5 It is a structural schematic diagram of an electronic device that implements the sleep data display method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

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

[0031] Embodiment 1

[0032] Figure 1AThis is a flowchart of a sleep data display method provided in the first embodiment of the present invention. This embodiment can be used to display sleep data to users in the form of charts. The method can be executed by a sleep data display device. The sleep data display device can be implemented in the form of hardware and / or software. The sleep data display device is configured in a sleep data management system. The sleep data management system is configured in an electronic device such as a terminal device or a server. Figure 1A As shown, the method includes:

[0033] S101 . In response to obtaining a sleep data display request, obtaining a first coordinate parameter according to a display date of the sleep data display request.

[0034] The sleep data management system can be configured in a server, and the user can send a sleep data management request to the server through an application software (Application) such as a browser in a terminal device. The sleep data management system provides the user with a matching sleep data management page through the browser, and obtains user operations such as sleep data display requests through the sleep data management page; the sleep data management system can also be configured in a client (Client), and the user can send a sleep data management request through the sleep data management page provided by the client; the client can draw a chart based on the locally stored sleep data and display the drawn chart to the user, or it can obtain remotely stored sleep data through the server, and then draw a local chart, and can also display it locally based on the chart drawn by the server.

[0035] The sleep data management system can provide the user with a display date option through the sleep data management page, so as to obtain the display start and end dates according to the user's selection results, that is, to obtain the date range involved in the display chart. For example, the user selects the sleep data of the past week as the display date on August 15, that is, the display date at this time is August 8 to August 14; and the display date can be used as one of the coordinate axes (that is, the first coordinate axis) in the display chart, for example, the first coordinate axis can be the vertical coordinate axis; the first coordinate parameters, that is, the coordinate parameters of the first coordinate axis, include the start and end dates of the coordinate axis, the row height of each date, and the scale information displayed on the coordinate axis.

[0036] by Figure 1B and Figure 1C For example, Figure 1B The sleep data for the past week (i.e. 7 consecutive days) is displayed, with the start and end dates of the vertical axis being August 8 and August 14 respectively; the sleep data for each displayed date occupies a larger row height; the dates on the axis can also be displayed in full, that is, each date between August 8 and August 14 is displayed on the vertical axis; Figure 1CThe sleep data for the past month (i.e., 31 consecutive days) is displayed, with the start and end dates of the vertical axis being August 1 and August 31 respectively; the sleep data for each displayed date occupies a smaller row height; the dates on the axis cannot fully display all dates, so only the start and end dates are displayed, that is, only August 1 and August 31 are displayed on the vertical axis, and other display dates are not displayed.

[0037] Optionally, in an embodiment of the present invention, obtaining the first coordinate parameter according to the display date of the sleep data display request includes: obtaining the display day of the sleep data display request, and the first second value corresponding to the current moment; obtaining multiple second second values ​​according to the first second value, the display day and the single-day second threshold, and obtaining a matching display date according to each of the second second values.

[0038] Specifically, if the display request issued by the user does not include the complete start and end dates, but only includes the number of display days, that is, displaying the sleep data of the past N days (N is an integer greater than 1); at this time, first obtain the first second value corresponding to the current time; wherein the current time can be a time value expressed in the form of "year + month + day + hour + minute + second", for example, the current time can be January 1, 2023 08:00:00, or it can be a time value expressed in the form of "year + month + day", for example, the current time can be January 1, 2023.

[0039] Converting the current time into a seconds value can be accomplished in a variety of ways, for example, based on an SQL statement, obtaining a specific seconds value through the relational database MySQL; based on a Java statement, converting the time value represented by the "Calendar object" into milliseconds represented by the "Date object", and then converting the milliseconds into a seconds value; optionally, in an embodiment of the present invention, the method for converting date and time into seconds values ​​is not specifically limited.

[0040] After obtaining the first second value, display days, and single-day second threshold, the second second values ​​can be obtained according to the following equation (i.e., equation 1-1):

[0041] M i =MK×i(Formula 1-1)

[0042] Among them, M is the first second value corresponding to the current moment; M i Represents the second value of the past i-th day (i.e., the second second value); i is an integer greater than or equal to 1 and less than or equal to the number of display days; K represents the single-day second value threshold, K = 24×60×60, i.e., 24 hours multiplied by 60 minutes multiplied by 60 seconds; obviously, the number of second second values ​​is equal to the number of display days, for example, by displaying the sleep data of the past 7 days, you can get 7 second second values, i.e., M1 to M7.

[0043] By converting the second-second values ​​obtained above into time values ​​expressed in the form of "year + month + day + hour + minute + second" or "year + month + day", the display dates can be obtained; therefore, when the sleep data display request only includes the display days, the display dates can be obtained through the above-mentioned seconds conversion method, thereby improving the accuracy of obtaining the display dates and ensuring the accuracy of the parameters of the first coordinate axis in the sleep data display chart.

[0044] S102: Obtain a second coordinate parameter according to the recommended schedule and the actual schedule corresponding to the display date.

[0045] The actual schedule set includes multiple actual schedule pairs, and the number of actual schedule pairs is equal to the number of display days included in the display date, that is, there is a matching actual schedule pair for each display day. The actual schedule pair records the user's actual schedule time on that display day. The actual schedule pair specifically includes the actual bed time and the actual wake-up time; among which, the actual bed time is the moment when the user lies in bed and prepares to sleep; the actual wake-up time is the moment when the user leaves the bed; in addition, the actual bed time can also include the actual sleep time and the actual wake-up time; the actual sleep time is the moment when the user goes from the awake state to the sleeping state, that is, the moment when the user falls asleep; the actual wake-up time is the moment when the user goes from the sleeping state to the awake state, that is, the moment when the user wakes up.

[0046] The actual work and rest schedule can be recorded by the user and then input into the sleep data management system, and the sleep data management system can also directly obtain it through the wearable device worn by the user (for example, a bracelet, etc.); for example, according to the user's movement status recorded by the wearable device, the moment when the user enters a stationary state from a moving state is taken as the actual bedtime, and the moment when the user enters a stationary state from a stationary state is taken as the actual wake-up time; in addition, since there are significant differences in human body data such as heart rate and pulse when people are in a sleeping state and a non-sleeping state, the user's actual sleeping time and actual waking time can also be obtained through human body data such as heart rate and pulse recorded by wearable devices; optionally, in the embodiment of the present invention, there is no specific limitation on the method of obtaining the actual work and rest schedule.

[0047] The recommended schedule set includes one or more recommended schedule pairs; the recommended schedule pairs record the recommended schedule time for the user within a sleep cycle (for example, a week); the recommended schedule pairs specifically include a recommended bedtime and a recommended wake-up time; wherein, the recommended bedtime is the time when the user is recommended to lie in bed; the recommended wake-up time is the time when the user is recommended to leave the bed; in an embodiment of the present invention, the natural week can be used as the basis for dividing the sleep cycle. For example, August 1, 2022 (Monday) to August 7, 2022 (Sunday) is used as a natural week, and August 8, 2022 (Monday) to August 14, 2022 (Sunday) is used as another natural week, and different natural weeks correspond to their own recommended schedule pairs.

[0048] Taking the above technical solution as an example, if the display date selected by the user is 7 days, assuming that the current date is August 11, it is obvious that the sleep data of the past 7 days involves the above two natural weeks, that is, August 4 to August 7 belongs to one natural week, and August 8 to August 10 belongs to another natural week, that is, two recommended work and rest pairs will be obtained at this time; assuming that the current date is August 8, it is obvious that the sleep data of the past 7 days only involves one natural week, that is, only one recommended work and rest pair will be obtained; if the display date selected by the user is 30 days, assuming that the current date is August 31, it is obvious that the sleep data of the past 30 days will involve five natural weeks, that is, five recommended work and rest pairs will be obtained.

[0049] The recommended work and rest schedule can be obtained by pre-training a prediction model (for example, a prediction model built based on an artificial neural network) to predict the actual work and rest time of the current user; it can also be obtained based on the historical sleep data of different users and used as the recommended work and rest time for the current user; the above-mentioned recommended work and rest schedule set can also be directly obtained through an external system; optionally, in the embodiment of the present invention, there is no specific limitation on the method of obtaining the recommended work and rest schedule set and the method of dividing the sleep cycle.

[0050] After obtaining the recommended work and rest schedule pairs and the actual work and rest schedule pairs corresponding to the display date, obtain the minimum value of all bedtimes (including the recommended bedtime and the actual bedtime), that is, the minimum bedtime, and use the minimum bedtime as the starting point coordinate of the second coordinate axis; at the same time, obtain the maximum value of all wake-up times (including the recommended wake-up time and the actual wake-up time), that is, the maximum wake-up time, and use the maximum wake-up time as the end point coordinate of the second coordinate axis, thereby obtaining the start and end times of the second coordinate axis; wherein, the second coordinate axis is different from the first coordinate axis, if the first coordinate axis is the vertical axis, correspondingly, the second coordinate axis is the horizontal axis.

[0051] After determining the start and end time of the second coordinate axis, the second coordinate axis can be divided into equal parts according to a preset number of divisions to mark other scale values ​​in the second coordinate axis except the starting point and the end point; for example, the preset number of divisions can be 4, that is, the second coordinate axis is divided into 4 time periods. Accordingly, in addition to the starting point and the end point, three other coordinate points are required to complete the 4-division process of the second coordinate axis.

[0052] The time values ​​of the coordinate points on the second coordinate axis other than the starting point and the end point can be obtained by the following equation (i.e., equation 1-2):

[0053]

[0054] Among them, x(n) represents the time value of the nth coordinate point, n is an integer greater than or equal to 1 and less than or equal to L-1; L is the preset number of equal divisions; Max represents the maximum time to get up; Min represents the minimum time to go to bed.

[0055] In particular, when (Formula 1-2) When it is not an integer, that is, when the division result has a remainder, you can The integer part of the value is added by 1, and the value after adding 1 is used as to ensure that the value of each coordinate point of the second coordinate axis is accurate to the "minute".

[0056] The second coordinate parameters obtained in the above manner not only ensure the scale information of the second coordinate axis, completely cover all the work and rest time of the recommended work and rest set and the actual work and rest set involved in the display date, completely represent all the sleep data related to the user, but also make the sleep data maximize the use of the display space of the display interface, avoid the waste of display resources, and greatly improve the display effect of the sleep data.

[0057] S103: Draw a matching sleep data display diagram according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter, and the second coordinate parameter.

[0058] As described in the above technical solution, the first coordinate parameter and the second coordinate parameter respectively represent the horizontal coordinate and the vertical coordinate of the sleep data display graph, so that the actual work and rest set and the recommended work and rest set are displayed in the display area formed by the horizontal coordinate and the vertical coordinate, which can fully represent all the sleep data related to the current user on the current display date; in addition, in the sleep data display interface, in addition to the above sleep data display graph, other related data can also be displayed in the form of a sleep data display table, such as Figure 1B and Figure 1CAs shown, sleep data such as average sleep duration, average bed time, average sleep duration, and average sleep efficiency for the current display date can also be displayed in the sleep data display table.

[0059] Optionally, in an embodiment of the present invention, the actual work and rest schedule pair also includes the actual sleeping time and the actual waking up time; the drawing of the sleep data display chart based on the recommended work and rest schedule set, the actual work and rest schedule set, the first coordinate parameter and the second coordinate parameter specifically includes: obtaining the bed time period of each display date based on the actual bed time and the actual getting up time, and obtaining the sleeping time period of each display date based on the actual sleeping time and the actual waking up time; drawing the sleep data display chart based on the bed time period and the sleeping time period of each display date, as well as the recommended work and rest schedule set, the first coordinate parameter and the second coordinate parameter.

[0060] Specifically, the sleeping time period on each display date can be determined based on the actual sleeping time and the actual waking time; and the bed rest time period on each display date can be determined based on the actual bed time and the actual waking time, such as Figure 1B and Figure 1C As shown, in the display area formed by the horizontal axis and the vertical axis, the bed time period and the sleeping time period are displayed in different colors respectively, so that the different sleep stages of the user, i.e., the different sleep stages from going to bed to falling asleep, from falling asleep to waking up, and from waking up to getting up, are intuitively displayed through the sleep data display chart, and the sleep efficiency of the user is reflected thereby, i.e., the proportion of the sleeping time period in the bed time period, thereby guiding the user to improve the sleep quality by improving the sleep efficiency, thereby greatly improving the display effect of the sleep data display chart.

[0061] Optionally, in an embodiment of the present invention, drawing a sleep data display chart based on the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter includes: drawing a display coordinate axis based on the first coordinate parameter and the second coordinate parameter; obtaining an initial display chart based on the actual work and rest set and the display coordinate axis; drawing the recommended work and rest time in the initial display diagram based on the recommended work and rest set and a preset display method to obtain a completed sleep data display chart.

[0062] Specifically, after drawing the display coordinate axis according to the first coordinate parameter and the second coordinate parameter, the display area of ​​the sleep data in the display chart is determined, and then the actual work and rest set is displayed in the above display area, that is, an initial display chart is formed; the preset display method is the display method of the recommended work and rest time (including the recommended bedtime and the recommended wake-up time), which can be configured in any form as needed, for example, Figure 1B and Figure 1CThe recommended work and rest time is configured in the form of "dotted lines", that is, the recommended bedtime and the recommended wake-up time are represented by different "dotted lines" respectively.

[0063] Therefore, the recommended bedtime and the recommended getting-up time that are based on the recommended work and rest schedule are drawn on the initial display chart in the above-mentioned preset display method, and the completed sleep data display chart is obtained; the sleep data display chart not only displays the user's actual sleep data, but also intuitively displays the recommended work and rest schedule, so that the user can timely know the shortcomings of his or her own sleeping habits (i.e., sleep time interval) through the sleep data display chart, and then guide the user to improve sleep quality by changing his or her sleeping habits, further improving the display effect of the sleep data display chart.

[0064] The technical solution of the embodiment of the present invention, in response to obtaining a sleep data display request, obtains a first coordinate parameter according to the display date of the sleep data display request; obtains a second coordinate parameter according to the recommended work and rest set and the actual work and rest set corresponding to the display date; draws a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter. It not only ensures that the user's sleep data will not exceed the display range of the chart, fully represents all sleep data related to the user, but also avoids the sleep data occupying only a small area in the chart, reasonably utilizes the display space of the display interface, avoids the waste of resources of the display interface, and greatly improves the display effect of the sleep data.

[0065] Embodiment 2

[0066] Figure 2 This is a flowchart of a sleep data display method provided by the second embodiment of the present invention. The relationship between this embodiment and the above embodiment is that after obtaining the actual work and rest set, the actual work and rest time is first converted into a second value to facilitate comparison of the actual work and rest time on different dates. Figure 2 As shown, the method includes:

[0067] S201 . In response to obtaining a sleep data display request, obtain a first coordinate parameter according to a display date of the sleep data display request.

[0068] S202. Obtain a recommended schedule set and an actual schedule set corresponding to the display date; wherein the actual schedule set includes a plurality of actual schedule pairs; and the actual schedule pairs include an actual bedtime and an actual wake-up time.

[0069] S203, converting each of the actual bedtimes into a matching third second value, and converting each of the actual wake-up times into a matching fourth second value.

[0070] The actual bed time and the actual getting-up time are both time values ​​expressed in the form of "year + month + day + hour + minute + second". For example, the actual getting-up times for two consecutive days are "2023-04-17 08:00:00", and "2023-04-18 05:00:00"; although the getting-up time of the latter day is 5 o'clock, which is less than the getting-up time of the previous day at 8 o'clock, the latter day is one day later than the previous day, and 24 hours are added in time. Therefore, the above method cannot actually compare the differences in getting-up times in the same time dimension. Therefore, it is necessary to convert the actual work and rest time with date. First, convert each actual bed time into a matching second value (i.e., the third second value), and convert each actual getting-up time into a matching second value (i.e., the fourth second value).

[0071] S204, modulo each of the third second values ​​and the daily second threshold value to obtain a corresponding standard bedtime, and modulo each of the fourth second values ​​and the daily second threshold value to obtain a corresponding standard wake-up time.

[0072] Taking the above technical solution as an example, after the remainder operation of the previous day's wake-up time, the standard wake-up time obtained is "08:00:00", and after the remainder operation of the next day's wake-up time, the standard wake-up time obtained is "05:00:00". Obviously, "5:00:00" is less than "8:00:00", that is, the wake-up time of the next day is earlier than the wake-up time of the previous day.

[0073] S205. If the actual bedtime corresponding to the current standard bedtime is not the same as the current display date, increase the current standard bedtime by the single-day hour threshold; if the actual bedtime corresponding to the current standard bedtime is the same as the current display date, keep the current standard bedtime unchanged.

[0074] Since sleep time often spans multiple days, especially due to irregular lifestyles, the bedtime of the day may be delayed until the early morning of the next day. For example, if the actual bedtime in the sleep data on April 18 is "April 19 01:00:00", although the above behavior occurred on April 19, it is still considered as the sleep time on April 18 for the user's behavior habits. Therefore, if the actual bedtime corresponding to the current standard bedtime is not the same day as its own display date, the current standard bedtime needs to be increased by a single-day hour threshold; if the actual bedtime corresponding to the current standard bedtime is the same day as its own display date, the current standard bedtime remains unchanged.

[0075] Taking the above technical solution as an example, if the actual bedtime on April 17 is "20:00:00, April 17, 2023" and the actual bedtime on April 18 is "01:00:00, April 19, 2023"; for April 17, the actual bedtime (i.e. "20:00:00") corresponding to the standard bedtime (i.e. "20:00:00") is the same day as its own display date (i.e. "April 17, 2023"), then the current standard bedtime remains unchanged.

[0076] For April 18, the actual bedtime (i.e. "01:00:00") corresponding to the standard bedtime (i.e. "01:00:00") is not the same day as its own display date (i.e. "April 18, 2023"), so the current standard bedtime needs to increase the single-day hour threshold (i.e. 24 hours), that is, the standard bedtime should be changed to "25:00:00".

[0077] Therefore, when comparing the above two actual bedtimes, the actual bedtime on April 17 is "20:00:00", and the actual bedtime on April 18 is "25:00:00", and it is obvious that the latter goes to bed later than the former; by first converting the actual work and rest time into a second value, and then converting the second value into a unified time in hour format, the actual work and rest time with date is converted into a unified time in 48-hour format, thereby realizing numerical comparison between the actual work and rest time of different display dates, ensuring the accuracy of user sleep data, and thereby improving the accuracy of obtaining the second coordinate parameter.

[0078] S206. Obtain a second coordinate parameter according to the recommended work and rest schedule and the actual work and rest schedule.

[0079] S207 , drawing a sleep data display chart according to the recommended work and rest schedule, the actual work and rest schedule, the first coordinate parameter, and the second coordinate parameter.

[0080] The technical solution of the embodiment of the present invention, after obtaining the actual work and rest set, first converts the actual work and rest time into a second value, and then converts the second value into a unified time in the hour format. The actual work and rest time with a date is converted into a unified time in a 48-hour format, thereby realizing numerical comparison between the actual work and rest time on different display dates, ensuring the accuracy of the user's sleep data, and further improving the accuracy of obtaining the second coordinate parameter.

[0081] Embodiment 3

[0082] Figure 3This is a flowchart of a sleep data display method provided by Embodiment 3 of the present invention. The relationship between this embodiment and the above embodiments is that after obtaining the recommended work and rest set, the recommended work and rest time is modified according to the time interval in which the recommended work and rest time is located. Figure 3 As shown, the method includes:

[0083] S301 : In response to obtaining a sleep data display request, obtain a first coordinate parameter according to a display date of the sleep data display request.

[0084] S302, obtaining a recommended schedule set and an actual schedule set corresponding to the display date; wherein the recommended schedule set includes at least one recommended schedule pair; the recommended schedule pair includes a recommended bedtime and a recommended wake-up time.

[0085] S303: If the current recommended bedtime is in the first time interval, increase the current recommended bedtime by the daily hour threshold; if the current recommended bedtime is in the second time interval, keep the current recommended bedtime unchanged.

[0086] S304: If the current recommended wake-up time is within the first time interval, increase the current recommended wake-up time by the daily hour threshold; if the current recommended wake-up time is within the second time interval, keep the current recommended wake-up time unchanged.

[0087] The recommended bedtime and the recommended wake-up time are both time values ​​expressed in the form of "hours + minutes + seconds"; the first time interval and the second time interval can be configured as needed, for example, the first time interval can be configured as "00:00:00 to 17:59:59"; the second time interval can be configured as "18:00:00 to 23:59:59"; if the recommended bedtime or the recommended wake-up time is within the second time interval, the value remains unchanged.

[0088] If the recommended bedtime or the recommended wake-up time is within the first time interval, it means that there is a cross-day phenomenon. At this time, the recommended bedtime or the recommended wake-up time is increased by 24 hours. Thereby, the recommended work and rest time without a date is also converted into a unified time in a 48-hour format, thereby realizing the numerical comparison of the recommended work and rest time on different display dates, avoiding the influence of the recommended work and rest time on the numerical comparison result when there is a cross-day phenomenon, ensuring the numerical accuracy of the recommended work and rest time, and thereby improving the accuracy of obtaining the second coordinate parameter.

[0089] Optionally, in an embodiment of the present invention, the second coordinate parameter is obtained based on the recommended schedule and the actual schedule corresponding to the display date, including: if the current recommended wake-up time is less than the matching target recommended bedtime, reducing the target recommended bedtime by a single-day hour threshold.

[0090] Specifically, taking the above technical solution as an example, in a recommended schedule pair, if the recommended bedtime is "April 17, 17:00:00", and the recommended wake-up time is "April 18, 03:00:00", as described in the above technical solution, the above two recommended schedules are both within the first time interval, and the above two values ​​need to be increased by 24 hours. However, in fact, in a recommended schedule pair, the recommended wake-up time must be after the recommended bedtime. Therefore, if the current recommended wake-up time is less than the matching target recommended bedtime; wherein the target recommended bedtime is the recommended bedtime in the recommended schedule pair where the current recommended wake-up time is located; at this time, the target recommended bedtime is reduced by 24 hours to avoid misconfiguring the recommended bedtime in the recommended schedule pair after the recommended wake-up time, thereby further ensuring the accuracy of the values ​​of each recommended schedule.

[0091] S305. Obtain a second coordinate parameter according to the recommended work and rest schedule and the actual work and rest schedule.

[0092] S306 , drawing a sleep data display chart according to the recommended work and rest schedule, the actual work and rest schedule, the first coordinate parameter, and the second coordinate parameter.

[0093] The technical solution of the embodiment of the present invention, after obtaining the recommended work and rest set, realizes the numerical comparison between the recommended work and rest times on different display dates by converting the recommended work and rest times without dates into a unified time in a 48-hour format, thereby avoiding the influence of the recommended work and rest time on the numerical comparison result when it spans multiple days, ensuring the numerical accuracy of the recommended work and rest time, and further improving the accuracy of obtaining the second coordinate parameter.

[0094] Embodiment 4

[0095] Figure 4 : is a structural block diagram of a sleep data display device provided by Embodiment 4 of the present invention, and the device specifically includes:

[0096] A first parameter acquisition module 401 is used to acquire a first coordinate parameter according to a display date of the sleep data display request in response to the sleep data display request;

[0097] A second parameter acquisition module 402 is used to acquire a second coordinate parameter according to the recommended schedule and the actual schedule corresponding to the display date;

[0098] The data drawing execution module 403 is used to draw a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter.

[0099] The technical solution of the embodiment of the present invention, in response to obtaining a sleep data display request, obtains a first coordinate parameter according to the display date of the sleep data display request; obtains a second coordinate parameter according to the recommended work and rest set and the actual work and rest set corresponding to the display date; draws a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter. It not only ensures that the user's sleep data will not exceed the display range of the chart, fully represents all sleep data related to the user, but also avoids the sleep data occupying only a small area in the chart, reasonably utilizes the display space of the display interface, avoids the waste of resources of the display interface, and greatly improves the display effect of the sleep data.

[0100] Optionally, the first parameter acquisition module 401 is specifically used to obtain the display day of the sleep data display request and the first second value corresponding to the current moment; obtain multiple second second values ​​according to the first second value, the display day and the single-day second threshold, and obtain the matching display date according to each of the second second values.

[0101] Optionally, the actual work and rest schedule set includes multiple actual work and rest schedule pairs; the actual work and rest schedule pairs include an actual bedtime and an actual wake-up time.

[0102] The second parameter acquisition module 402 is specifically used to convert each of the actual bedtimes into a matching third-second value, and convert each of the actual wake-up times into a matching fourth-second value; modulo each of the third-second values ​​with a single-day seconds threshold to obtain a corresponding standard bedtime, and modulo each of the fourth-second values ​​with a single-day seconds threshold to obtain a corresponding standard wake-up time; if the actual bedtime corresponding to the current standard bedtime is not the same day as the current display date, increase the current standard bedtime by the single-day hour threshold; if the actual bedtime corresponding to the current standard bedtime is the same day as the current display date, keep the current standard bedtime unchanged.

[0103] Optionally, the actual work-sleep schedule also includes an actual sleeping time and an actual waking time.

[0104] The data drawing execution module 403 is specifically used to obtain the bed time period of each display date according to the actual bed time and the actual getting-up time, and to obtain the sleep time period of each display date according to the actual sleep time and the actual waking-up time; and to draw a sleep data display chart according to the bed time period and the sleep time period of each display date, as well as the recommended work and rest set, the first coordinate parameters and the second coordinate parameters.

[0105] Optionally, the recommended schedule set includes at least one recommended schedule pair; the recommended schedule pair includes a recommended bedtime and a recommended wake-up time.

[0106] The second parameter acquisition module 402 is specifically used to increase the current recommended bedtime by the daily hour threshold if the current recommended bedtime is in the first time interval; keep the current recommended bedtime unchanged if the current recommended bedtime is in the second time interval; increase the current recommended wake-up time by the daily hour threshold if the current recommended wake-up time is in the first time interval; and keep the current recommended wake-up time unchanged if the current recommended wake-up time is in the second time interval.

[0107] Optionally, the second parameter acquisition module 402 is further configured to reduce the target recommended bedtime by a daily hour threshold if the current recommended wake-up time is less than the matched target recommended bedtime.

[0108] Optionally, the data drawing execution module 403 is specifically used to draw a display coordinate axis based on the first coordinate parameter and the second coordinate parameter; obtain an initial display chart based on the actual work and rest set and the display coordinate axis; based on the recommended work and rest set and the preset display method, draw the recommended work and rest time in the initial display chart to obtain a completed sleep data display chart.

[0109] The above device can execute the sleep data display method provided by any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the sleep data display method provided by any embodiment of the present invention.

[0110] Embodiment 5

[0111] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0112] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to 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.

[0113] A number of 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, speakers, etc.; a storage unit 18, such as a 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.

[0114] The processor 11 may be a variety of general and / or special 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 artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the sleep data display method.

[0115] In some embodiments, the sleep data display method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the processor, one or more steps of the sleep data display method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the sleep data display method in any other appropriate manner (e.g., by means of firmware).

[0116] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0117] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0118] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0119] To provide interaction with a user, the systems and techniques described herein may be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0120] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may 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), a blockchain network, and the Internet.

[0121] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A sleep data display method, characterized in that: include: In response to obtaining a sleep data display request, obtaining a first coordinate parameter according to a display date of the sleep data display request; Obtaining a second coordinate parameter according to the recommended schedule and the actual schedule corresponding to the display date; Draw a sleep data display chart based on the recommended schedule, actual schedule, first coordinate parameter and second coordinate parameter.

2. The method according to claim 1, characterized in that The acquiring the first coordinate parameter according to the display date of the sleep data display request includes: Obtain the display days of the sleep data display request and the first second value corresponding to the current time; According to the first second value, the display days and the single-day second threshold, multiple second second values ​​are obtained, and matching display dates are obtained according to each of the second second values.

3. The method according to claim 1, characterized in that The actual work and rest set includes a plurality of actual work and rest pairs; the actual work and rest pairs include an actual bedtime and an actual wake-up time; The step of obtaining the second coordinate parameter according to the recommended schedule set and the actual schedule set corresponding to the display date includes: Convert each of the actual bedtimes into a matching third second value, and convert each of the actual wake-up times into a matching fourth second value; Taking the modulus of each third second value and the single-day second threshold value to obtain the corresponding standard bedtime, and taking the modulus of each fourth second value and the single-day second threshold value to obtain the corresponding standard wake-up time; If the actual bedtime corresponding to the current standard bedtime is not the same as the current display date, increase the current standard bedtime by the single-day hour threshold; If the actual bedtime corresponding to the current standard bedtime is the same as the current display date, keep the current standard bedtime unchanged.

4. The method according to claim 3, characterized in that The actual work-sleep schedule also includes the actual sleeping time and the actual waking time; The step of drawing a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter includes: According to the actual bed time and the actual wake-up time, obtain the bed time period of each display date, and according to the actual sleep time and the actual wake-up time, obtain the sleep time period of each display date; A sleep data display chart is drawn based on the bed rest time period and sleep time period of each display date, as well as the recommended work and rest schedule, the first coordinate parameter and the second coordinate parameter.

5. The method according to claim 3, characterized in that: The recommended work and rest set includes at least one recommended work and rest pair; the recommended work and rest pair includes a recommended bedtime and a recommended wake-up time; The step of obtaining the second coordinate parameter according to the recommended schedule set and the actual schedule set corresponding to the display date includes: If the current recommended bedtime is in the first time interval, increase the current recommended bedtime by a single-day hour threshold; If the current recommended bedtime is within the second time interval, keep the current recommended bedtime unchanged; If the current recommended wake-up time is within the first time interval, the current recommended wake-up time is increased by the single-day hour threshold; if the current recommended wake-up time is within the second time interval, the current recommended wake-up time is kept unchanged.

6. The method according to claim 5, characterized in that The step of obtaining the second coordinate parameter according to the recommended schedule set and the actual schedule set corresponding to the display date further includes: If the current recommended wake-up time is less than the matching target recommended bedtime, the target recommended bedtime is reduced by a single-day hour threshold.

7. The method according to claim 1, characterized in that The step of drawing a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter includes: Draw a display coordinate axis according to the first coordinate parameter and the second coordinate parameter; Obtaining an initial display chart according to the actual work and rest schedule set and the display coordinate axis; Based on the recommended work and rest set and the preset display mode, the recommended work and rest time is drawn in the initial display diagram to obtain a completed sleep data display chart.

8. A sleep data display device, characterized in that: include: A first parameter acquisition module, configured to, in response to obtaining a sleep data display request, obtain a first coordinate parameter according to a display date of the sleep data display request; A second parameter acquisition module, used to acquire a second coordinate parameter according to the recommended work and rest set and the actual work and rest set corresponding to the display date; The data drawing execution module is used to draw a sleep data display chart according to the recommended work and rest set, the actual work and rest set, the first coordinate parameter and the second coordinate parameter.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the sleep data presentation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the sleep data display method according to any one of claims 1 to 7 when executed.