A control method and electronic device
By dynamically adjusting the device's disabled time period or the application's available time by acquiring the user's sleep parameters, the problem of the single method for controlling the usage time of smart devices is solved, realizing more scientific and flexible usage time management and improving the user's sleep quality and user experience.
Patent Information
- Application Number
- CN202210400210.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-27
- Filing Date
- 2022-04-15
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In existing technologies, the methods for controlling the usage time of smart devices are simplistic, lack flexibility and practicality, and cannot be dynamically adjusted according to the user's sleep health status, leading to overuse and affecting physical and mental health.
By acquiring users' sleep parameters, such as sleep quality, duration, and sleep onset time, the system dynamically adjusts the device's disabled time period or the application's available time, scientifically and flexibly controlling device usage time based on the user's sleep health status.
It improves the flexibility and practicality of smart device usage time, promotes healthy use by users, and enhances sleep quality and user experience.
Smart Images

Figure CN116567140B_ABST
Abstract
Description
[0001] Cross Reference to Related Applications
[0002] The present application claims priority from the Chinese patent application No. 202210099522.6 filed on January 27, 2022, and entitled "A method for dynamically adjusting a user's health phone usage plan", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to the technical field of electronic devices, and in particular to a control method and an electronic device. BACKGROUND
[0004] With the development of smart devices, the services provided by smart devices are becoming more and more extensive, so that users spend more and more time on smart devices. Correspondingly, the situation of unhealthy use of smart devices by users is also increasing. For example, the current users use the phone for a long time, which will squeeze the user's rest time, may cause the user to lack of sleep, and is easy to cause fatigue problems, etc. At the same time, some content (such as video, game content, etc.) provided by the phone may cause the user to be excited in physiology and psychology, increase the user's stress, and affect the user's rest, etc. In short, excessive use of the phone may affect the user's physical and mental health.
[0005] Currently, in order to enable the user to better control his own use behavior, so as to use the smart device more healthily, the smart device can control the time of the user using the smart device (or the application in the smart device) according to the time set by the user. Among them, when it is monitored that the time of the user using the smart device reaches the time set by the user, the terminal device can prohibit the user to continue using the smart device. In this method, the time of the user using the smart device is only related to the user's own setting, the control mode is single, the flexibility is poor, and it is also not conducive to reasonably adjusting the time of the user using the smart device, and the practicality is also poor. SUMMARY
[0006] The present application provides a control method and an electronic device to improve the flexibility and practicality of controlling the use time of the electronic device.
[0007] In a first aspect, an embodiment of the present application provides a control method applied to a first electronic device, the method comprising: obtaining a first sleep parameter of a first user; wherein the first user is associated with the first electronic device; determining a first time interval or a first time length according to the first sleep parameter; wherein the first time interval is a time interval during which the first electronic device is prohibited from being used, and the first time length is a time length during which a first application installed in the first electronic device is allowed to be used; and displaying first indication information, the first indication information being used to indicate that the time interval during which the first electronic device is prohibited from being used is updated to the first time interval, or the time length during which the first application is allowed to be used is updated to the first time length.
[0008] In the method, the first electronic device can determine a device disabling time period during which the first user is prohibited from using the first electronic device, or determine an application available time length during which the first user is allowed to use the first application in the first electronic device, according to the sleep parameter of the first user, so as to control the time during which the first user uses the electronic device according to the first time interval or the first time length, thereby avoiding overuse of the electronic device by the user. Meanwhile, in the scheme, the device disabling time interval or the application available time length is determined based on the sleep parameter of the user, so as to fully consider the sleep health status of the first user, and more scientifically and flexibly determine the limited time during which the user uses the electronic device according to the sleep health status of the first user. Therefore, the scheme can improve the flexibility and practicality of controlling the use time of the electronic device.
[0009] In a possible design, the first sleep parameter comprises at least one of the following: a sleep quality parameter, a sleep time length, a sleep-in time, and a sleep-out time.
[0010] In the method, the sleep quality parameter, the sleep time length, the sleep-in time, and the sleep-out time can all reflect the sleep health status of the user, so that the first electronic device can determine the first time interval or the first time length according to these information, so as to establish the association between the device disabling time period or the application available time length and the sleep health of the user, and then control the use time of the device based on the sleep health status of the user.
[0011] In a possible design, before determining the first time interval or the first time length according to the first sleep parameter, the method further comprises: determining that the sleep quality parameter is less than or equal to a set quality parameter threshold.
[0012] In the method, the set quality parameter threshold value can be used as a criterion for judging the sleep quality of the user. When the sleep quality parameter is less than or equal to the set quality parameter threshold value, it indicates that the sleep quality of the user is poor, and it is necessary to promote the user to adjust the sleep behavior by limiting the use time of the electronic device to improve the sleep quality. Therefore, the first electronic device can start a process of determining the device disable time period or the application available time length, so as to control the user's behavior of using the electronic device according to the determined device disable time period or the application available time length.
[0013] In a possible design, according to the first sleep parameter, the first time interval or the first time length is determined, including: when the sleep time length is less than or equal to a first set time length, the first time interval is determined according to the sleep-in time and the sleep-out time; or when the sleep time length is greater than the first set time length, a second time length corresponding to the first application is acquired, and the first time length is determined according to the second time length; wherein the second time length is a current time length during which the first application is allowed to be used.
[0014] In the method, the first set time length can be used as a criterion for judging whether the sleep time length of the user is sufficient. When the sleep time length is less than or equal to the first set time length, it indicates that the sleep time length of the user is not sufficient, and then the first electronic device can promote the user to sleep early by adjusting the device disable time period, so as to improve the sleep time length of the user and further improve the sleep quality of the user. Therefore, the first electronic device can determine the first time interval based on the sleep-in time and the sleep-out time of the user, so as to control the user's behavior of using the electronic device according to the first time interval, and promote the user to adjust the sleep-in time and the sleep-out time. When the sleep time length is greater than the first set time length, it indicates that the sleep time length of the user is sufficient, but the sleep quality of the user is poor, so it is also necessary to control the use time of the device. In the case where the sleep time length of the user is sufficient, the sleep quality is not high, which may be due to the fact that the user has a large pressure or is in an excited mood before sleeping, and then the use time of an application that may cause physiological and psychological excitement of the user can be reduced, so as to promote the user to calm down and sleep, and further improve the sleep quality. Therefore, the first electronic device can adopt a scheme of adjusting the available time length of the application in the first electronic device.
[0015] In a possible design, the first time interval is determined according to the sleep-in time and the sleep-out time, including: a time earlier than the sleep-out time and spaced from the sleep-out time by a second set time length is taken as a target sleep-in time; the first time interval is determined according to the target sleep-in time and the sleep-in time; wherein the start time of the first time interval is later than the target sleep-in time and earlier than the sleep-in time.
[0016] In the method, the second set time length is an ideal sleep time length, and keeping the sleep time length close to the ideal sleep time length helps to improve the sleep quality of the user. Therefore, the first electronic device can obtain the ideal sleep-in time based on the actual sleep-in time of the user and the ideal sleep time length. Further, the first electronic device sets the start time of the device disabling time period as a time between the ideal sleep-in time and the actual sleep-in time of the user, which can encourage the user to sleep earlier to increase the sleep time length of the user and thus improve the sleep quality of the user. Meanwhile, multiple executions of the method can realize dynamic adjustment of the device disabling time period, gradually guide the user to sleep earlier, and thus guide the user to cultivate a healthy and achievable sleep habit.
[0017] In a possible design, the first time interval is determined according to the target sleep-in time and the sleep-in time, including: determining a first target time earlier than the sleep-in time and spaced from the sleep-in time by a third set time length; wherein the third set time length is less than or equal to a time length between the target sleep-in time and the sleep-in time; determining a second target time later than the first target time and spaced from the first target time by a fourth set time length; and taking the first target time as the start time of the first time interval and taking the second target time as the end time of the first time interval.
[0018] In the method, after determining the ideal sleep-in time, the first electronic device targets the ideal sleep-in time, appropriately advances the actual sleep-in time of the user, and takes the advanced time as the start time of the device disabling time period, which can encourage the user to sleep earlier, and thus controls the device use time as much as possible within an acceptable range of the user and improves the user experience.
[0019] In a possible design, the first time length is determined according to the second time length, including: reducing the second time length to obtain the first time length.
[0020] In the method, the first electronic device can reduce the use time of the application by the user before sleep by reducing the application available time, which helps the user to sleep early to maintain good sleep quality.
[0021] In a possible design, the first application is any one of at least one candidate application, and the at least one candidate application satisfies the following conditions: the at least one candidate application is at least one application with the longest foreground running time in the first electronic device within a target time interval; and / or, the at least one candidate application is at least one application with a foreground running time greater than or equal to a fifth set time length in the first electronic device within the target time interval; wherein the target time interval is a time interval of a set time length before the sleep-in time.
[0022] In the method, the first electronic device can adjust the application available time for the application used by the user for a long time, so that the time length of the user using the application can be reduced when the control is performed, the user can be prevented from being excessively addicted to some applications, and the user can be guided to use the application healthily.
[0023] In a possible design, before obtaining the first sleep parameter of the first user, the method further includes: determining a start time of the first time period.
[0024] In the method, the first electronic device can periodically perform the method of determining the device disable time period or the application available time length, so that the device disable time period or the application available time length can be dynamically adjusted according to the dynamically changed sleep parameter of the user, and therefore, a more reasonable and flexible device use time limitation scheme can be dynamically provided for the user, and the user experience is improved.
[0025] In a possible design, the first time period includes at least one second time period; and the method further includes: in each second time period, when the start time of the first time period is reached, displaying second indication information, the second indication information being used to indicate that the first electronic device is prohibited from being used; or in each second time period, when the time length during which the first application runs in the foreground is equal to the first time length, displaying third indication information, the third indication information being used to indicate that the first application is prohibited from being used.
[0026] In the method, in each control period, the first electronic device can prompt the user when the time length of the user using the device or the application exceeds the corresponding limitation, so as to guide the user to adjust the device use behavior.
[0027] In a possible design, before obtaining the first sleep parameter of the first user, the method further includes: obtaining a plurality of second sleep parameters; each second sleep parameter is used to represent feature information of a sleep process of the first user; and the obtaining of the first sleep parameter of the first user includes: taking an average value of the plurality of second sleep parameters as the first sleep parameter, or taking a median value of the plurality of second sleep parameters as the first sleep parameter.
[0028] In the method, based on the average value parameter and the median value parameter, the first electronic device can determine the device disable time period or the application available time length according to the average sleep parameter of the historical time period content, and the accuracy of the determined result can be improved.
[0029] In a possible design, the plurality of second sleep parameters are acquired in the following manner: the plurality of second sleep parameters are acquired from a second electronic device; the second electronic device is an electronic device worn by the first user; or the plurality of second sleep parameters are acquired by performing a plurality of sleep parameter acquisition processes; each sleep parameter acquisition process includes: when it is detected that the first user is in a sleep state, acquiring a first signal, and determining a second sleep parameter according to the first signal.
[0030] In the method, the first electronic device can detect the sleep parameter of the user by itself, or directly acquire the sleep parameter of the user detected by another electronic device, and thus the flexibility is relatively high.
[0031] In a possible design, the plurality of second sleep parameters are sleep parameters acquired in a time period before the first time period.
[0032] In the method, the sleep parameter on which the first electronic device is based when determining the device disabling time period or the application available duration is a sleep parameter actually measured in a historical time period, and thus the first electronic device can adjust the device disabling time period or the application available duration in a future time period based on the sleep of the user in the historical time period, so as to dynamically adjust the control scheme according to the change of the actual sleep of the user, and improve the control flexibility and practicability.
[0033] In a second aspect, the present application provides an electronic device, which includes a display screen, a memory and one or more processors; the memory is configured to store computer program codes, and the computer program codes include computer instructions; when the computer instructions are executed by the one or more processors, the electronic device performs the method described in the first aspect or any possible design of the first aspect.
[0034] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program; when the computer program is run on a computer, the computer executes the method described in the first aspect or any possible design of the first aspect.
[0035] In a fourth aspect, the present application provides a computer program product, which includes a computer program or instructions; when the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible design of the first aspect.
[0036] The beneficial effects of the second aspect to the fourth aspect are described in the description of the beneficial effects of the first aspect, and thus are not repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1A hardware architecture schematic diagram of an electronic device provided for an embodiment of the present application;
[0038] Figure 2 A software architecture schematic diagram of an electronic device provided for an embodiment of the present application;
[0039] Figure 3 A schematic diagram of a control system provided for an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a control method provided for an embodiment of the present application;
[0041] Figure 5 A flowchart of a control method provided for an embodiment of the present application;
[0042] Figure 6a A schematic diagram of a prompt interface provided for an embodiment of the present application;
[0043] Figure 6b A schematic diagram of a control interface provided for an embodiment of the present application;
[0044] Figure 6c A schematic diagram of an application interface provided for an embodiment of the present application;
[0045] Figure 6d A schematic diagram of a control interface provided for an embodiment of the present application;
[0046] Figure 7 A schematic diagram of a prompt interface provided for an embodiment of the present application;
[0047] Figure 8 A schematic diagram of a prompt interface provided for an embodiment of the present application;
[0048] Figure 9 A schematic diagram of a prompt interface provided for an embodiment of the present application;
[0049] Figure 10 A schematic diagram of a control method provided for an embodiment of the present application;
[0050] Figure 11 A schematic diagram of a structure of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0052] In the description of the embodiments of the present application, the terms "first", "second", etc. are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features.
[0053] For the convenience of understanding, the description of the related concepts of the present application is exemplarily given for reference.
[0054] The electronic device can be a device with processing function. In some embodiments of the present application, the electronic device can also have wireless connection function, display function, etc.
[0055] In some embodiments of the present application, the electronic device can be a portable device, such as a mobile phone, a tablet computer, a wearable device (for example, a watch, a bracelet, a helmet, a headset, etc.) with wireless communication function, a vehicle terminal device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a smart home device (for example, a smart television, a smart speaker, etc.), a smart robot, a plant device, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, or a wireless terminal in smart home, a flight device (for example, a smart robot, a hot air balloon, a drone, an airplane), etc.
[0056] Among them, the wearable device is a portable device that can be directly worn on the user's body or integrated into the user's clothes or accessories.
[0057] In some embodiments of the present application, the electronic device can also be a portable terminal device containing other functions such as personal digital assistant and / or music player functions. Exemplary embodiments of the portable terminal device include, but are not limited to, mobile phones equipped with or other operating systems. The portable terminal device described above can also be other portable terminal devices, such as a laptop having a touch-sensitive surface (e.g., a touch panel), and the like. It should also be understood that in some other embodiments of the present application, the electronic device described above can not be a portable terminal device, but can be a desktop computer having a touch-sensitive surface (e.g., a touch panel).
[0058] It should be understood that "at least one" in the embodiments of the present application means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after it are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can mean a, b, c, a and b, a and c, b and c, or a, b and c, where a, b and c can be single or multiple.
[0059] In view of the poor flexibility and practicability of the current method for controlling the available time of an electronic device, the embodiments of the present application provide a control method and an electronic device. The scheme can dynamically adjust and control the time for a user to use the electronic device in combination with user sleep information, can improve the flexibility and practicability of control, and further improve the user experience.
[0060] The following refers to Figure 1 The structure of the electronic device to which the method provided by the embodiments of the present application is applicable is introduced.
[0061] As shown in Figure 1 The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc.
[0062] The sensor module 180 can include a gyroscope sensor, an acceleration sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, a temperature sensor, a pressure sensor, a distance sensor, a magnetic sensor, an ambient light sensor, an air pressure sensor, a bone conduction sensor, etc.
[0063] It can be understood that, Figure 1 The electronic device 100 shown is merely an example and does not constitute a limitation on electronic devices, and an electronic device can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. Figure 1 The various components shown in FIG. 1 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0064] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated into one or more processors. The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0065] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instructions or data again, it can directly call them from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0066] The execution of the control method provided in the embodiments of the present application can be controlled by the processor 110 or other components, such as calling the processing program of the embodiments of the present application stored in the internal memory 121, or calling the processing program of the embodiments of the present application stored in a third-party device through the external memory interface 120, to control the wireless communication module 160 to communicate data with other devices, thereby improving the intelligence and convenience of the electronic device 100 and improving the user experience. The processor 110 can include different devices, such as integrated CPU and GPU, and the CPU and GPU can cooperate to execute the control method provided in the embodiments of the present application, such as part of the algorithm in the control method is executed by the CPU and another part of the algorithm is executed by the GPU, to obtain faster processing efficiency.
[0067] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1. The display screen 194 can be configured to display information input by a user or provided to the user, as well as various graphical user interfaces (GUIs). For example, the display screen 194 can display photos, videos, webpages, or files, and the like.
[0068] In the embodiments of the present application, the display screen 194 can be a flexible display screen as a whole, or can be a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
[0069] The camera 193 (front-facing camera or rear-facing camera, or one camera that can be used as both a front-facing camera and a rear-facing camera) is used to capture still images or videos. Generally, the camera 193 can include a light-sensing element such as a lens group and an image sensor, where the lens group includes a plurality of lenses (convex lenses or concave lenses) for collecting light signals reflected by an object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates a raw image of the object to be photographed according to the light signals.
[0070] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, codes of application programs (such as control functions, etc.), and the like. The data storage area can store data created during use of the electronic device 100, and the like.
[0071] The internal memory 121 can also store one or more computer programs corresponding to the control algorithm provided by the embodiments of the present application. The one or more computer programs are stored in the above-mentioned internal memory 121 and are configured to be executed by the one or more processors 110, and the one or more computer programs include instructions that can be used to perform various steps in the following embodiments.
[0072] In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0073] Of course, the code of the control algorithm provided by the embodiments of the present application can also be stored in an external memory. In this case, the processor 110 can run the code of the algorithm for detecting the user's posture stored in the external memory through the external memory interface 120.
[0074] The sensor module 180 can include a gyroscope sensor, an acceleration sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, and the like.
[0075] The touch sensor, also referred to as a "touch panel". The touch sensor can be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch display screen, also referred to as a "touch screen". The touch sensor is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operation to the application processor to determine a touch event type. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0076] For example, the display screen 194 of the electronic device 100 displays a home interface, and the home interface includes icons of a plurality of applications (such as a camera application, a sports health application, and the like). For example, a user can click the icon of the camera application in the home interface through the touch sensor, trigger the processor 110 to start the camera application, and open the camera 193. The display screen 194 displays the interface of the camera application, for example, a viewfinder interface.
[0077] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.
[0078] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antennas can be used in combination with a tuning switch.
[0079] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves to be radiated through the antenna 1. In some embodiments, at least part of the function modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the function modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device. In the embodiments of the present application, the mobile communication module 150 can also be configured to interact with other devices.
[0080] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.
[0081] The wireless communication module 160 can provide a wireless communication solution applied to the electronic device 100, including wireless local area networks (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification, and convert the signal into electromagnetic wave radiation via the antenna 2. In the embodiments of the present application, the wireless communication module 160 is configured to establish a connection with other electronic devices and perform data interaction. Alternatively, the wireless communication module 160 can be configured to access an access point device, transmit a control instruction to other electronic devices, or receive data transmitted from other electronic devices.
[0082] In addition, the electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor, etc. For example, music play, recording, etc. The electronic device 100 can receive a key 190 input, and generate a key signal input related to a user setting and a function control of the electronic device 100. The electronic device 100 can generate a vibration cue (such as a call vibration cue) using a motor 191. An indicator 192 in the electronic device 100 can be an indicator light, and can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc. A SIM card interface 195 in the electronic device 100 is used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 100.
[0083] It should be understood that, in actual applications, the electronic device 100 can include more or fewer components than those shown in the figure, and the embodiments of the present application are not limited thereto. The electronic device 100 shown in the figure is only an example, and the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits. Figure 1 It should be understood that, in actual applications, the electronic device 100 can include more or fewer components than those shown in the figure, and the embodiments of the present application are not limited thereto. The electronic device 100 shown in the figure is only an example, and the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0084] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device.
[0085] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. As shown in the figure, the software architecture can be divided into four layers, from top to bottom, an application layer, an application framework layer (FWK), an Android runtime and system library, and a Linux kernel layer. Figure 2
[0086] The application layer is the top layer of the operating system, and includes native applications of the operating system, such as a camera, a gallery, a calendar, Bluetooth, music, video, information, and the like. An application referred to in embodiments of the present application is referred to as an application (APP), and is a software program capable of implementing one or more specific functions. Generally, a plurality of applications can be installed in an electronic device. For example, a camera application, a mailbox application, a sports health application, a health use mobile phone application, and the like. Applications mentioned hereinafter can be system applications installed in an electronic device when the electronic device is shipped, or can be third-party applications downloaded from a network or acquired from another electronic device during use of the electronic device by a user.
[0087] Of course, for a developer, the developer can write an application and install the application to this layer. In a possible implementation manner, the application can be developed using a Java language, and is completed by calling an application programming interface (API) provided by the application framework layer. The developer can interact with a bottom layer (for example, a kernel layer, and the like) of the operating system through the application framework to develop an application of his own.
[0088] The application framework layer is an API and a programming framework of the application layer. The application framework layer can include some pre-defined functions. The application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0089] The window manager is used to manage a window program. The window manager can acquire a display screen size, determine whether there is a status bar, lock a screen, and the like.
[0090] The content provider is used to store and acquire data, and enable the data to be accessed by an application. The data can include files (for example, a document, a video, an image, audio), text, and the like.
[0091] The view system includes visual controls, for example, controls for displaying text, pictures, document content, and the like. The view system can be used to build an application. An interface in a display window can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying a picture.
[0092] The phone manager is used to provide a communication function of the electronic device. The notification manager enables an application to display notification information in a status bar, and can be used to convey a message of a notification type, which can automatically disappear after a short stay without user interaction.
[0093] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0094] The core library of the Android system includes two parts: one part is the function function that the Java language needs to call, and the other part is the core library of the Android system. The application layer and the application framework layer run in the virtual machine. Taking Java as an example, the virtual machine executes the Java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0095] The system library can include a plurality of function modules. For example: a surface manager, a media library, a three-dimensional graphics processing library (such as OpenGL ES), a two-dimensional graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem, and provides a two-dimensional and three-dimensional layer fusion for a plurality of applications. The media library supports a plurality of commonly used audio, video format playback and recording, and static image files, etc. The media library can support a plurality of audio and video coding formats, such as MPEG4, H.564, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc. The two-dimensional graphics engine is a two-dimensional drawing drawing engine.
[0096] The kernel layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack, and driver model, which are all implemented based on the kernel layer. The kernel layer also serves as an abstraction layer between the hardware and the software stack. This layer has many device-related drivers, including: display drivers; keyboard drivers as input devices; Flash drivers based on memory technology devices; camera drivers; audio drivers; Bluetooth drivers; WiFi drivers, etc.
[0097] It should be understood that the functional services as described above are only examples, and in actual applications, the electronic device can also be divided into more or fewer functional services according to other factors, or the functions of each service can be divided in other ways, or there can be no functional services, but the whole works.
[0098] The scheme provided by the present application will be described in detail below in combination with specific embodiments.
[0099] Figure 3 An architecture schematic diagram of a control system provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the system can include a sleep data acquisition module, a control function module, and a control scheme output module. Figure 3
[0100] The sleep data acquisition module is configured to acquire sleep index parameters, the control function module is configured to analyze the sleep index parameters acquired by the sleep data acquisition module, and determine a control strategy for adjusting the use time of the electronic device. The control scheme output module is configured to control the use time of the electronic device according to the control strategy determined by the control function module.
[0101] In some embodiments of the present application, the system described above can be deployed in the application layer of the electronic device as shown in Figure 2 Specifically, the sleep data acquisition module can be deployed in an application installed on the electronic device, for example, in a sports health application, a sleep monitoring application, or the like, which can provide sleep-related data of the user. The sleep-related data provided by these applications can be obtained from a wearable device with a sleep monitoring function, or can be obtained by monitoring the sleep state of the electronic device or the applications themselves. The control function module and the control scheme output module can be deployed in the same application as the sleep data acquisition module, or can be deployed in different applications.
[0102] For example, the sleep data acquisition module, the control function module, and the control scheme output module can all be deployed in the sports health application, and the electronic device can complete the control method provided in the embodiments of the present application through the sports health application. For another example, the sleep data acquisition module can be deployed in the sports health application, and the control function module and the control scheme output module can be deployed in the health use phone application. The health use phone application can acquire the sleep index parameters from the sports health application, and then determine and execute the control scheme. Based on this, the electronic device can complete the control method provided in the embodiments of the present application through the cooperation of the sports health application and the health use phone application.
[0103] Referring to Figure 4 The control method provided in the embodiments of the present application includes:
[0104] S401: An electronic device acquires sleep index parameters of a user, wherein the sleep index parameters are used to indicate sleep characteristics of the user in a historical time period, and the user is associated with the electronic device.
[0105] In the embodiments of the present application, the user can be a user of the electronic device, i.e., a user using the electronic device, or the user can be a user corresponding to a user account logged in the electronic device.
[0106] In some embodiments of the present application, the electronic device can periodically perform the control method provided in the embodiments of the present application. Then, when the set adjustment period arrives, the electronic device can start to perform step S401 and the subsequent steps, so as to adjust and control the scheme for controlling the user's use time of the electronic device in the arrived adjustment period. Based on this manner, the electronic device can periodically adjust and control the user's use time of the electronic device when each adjustment period arrives, so as to dynamically provide the user with a more reasonable and flexible use time limit scheme of the electronic device, and improve the user experience. For example, the adjustment period can be one day or multiple days.
[0107] As an optional implementation, the electronic device can directly obtain the sleep index parameter of the user from the wearable device worn by the user. The wearable device can collect basic sleep data of the user by monitoring the sleep of the user, and determine the sleep index parameter of the user according to the collected basic sleep data.
[0108] As another optional implementation, the electronic device can obtain the basic sleep data for determining the sleep index parameter of the user from the wearable device worn by the user, and then determine the sleep index parameter of the user according to the obtained basic sleep data. The wearable device can collect basic sleep data of the user by monitoring the sleep of the user. After obtaining the basic sleep data collected by the wearable device, the electronic device can determine the sleep index parameter of the user according to the basic sleep data.
[0109] In the above method, the wearable device can periodically report the basic sleep data or the sleep index parameter to the electronic device; or the wearable device can report the basic sleep data or the sleep index parameter to the electronic device after receiving the indication of the electronic device. The electronic device can send indication information to the wearable device to instruct the wearable device to report the basic sleep data or the sleep index parameter after receiving the user instruction for triggering the update of the sleep index parameter.
[0110] As still another optional implementation, the electronic device can collect basic sleep data of the user by monitoring the sleep of the user, and then determine the sleep index parameter of the user according to the collected basic sleep data.
[0111] In some embodiments of the present application, when determining the sleep index parameter according to the basic sleep data of the user, the wearable device or the electronic device can analyze and calculate the basic sleep data to obtain the corresponding sleep index parameter, or can send the basic sleep data to a related server, analyze the basic sleep data by the server to obtain the corresponding sleep index parameter, and then obtain the sleep index parameter from the server.
[0112] In some embodiments of the present application, the electronic device can complete the functions of interacting with the wearable device, performing sleep monitoring, determining sleep index data, etc. in the above method through an application capable of obtaining or providing user sleep data, such as a motion health application, a sleep monitoring application, etc.
[0113] In the embodiments of the present application, as an optional implementation, the user sleep index parameter can include at least one of the following: average sleep quality, average sleep duration, average sleep time, and average wake-up time. The average sleep quality is an average value of sleep quality parameters corresponding to multiple sleep processes of the user, and the sleep quality parameter corresponding to each sleep process is used to indicate the level of sleep quality of the user. The average sleep duration is an average value of sleep duration parameters corresponding to multiple sleep processes of the user, and the sleep duration parameter corresponding to each sleep process is used to indicate the duration of the sleep process. The average sleep time is an average value of sleep times corresponding to multiple sleep processes of the user, and the sleep time corresponding to each sleep process is the time when the electronic device or the wearable device monitors the user entering the sleep state, i.e., the time when the user falls asleep. The average wake-up time is an average value of wake-up times corresponding to multiple sleep processes of the user, and the wake-up time corresponding to each sleep process is the time when the electronic device or the wearable device monitors the user leaving the sleep state, i.e., the time when the user wakes up.
[0114] As another optional implementation, the user sleep index parameter can include at least one of the following: sleep quality median value, sleep duration median value, sleep time median value, and wake-up time median value. The sleep duration median value is a median value of sleep duration parameters corresponding to multiple sleep processes of the user, the sleep duration median value is a median value of sleep duration parameters corresponding to multiple sleep processes of the user, the sleep time median value is a median value of sleep times corresponding to multiple sleep processes of the user, and the wake-up time median value is a median value of wake-up times corresponding to multiple sleep processes of the user.
[0115] In some embodiments of the present application, a sleep process is a night sleep process of the user monitored by the electronic device or the wearable device in a control period, and the control period is one day. Therefore, the electronic device or the wearable device can monitor the sleep process of the user every day, and correspondingly, the sleep time corresponding to the sleep process monitored every day is the time when the user falls asleep at night the previous day, the wake-up time is the time when the user wakes up on the current day, and the sleep duration is the duration between the time when the user falls asleep at night the previous day and the time when the user wakes up on the current day.
[0116] As an optional implementation, the electronic device can take the average value of the sleep quality parameters corresponding to the multiple sleep processes of the user in the historical time period as the average sleep quality parameter, and can control the use time of the electronic device in the current and future time period according to the determined average sleep quality parameter. The other sleep index parameters are the same, and will not be repeated here.
[0117] As an optional implementation, the electronic device can take the median value of the sleep quality parameters corresponding to the multiple sleep processes of the user in the historical time period as the sleep quality median value, and can control the use time of the electronic device in the current and future time period according to the determined sleep quality median value. The other sleep index parameters are the same, and will not be repeated here.
[0118] Among them, the electronic device or wearable device can collect the corresponding basic sleep data of the user in each sleep process when monitoring the sleep behavior of the user, and record the corresponding sleep time, sleep time and sleep duration. The electronic device or wearable device can determine the corresponding sleep quality score by analyzing and scoring the basic sleep data, and take the sleep quality score as the sleep quality parameter corresponding to the sleep process of the user.
[0119] For example, in the case of periodic control of the use time of the electronic device, the historical time period can be the time period corresponding to the last adjustment period, and when the current adjustment period is reached, the electronic device can take the average value of the sleep quality parameter corresponding to at least one sleep process determined in the last adjustment period as the average sleep quality parameter referred to in the current adjustment period. In the current adjustment period, the electronic device or wearable device continues to monitor the sleep behavior of the user and determines the sleep quality parameter corresponding to each sleep process of the user, so as to determine the average sleep quality parameter referred to in the next adjustment period.
[0120] Optionally, the above step S401 can be performed by the sleep data acquisition module shown in Figure 3 .
[0121] S402: The electronic device determines whether to adjust the control strategy according to the obtained sleep index parameter, wherein the control strategy is used to control the available time of the electronic device or the application in the electronic device.
[0122] In some embodiments of the present application, initially, the electronic device can control the use time of the electronic device according to the control strategy set by the user. In the subsequent process, after obtaining the sleep index parameter of the user, the electronic device can adjust the control strategy according to the sleep index parameter of the user. The control strategy is used to control the available time and the disabled time of the electronic device. The available time can be the available time of the entire electronic device (i.e., the time when the user is allowed to use the electronic device) or the available time of the application in the electronic device (i.e., the time when the user is allowed to use the application in the electronic device). The disabled time is the time other than the available time (i.e., the time when the user is prohibited to use the electronic device or the application in the electronic device).
[0123] The following describes the control method provided by the embodiments of the present application by taking the sleep index parameter including the average sleep quality parameter, the average sleep duration, the average sleep time, and the average sleep-out time as an example. The control method corresponding to the sleep index parameter including the sleep quality median value, the sleep duration median value, the sleep-in time median value, and the sleep-out time median value is the same as the method below, and will not be described again.
[0124] In the embodiments of the present application, the electronic device can determine whether to adjust the control strategy according to the average sleep quality parameter in the sleep index parameter. Specifically, after obtaining the average sleep quality parameter, the electronic device determines whether the average sleep quality parameter is less than or equal to the set quality parameter threshold value. If yes, it is determined to adjust the control strategy, and the following step S403 can be continued to be executed. Otherwise, it is determined not to adjust the control strategy, and the corresponding control can be continued according to the currently used control strategy. The set quality parameter threshold value can be the ideal sleep quality parameter value set by the user.
[0125] S403: When the electronic device determines to adjust the control strategy, it is determined whether to adjust to adopt the device-level time control strategy according to the sleep index parameter. If yes, step S404 is executed. Otherwise, step S406 is executed.
[0126] The device-level time control strategy is used to control the available time period and the disabled time period of the entire electronic device. For the electronic device with a screen, the available time period and the disabled time period of the entire electronic device are also the available time period and the disabled time period of the screen of the electronic device.
[0127] In the embodiments of the present application, the electronic device can determine whether to adjust to adopt the device-level time control strategy according to the average sleep duration and the average sleep-in time in the sleep index parameters. Specifically, after obtaining the average sleep duration, the electronic device determines whether the average sleep duration is less than or equal to the set ideal sleep duration. If the average sleep duration is less than or equal to the set ideal sleep duration, the electronic device determines whether the average sleep-in time is earlier than the set ideal sleep-in time. If yes, the electronic device determines to adjust to adopt the device-level time control strategy and performs the following step S404. Otherwise, the electronic device determines not to adjust to adopt the device-level time control strategy and performs the following step S406. If the average sleep duration is greater than the set ideal sleep duration, the electronic device determines not to adjust to adopt the device-level time control strategy and performs the following step S406.
[0128] S404: The electronic device determines the device-available time period and the device-disabled time period according to the sleep index parameters, and performs step S405.
[0129] In the embodiments of the present application, the electronic device can determine the device-available time period and the device-disabled time period according to the average sleep-out time and the average sleep-in time in the sleep index parameters. Specifically, the electronic device first determines a time earlier than the average sleep-out time and spaced from the average sleep-out time by a set ideal sleep duration as a target sleep-in time, then determines a target duration spaced between the target sleep-in time and the average sleep-in time, and then determines a product of the target duration and a set coefficient as an adjustment duration. Finally, the electronic device determines a time earlier than the average sleep-in time and spaced from the average sleep-in time by the adjustment duration as the start time of the device-disabled time period, and determines a time later than the start time of the device-disabled time period and spaced from the start time of the device-disabled time period by a set duration as the end time of the device-disabled time period. The set coefficient is greater than 0 and less than or equal to 1. The set time can be a time later than the start time of the device-disabled time period and spaced from the start time of the device-disabled time period by a set duration, or can be the average sleep-out time, or can be another time set by the user. The set duration can be the set ideal sleep duration, or an ideal sleep duration set by the user to enable the user to maintain good sleep quality, and the value range thereof can be, for example, 6-8 hours.
[0130] The device-disabled time period determined by the above method is a time period during which the user is prohibited from using the electronic device in each control cycle, and the control cycle is one day. After determining the device-disabled time period, the electronic device can determine the device-available time period in each control cycle as a time period in the control cycle other than the device-disabled time period. For example, if the electronic device determines that the device-disabled time period is from 1 a.m. to 7 a.m. every day, the electronic device can determine that the device-available time period is from 0 a.m. to 1 a.m. and from 7 a.m. to 24 p.m. every day.
[0131] In the method, the time length is set as an ideal sleep time length, the electronic device can determine a target sleep time according to an actual sleep time of the user and the ideal sleep time length, and the starting time of the disabled time period is obtained by adjusting the actual sleep time of the user according to the determined target sleep time, so that the user is prohibited from using the electronic device within a period of time before the actual sleep time of the user, thereby guiding the user to go to sleep in advance, and making the actual sleep time of the user gradually close to the ideal sleep time. Therefore, the method can dynamically adjust the time for limiting the use of the electronic device according to the actual sleep condition of the user, improve the control flexibility, and gradually guide the user to cultivate a healthy and achievable sleep habit, and reduce the health problems caused by unreasonable use of the electronic device by the user.
[0132] In some embodiments of the present application, after determining the disabled time period and the available time period, the electronic device can indicate the information of the disabled time period and / or the available time period to the user, so that the user knows the time when the electronic device can be used and the time when the electronic device is prohibited from being used.
[0133] Optionally, the steps S402-S404 can be completed by the control function module shown in Figure 3 .
[0134] S405: The electronic device controls the time for the user to use the electronic device according to the available time period of the device and the disabled time period of the device.
[0135] After determining the available time period of the device and the disabled time period of the device, the electronic device can execute a device-level control strategy based thereon. Specifically, in each control period, when it is determined that the current time is within the available time period, the electronic device does not limit the use process of the electronic device by the user; when it is determined that the current time is within the disabled time period, the electronic device can prohibit the user from continuing to use the electronic device, thereby forcing the user to use the electronic device reasonably and reducing the harm caused by excessive use of the electronic device by the user.
[0136] In some embodiments of the present application, in each control period, when the starting time of the disabled time period is reached, the electronic device can display prompt information to prompt the user that the device disabled time period has been reached and the user is prohibited from continuing to use the electronic device.
[0137] Optionally, the step S405 can be completed by the control scheme output module shown in Figure 3 .
[0138] S406: The electronic device determines to adopt an application use time control strategy, and executes step S407.
[0139] The application use time control strategy is used to control the available time length of an application in the electronic device.
[0140] S407: The electronic device determines the target application and an application available duration corresponding to the target application.
[0141] The application available duration corresponding to the target application is a duration in each control period during which the user is allowed to use the target application.
[0142] In an embodiment of the present application, after determining to use the application time control strategy, the electronic device can obtain the use duration of each application installed in the electronic device in a target historical time period (i.e., the duration during which the user uses the application in the target historical time period), and then select at least one application with the maximum use duration and / or a use duration greater than or equal to a set value as the target application. The target historical time period is a time period of a set size before the average sleep time of the user, for example, a time period corresponding to 3 hours before the average sleep time of the user.
[0143] As an optional implementation, after determining the target application, the electronic device can shorten the application available duration corresponding to the last determined target application by a set value to obtain the application available duration corresponding to the target application determined this time, and update the application available duration determined last time with the application available duration determined this time. As another optional implementation, the electronic device can take the duration obtained by shortening the average use duration of the target application in the historical time period by a set value as the application available duration corresponding to the target application. The average use duration is the average value of at least one use duration corresponding to the target application, and each use duration is the use duration of the target application in one control period in the historical time period. The set value can be the product of the use duration of the target application in the target historical time period and a set coefficient, and the set coefficient is greater than 0 and less than or equal to 1.
[0144] The application available durations corresponding to different applications can be the same or different.
[0145] Optionally, the target application can be an application of a set type, such as a video application, a social application, and the like, which is easy to cause physiological and psychological excitement of the user.
[0146] In the method, in a case where the average sleep quality parameter is less than or equal to a set quality parameter threshold and the average sleep duration is greater than a set ideal sleep duration, it is indicated that the sleep duration of the user is sufficient but the sleep quality is not high, and therefore the user can have a relatively large stress or a relatively excited mood before sleep. Therefore, by appropriately shortening the available duration of an application (for example, a social application or a video application) that can cause physiological and psychological excitement of the user, on one hand, the time for limiting the use of the application in the electronic device by the user can be dynamically adjusted according to the actual sleep condition of the user, the control flexibility is improved, and on the other hand, the use of the application that can cause mental excitement of the user can be reduced before sleep of the user, which is helpful for the user to calm down and sleep, thereby guiding the user to cultivate a healthy sleep habit and reduce health problems caused by unreasonable use of the electronic device by the user.
[0147] In some embodiments of the present application, after the electronic device determines the application available duration corresponding to the target application, the electronic device can indicate the information of the application available duration to the user, so that the user knows the duration in which the target application can be used.
[0148] Optionally, the steps S406-S407 can be completed by the control function module shown in Figure 3 .
[0149] S408: The electronic device controls the time for the user to use the target application in the electronic device according to the application available duration corresponding to the target application.
[0150] After the electronic device determines the application available duration corresponding to the target application, the electronic device can execute an application-level control strategy based on this. Specifically, in each control period, when it is determined that the duration for the user to use the target application is less than the application available duration corresponding to the target application, the electronic device does not limit the use process of the target application by the user; and when it is determined that the duration for the user to use the target application is greater than or equal to the application available duration corresponding to the target application, the electronic device can prohibit the user to continue using the target application, thereby forcing the user to reasonably use the application in the electronic device and reducing the harm caused by excessive use of the application in the electronic device by the user.
[0151] In some embodiments of the present application, in each control period, when the duration for the user to use the target application reaches the application available duration corresponding to the target application, the electronic device can display prompt information to prompt the user that the time for using the target application has reached the upper limit and prohibit the user to continue using the target application.
[0152] Optionally, the step S408 can be completed by the control scheme output module shown in Figure 3 .
[0153] In the above embodiments, the sleep data of the user is deeply fused with the use time of the electronic device, so that the electronic device provides a dynamic use time limit scheme according to the actual sleep health condition of the user, increases the interconnection between different dimension data, and can more scientifically and flexibly control the use time of the electronic device. At the same time, the use time of the electronic device can be controlled to guide the user to establish good sleep habits, and the use experience of the user can be greatly improved.
[0154] With reference to Figure 5 The control method provided by the embodiments of the present application can include the following possible process:
[0155] S501: The electronic device determines that the set adjustment period is reached, and acquires the average sleep quality parameter of the user in the last adjustment period.
[0156] For example, when the electronic device detects that there is a wearable device in the surrounding, the electronic device can establish a communication connection with the wearable device, acquire the identification information of the wearable device, determine whether the identification information is associated with the user account logged in the sports health application, and if so, determine that the user wearing the wearable device matches the electronic device. Then, the electronic device can acquire the sleep quality parameter of the user monitored by the wearable device through the sports health application and save it. The sports health application can be a matching application of the wearable device, and the electronic device can pre-save the association relationship between the identification information of the wearable device and the user account logged in the sports health application.
[0157] When the set adjustment period is reached, the electronic device can acquire at least one sleep quality parameter saved in the last adjustment period from the sports health application, and average the at least one sleep quality parameter to obtain the average sleep quality parameter. For example, the adjustment period can be one day or more.
[0158] The acquisition method of other sleep index parameters (average sleep duration, average sleep time, and average sleep-out time) can refer to the acquisition method of the average sleep quality parameter, which will not be described again below.
[0159] S502: The electronic device determines whether the average sleep quality parameter is less than or equal to the set quality parameter threshold, and if so, executes step S503, otherwise, executes step S516.
[0160] For example, the set quality parameter threshold is 80 points, when the average sleep quality parameter is 72 points, it can be determined that the control strategy needs to be adjusted, and then the electronic device can execute the following step S503. When the average sleep quality parameter is 85 points, it can be determined that the control strategy does not need to be adjusted, and then the electronic device can execute the following step S516.
[0161] S503: The electronic device acquires an average sleep duration parameter of the user in the last adjustment period.
[0162] S504: The electronic device determines whether the average sleep duration parameter is less than or equal to a set ideal sleep duration. If yes, step S505 is performed; otherwise, step S513 is performed.
[0163] For example, the set ideal sleep duration can be 6 hours. When the average sleep duration parameter is 5.5 hours (less than the ideal sleep duration of 6 hours), the electronic device can determine that the device-level time control strategy needs to be adopted in the current adjustment period to control the user's use of the electronic device, and then the electronic device can perform the following steps S505-S512. When the average sleep duration parameter is 7.5 hours (greater than the ideal sleep duration of 6 hours), the electronic device can determine that the application-level time control strategy needs to be adopted in the current adjustment period to control the user's use of some applications of the electronic device, and then the electronic device can perform the following steps S513-S515.
[0164] S505: The electronic device acquires an average sleep duration parameter of the user in the last adjustment period.
[0165] S506: The electronic device determines whether the average sleep duration parameter is less than or equal to a set ideal sleep duration. If yes, step S505 is performed; otherwise, step S516 is performed.
[0166] For example, the set ideal sleep duration can be 6 hours. When the average sleep duration parameter is 5.5 hours (less than the ideal sleep duration of 6 hours), the electronic device can determine that the device-level time control strategy needs to be adopted in the current adjustment period to control the user's use of the electronic device, and then the electronic device can perform the following steps S505-S512. When the average sleep duration parameter is 7.5 hours (greater than the ideal sleep duration of 6 hours), the electronic device can determine that the application-level time control strategy needs to be adopted in the current adjustment period to control the user's use of some applications of the electronic device, and then the electronic device can perform the following steps S513-S515.
[0167] S507: The electronic device acquires an average sleep duration parameter of the user in the last adjustment period.
[0168] S508: The electronic device acquires an average sleep duration parameter of the user in the last adjustment period.
[0169] S509: The electronic device determines the duration between the target sleep time and the average sleep time, multiplies the duration by a set coefficient to obtain an adjustment duration.
[0170] S510: The electronic device acquires an average sleep duration parameter of the user in the last adjustment period.
[0171] S511: The electronic device sets a time period in a control period other than the device disable time period as a device available time period.
[0172] For example, when the average sleep-in time is 2 a.m. and the average sleep-out time is 7 a.m., the ideal sleep duration is 6 hours, which is set as the reference point, and the target sleep-in time is 1 a.m. The interval between the target sleep-in time and the average sleep-in time is 1 hour, and the adjustment duration is 15 minutes when the coefficient is 25%. Correspondingly, the average sleep-in time is adjusted by the adjustment duration, and the corresponding time is 1:45 a.m. The electronic device can set 1:45 a.m. as the start time of the disable time period, and set the time corresponding to the start time delayed by the ideal sleep duration (7:45 a.m.) as the end time of the disable time period. The disable time period is 1:45 a.m. to 7:45 a.m. every day, and the available time period is 0 a.m. to 1:45 a.m. and 7:45 a.m. to 24 a.m. every day.
[0173] After determining the device disable time period and the device available time period, the electronic device can display information about the device disable time period and / or the device available time period through a notification message or a control interface, so as to notify the user. For example, taking the electronic device as a mobile phone, the electronic device can display a prompt interface as shown in FIG. 13A, which includes information for indicating the disable time period, so as to prompt the user about the newly determined device disable time, and facilitate the user to control the use of the electronic device according to the newly determined application disable time period. Figure 6a
[0174] For example, taking the electronic device as a mobile phone, the scheme provided in the embodiments of the present application can be completed by the motion health application and the health use of mobile phone application in the electronic device, where the motion health application is used to provide the sleep index parameter, and the health use of mobile phone application is used to determine the control strategy according to the sleep index parameter and perform corresponding control. In this way, the electronic device can display information about the device available time period and the device disable time period in the control interface of the health use of mobile phone application, for example, the interface as shown in FIG. 13B, based on which the user can check the time when the use of the electronic device is restricted at any time in the health use of mobile phone application. Figure 6b
[0175] The scheme provided in the embodiments of the present application can also be completed by only the motion health application in the electronic device, and the electronic device can add a control (health use of mobile phone) corresponding to a function module for controlling the use time of the electronic device in the application interface of the motion health application, for example, the interface as shown in FIG. 13C. After the user operates the control, the electronic device can further display the interface as shown in FIG. 13B. Figure 6c Figure 6d The control interface shown includes a control ( "available time" ) for triggering the display of information about the available time period of the device, and the user can trigger the electronic device to display an interface containing information about the available time period and / or the disabled time period of the device by operating the control, for example Figure 6b The interface shown in the middle contains information about the available time period and the disabled time period of the device, based on which the user can view the time when the use of the electronic device is restricted at any time through the sports health application.
[0176] S512: When the electronic device determines that the current time is within the available time period of the device, the user is allowed to use the electronic device, and when the current time is within the disabled time period of the device, the user is prohibited from using the electronic device.
[0177] Optionally, after the start time, before reaching the end time of the disabled time period of the device, if the electronic device receives an operation of the user on the electronic device, a prompt information can be displayed to prompt the user that the current time is within the time period when the use of the electronic device is prohibited, and the user is not allowed to use the electronic device. The end time of the disabled time period of the device is the set time.
[0178] Optionally, during the time period other than the disabled time period of the device, if the electronic device receives an operation of the user on the electronic device, the electronic device can respond to the operation for corresponding processing.
[0179] For example, based on the above-mentioned determined disabled time period, the electronic device can prohibit the user from using the electronic device between 1:45 am and 7:45 am every day. Taking the electronic device as a mobile phone as an example, when the user uses the electronic device during the time period, the electronic device can display the prompt information as shown in Figure 7 to prompt the user that the use of the electronic device is prohibited during the time period.
[0180] S513: The electronic device determines at least one application with the longest average use time during the set time period before the user falls asleep in the last adjustment period.
[0181] S514: For each of the at least one application, the electronic device obtains the application available time corresponding to the application in the last adjustment period, and subtracts the set time from the application available time to obtain the application available time corresponding to the application in the current adjustment period.
[0182] For example, the electronic device can determine, according to the statistical use time of different applications, three applications with the longest average use time within three hours before the average sleep time of the user, and if the use time of the three applications is 1.5 hours, 1 hour and 0.5 hours respectively, the electronic device can shorten the application available time of the three applications by 45 minutes, 30 minutes and 15 minutes respectively in the current adjustment period. If the application available time of the three applications in the last adjustment period is 100 minutes, 80 minutes and 40 minutes respectively, the application available time of the three applications in the current adjustment period is adjusted to 55 minutes, 50 minutes and 25 minutes respectively.
[0183] After determining the application available time of the application, the electronic device can also add the information of the application available time to the related control interface for display, so that the user can view it. For example, taking the electronic device as a mobile phone, the electronic device can display the prompt interface shown in Figure 8 , which includes information indicating the application available time, prompting the user of the newly determined application available time, so that the user can control the use of the application according to the newly determined application available time.
[0184] For example, as shown in Figure 6a , the electronic device can also add the information of the newly determined application available time of the application to the control interface of the healthy use of the application, based on which the user can view the limited time for using the application in the electronic device at any time in the healthy use of the mobile phone application or the sports health application.
[0185] S515: In any control period in the current adjustment period, for any application in the at least one application, the electronic device prohibits the user from continuing to use the application when the use time of the user reaches the application available time corresponding to the application.
[0186] For example, taking the electronic device as a mobile phone, when the use time of the user reaches the application available time corresponding to the application (such as Huawei video application) in the electronic device, the electronic device can display the prompt information as shown in Figure 9 to prompt the user to prohibit the use of the application.
[0187] S516: The electronic device controls according to the control strategy adopted in the last adjustment period in the current adjustment period.
[0188] It should be noted that the specific implementation process provided in the above examples is only an example of the method process applicable to the embodiments of the present application, and the execution order of each step can be adjusted accordingly according to actual needs, and other steps can be added or some steps can be reduced.
[0189] Based on the above embodiments and the same concept, the embodiments of the present application further provide a control method, as shown in Figure 10 The method comprises:
[0190] S1001: A first electronic device acquires a first sleep parameter of a first user; wherein the first user is associated with the first electronic device.
[0191] The first electronic device can be the electronic device described in the above embodiments, and the first user can be a user using the first electronic device.
[0192] In some embodiments of the present application, the first sleep parameter comprises at least one of the following: a sleep quality parameter, a sleep duration, a sleep-in time, and a sleep-out time. Optionally, the sleep quality parameter, the sleep duration, the sleep-in time, and the sleep-out time can be the average sleep quality parameter, the average sleep duration, the average sleep-in time, and the average sleep-out time respectively, or can be the sleep quality median value, the sleep duration median value, the sleep-in time median value, and the sleep-out time median value respectively.
[0193] In some embodiments of the present application, the first electronic device can execute the method of steps S1001-S1003 when it is determined that the start time of the first time period is reached, so as to update and adjust the disabled time period of the first device or the available time length of the first application in the first device. The first time period can be the adjustment period described in the above embodiments.
[0194] In some embodiments of the present application, the first electronic device can determine whether to update the first time interval or the first time length according to the sleep quality parameter. Specifically, when the first electronic device determines that the sleep quality parameter is less than or equal to a set quality parameter threshold, the first electronic device determines to update the first time interval, and then triggers the method of determining the first time interval in steps S1001-S1003 to be executed. When the first electronic device determines that the sleep quality parameter is greater than the set quality parameter threshold, the first electronic device determines to update the first time length, and then triggers the method of determining the first time length in steps S1001-S1003 to be executed.
[0195] S1002: The first electronic device determines a first time interval or a first time length according to the first sleep parameter; wherein the first time interval is a time interval during which the first electronic device is prohibited to be used, and the first time length is a time length during which a first application installed in the first electronic device is allowed to be used.
[0196] In some embodiments of the present application, the first electronic device can execute the method of steps S1001-S1003 when it is determined that the start time of the first time period is reached, so as to update and adjust the disabled time period of the first device or the available time length of the first application in the first device. The first time period can be the adjustment period described in the above embodiments.In some embodiments of the present application, the first electronic device can obtain a plurality of second sleep parameters corresponding to a plurality of sleep processes of the first user, and then calculate the corresponding first sleep parameter according to the plurality of second sleep parameters. Each second sleep parameter is used to represent the characteristic information of a sleep process of the first user. The first electronic device can obtain the plurality of second sleep parameters collected by the second electronic device, or the first electronic device can detect the sleep state of the first user through the first user, collect a first signal when the first user is in a sleep state, and determine a second sleep parameter according to the first signal. A plurality of second sleep parameters can be obtained by performing a plurality of detection processes. The plurality of second sleep parameters are sleep parameters collected in a previous time period of the first time period, that is, sleep parameters collected in the previous adjustment period in the above embodiments.
[0197] For example, the plurality of second sleep parameters can be a plurality of sleep parameters detected in a plurality of sleep processes of the user in a historical time period in the above embodiments. The second electronic device can be a wearable device in the above embodiments.
[0198] For example, the first time interval can be the device disabled time period in the above embodiments, and the first time length can be the application available time length in the above embodiments.
[0199] In some embodiments of the present application, the first electronic device can determine a target sleep time earlier than the sleep-out time and spaced from the sleep-out time by a second set time length; and then determine the first time interval according to the target sleep time and the sleep-in time, wherein the start time of the first time interval is later than the target sleep time and earlier than the sleep-in time. The first electronic device can determine a first target time earlier than the sleep-in time and spaced from the sleep-in time by a third set time length, wherein the third set time length is less than or equal to the time length between the target sleep time and the sleep-in time; determine a second target time later than the first target time and spaced from the first target time by a fourth set time length; and finally, determine the first target time as the start time of the first time interval and the second target time as the end time of the first time interval. For details of the implementation steps of this method, please refer to the method of determining the device disabled time period by the electronic device in the above embodiments, which will not be described here.
[0200] In some embodiments of the present application, when the sleep time length is greater than the first set time length, the first electronic device can obtain a second time length corresponding to the first application, and reduce the second time length to obtain the first time length. The second time length is the current time length allowed to use the first application, that is, the time length allowed to use the first application determined in the previous time period.
[0201] Optionally, the first application can be any one of at least one candidate application, the at least one candidate application satisfying the following conditions: the at least one candidate application is at least one application with the longest foreground running time in the first electronic device within a target time interval; and / or, the at least one candidate application is at least one application with a foreground running time greater than or equal to a fifth set time length in the first electronic device within the target time interval; wherein the target time interval is a set time interval before the sleep time.
[0202] The specific implementation steps of the above method can refer to the method of determining the application available time length of the electronic device in the above embodiments, which will not be described in detail here.
[0203] S1003: The first electronic device displays first indication information, the first indication information being used to indicate that the time interval during which the first electronic device is prohibited from being used is updated to the first time interval, or the time length during which the first application is allowed to be used is updated to the first time length.
[0204] In one possible method, when the first electronic device determines the first time interval, the first electronic device can display first indication information, and at this time, the first indication information is used to indicate that the time interval during which the first electronic device is prohibited from being used is updated to the first time interval.
[0205] For example, the first indication information can be information in the interface shown in the above embodiments, and specifically can be "The adjusted device disable time is 1:45-7:45" shown in the interface in the above embodiment. Figure 6a Figure 6a For example, the first indication information can be information in the interface shown in the above embodiments, and specifically can be "The adjusted device disable time is 1:45-7:45" shown in the interface in the above embodiment.
[0206] In another possible method, when the first electronic device determines the first time length, the first electronic device can display first indication information, and at this time, the first indication information is used to indicate that the time length during which the first application is allowed to be used is updated to the first time length.
[0207] For example, the first indication information can be information in the interface shown in the above embodiments, and specifically can be "The adjusted device disable time is 1:45-7:45" shown in the interface in the above embodiment. Figure 8 Figure 8 For example, the first indication information can be information in the interface shown in the above embodiments, and specifically can be "The adjusted device disable time is 1:45-7:45" shown in the interface in the above embodiment.
[0208] In some embodiments of the present application, the first time period includes at least one second time period. After determining the first time interval, the first electronic device can control the available time period and the disabled time period of the first electronic device according to the determined first time interval in each second time period. In each second time period, when the first electronic device determines that the start time of the first time interval is reached, the second indication information is displayed, and the second indication information is used to indicate that the first electronic device is prohibited from being used.
[0209] For example, the second indication information can be information shown in the interface in Figure 7 The second time period can be the control period described in the above embodiments.
[0210] In some embodiments of the present application, after determining the first time interval, the first electronic device can control the available time period of the first application in the first electronic device according to the determined first time interval in each second time period. In each second time period, when the first electronic device determines that the time period during which the first application runs in the foreground is equal to the first time interval, the third indication information is displayed, and the third indication information is used to indicate that the first application is prohibited from being used.
[0211] For example, the third indication information can be information shown in the interface in Figure 9
[0212] For example, the first time period can be multiple days, and the second time period can be one day.
[0213] In the above method, the specific steps performed by the first electronic device can refer to the related descriptions in the foregoing embodiments, and will not be described in detail here.
[0214] Based on the above embodiments and the same concept, the embodiments of the present application also provide an electronic device for implementing the control method provided by the embodiments of the present application. As shown in Figure 11 The electronic device 1100 can include a display screen 1101, a memory 1102, one or more processors 1103, and one or more computer programs (not shown in the figure). The above devices can be coupled through one or more communication buses 1104.
[0215] The display screen 1101 is used to display application interfaces and other related user interfaces.
[0216] The memory 1102 stores one or more computer programs (codes), and the one or more computer programs include computer instructions. The one or more processors 1103 invoke the computer instructions stored in the memory 1102, so that the electronic device 1100 executes the control method provided by the embodiments of the present application.
[0217] In particular implementations, the memory 1102 can include high-speed random access memory and can also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 1102 can store an operating system (hereinafter referred to as the system) such as an ANDROID, IOS, WINDOWS, or LINUX embedded operating system. The memory 1102 can be used to store the implementation program of the embodiments of the present application. The memory 1102 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more user devices, and one or more network devices.
[0218] The one or more processors 1103 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the present application.
[0219] It should be noted that, Figure 11 The electronic device 1100 provided by the embodiments of the present application is only one implementation, and in actual applications, the electronic device 1100 can also include more or fewer components, which is not limited here.
[0220] Based on the above embodiments and the same concept, the embodiments of the present application also provide a computer readable storage medium, which stores a computer program, when the computer program runs on a computer, the computer executes the method provided by the above embodiments.
[0221] Based on the above embodiments and the same concept, the embodiments of the present application also provide a computer program product, which includes a computer program or instructions, when the computer program or instructions run on a computer, the computer executes the method provided by the above embodiments.
[0222] The method provided by the embodiments of the present application can be implemented by software, hardware, firmware or any combination thereof, in whole or in part. When implemented by software, the method can be implemented in the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the process or function according to the embodiments of the present application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (such as infrared, wireless, microwave, etc.)) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD), or a semiconductor medium (such as an SSD), etc.
[0223] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.
Claims
1. A control method applied to a first electronic device, characterized in that, The method includes: Obtain the first sleep parameters of the first user; wherein the first user is associated with the first electronic device, and the first sleep parameters include the time of falling asleep and the time of waking up from sleep; Based on the first sleep parameter, a first time interval is determined; wherein, the first time interval is the time interval during which the use of the first electronic device is prohibited; Display first instruction information, which is used to indicate that the time interval during which the use of the first electronic device is prohibited be updated to the first time interval. The step of determining the first time interval based on the first sleep parameter includes: The time earlier than the stated sleep time and the second set duration of the sleep time interval is taken as the target sleep time. A first target time is determined that is earlier than the sleep onset time and is a third set duration between the sleep onset time and the sleep onset time; wherein the third set duration is less than or equal to the duration between the target sleep onset time and the sleep onset time; Determine a second target time that is later than the first target time and has a time interval of a fourth predetermined duration from the first target time; The first target time is used as the start time of the first time interval, and the second target time is used as the end time of the first time interval.
2. The method as described in claim 1, characterized in that, The first sleep parameter also includes sleep quality parameters and / or sleep duration.
3. The method as described in claim 2, characterized in that, Before determining the first time interval based on the first sleep parameter, the method further includes: The sleep quality parameter is determined to be less than or equal to the set quality parameter threshold.
4. The method as described in claim 2 or 3, characterized in that, Determining the first time interval based on the first sleep parameter includes: When the sleep duration is less than or equal to the first set duration, the first time interval is determined based on the first sleep parameter.
5. The method according to any one of claims 1 to 3, characterized in that, Before obtaining the first sleep parameters of the first user, the method further includes: Determine the start time of the first time period.
6. The method as described in claim 5, characterized in that, The first time period includes at least one second time period; the method further includes: Within each second time period, when the start time of the first time interval is determined, a second indication message is displayed, which indicates that the use of the first electronic device is prohibited.
7. The method as described in claim 5, characterized in that, Before obtaining the first sleep parameters of the first user, the method further includes: Multiple second sleep parameters are obtained; wherein each second sleep parameter is used to characterize the feature information of one sleep process of the first user; The step of obtaining the first user's first sleep parameters includes: The average value of the plurality of second sleep parameters is used as the first sleep parameter; or The median value of the plurality of second sleep parameters is used as the first sleep parameter.
8. The method as described in claim 7, characterized in that, Obtain multiple second sleep parameters, including: The plurality of second sleep parameters are obtained from a second electronic device; wherein the second electronic device is an electronic device worn by the first user; or Perform multiple sleep parameter acquisition processes to obtain at least one second sleep parameter; wherein each sleep parameter acquisition process includes: when the first user is detected to be in a sleep state, acquiring a first signal, and determining a second sleep parameter based on the first signal.
9. The method as described in claim 7, characterized in that, The plurality of second sleep parameters are sleep parameters collected in the time period preceding the first time period.
10. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and one or more processors; The memory is used to store computer program code, which includes computer instructions; when the computer instructions are executed by the one or more processors, the electronic device performs the method as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Apparatus and method for automatically closing applications
CN105528228A
Terminal control method and apparatus
CN106657654A