WO2023217137A1 - Sleep data calibration method and electronic device - Google Patents

Sleep data calibration method and electronic device Download PDF

Info

Publication number
WO2023217137A1
WO2023217137A1 PCT/CN2023/092981 CN2023092981W WO2023217137A1 WO 2023217137 A1 WO2023217137 A1 WO 2023217137A1 CN 2023092981 W CN2023092981 W CN 2023092981W WO 2023217137 A1 WO2023217137 A1 WO 2023217137A1
Authority
WO
WIPO (PCT)
Prior art keywords
sleep
time period
time
data
electronic device
Prior art date
Application number
PCT/CN2023/092981
Other languages
French (fr)
Chinese (zh)
Inventor
陈晓斌
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023217137A1 publication Critical patent/WO2023217137A1/en

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • G16H10/65ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records stored on portable record carriers, e.g. on smartcards, RFID tags or CD
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • This application belongs to the field of electronic technology, and specifically relates to a sleep data calibration method and electronic equipment.
  • the purpose of the embodiments of the present application is to provide a sleep data calibration method and electronic device, which can solve the problem of low accuracy of sleep data obtained through sleep monitoring methods in related technologies.
  • embodiments of the present application provide a sleep data calibration method, which method includes: obtaining historical usage data of an electronic device; when the electronic device and the wearable device are in a communication connection state, receiving the wearable device The first sleep data is sent; the first sleep data is calibrated according to the historical usage data to obtain the second sleep data; wherein the first sleep data is the user's first historical data obtained by the wearable device.
  • the sleep data of the time period, the history The historical usage data includes the usage data of the electronic device by the user in the first historical time period obtained by the electronic device, and the electronic device and the wearable device have not used the electronic device in the first historical time period.
  • the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
  • a sleep data calibration device including: an acquisition module, a receiving module and a processing module; the acquisition module is used to acquire historical usage data of electronic equipment; the receiving module is used to When the electronic device and the wearable device are in a communication connection state, receive the first sleep data sent by the wearable device; the processing module is configured to calibrate the first sleep data according to the historical usage data. Process to obtain second sleep data; wherein the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the user's sleep data obtained by the electronic device in the first historical time period.
  • the usage data of the electronic device during the first historical time period, the electronic device and the wearable device are not in a communication connection state during the first historical time period, and the second sleep data includes The total sleep duration is less than or equal to the total sleep duration included in the first sleep data.
  • inventions of the present application provide an electronic device.
  • the electronic device includes a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the programs or instructions are processed by the processor.
  • the processor is executed, the steps of the method described in the first aspect are implemented.
  • embodiments of the present application provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the steps of the method described in the first aspect are implemented. .
  • inventions of the present application provide a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the first aspect. the method described.
  • embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
  • embodiments of the present application provide an electronic device configured to use To implement the steps of the method of the first aspect.
  • the historical usage data of the electronic device can be obtained; when the electronic device and the wearable device are in a communication connection state, the first sleep data sent by the wearable device is received; and the first sleep data is processed based on the historical usage data.
  • the usage data of the electronic device during the first historical time period, the electronic device and the wearable device are not in a communication connection state during the first historical time period, and the sleep included in the second sleep data is The total duration is less than or equal to the total sleep duration included in the first sleep data.
  • the first sleep data is the data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state
  • the historical usage data includes data obtained by the electronic device when the electronic device and the wearable device are in a non-communication connection state.
  • the second sleep data can be The total sleep duration included is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, the second sleep The accuracy of the data is higher than the accuracy of the first sleep data.
  • Figure 1 is one of the flow diagrams of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 2 is the second schematic flow chart of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 3 is the third schematic flow chart of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 4(a) is one of the schematic diagrams of the calibration method of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 4(b) is a second schematic diagram of the calibration method of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 5 is a third schematic diagram of the calibration method of the sleep data calibration method provided by the embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a sleep data calibration device provided by an embodiment of the present application.
  • Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 8 is a hardware schematic diagram of an electronic device provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first,” “second,” etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • the sleep data calibration method provided by the embodiment of the present application may be an electronic device or a functional module or functional entity in the electronic device that can implement the sleep data calibration method.
  • the electronic device mentioned in the embodiment of the present application Including but not limited to mobile phones, tablets, computers, cameras, wearable devices, etc., the sleep data calibration method provided by the embodiment of the present application is described below by taking electronic devices as the execution subject as an example.
  • this embodiment of the present application provides a sleep data calibration method, which may include steps 101 to 103:
  • Step 101 The electronic device obtains historical usage data of the electronic device.
  • the above historical usage data includes the user's first historical usage data obtained by the electronic device. Usage data of the electronic device during the historical time period, and the electronic device and the wearable device were not in a communication connection state during the first historical time period.
  • the non-communication connection state between the electronic device and the wearable device means that two-way information communication between the electronic device and the wearable device cannot be achieved, that is, a disconnected state.
  • the above-mentioned first historical time period can be the longest historical time period that the wearable device can record; it can also be a preset sleep recording period, for example, it can be 12 hours or 24 hours; it can also be input by the user. Determined time period.
  • the electronic device obtains historical usage data of the electronic device, which may specifically include: obtaining operating information of the electronic device in the first historical time period, where the operating information includes at least one of the following: screen on time, receiving user input time and the running status of the foreground application; determine the historical usage data based on the running information.
  • the above historical usage data may at least include information on the time the user uses the electronic device.
  • the electronic device can combine the first time period (t 1 , t 2 ), the second time period (t 3 , t 4 ) and the third time period ( t 5 , t 6 ) is determined as the time period during which the user uses the electronic device, that is, historical usage data.
  • the electronic device since the electronic device can determine the historical usage data based on the operating information of the electronic device in the first historical time period, it can provide a basis for the electronic device to calibrate the first sleep data based on the historical usage data.
  • Step 102 When the electronic device and the wearable device are in a communication connection state, the electronic device receives the first sleep data sent by the wearable device.
  • the above-mentioned first sleep data is the user's sleep data in the first historical time period obtained by the wearable device.
  • the above-mentioned wearable device refers to a portable device that can be directly worn on the user or integrated into the user's clothes or accessories.
  • the wearable device can be a smart watch, Bracelets, electronic socks, glasses, etc.
  • the communication connection state between the electronic device and the wearable device means that two-way information communication can be achieved between the electronic device and the wearable device.
  • the electronic device and the wearable device can be in a Bluetooth connection state, or they can be in the same local area network at the same time. .
  • the wearable device may record the sleep data while the wearable device is in a wearing state. That is to say, when the wearable device detects that it is currently being worn by the user, it can start recording the user's sleep data.
  • the electronic device when the user wants to view his or her sleep data, the electronic device can first be triggered to communicate with the wearable device. After that, while the user is in a communication connection state with the wearable device, the electronic device can receive the third sleep data in a preset manner.
  • the preset method can be a user-triggered method or an automatic acquisition method.
  • the user when the preset mode is the user-triggered mode, the user can make a first input to the electronic device when the electronic device and the wearable device are in a communication connection state, and the electronic device can respond to the first input by sending a message to the wearable device.
  • the wearable device can send the first sleep data to the electronic device in response to the data request information, and accordingly, the electronic device can receive the first sleep data from the wearable device; when the preset mode is the automatic acquisition mode, the electronic device
  • the data request information can be automatically sent to the wearable device after a successful communication connection with the wearable device, or the data request information can be automatically sent to the wearable device after a preset time of successful communication connection with the wearable device, thereby making the wearable device
  • the device sends first sleep data to the electronic device.
  • Step 103 The electronic device performs calibration processing on the first sleep data based on the historical usage data to obtain second sleep data.
  • the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
  • the above-mentioned first sleep data may include the start time and end time of the first sleep time period; the electronic device performs calibration processing on the first sleep data based on the historical usage data, which may specifically include: the electronic device performs calibration processing on the first sleep data based on the historical usage data.
  • the first sleep period is obtained from the historical usage data Determine a first use time period set, the first use time period set includes at least one use time period, and each of the use time periods at least partially overlaps with the first sleep time period; thereafter, The electronic device may perform calibration processing on the start time, the end time of the first sleep time period, and the sleep time between the start time and the end time according to each use time period.
  • the electronic device performs calibration processing on the first sleep data based on historical usage data to obtain the second sleep data, which may include steps 201 to 203:
  • Step 201 The electronic device can determine the user's first sleep time period (s 1 , s 2 ) based on the first sleep data.
  • s 1 is the starting time and s 2 is the ending time.
  • Step 202 The electronic device can determine a first usage time period set [(t 1 , t 2 ), (t 3 , t 4 ), ... (t n-1 , t ) from historical usage data based on the first sleep time period. n )].
  • each usage time period in the first usage time period set at least partially overlaps with the first sleep time period (s 1 , s 2 ) in time. For example, if the first sleep time period is 22:00-7:00, then one usage time period in the first usage time period set may be 21:30-22:30.
  • Step 203 The electronic device can determine the start time s 1 , end time s 2 of the first sleep time period (s 1 , s 2 ) according to each use time period, and the time between the start time and the end time.
  • the sleep time is calibrated.
  • the start time, end time and intermediate sleep time period of the first sleep time period can be corrected according to each use time period in the first use time period set, historical usage data of the electronic device can be combined
  • the sleep time obtained by the wearable device is corrected so that the sleep time period in the second sleep data is closer to the user's real sleep time period.
  • the electronic device performs calibration processing on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time according to each use time period. , specifically, it may include: when the first usage time period satisfies the falling asleep correction rule, updating the start time of the first sleep time period to the time end point of the first usage time period; If the time period satisfies the sleep correction rules, the The end time of the first sleep time period is updated to the time starting point of the first use time period; if the first use time period does not satisfy the falling asleep correction rule and the falling asleep correction rule, the end time is updated from the first use time period.
  • the sleep time period corresponding to the first use time period is deleted from the first sleep time period; wherein the first use time period is any use time period in the first use time period set.
  • the above step 203 may include steps 203a to 203e:
  • Step 203a The electronic device can first determine whether the first use time period ( ti , ti +1 ) meets the sleep correction rule;
  • Step 203b If the falling asleep correction rule is met, the electronic device can update the starting time s 1 to the time end point t i+ 1 of the first use time period (t i , t i+1 );
  • Step 203c If the falling asleep correction rule is not satisfied, the electronic device can continue to determine whether the first use time period ( ti , t i+1 ) satisfies the falling asleep correction rule;
  • Step 203d if the sleep correction rule is satisfied, the electronic device can update the end time s 2 to the time starting point t i of the first use time period (t i , ti +1 ),
  • Step 203e If the sleep correction rule is not satisfied, the electronic device can delete the sleep time period corresponding to the first usage time period (t i , t i+1 ) from the first sleep time period (s 1 , s 2 ), Thus, the second sleep data is obtained.
  • the sleep time period in the above second sleep data can be a continuous sleep time period or a discontinuous sleep time period.
  • the sleep time period in the second sleep data may include (s 1 , ti ) and (t i+1 , s 2 ).
  • the sleep time period in the second sleep data can be made closer The user’s actual sleep period.
  • the above-mentioned fall asleep correction rule may include at least one of the following: the starting time is between the first usage time period, the time starting point between the first usage time period and the starting time. The time difference is less than the first threshold.
  • the first usage time period included in the first usage time period set is (t 1 , t 2 ) for example, if the electronic device determines that t 1 ⁇ s 1 ⁇ t 2 , that is, the starting time s 1 is between the first use time period (t 1 , t 2 ), the electronic device can set the starting time s 1 to Time s 1 is updated to t 2 .
  • the time difference between the time starting point and the start time of the first usage time period included in the fall asleep correction rule is less than the first threshold, with reference to (b) in FIG.
  • the first usage time period included in the first usage time period set is Taking the time period as (t 3 , t 4 ) as an example, if the electronic device determines that the time difference (t 3 -s 1 ) between the starting time t 3 and the starting time s 1 of the first usage time period is less than the first threshold, then The electronic device can update the starting time s 1 to t 4 .
  • the fall asleep correction rule includes: the starting time is between the first usage time periods, and the time difference between the time starting point of the first usage time period and the starting time is less than a first threshold.
  • the electronic device may first determine whether the start time is between the first use time periods, and then determine whether the time difference between the time starting point of the first use time period and the start time is less than the first threshold.
  • the above-mentioned sleep correction rule includes at least one of the following: the end time is located between the first use time periods, and the time difference between the time end of the first use time period and the end time is less than Second threshold.
  • the sleep correction rule includes that the end time is between the first usage time periods
  • the first usage time period included in the first usage time period set is ( t 5 , t 6 ) for example, if the electronic device determines that t 5 ⁇ s 2 ⁇ t 6 , that is, the termination time s 2 is between the first use time period (t 5 , t 6 ), the electronic device can set the termination time s 2 is updated to t 5 .
  • the time difference between the time end point and the end time of the first usage time period included in the sleep correction rule is less than the second threshold, continue to refer to (b) in FIG.
  • the use time period is (t 7 , t 8 ). If the electronic device determines the first use time period, If the time difference (s 2 -t 8 ) between the time end point t 8 and the end time s 2 is less than the second threshold, the electronic device can update the end time s 2 to t 7 .
  • the sleep correction rule includes: the termination time is between the first usage time periods, and the time difference between the time end of the first usage time period and the termination time is less than a second threshold.
  • the electronic device may first determine whether the termination time is between the first usage time periods, and then determine whether the time difference between the time end of the first usage time period and the termination time is less than the second threshold.
  • the electronic device's correction of the first sleep time period according to the first use time period set will be described in detail below through a general example.
  • the first use time period set includes a use time period (t 1 , t 2 ), a use time period (t 3 , t 4 ), use the time period (t 5 , t 6 ) as an example. Since the use time period (t 1 , t 2 ) satisfies the falling asleep correction rule, the electronic device can update the starting time s 1 to t 2 . Since the use time period (t 5 , t 6 ) satisfies the sleep correction rule, the electronic device can update the end time s 2 to t 5 .
  • the electronic device can delete the usage time period ( (s 1 , s 2 ) from the first sleep time period (s 1 , s 2 ).
  • the sleep time periods corresponding to t 3 , t 4 ), the sleep time periods in the finally obtained second sleep data may be (t 2 , t 3 ) and (t 4 , t 5 ).
  • the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state
  • the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded
  • the total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
  • the execution subject can calibrate the sleep data. standard device.
  • the sleep data calibration method performed by the sleep data calibration device is used as an example to illustrate the sleep data calibration device provided by the embodiment of the present application.
  • the embodiment of the present application also provides a sleep data calibration device 600, which includes: an acquisition module 601, a receiving module 602, and a processing module 603; the acquisition module 601 is used to acquire historical usage data of electronic equipment;
  • the receiving module 602 is configured to receive the first sleep data sent by the wearable device when the electronic device and the wearable device are in a communication connection state;
  • the processing module 603 is configured to use the historical usage data according to the Perform calibration processing on the first sleep data to obtain second sleep data; wherein the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the
  • the electronic device obtains the usage data of the electronic device by the user during the first historical time period, and the electronic device and the wearable device are not in a communication connection state during the first historical time period,
  • the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
  • the first sleep data includes the start time and end time of the first sleep time period; the processing module 603 is specifically configured to: determine the first sleep time period from the historical usage data according to the first sleep time period.
  • a set of use time periods, the first set of use time periods includes at least one use time period, and each use time period at least partially overlaps with the first sleep time period; according to each use time period respectively The time period performs calibration processing on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time.
  • the processing module 603 is specifically configured to: update the starting time of the first sleep time period to the first use time period when the first use time period satisfies the falling asleep correction rule. Time end point; when the first use time period satisfies the sleep correction rule, update the end time of the first sleep time period to the time starting point of the first use time period; in the first use time period If the time period does not satisfy the falling asleep correction rule and the sleeping out correction rule, delete the sleep time period corresponding to the first use time period from the first sleep time period; wherein, the first use time period The time period is any one of the first use time period sets. Use time period.
  • the fall asleep correction rule includes at least one of the following: the starting time is between the first usage time period, the time starting point of the first usage time period and the starting time.
  • the time difference is less than the first threshold;
  • the sleep correction rule includes at least one of the following: the end time is between the first use time period, and the time end point of the first use time period is between the end time and the end time.
  • the time difference is less than the second threshold.
  • the acquisition module 601 is also used to acquire the operation information of the electronic device in the first historical time period.
  • the operation information includes at least one of the following: screen turning time, user input receiving time and foreground time.
  • the running status of the application; the processing module 603 is also used to determine the historical usage data according to the running information.
  • the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state
  • the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded
  • the total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
  • the sleep data calibration device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or chip.
  • the electronic device may be a terminal or other devices other than the terminal.
  • the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or augmented reality (AR)/virtual reality (VR).
  • MID mobile Internet device
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computers
  • PDA personal digital assistants
  • NAS Network Attached Storage
  • PC personal computer
  • TV television
  • teller machine or self-service machine etc.
  • the sleep data calibration device in the embodiment of the present application may be a device with an operating system.
  • the operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
  • the sleep data calibration device provided by the embodiment of the present application can implement various processes implemented by the method embodiments of Figures 1 to 5. To avoid repetition, they will not be described again here.
  • this embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702.
  • the memory 702 stores programs or instructions that can be run on the processor 701.
  • each step of the above sleep data calibration method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, the details will not be described here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 8 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 1000 includes but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, processor 1010, etc. part.
  • the electronic device 1000 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 1010 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions.
  • the structure of the electronic device shown in Figure 8 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
  • sensor 1005 is used to obtain historical usage data of electronic equipment.
  • Radio frequency unit 1001 configured to receive the first sleep data sent by the wearable device when the electronic device and the wearable device are in a communication connection state
  • Processor 1010 configured to calibrate the first sleep data according to the historical usage data to obtain second sleep data; wherein the first sleep data is the user's time at the first historical time obtained by the wearable device. period of sleep data, the historical usage data includes usage data of the electronic device by the user in the first historical time period obtained by the electronic device, and the electronic device and the wearable device are in the first historical time period.
  • the communication connection state is not in the first historical time period, and the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
  • the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state
  • the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded
  • the total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
  • the first sleep data includes the start time and end time of the first sleep time period; the processor 1010 is specifically configured to: determine the first usage time from the historical usage data according to the first sleep time period. Segment set, the first use time period set includes at least one use time period, and each use time period at least partially overlaps with the first sleep time period; according to each use time period respectively Calibration processing is performed on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time.
  • the start time, end time and intermediate sleep time period of the first sleep time period can be corrected according to each use time period in the first use time period set, it can be combined with the electronic device's
  • the historical usage data corrects the sleep time obtained by the wearable device, so that the sleep time period in the second sleep data is closer to the user's real sleep time. interval.
  • the processor 1010 is specifically configured to: update the start time of the first sleep time period to the time end point of the first use time period when the first usage time period satisfies the falling asleep correction rule. ; When the first use time period satisfies the sleep correction rule, update the end time of the first sleep time period to the time starting point of the first use time period; in the first use time period If the falling asleep correction rule and the falling asleep correction rule are not satisfied, the sleep time period corresponding to the first use time period is deleted from the first sleep time period; wherein, the first use time period It is any usage time period in the first usage time period set.
  • the sleep time in the second sleep data can be corrected.
  • the period is closer to the user's real sleep time period.
  • the sensor 1005 is also used to obtain the operating information of the electronic device in the first historical time period.
  • the operating information includes at least one of the following: screen turning time, user input receiving time, and running of foreground applications.
  • Status; Processor 1010 is also configured to determine the historical usage data according to the running information.
  • the electronic device can determine the historical usage data based on the operating information of the electronic device in the first historical time period, a basis can be provided for the electronic device to calibrate the first sleep data based on the historical usage data.
  • the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042.
  • the graphics processor 10041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072 .
  • Touch panel 10071 also known as touch screen.
  • the touch panel 10071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 10072 may include but are not It is limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, so I won’t go into details here.
  • Memory 1009 may be used to store software programs as well as various data.
  • the memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 1009 may include volatile memory or nonvolatile memory, or memory 1009 may include both volatile and nonvolatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory Synchronous DRAM, SDRAM
  • Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
  • enhanced SDRAM synchronous dynamic random access memory
  • Synch link DRAM synchronous link dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 1010.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • each process of the sleep data calibration method embodiment is implemented, and can achieve The same technical effects are not repeated here to avoid repetition.
  • the processor is the processor in the electronic device described in the above embodiment.
  • the readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the above sleep data calibration method embodiment. Each process can achieve the same technical effect. To avoid repetition, we will not go into details here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
  • Embodiments of the present application provide a computer program product.
  • the program product is stored in a storage medium.
  • the program product is executed by at least one processor to implement each process of the above sleep data calibration method embodiment, and can achieve the same technology. The effect will not be described here to avoid repetition.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device is configured to implement each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, the details will not be described here.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to related technologies.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of this application.

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Physics & Mathematics (AREA)
  • Pathology (AREA)
  • Veterinary Medicine (AREA)
  • Epidemiology (AREA)
  • Primary Health Care (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The present application relates to the technical field of electronics. Disclosed are a sleep data calibration method and an electronic device. A specific scheme comprises: obtaining historical use data of an electronic device; if the electronic device and a wearable device are in a communication connection state, receiving first sleep data sent by the wearable device; and performing calibration processing on the first sleep data according to the historical use data to obtain second sleep data, wherein the first sleep data is sleep data of a user, in a first historical time period, obtained by the wearable device, the historical use data comprises electronic device use data of the user, in the first historical time period, obtained by the electronic device, the electronic device and the wearable device are not in a communication connection state within the first historical time period, and a total sleep duration comprised in the second sleep data is less than or equal to a total sleep duration comprised in the first sleep data.

Description

睡眠数据校准方法和电子设备Sleep data calibration methods and electronic devices
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年05月09日提交的申请号为202210503553.3,发明名称为“睡眠数据校准方法和电子设备”的中国专利申请的优先权,其通过引用方式全部并入本申请。This application claims priority to the Chinese patent application with application number 202210503553.3 and the invention name "Sleep Data Calibration Method and Electronic Device" submitted on May 9, 2022, which is fully incorporated into this application by reference.
技术领域Technical field
本申请属于电子技术领域,具体涉及一种睡眠数据校准方法和电子设备。This application belongs to the field of electronic technology, and specifically relates to a sleep data calibration method and electronic equipment.
背景技术Background technique
随着电子科技产品的不断升级,穿戴设备的功能越来越贴近人们的生活,例如,人们可以通过佩戴穿戴设备来监测自己的睡眠状况。With the continuous upgrading of electronic technology products, the functions of wearable devices are becoming more and more relevant to people's lives. For example, people can monitor their sleep status by wearing wearable devices.
在相关技术中,人们在睡前大多有使用电子设备的习惯,当用户在使用电子设备时,人的身体处于比较稳定的状态,穿戴设备可能会将用户使用电子设备的时间段也识别为睡眠时间段,因此,通过相关技术中的睡眠监测方法得到的睡眠数据准确率较低。In related technologies, most people have the habit of using electronic devices before going to bed. When the user is using the electronic device, the human body is in a relatively stable state, and the wearable device may also recognize the time period during which the user uses the electronic device as sleep. time period, therefore, the accuracy of sleep data obtained through sleep monitoring methods in related technologies is low.
发明内容Contents of the invention
本申请实施例的目的是提供一种睡眠数据校准方法和电子设备,能够解决通过相关技术中的睡眠监测方法得到的睡眠数据准确率较低的问题。The purpose of the embodiments of the present application is to provide a sleep data calibration method and electronic device, which can solve the problem of low accuracy of sleep data obtained through sleep monitoring methods in related technologies.
第一方面,本申请实施例提供了一种睡眠数据校准方法,该方法包括:获取电子设备的历史使用数据;在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据;根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历 史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。In a first aspect, embodiments of the present application provide a sleep data calibration method, which method includes: obtaining historical usage data of an electronic device; when the electronic device and the wearable device are in a communication connection state, receiving the wearable device The first sleep data is sent; the first sleep data is calibrated according to the historical usage data to obtain the second sleep data; wherein the first sleep data is the user's first historical data obtained by the wearable device. The sleep data of the time period, the history The historical usage data includes the usage data of the electronic device by the user in the first historical time period obtained by the electronic device, and the electronic device and the wearable device have not used the electronic device in the first historical time period. In the communication connection state, the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
第二方面,本申请实施例提供了一种睡眠数据校准装置,包括:获取模块、接收模块和处理模块;所述获取模块,用于获取电子设备的历史使用数据;所述接收模块,用于在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据;所述处理模块,用于根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。In the second aspect, embodiments of the present application provide a sleep data calibration device, including: an acquisition module, a receiving module and a processing module; the acquisition module is used to acquire historical usage data of electronic equipment; the receiving module is used to When the electronic device and the wearable device are in a communication connection state, receive the first sleep data sent by the wearable device; the processing module is configured to calibrate the first sleep data according to the historical usage data. Process to obtain second sleep data; wherein the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the user's sleep data obtained by the electronic device in the first historical time period. The usage data of the electronic device during the first historical time period, the electronic device and the wearable device are not in a communication connection state during the first historical time period, and the second sleep data includes The total sleep duration is less than or equal to the total sleep duration included in the first sleep data.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes a processor and a memory. The memory stores programs or instructions that can be run on the processor. The programs or instructions are processed by the processor. When the processor is executed, the steps of the method described in the first aspect are implemented.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented. .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the first aspect. the method described.
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method as described in the first aspect.
第七方面,本申请实施例提供了一种电子设备,该电子设备被配置成用 于实现如第一方面的方法的步骤。In a seventh aspect, embodiments of the present application provide an electronic device configured to use To implement the steps of the method of the first aspect.
在本申请实施例中,可以获取电子设备的历史使用数据;在电子设备与穿戴设备处于通信连接状态的情况下,接收穿戴设备发送的第一睡眠数据;根据历史使用数据对第一睡眠数据进行校准处理,得到第二睡眠数据;所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。通过该方案,一方面,由于第一睡眠数据为电子设备与穿戴设备处于非通信连接状态时穿戴设备获取的数据、历史使用数据包括电子设备与穿戴设备处于非通信连接状态时电子设备获取的数据,因此,即使处于电子设备与穿戴设备的断连场景,也可以实现两种数据的记录;另一方面,由于可以根据历史使用数据对第一睡眠数据进行校准处理,从而使第二睡眠数据中包括的睡眠总时长小于或等于第一睡眠数据中包括的睡眠总时长,也就是说,可以根据电子设备的历史使用数据从第一睡眠数据中剔除用户使用电子设备的时长,因此,第二睡眠数据的准确率高于第一睡眠数据的准确率。In the embodiment of the present application, the historical usage data of the electronic device can be obtained; when the electronic device and the wearable device are in a communication connection state, the first sleep data sent by the wearable device is received; and the first sleep data is processed based on the historical usage data. Calibration processing to obtain second sleep data; the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the user's sleep data obtained by the electronic device. The usage data of the electronic device during the first historical time period, the electronic device and the wearable device are not in a communication connection state during the first historical time period, and the sleep included in the second sleep data is The total duration is less than or equal to the total sleep duration included in the first sleep data. Through this solution, on the one hand, since the first sleep data is the data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state, the historical usage data includes data obtained by the electronic device when the electronic device and the wearable device are in a non-communication connection state. , therefore, even in a disconnection scenario between the electronic device and the wearable device, the recording of the two types of data can be achieved; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be The total sleep duration included is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, the second sleep The accuracy of the data is higher than the accuracy of the first sleep data.
附图说明Description of the drawings
图1是本申请实施例提供的睡眠数据校准方法的流程示意图之一;Figure 1 is one of the flow diagrams of the sleep data calibration method provided by the embodiment of the present application;
图2是本申请实施例提供的睡眠数据校准方法的流程示意图之二;Figure 2 is the second schematic flow chart of the sleep data calibration method provided by the embodiment of the present application;
图3是本申请实施例提供的睡眠数据校准方法的流程示意图之三;Figure 3 is the third schematic flow chart of the sleep data calibration method provided by the embodiment of the present application;
图4(a)是本申请实施例提供的睡眠数据校准方法的校准方式示意图之一;Figure 4(a) is one of the schematic diagrams of the calibration method of the sleep data calibration method provided by the embodiment of the present application;
图4(b)是本申请实施例提供的睡眠数据校准方法的校准方式示意图之二;Figure 4(b) is a second schematic diagram of the calibration method of the sleep data calibration method provided by the embodiment of the present application;
图5是本申请实施例提供的睡眠数据校准方法的校准方式示意图之三; Figure 5 is a third schematic diagram of the calibration method of the sleep data calibration method provided by the embodiment of the present application;
图6是本申请实施例提供的睡眠数据校准装置的结构示意图;Figure 6 is a schematic structural diagram of a sleep data calibration device provided by an embodiment of the present application;
图7是本申请实施例提供的电子设备的结构示意图;Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图8是本申请实施例提供的电子设备的硬件示意图。Figure 8 is a hardware schematic diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的睡眠数据校准方法进行详细地说明。The sleep data calibration method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
本申请实施例提供的睡眠数据校准方法,该睡眠数据校准方法的执行主体可以为电子设备或者电子设备中能够实现该睡眠数据校准方法的功能模块或功能实体,本申请实施例提及的电子设备包括但不限于手机、平板电脑、电脑、相机、可穿戴设备等,下面以电子设备作为执行主体为例对本申请实施例提供的睡眠数据校准方法进行说明。The sleep data calibration method provided by the embodiment of the present application. The execution subject of the sleep data calibration method may be an electronic device or a functional module or functional entity in the electronic device that can implement the sleep data calibration method. The electronic device mentioned in the embodiment of the present application Including but not limited to mobile phones, tablets, computers, cameras, wearable devices, etc., the sleep data calibration method provided by the embodiment of the present application is described below by taking electronic devices as the execution subject as an example.
如图1所示,本申请实施例提供了一种睡眠数据校准方法,该方法可以包括步骤101-步骤103:As shown in Figure 1, this embodiment of the present application provides a sleep data calibration method, which may include steps 101 to 103:
步骤101、电子设备获取电子设备的历史使用数据。Step 101: The electronic device obtains historical usage data of the electronic device.
其中,上述历史使用数据包括所述电子设备获取的所述用户在第一历 史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态。Wherein, the above historical usage data includes the user's first historical usage data obtained by the electronic device. Usage data of the electronic device during the historical time period, and the electronic device and the wearable device were not in a communication connection state during the first historical time period.
可选地,电子设备与穿戴设备处于非通信连接状态是指电子设备与穿戴设备之间无法实现双向的信息通信,即断联状态。Optionally, the non-communication connection state between the electronic device and the wearable device means that two-way information communication between the electronic device and the wearable device cannot be achieved, that is, a disconnected state.
可选地,上述第一历史时间段可以为穿戴设备可以记录的最长历史时间段;也可以为一个预设的睡眠记录周期,例如,可以为12小时或24小时;还可以为用户通过输入确定的时间段。Optionally, the above-mentioned first historical time period can be the longest historical time period that the wearable device can record; it can also be a preset sleep recording period, for example, it can be 12 hours or 24 hours; it can also be input by the user. Determined time period.
可选地,电子设备获取电子设备的历史使用数据,具体可以包括:获取电子设备在所述第一历史时间段的运行信息,所述运行信息包括以下至少一项:亮屏时间、接收用户输入时间以及前台应用的运行状态;根据所述运行信息确定所述历史使用数据。Optionally, the electronic device obtains historical usage data of the electronic device, which may specifically include: obtaining operating information of the electronic device in the first historical time period, where the operating information includes at least one of the following: screen on time, receiving user input time and the running status of the foreground application; determine the historical usage data based on the running information.
可选地,上述历史使用数据至少可以包括用户使用电子设备的时间信息。Optionally, the above historical usage data may at least include information on the time the user uses the electronic device.
示例性地,若电子设备在第一时间段(t1,t2)处于亮屏状态,在第二时间段(t3,t4)接收到用户的触控输入,电子设备的前台应用在第三时间段(t5,t6)处于持续运行状态,则电子设备可以将第一时间段(t1,t2)、第二时间段(t3,t4)和第三时间段(t5,t6)确定为用户使用电子设备的时间段,即历史使用数据。For example, if the electronic device is in the screen-on state during the first time period (t 1 , t 2 ) and receives the user's touch input during the second time period (t 3 , t 4 ), the foreground application of the electronic device will The third time period (t 5 , t 6 ) is in a continuous running state, then the electronic device can combine the first time period (t 1 , t 2 ), the second time period (t 3 , t 4 ) and the third time period ( t 5 , t 6 ) is determined as the time period during which the user uses the electronic device, that is, historical usage data.
基于上述方案,由于电子设备可以根据电子设备在第一历史时间段的运行信息确定历史使用数据,因此,可以为电子设备根据历史使用数据对第一睡眠数据进行校准处理提供基础。Based on the above solution, since the electronic device can determine the historical usage data based on the operating information of the electronic device in the first historical time period, it can provide a basis for the electronic device to calibrate the first sleep data based on the historical usage data.
步骤102、在所述电子设备与穿戴设备处于通信连接状态的情况下,电子设备接收所述穿戴设备发送的第一睡眠数据。Step 102: When the electronic device and the wearable device are in a communication connection state, the electronic device receives the first sleep data sent by the wearable device.
其中,上述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据。Wherein, the above-mentioned first sleep data is the user's sleep data in the first historical time period obtained by the wearable device.
可选地,上述穿戴设备是指可以直接穿戴在用户身上或者整合到用户的衣服或配件上的一种便携式设备。例如,该穿戴设备可以为智能手表、 手环、电子袜、眼镜等。Optionally, the above-mentioned wearable device refers to a portable device that can be directly worn on the user or integrated into the user's clothes or accessories. For example, the wearable device can be a smart watch, Bracelets, electronic socks, glasses, etc.
可选地,电子设备与穿戴设备处于通信连接状态是指电子设备与穿戴设备之间可以实现双向的信息通信,例如,电子设备与穿戴设备可以处于蓝牙连接状态,也可以同时处于同一个局域网内。Optionally, the communication connection state between the electronic device and the wearable device means that two-way information communication can be achieved between the electronic device and the wearable device. For example, the electronic device and the wearable device can be in a Bluetooth connection state, or they can be in the same local area network at the same time. .
可选地,在接收第一睡眠数据之前,在穿戴设备处于穿戴状态的情况下,穿戴设备可以记录睡眠数据。也就是说,当穿戴设备检测到当前处于被用户佩戴的状态时,就可以开始记录该用户的睡眠数据。Optionally, before receiving the first sleep data, the wearable device may record the sleep data while the wearable device is in a wearing state. That is to say, when the wearable device detects that it is currently being worn by the user, it can start recording the user's sleep data.
可选地,当用户想要查看自己的睡眠数据时,可以先触发电子设备与穿戴设备进行通信连接,之后,在与穿戴设备处于通信连接状态的情况下,电子设备可以按照预设方式接收第一睡眠数据,该预设方式可以为用户触发方式或自动获取方式。Optionally, when the user wants to view his or her sleep data, the electronic device can first be triggered to communicate with the wearable device. After that, while the user is in a communication connection state with the wearable device, the electronic device can receive the third sleep data in a preset manner. For sleep data, the preset method can be a user-triggered method or an automatic acquisition method.
例如,当预设方式为用户触发方式时,用户可以在电子设备与穿戴设备处于通信连接状态的情况下,对电子设备进行第一输入,电子设备可以响应于该第一输入,向穿戴设备发送数据请求信息,穿戴设备可以响应于该数据请求信息,向电子设备发送第一睡眠数据,相应地,电子设备可以从穿戴设备接收第一睡眠数据;当预设方式为自动获取方式时,电子设备可以在成功与穿戴设备进行通信连接后,自动向穿戴设备发送数据请求信息,或者,也可以在成功与穿戴设备进行通信连接的预设时间后,自动向穿戴设备发送数据请求信息,从而使穿戴设备响应于该数据请求信息,向电子设备发送第一睡眠数据。For example, when the preset mode is the user-triggered mode, the user can make a first input to the electronic device when the electronic device and the wearable device are in a communication connection state, and the electronic device can respond to the first input by sending a message to the wearable device. Data request information, the wearable device can send the first sleep data to the electronic device in response to the data request information, and accordingly, the electronic device can receive the first sleep data from the wearable device; when the preset mode is the automatic acquisition mode, the electronic device The data request information can be automatically sent to the wearable device after a successful communication connection with the wearable device, or the data request information can be automatically sent to the wearable device after a preset time of successful communication connection with the wearable device, thereby making the wearable device In response to the data request information, the device sends first sleep data to the electronic device.
步骤103、电子设备根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据。Step 103: The electronic device performs calibration processing on the first sleep data based on the historical usage data to obtain second sleep data.
其中,上述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。Wherein, the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
可选地,上述第一睡眠数据可以包括第一睡眠时间段的起始时间和终止时间;电子设备根据所述历史使用数据对所述第一睡眠数据进行校准处理,具体可以包括:电子设备根据第一睡眠时间段从所述历史使用数据中 确定第一使用时间段集合,所述第一使用时间段集合包括至少一个使用时间段,且每个所述使用时间段均与所述第一睡眠时间段在时间上存在至少部分重合;之后,电子设备可以分别根据每个使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Optionally, the above-mentioned first sleep data may include the start time and end time of the first sleep time period; the electronic device performs calibration processing on the first sleep data based on the historical usage data, which may specifically include: the electronic device performs calibration processing on the first sleep data based on the historical usage data. The first sleep period is obtained from the historical usage data Determine a first use time period set, the first use time period set includes at least one use time period, and each of the use time periods at least partially overlaps with the first sleep time period; thereafter, The electronic device may perform calibration processing on the start time, the end time of the first sleep time period, and the sleep time between the start time and the end time according to each use time period.
具体地,如图2所示,电子设备根据历史使用数据对第一睡眠数据进行校准处理,得到第二睡眠数据,可以包括步骤201-步骤203:Specifically, as shown in Figure 2, the electronic device performs calibration processing on the first sleep data based on historical usage data to obtain the second sleep data, which may include steps 201 to 203:
步骤201、电子设备可以根据第一睡眠数据确定用户的第一睡眠时间段(s1,s2)。Step 201: The electronic device can determine the user's first sleep time period (s 1 , s 2 ) based on the first sleep data.
其中,s1为起始时间,s2为终止时间。Among them, s 1 is the starting time and s 2 is the ending time.
步骤202、电子设备可以根据第一睡眠时间段从历史使用数据中确定第一使用时间段集合[(t1,t2),(t3,t4),……(tn-1,tn)]。Step 202: The electronic device can determine a first usage time period set [(t 1 , t 2 ), (t 3 , t 4 ), ... (t n-1 , t ) from historical usage data based on the first sleep time period. n )].
其中,第一使用时间段集合中的每个使用时间段均与第一睡眠时间段(s1,s2)在时间上存在至少部分重合。例如,若第一睡眠时间段为22:00-7:00,则第一使用时间段集合中的一个使用时间段可以为21:30-22:30。Wherein, each usage time period in the first usage time period set at least partially overlaps with the first sleep time period (s 1 , s 2 ) in time. For example, if the first sleep time period is 22:00-7:00, then one usage time period in the first usage time period set may be 21:30-22:30.
步骤203、电子设备可以根据每个使用时间段对第一睡眠时间段(s1,s2)的起始时间s1、终止时间s2、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Step 203: The electronic device can determine the start time s 1 , end time s 2 of the first sleep time period (s 1 , s 2 ) according to each use time period, and the time between the start time and the end time. The sleep time is calibrated.
基于上述方案,由于可以根据第一使用时间段集合中的每个使用时间段对第一睡眠时间段的起始时间、终止时间以及中间睡眠时间段进行校正,因此可以结合电子设备的历史使用数据对穿戴设备获取的睡眠时间进行校正,从而使第二睡眠数据中的睡眠时间段更接近用户的真实睡眠时间段。Based on the above solution, since the start time, end time and intermediate sleep time period of the first sleep time period can be corrected according to each use time period in the first use time period set, historical usage data of the electronic device can be combined The sleep time obtained by the wearable device is corrected so that the sleep time period in the second sleep data is closer to the user's real sleep time period.
可选地,电子设备分别根据所述每个使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理,具体可以包括:在第一使用时间段满足入睡校正规则的情况下,将所述第一睡眠时间段的起始时间更新为所述第一使用时间段的时间终点;在所述第一使用时间段满足出睡校正规则的情况下,将所述 第一睡眠时间段的终止时间更新为所述第一使用时间段的时间起点;在所述第一使用时间段不满足所述入睡校正规则和所述出睡校正规则的情况下,从所述第一睡眠时间段中删除所述第一使用时间段对应的睡眠时间段;其中,所述第一使用时间段为所述第一使用时间段集合中的任一个使用时间段。Optionally, the electronic device performs calibration processing on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time according to each use time period. , specifically, it may include: when the first usage time period satisfies the falling asleep correction rule, updating the start time of the first sleep time period to the time end point of the first usage time period; If the time period satisfies the sleep correction rules, the The end time of the first sleep time period is updated to the time starting point of the first use time period; if the first use time period does not satisfy the falling asleep correction rule and the falling asleep correction rule, the end time is updated from the first use time period. The sleep time period corresponding to the first use time period is deleted from the first sleep time period; wherein the first use time period is any use time period in the first use time period set.
具体地,如图3所示,以根据第一使用时间段(ti,ti+1)对第一睡眠时间段(s1,s2)的起始时间s1、终止时间s2、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理为例,i为(1,n-1)中的任一个整数,上述步骤203可以包括步骤203a-步骤203e:Specifically, as shown in Figure 3 , the start time s1 , end time s2 , And taking the calibration process of the sleep time between the start time and the end time as an example, i is any integer in (1, n-1), the above step 203 may include steps 203a to 203e:
步骤203a、电子设备可以先判断第一使用时间段(ti,ti+1)是否满足入睡校正规则;Step 203a: The electronic device can first determine whether the first use time period ( ti , ti +1 ) meets the sleep correction rule;
步骤203b、若满足入睡校正规则,则电子设备可以将起始时间s1更新为第一使用时间段(ti,ti+1)的时间终点ti+1Step 203b. If the falling asleep correction rule is met, the electronic device can update the starting time s 1 to the time end point t i+ 1 of the first use time period (t i , t i+1 );
步骤203c、若不满足入睡校正规则,则电子设备可以继续判断第一使用时间段(ti,ti+1)是否满足出睡校正规则;Step 203c. If the falling asleep correction rule is not satisfied, the electronic device can continue to determine whether the first use time period ( ti , t i+1 ) satisfies the falling asleep correction rule;
步骤203d、若满足出睡校正规则,则电子设备可以将终止时间s2更新为第一使用时间段(ti,ti+1)的时间起点tiStep 203d, if the sleep correction rule is satisfied, the electronic device can update the end time s 2 to the time starting point t i of the first use time period (t i , ti +1 ),
步骤203e、若不满足出睡校正规则,则电子设备可以从第一睡眠时间段(s1,s2)中删除第一使用时间段(ti,ti+1)对应的睡眠时间段,从而得到第二睡眠数据。Step 203e. If the sleep correction rule is not satisfied, the electronic device can delete the sleep time period corresponding to the first usage time period (t i , t i+1 ) from the first sleep time period (s 1 , s 2 ), Thus, the second sleep data is obtained.
可选地,上述第二睡眠数据中的睡眠时间段可以为连续的睡眠时间段,也可以为不连续的睡眠时间段,例如,当电子设备从第一睡眠时间段(s1,s2)中删除第一使用时间段(ti,ti+1)对应的睡眠时间段后,第二睡眠数据中的睡眠时间段可以包括(s1,ti)和(ti+1,s2)。Optionally, the sleep time period in the above second sleep data can be a continuous sleep time period or a discontinuous sleep time period. For example, when the electronic device changes from the first sleep time period (s 1 , s 2 ) After deleting the sleep time period corresponding to the first usage time period (t i , ti +1 ), the sleep time period in the second sleep data may include (s 1 , ti ) and (t i+1 , s 2 ).
基于上述方案,由于可以根据入睡校正规则和出睡校正规则对第一睡眠时间段的起始时间、终止时间以及中间睡眠时间段进行校正,因此可以使第二睡眠数据中的睡眠时间段更接近用户的真实睡眠时间段。 Based on the above solution, since the start time, end time and intermediate sleep time period of the first sleep time period can be corrected according to the falling asleep correction rule and the sleeping out correction rule, the sleep time period in the second sleep data can be made closer The user’s actual sleep period.
可选地,上述入睡校正规则可以包括以下至少一项:所述起始时间位于所述第一使用时间段之间,所述第一使用时间段的时间起点与所述起始时间之间的时间差小于第一阈值。Optionally, the above-mentioned fall asleep correction rule may include at least one of the following: the starting time is between the first usage time period, the time starting point between the first usage time period and the starting time. The time difference is less than the first threshold.
示例性的,在入睡校正规则包括起始时间位于第一使用时间段之间的情况下,参考图4中的(a),以第一使用时间段集合包括的第一使用时间段为(t1,t2)为例,若电子设备确定t1<s1<t2,即起始时间s1位于第一使用时间段(t1,t2)之间,则电子设备可以将起始时间s1更新为t2。在入睡校正规则包括第一使用时间段的时间起点与起始时间之间的时间差小于第一阈值的情况下,参考图4中的(b),以第一使用时间段集合包括的第一使用时间段为(t3,t4)为例,若电子设备确定第一使用时间段的时间起点t3与起始时间s1之间的时间差(t3-s1)小于第一阈值,则电子设备可以将起始时间s1更新为t4For example, in the case where the fall asleep correction rule includes a start time located between the first usage time periods, referring to (a) in FIG. 4 , the first usage time period included in the first usage time period set is (t 1 , t 2 ) for example, if the electronic device determines that t 1 <s 1 <t 2 , that is, the starting time s 1 is between the first use time period (t 1 , t 2 ), the electronic device can set the starting time s 1 to Time s 1 is updated to t 2 . In the case where the time difference between the time starting point and the start time of the first usage time period included in the fall asleep correction rule is less than the first threshold, with reference to (b) in FIG. 4 , the first usage time period included in the first usage time period set is Taking the time period as (t 3 , t 4 ) as an example, if the electronic device determines that the time difference (t 3 -s 1 ) between the starting time t 3 and the starting time s 1 of the first usage time period is less than the first threshold, then The electronic device can update the starting time s 1 to t 4 .
可选地,在入睡校正规则包括:所述起始时间位于所述第一使用时间段之间、所述第一使用时间段的时间起点与所述起始时间之间的时间差小于第一阈值的情况下,电子设备可以先判断起始时间是否位于所述第一使用时间段之间,再判断第一使用时间段的时间起点与所述起始时间之间的时间差是否小于第一阈值。Optionally, the fall asleep correction rule includes: the starting time is between the first usage time periods, and the time difference between the time starting point of the first usage time period and the starting time is less than a first threshold. In the case of , the electronic device may first determine whether the start time is between the first use time periods, and then determine whether the time difference between the time starting point of the first use time period and the start time is less than the first threshold.
可选地,上述出睡校正规则包括以下至少一项:所述终止时间位于所述第一使用时间段之间,所述第一使用时间段的时间终点与所述终止时间之间的时间差小于第二阈值。Optionally, the above-mentioned sleep correction rule includes at least one of the following: the end time is located between the first use time periods, and the time difference between the time end of the first use time period and the end time is less than Second threshold.
示例性的,在出睡校正规则包括终止时间位于第一使用时间段之间的情况下,继续参考图4中的(a),以第一使用时间段集合包括的第一使用时间段为(t5,t6)为例,若电子设备确定t5<s2<t6,即终止时间s2位于第一使用时间段(t5,t6)之间,则电子设备可以将终止时间s2更新为t5。在出睡校正规则包括第一使用时间段的时间终点与终止时间之间的时间差小于第二阈值的情况下,继续参考图4中的(b),以第一使用时间段集合包括的第一使用时间段为(t7,t8)为例,若电子设备确定第一使用时间段的 时间终点t8与终止时间s2之间的时间差(s2-t8)小于第二阈值,则电子设备可以将终止时间s2更新为t7For example, in the case where the sleep correction rule includes that the end time is between the first usage time periods, continuing to refer to (a) in FIG. 4 , the first usage time period included in the first usage time period set is ( t 5 , t 6 ) for example, if the electronic device determines that t 5 <s 2 <t 6 , that is, the termination time s 2 is between the first use time period (t 5 , t 6 ), the electronic device can set the termination time s 2 is updated to t 5 . In the case where the time difference between the time end point and the end time of the first usage time period included in the sleep correction rule is less than the second threshold, continue to refer to (b) in FIG. 4 to use the first usage time period set included in the first For example, the use time period is (t 7 , t 8 ). If the electronic device determines the first use time period, If the time difference (s 2 -t 8 ) between the time end point t 8 and the end time s 2 is less than the second threshold, the electronic device can update the end time s 2 to t 7 .
可选地,在出睡校正规则包括:所述终止时间位于所述第一使用时间段之间、所述第一使用时间段的时间终点与所述终止时间之间的时间差小于第二阈值的情况下,电子设备可以先判断终止时间是否位于所述第一使用时间段之间,再判断第一使用时间段的时间终点与所述终止时间之间的时间差是否小于第二阈值。Optionally, the sleep correction rule includes: the termination time is between the first usage time periods, and the time difference between the time end of the first usage time period and the termination time is less than a second threshold. In this case, the electronic device may first determine whether the termination time is between the first usage time periods, and then determine whether the time difference between the time end of the first usage time period and the termination time is less than the second threshold.
下面通过一个总示例对电子设备根据第一使用时间段集合对第一睡眠时间段进行校正进行详细说明。The electronic device's correction of the first sleep time period according to the first use time period set will be described in detail below through a general example.
示例性地,如图5所示,以第一睡眠时间段为(s1,s2)、第一使用时间段集合包括使用时间段(t1,t2)、使用时间段(t3,t4)、使用时间段(t5,t6)为例。由于使用时间段(t1,t2)满足入睡校正规则,因此,电子设备可以将起始时间s1更新为t2。由于使用时间段(t5,t6)满足出睡校正规则,因此,电子设备可以将终止时间s2更新为t5。由于使用时间段(t3,t4)既不满足入睡校正规则,也不满足出睡校正规则,因此,电子设备可以从第一睡眠时间段(s1,s2)中删除使用时间段(t3,t4)对应的睡眠时间段,最终得到的第二睡眠数据中的睡眠时间段可以为(t2,t3)和(t4,t5)。For example, as shown in Figure 5, assuming that the first sleep time period is (s 1 , s 2 ), the first use time period set includes a use time period (t 1 , t 2 ), a use time period (t 3 , t 4 ), use the time period (t 5 , t 6 ) as an example. Since the use time period (t 1 , t 2 ) satisfies the falling asleep correction rule, the electronic device can update the starting time s 1 to t 2 . Since the use time period (t 5 , t 6 ) satisfies the sleep correction rule, the electronic device can update the end time s 2 to t 5 . Since the usage time period (t 3 , t 4 ) neither satisfies the falling asleep correction rule nor the sleeping out correction rule, the electronic device can delete the usage time period ( (s 1 , s 2 ) from the first sleep time period (s 1 , s 2 ). The sleep time periods corresponding to t 3 , t 4 ), the sleep time periods in the finally obtained second sleep data may be (t 2 , t 3 ) and (t 4 , t 5 ).
在本申请实施例中,一方面,由于第一睡眠数据为电子设备与穿戴设备处于非通信连接状态时穿戴设备获取的数据、历史使用数据包括电子设备与穿戴设备处于非通信连接状态时电子设备获取的数据,因此,即使处于电子设备与穿戴设备的断连场景,也可以实现两种数据的记录;另一方面,由于可以根据历史使用数据对第一睡眠数据进行校准处理,从而使第二睡眠数据中包括的睡眠总时长小于或等于第一睡眠数据中包括的睡眠总时长,也就是说,可以根据电子设备的历史使用数据从第一睡眠数据中剔除用户使用电子设备的时长,因此,第二睡眠数据的准确率高于第一睡眠数据的准确率。In the embodiment of the present application, on the one hand, since the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state, the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded The total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
本申请实施例提供的睡眠数据校准方法,执行主体可以为睡眠数据校 准装置。本申请实施例中以睡眠数据校准装置执行睡眠数据校准方法为例,说明本申请实施例提供的睡眠数据校准装置。For the sleep data calibration method provided by the embodiment of the present application, the execution subject can calibrate the sleep data. standard device. In the embodiment of the present application, the sleep data calibration method performed by the sleep data calibration device is used as an example to illustrate the sleep data calibration device provided by the embodiment of the present application.
如图6所示,本申请实施例还提供一种睡眠数据校准装置600,包括:获取模块601、接收模块602和处理模块603;所述获取模块601,用于获取电子设备的历史使用数据;所述接收模块602,用于在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据;所述处理模块603,用于根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。As shown in Figure 6, the embodiment of the present application also provides a sleep data calibration device 600, which includes: an acquisition module 601, a receiving module 602, and a processing module 603; the acquisition module 601 is used to acquire historical usage data of electronic equipment; The receiving module 602 is configured to receive the first sleep data sent by the wearable device when the electronic device and the wearable device are in a communication connection state; the processing module 603 is configured to use the historical usage data according to the Perform calibration processing on the first sleep data to obtain second sleep data; wherein the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the The electronic device obtains the usage data of the electronic device by the user during the first historical time period, and the electronic device and the wearable device are not in a communication connection state during the first historical time period, The total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
可选地,所述第一睡眠数据包括第一睡眠时间段的起始时间和终止时间;所述处理模块603,具体用于:根据第一睡眠时间段从所述历史使用数据中确定第一使用时间段集合,所述第一使用时间段集合包括至少一个使用时间段,且每个所述使用时间段均与所述第一睡眠时间段在时间上存在至少部分重合;分别根据每个使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Optionally, the first sleep data includes the start time and end time of the first sleep time period; the processing module 603 is specifically configured to: determine the first sleep time period from the historical usage data according to the first sleep time period. A set of use time periods, the first set of use time periods includes at least one use time period, and each use time period at least partially overlaps with the first sleep time period; according to each use time period respectively The time period performs calibration processing on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time.
可选地,所述处理模块603,具体用于:在第一使用时间段满足入睡校正规则的情况下,将所述第一睡眠时间段的起始时间更新为所述第一使用时间段的时间终点;在所述第一使用时间段满足出睡校正规则的情况下,将所述第一睡眠时间段的终止时间更新为所述第一使用时间段的时间起点;在所述第一使用时间段不满足所述入睡校正规则和所述出睡校正规则的情况下,从所述第一睡眠时间段中删除所述第一使用时间段对应的睡眠时间段;其中,所述第一使用时间段为所述第一使用时间段集合中的任一个使 用时间段。Optionally, the processing module 603 is specifically configured to: update the starting time of the first sleep time period to the first use time period when the first use time period satisfies the falling asleep correction rule. Time end point; when the first use time period satisfies the sleep correction rule, update the end time of the first sleep time period to the time starting point of the first use time period; in the first use time period If the time period does not satisfy the falling asleep correction rule and the sleeping out correction rule, delete the sleep time period corresponding to the first use time period from the first sleep time period; wherein, the first use time period The time period is any one of the first use time period sets. Use time period.
可选地,所述入睡校正规则包括以下至少一项:所述起始时间位于所述第一使用时间段之间,所述第一使用时间段的时间起点与所述起始时间之间的时间差小于第一阈值;所述出睡校正规则包括以下至少一项:所述终止时间位于所述第一使用时间段之间,所述第一使用时间段的时间终点与所述终止时间之间的时间差小于第二阈值。Optionally, the fall asleep correction rule includes at least one of the following: the starting time is between the first usage time period, the time starting point of the first usage time period and the starting time. The time difference is less than the first threshold; the sleep correction rule includes at least one of the following: the end time is between the first use time period, and the time end point of the first use time period is between the end time and the end time. The time difference is less than the second threshold.
可选地,所述获取模块601,还用于获取所述电子设备在所述第一历史时间段的运行信息,所述运行信息包括以下至少一项:亮屏时间、接收用户输入时间以及前台应用的运行状态;所述处理模块603,还用于根据所述运行信息确定所述历史使用数据。Optionally, the acquisition module 601 is also used to acquire the operation information of the electronic device in the first historical time period. The operation information includes at least one of the following: screen turning time, user input receiving time and foreground time. The running status of the application; the processing module 603 is also used to determine the historical usage data according to the running information.
在本申请实施例中,一方面,由于第一睡眠数据为电子设备与穿戴设备处于非通信连接状态时穿戴设备获取的数据、历史使用数据包括电子设备与穿戴设备处于非通信连接状态时电子设备获取的数据,因此,即使处于电子设备与穿戴设备的断连场景,也可以实现两种数据的记录;另一方面,由于可以根据历史使用数据对第一睡眠数据进行校准处理,从而使第二睡眠数据中包括的睡眠总时长小于或等于第一睡眠数据中包括的睡眠总时长,也就是说,可以根据电子设备的历史使用数据从第一睡眠数据中剔除用户使用电子设备的时长,因此,第二睡眠数据的准确率高于第一睡眠数据的准确率。In the embodiment of the present application, on the one hand, since the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state, the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded The total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
本申请实施例中的睡眠数据校准装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage, NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The sleep data calibration device in the embodiment of the present application may be an electronic device or a component in the electronic device, such as an integrated circuit or chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or augmented reality (AR)/virtual reality (VR). ) equipment, robots, wearable devices, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (PDA), etc., and can also be servers, network attached storage (Network Attached Storage, NAS), personal computer (PC), television (TV), teller machine or self-service machine, etc., the embodiments of this application are not specifically limited.
本申请实施例中的睡眠数据校准装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The sleep data calibration device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的睡眠数据校准装置能够实现图1至图5的方法实施例实现的各个过程,为避免重复,这里不再赘述。The sleep data calibration device provided by the embodiment of the present application can implement various processes implemented by the method embodiments of Figures 1 to 5. To avoid repetition, they will not be described again here.
可选地,如图7所示,本申请实施例还提供一种电子设备700,包括处理器701和存储器702,存储器702上存储有可在所述处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述睡眠数据校准方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 7, this embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores programs or instructions that can be run on the processor 701. When the program or instruction is executed by the processor 701, each step of the above sleep data calibration method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, the details will not be described here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图8为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 8 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The electronic device 1000 includes but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, processor 1010, etc. part.
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 8 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .
其中,传感器1005,用于获取电子设备的历史使用数据。Among them, sensor 1005 is used to obtain historical usage data of electronic equipment.
射频单元1001,用于在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据; Radio frequency unit 1001, configured to receive the first sleep data sent by the wearable device when the electronic device and the wearable device are in a communication connection state;
处理器1010,用于根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。Processor 1010, configured to calibrate the first sleep data according to the historical usage data to obtain second sleep data; wherein the first sleep data is the user's time at the first historical time obtained by the wearable device. period of sleep data, the historical usage data includes usage data of the electronic device by the user in the first historical time period obtained by the electronic device, and the electronic device and the wearable device are in the first historical time period. The communication connection state is not in the first historical time period, and the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
在本申请实施例中,一方面,由于第一睡眠数据为电子设备与穿戴设备处于非通信连接状态时穿戴设备获取的数据、历史使用数据包括电子设备与穿戴设备处于非通信连接状态时电子设备获取的数据,因此,即使处于电子设备与穿戴设备的断连场景,也可以实现两种数据的记录;另一方面,由于可以根据历史使用数据对第一睡眠数据进行校准处理,从而使第二睡眠数据中包括的睡眠总时长小于或等于第一睡眠数据中包括的睡眠总时长,也就是说,可以根据电子设备的历史使用数据从第一睡眠数据中剔除用户使用电子设备的时长,因此,第二睡眠数据的准确率高于第一睡眠数据的准确率。In the embodiment of the present application, on the one hand, since the first sleep data is data obtained by the wearable device when the electronic device and the wearable device are in a non-communication connection state, the historical usage data includes the electronic device when the electronic device and the wearable device are in a non-communication connection state. Therefore, even if the electronic device and the wearable device are disconnected, the two data can be recorded; on the other hand, since the first sleep data can be calibrated based on historical usage data, the second sleep data can be recorded The total sleep duration included in the sleep data is less than or equal to the total sleep duration included in the first sleep data. That is to say, the duration of the user's use of the electronic device can be eliminated from the first sleep data based on the historical usage data of the electronic device. Therefore, The accuracy of the second sleep data is higher than the accuracy of the first sleep data.
可选地,所述第一睡眠数据包括第一睡眠时间段的起始时间和终止时间;处理器1010,具体用于:根据第一睡眠时间段从所述历史使用数据中确定第一使用时间段集合,所述第一使用时间段集合包括至少一个使用时间段,且每个所述使用时间段均与所述第一睡眠时间段在时间上存在至少部分重合;分别根据每个使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Optionally, the first sleep data includes the start time and end time of the first sleep time period; the processor 1010 is specifically configured to: determine the first usage time from the historical usage data according to the first sleep time period. Segment set, the first use time period set includes at least one use time period, and each use time period at least partially overlaps with the first sleep time period; according to each use time period respectively Calibration processing is performed on the start time, end time of the first sleep time period, and the sleep time between the start time and the end time.
在本申请实施例中,由于可以根据第一使用时间段集合中的每个使用时间段对第一睡眠时间段的起始时间、终止时间以及中间睡眠时间段进行校正,因此可以结合电子设备的历史使用数据对穿戴设备获取的睡眠时间进行校正,从而使第二睡眠数据中的睡眠时间段更接近用户的真实睡眠时 间段。In the embodiment of the present application, since the start time, end time and intermediate sleep time period of the first sleep time period can be corrected according to each use time period in the first use time period set, it can be combined with the electronic device's The historical usage data corrects the sleep time obtained by the wearable device, so that the sleep time period in the second sleep data is closer to the user's real sleep time. interval.
可选地,处理器1010,具体用于:在第一使用时间段满足入睡校正规则的情况下,将所述第一睡眠时间段的起始时间更新为所述第一使用时间段的时间终点;在所述第一使用时间段满足出睡校正规则的情况下,将所述第一睡眠时间段的终止时间更新为所述第一使用时间段的时间起点;在所述第一使用时间段不满足所述入睡校正规则和所述出睡校正规则的情况下,从所述第一睡眠时间段中删除所述第一使用时间段对应的睡眠时间段;其中,所述第一使用时间段为所述第一使用时间段集合中的任一个使用时间段。Optionally, the processor 1010 is specifically configured to: update the start time of the first sleep time period to the time end point of the first use time period when the first usage time period satisfies the falling asleep correction rule. ; When the first use time period satisfies the sleep correction rule, update the end time of the first sleep time period to the time starting point of the first use time period; in the first use time period If the falling asleep correction rule and the falling asleep correction rule are not satisfied, the sleep time period corresponding to the first use time period is deleted from the first sleep time period; wherein, the first use time period It is any usage time period in the first usage time period set.
在本申请实施例中,由于可以根据入睡校正规则和出睡校正规则对第一睡眠时间段的起始时间、终止时间以及中间睡眠时间段进行校正,因此可以使第二睡眠数据中的睡眠时间段更接近用户的真实睡眠时间段。In the embodiment of the present application, since the start time, end time and middle sleep time period of the first sleep time period can be corrected according to the sleep time correction rule and the sleep time correction rule, the sleep time in the second sleep data can be corrected. The period is closer to the user's real sleep time period.
可选地,传感器1005,还用于获取所述电子设备在所述第一历史时间段的运行信息,所述运行信息包括以下至少一项:亮屏时间、接收用户输入时间以及前台应用的运行状态;处理器1010,还用于根据所述运行信息确定所述历史使用数据。Optionally, the sensor 1005 is also used to obtain the operating information of the electronic device in the first historical time period. The operating information includes at least one of the following: screen turning time, user input receiving time, and running of foreground applications. Status; Processor 1010 is also configured to determine the historical usage data according to the running information.
在本申请实施例中,由于电子设备可以根据电子设备在第一历史时间段的运行信息确定历史使用数据,因此,可以为电子设备根据历史使用数据对第一睡眠数据进行校准处理提供基础。In this embodiment of the present application, since the electronic device can determine the historical usage data based on the operating information of the electronic device in the first historical time period, a basis can be provided for the electronic device to calibrate the first sleep data based on the historical usage data.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072中的至少一种。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不 限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. The graphics processor 10041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras). The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072 . Touch panel 10071, also known as touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include but are not It is limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, so I won’t go into details here.
存储器1009可用于存储软件程序以及各种数据。存储器1009可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1009可以包括易失性存储器或非易失性存储器,或者,存储器1009可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1009包括但不限于这些和任意其它适合类型的存储器。Memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc. Additionally, memory 1009 may include volatile memory or nonvolatile memory, or memory 1009 may include both volatile and nonvolatile memory. Among them, non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 1009 in the embodiment of the present application includes, but is not limited to, these and any other suitable types of memory.
处理器1010可包括一个或多个处理单元;可选的,处理器1010集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 1010.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述睡眠数据校准方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。 Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the sleep data calibration method embodiment is implemented, and can achieve The same technical effects are not repeated here to avoid repetition.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述睡眠数据校准方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the above sleep data calibration method embodiment. Each process can achieve the same technical effect. To avoid repetition, we will not go into details here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述睡眠数据校准方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above sleep data calibration method embodiment, and can achieve the same technology. The effect will not be described here to avoid repetition.
本申请实施例还提供了一种电子设备,该电子设备被配置成用于实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides an electronic device. The electronic device is configured to implement each process of the above method embodiment and can achieve the same technical effect. To avoid duplication, the details will not be described here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。 It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to related technologies. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (15)

  1. 一种睡眠数据校准方法,包括:A method for calibrating sleep data, including:
    获取电子设备的历史使用数据;Obtain historical usage data of electronic devices;
    在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据;When the electronic device and the wearable device are in a communication connection state, receive the first sleep data sent by the wearable device;
    根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;Perform calibration processing on the first sleep data according to the historical usage data to obtain second sleep data;
    其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。Wherein, the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the user's sleep data in the first historical time period obtained by the electronic device. For the usage data of the electronic device, the electronic device and the wearable device are not in a communication connection state within the first historical time period, and the total sleep duration included in the second sleep data is less than or equal to the The total sleep duration included in the first sleep data.
  2. 根据权利要求1所述的睡眠数据校准方法,其中,所述第一睡眠数据包括第一睡眠时间段的起始时间和终止时间;所述根据所述历史使用数据对所述第一睡眠数据进行校准处理,包括:The sleep data calibration method according to claim 1, wherein the first sleep data includes a start time and an end time of a first sleep time period; and the first sleep data is calculated based on the historical usage data. Calibration processing, including:
    根据所述第一睡眠时间段从所述历史使用数据中确定第一使用时间段集合,所述第一使用时间段集合包括至少一个使用时间段,且每个所述使用时间段均与所述第一睡眠时间段在时间上存在至少部分重合;A first set of usage time periods is determined from the historical usage data according to the first sleep time period, the first set of usage time periods includes at least one usage time period, and each of the usage time periods is related to the There is at least partial overlap in time between the first sleep periods;
    分别根据每个所述使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Calibration processing is performed on the start time, the end time of the first sleep time period, and the sleep time between the start time and the end time respectively according to each use time period.
  3. 根据权利要求2所述的睡眠数据校准方法,其中,所述分别根据所述每个使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理,包括:The sleep data calibration method according to claim 2, wherein the start time, end time, and start time of the first sleep time period and the start time and the first sleep time period are determined according to each use time period. The sleep time between termination times is calibrated, including:
    在第一使用时间段满足入睡校正规则的情况下,将所述第一睡眠时间段的起始时间更新为所述第一使用时间段的时间终点;When the first usage time period satisfies the falling asleep correction rule, update the start time of the first sleep time period to the time end point of the first usage time period;
    在所述第一使用时间段满足出睡校正规则的情况下,将所述第一睡眠 时间段的终止时间更新为所述第一使用时间段的时间起点;When the first usage time period satisfies the sleep correction rule, the first sleep period is The end time of the time period is updated to the time starting point of the first usage time period;
    在所述第一使用时间段不满足所述入睡校正规则和所述出睡校正规则的情况下,从所述第一睡眠时间段中删除所述第一使用时间段对应的睡眠时间段;If the first use time period does not satisfy the falling asleep correction rule and the sleep out correction rule, delete the sleep time period corresponding to the first use time period from the first sleep time period;
    其中,所述第一使用时间段为所述第一使用时间段集合中的任一个使用时间段。Wherein, the first usage time period is any usage time period in the first usage time period set.
  4. 根据权利要求3所述的睡眠数据校准方法,其中,所述入睡校正规则包括以下至少一项:所述起始时间位于所述第一使用时间段之间,所述第一使用时间段的时间起点与所述起始时间之间的时间差小于第一阈值;The sleep data calibration method according to claim 3, wherein the falling asleep correction rule includes at least one of the following: the starting time is between the first use time period, the time of the first use time period The time difference between the starting point and the starting time is less than the first threshold;
    所述出睡校正规则包括以下至少一项:所述终止时间位于所述第一使用时间段之间,所述第一使用时间段的时间终点与所述终止时间之间的时间差小于第二阈值。The sleep correction rule includes at least one of the following: the end time is located between the first use time periods, and the time difference between the time end of the first use time period and the end time is less than a second threshold .
  5. 根据权利要求1-4任一项所述的睡眠数据校准方法,其中,所述获取电子设备的历史使用数据,包括:The sleep data calibration method according to any one of claims 1 to 4, wherein said obtaining historical usage data of electronic devices includes:
    获取所述电子设备在所述第一历史时间段的运行信息,所述运行信息包括以下至少一项:亮屏时间、接收用户输入时间以及前台应用的运行状态;Obtain the operating information of the electronic device in the first historical time period, where the operating information includes at least one of the following: screen turning time, user input receiving time, and the operating status of the foreground application;
    根据所述运行信息确定所述历史使用数据。The historical usage data is determined based on the operational information.
  6. 一种睡眠数据校准装置,包括:获取模块、接收模块和处理模块;A sleep data calibration device, including: an acquisition module, a receiving module and a processing module;
    所述获取模块,用于获取电子设备的历史使用数据;The acquisition module is used to acquire historical usage data of electronic equipment;
    所述接收模块,用于在所述电子设备与穿戴设备处于通信连接状态的情况下,接收所述穿戴设备发送的第一睡眠数据;The receiving module is configured to receive the first sleep data sent by the wearable device when the electronic device and the wearable device are in a communication connection state;
    所述处理模块,用于根据所述历史使用数据对所述第一睡眠数据进行校准处理,得到第二睡眠数据;The processing module is configured to perform calibration processing on the first sleep data based on the historical usage data to obtain second sleep data;
    其中,所述第一睡眠数据为所述穿戴设备获取的用户在第一历史时间段的睡眠数据,所述历史使用数据包括所述电子设备获取的所述用户在所述第一历史时间段内对所述电子设备的使用数据,所述电子设备与所述穿 戴设备在所述第一历史时间段内未处于通信连接状态,所述第二睡眠数据中包括的睡眠总时长小于或等于所述第一睡眠数据中包括的睡眠总时长。Wherein, the first sleep data is the user's sleep data in the first historical time period obtained by the wearable device, and the historical usage data includes the user's sleep data in the first historical time period obtained by the electronic device. Usage data of the electronic device, the electronic device and the wearer The wearable device is not in a communication connection state within the first historical time period, and the total sleep duration included in the second sleep data is less than or equal to the total sleep duration included in the first sleep data.
  7. 根据权利要求6所述的睡眠数据校准装置,其中,所述第一睡眠数据包括第一睡眠时间段的起始时间和终止时间;所述处理模块,具体用于:The sleep data calibration device according to claim 6, wherein the first sleep data includes the start time and end time of the first sleep time period; the processing module is specifically used to:
    根据所述第一睡眠时间段从所述历史使用数据中确定第一使用时间段集合,所述第一使用时间段集合包括至少一个使用时间段,且每个所述使用时间段均与所述第一睡眠时间段在时间上存在至少部分重合;A first set of usage time periods is determined from the historical usage data according to the first sleep time period, the first set of usage time periods includes at least one usage time period, and each of the usage time periods is related to the There is at least partial overlap in time between the first sleep periods;
    分别根据每个所述使用时间段对所述第一睡眠时间段的起始时间、终止时间、以及所述起始时间和所述终止时间之间的睡眠时间进行校准处理。Calibration processing is performed on the start time, the end time of the first sleep time period, and the sleep time between the start time and the end time respectively according to each use time period.
  8. 根据权利要求7所述的睡眠数据校准装置,其中,所述处理模块,具体用于:The sleep data calibration device according to claim 7, wherein the processing module is specifically used for:
    在第一使用时间段满足入睡校正规则的情况下,将所述第一睡眠时间段的起始时间更新为所述第一使用时间段的时间终点;When the first usage time period satisfies the falling asleep correction rule, update the start time of the first sleep time period to the time end point of the first usage time period;
    在所述第一使用时间段满足出睡校正规则的情况下,将所述第一睡眠时间段的终止时间更新为所述第一使用时间段的时间起点;When the first use time period satisfies the sleep correction rule, update the end time of the first sleep time period to the time starting point of the first use time period;
    在所述第一使用时间段不满足所述入睡校正规则和所述出睡校正规则的情况下,从所述第一睡眠时间段中删除所述第一使用时间段对应的睡眠时间段;If the first use time period does not satisfy the falling asleep correction rule and the sleep out correction rule, delete the sleep time period corresponding to the first use time period from the first sleep time period;
    其中,所述第一使用时间段为所述第一使用时间段集合中的任一个使用时间段。Wherein, the first usage time period is any usage time period in the first usage time period set.
  9. 根据权利要求8所述的睡眠数据校准装置,其中,所述入睡校正规则包括以下至少一项:所述起始时间位于所述第一使用时间段之间,所述第一使用时间段的时间起点与所述起始时间之间的时间差小于第一阈值;The sleep data calibration device according to claim 8, wherein the falling asleep correction rule includes at least one of the following: the starting time is between the first use time period, the time of the first use time period The time difference between the starting point and the starting time is less than the first threshold;
    所述出睡校正规则包括以下至少一项:所述终止时间位于所述第一使用时间段之间,所述第一使用时间段的时间终点与所述终止时间之间的时间差小于第二阈值。The sleep correction rule includes at least one of the following: the end time is located between the first use time periods, and the time difference between the time end of the first use time period and the end time is less than a second threshold .
  10. 根据权利要求6-9任一项所述的睡眠数据校准装置,其中, The sleep data calibration device according to any one of claims 6-9, wherein,
    所述获取模块,还用于获取所述电子设备在所述第一历史时间段的运行信息,所述运行信息包括以下至少一项:亮屏时间、接收用户输入时间以及前台应用的运行状态;The acquisition module is also used to acquire the operation information of the electronic device in the first historical time period. The operation information includes at least one of the following: screen-on time, user input time, and the operation status of the foreground application;
    所述处理模块,还用于根据所述运行信息确定所述历史使用数据。The processing module is also configured to determine the historical usage data based on the operating information.
  11. 一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-5任一项所述的睡眠数据校准方法。An electronic device, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the implementation of any one of claims 1-5 is achieved. The sleep data calibration method.
  12. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-5任一项所述的睡眠数据校准方法。A readable storage medium on which programs or instructions are stored. When the programs or instructions are executed by a processor, the sleep data calibration method according to any one of claims 1 to 5 is implemented.
  13. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-5任一项所述的睡眠数据校准方法。A chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement sleep data according to any one of claims 1-5. Calibration method.
  14. 一种计算机程序产品,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-5任一项所述的睡眠数据校准方法。A computer program product, which is executed by at least one processor to implement the sleep data calibration method according to any one of claims 1-5.
  15. 一种电子设备,所述电子设备被配置成用于执行如权利要求1-5任一项所述的睡眠数据校准方法。 An electronic device configured to perform the sleep data calibration method according to any one of claims 1-5.
PCT/CN2023/092981 2022-05-09 2023-05-09 Sleep data calibration method and electronic device WO2023217137A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210503553.3 2022-05-09
CN202210503553.3A CN114974495A (en) 2022-05-09 2022-05-09 Sleep data calibration method and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023217137A1 true WO2023217137A1 (en) 2023-11-16

Family

ID=82980730

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/092981 WO2023217137A1 (en) 2022-05-09 2023-05-09 Sleep data calibration method and electronic device

Country Status (2)

Country Link
CN (1) CN114974495A (en)
WO (1) WO2023217137A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114974495A (en) * 2022-05-09 2022-08-30 维沃移动通信有限公司 Sleep data calibration method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045386A (en) * 2015-06-30 2015-11-11 广东美的制冷设备有限公司 Sleeping state monitoring method, sleeping state monitoring terminal and air conditioner system
US20160235359A1 (en) * 2015-02-12 2016-08-18 Samsung Electronics Co., Ltd. Electronic device for inputting sleeping information and method of controlling the same
CN108030467A (en) * 2017-11-22 2018-05-15 广东思派康电子科技有限公司 Electronics bracelet and computer-readable recording medium
CN114343587A (en) * 2020-09-29 2022-04-15 Oppo广东移动通信有限公司 Sleep monitoring method and device, electronic equipment and computer readable medium
CN114974495A (en) * 2022-05-09 2022-08-30 维沃移动通信有限公司 Sleep data calibration method and electronic equipment
CN115137308A (en) * 2022-06-29 2022-10-04 东莞市猎声电子科技有限公司 Method for improving accuracy of in-out sleep detection in sleep algorithm of intelligent wearable device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160235359A1 (en) * 2015-02-12 2016-08-18 Samsung Electronics Co., Ltd. Electronic device for inputting sleeping information and method of controlling the same
CN105045386A (en) * 2015-06-30 2015-11-11 广东美的制冷设备有限公司 Sleeping state monitoring method, sleeping state monitoring terminal and air conditioner system
CN108030467A (en) * 2017-11-22 2018-05-15 广东思派康电子科技有限公司 Electronics bracelet and computer-readable recording medium
CN114343587A (en) * 2020-09-29 2022-04-15 Oppo广东移动通信有限公司 Sleep monitoring method and device, electronic equipment and computer readable medium
CN114974495A (en) * 2022-05-09 2022-08-30 维沃移动通信有限公司 Sleep data calibration method and electronic equipment
CN115137308A (en) * 2022-06-29 2022-10-04 东莞市猎声电子科技有限公司 Method for improving accuracy of in-out sleep detection in sleep algorithm of intelligent wearable device

Also Published As

Publication number Publication date
CN114974495A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US20210208697A1 (en) Method for controlling play of multimedia file and terminal device
AU2023203591A1 (en) Display method and apparatus
JP6348989B2 (en) Firmware restoration method, apparatus, terminal, program, and recording medium
US11630561B2 (en) Image editing method and terminal
US11785331B2 (en) Shooting control method and terminal
CN108135033B (en) Bluetooth connection method and mobile terminal
WO2023217137A1 (en) Sleep data calibration method and electronic device
WO2020253295A1 (en) Control method and apparatus, and terminal device
CN110795310B (en) Information reminding method and electronic equipment
US20220141163A1 (en) Message sending method and mobile terminal
WO2023061358A1 (en) Cache method and apparatus, and electronic device
CN111064654A (en) Message display method and electronic equipment
US10497303B2 (en) Method and device for always on display, and computer-readable storage medium
WO2019071594A1 (en) Display processing method and electronic device
WO2023284621A1 (en) Setting method and apparatus, electronic device, and storage medium
CN108229920B (en) Affair reminding method and mobile terminal
CN110221741B (en) Icon management method and terminal equipment
WO2024104081A1 (en) Wallpaper display method and apparatus, and electronic device
US20170280393A1 (en) Method and mobile device for controlling
WO2024078383A1 (en) Network-searching frequency determination method, network-searching frequency determination apparatus and electronic device
CN113537938A (en) To-do event processing method and device
WO2023030304A1 (en) Prompt information display method and apparatus, and electronic device
CN110099170B (en) Picture deleting method and mobile terminal
WO2023066100A1 (en) File sharing method and apparatus
CN109902232B (en) Display control method and terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23802906

Country of ref document: EP

Kind code of ref document: A1