Alarm reminder method, electronic device and computer readable storage medium

By calculating the advance time of the smart alarm clock and managing the reminder flag in the sports watch, the problem in the existing technology of a single alarm clock reminder method and disturbing the user's deep sleep is solved, thereby improving the user experience and improving the efficiency of alarm clock management.

CN118210219BActive Publication Date: 2024-09-13HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410629018.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-13
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

The alarm clock reminder method of existing sports watches is single, the user experience is not high, and the problem of repeated alarm clock reminders and disturbing users during deep sleep cannot be effectively avoided.

Method used

By calculating the advance time of the smart alarm clock, the alarm time is added to the alarm list at the target time in advance, and the user is reminded when the user is in a light sleep state to avoid reminding the user in a deep sleep state. The reminder flag is used to manage the alarm clock status to avoid repeated reminders.

Benefits of technology

It achieves accurate reminders at the time in advance that users expect, avoids repeated reminders by alarm clocks, protects users' deep sleep, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210219B
    Figure CN118210219B
Patent Text Reader

Abstract

The present application relates to the field of electronic technology, and provides an alarm reminder method, an electronic device, and a computer-readable storage medium, the method comprising: obtaining the first alarm time and advance time of the first alarm; adding the second alarm time to the alarm list, the second alarm time being the time before the first alarm time; if the second alarm time is the target time, reminding at the target time, and updating the state of the first alarm from the unremind state to the reminded state, the target time being the time when the alarm list is obtained; at the first alarm time, in response to the first alarm being in the reminded state, not reminding. The above method can remind the user in advance before the reminder time set by the user, realize intelligent reminder, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an alarm reminder method, an electronic device and a computer-readable storage medium. Background Art

[0002] With the development of electronic devices, smart wearable devices are increasingly being accepted and used by people. Sports watches are one of the most widely used smart wearable devices. Generally, sports watches can also be called sports bracelets. While being convenient to wear, they can also detect biological information such as heart rate and sleep. Sports watches can be connected to smartphones via Bluetooth communication.

[0003] Users can manage their sports watches through the corresponding applications (applications, APPs) installed on their smartphones, such as viewing information such as the heart rate detected by the sports watch. They can also manage the APPs on their sports watches, such as installing APPs, deleting APPs, setting alarms, etc.

[0004] When a user sets an alarm on a sports watch, the sports watch can ring at the set alarm time to remind the user. This ringing method is relatively simple and the user experience is not high. Summary of the invention

[0005] The present application provides an alarm reminder method, device, chip, electronic device, computer-readable storage medium and computer program product, which can enhance user experience.

[0006] In a first aspect, an alarm reminder method is provided, comprising: obtaining a first alarm time and an advance time of a first alarm clock; adding a second alarm time to an alarm list, the second alarm time being a time before the first alarm time; if the second alarm time is a target time, giving a reminder at the target time, and updating the state of the first alarm clock from a non-remind state to a reminded state, the target time being the time when the alarm list is obtained; at the first alarm time, in response to the first alarm clock being in a reminded state, not giving a reminder.

[0007] It should be noted that the first alarm clock is a smart alarm clock, the first alarm clock time is the smart alarm clock time, and the advance time is the advance amount corresponding to the smart alarm clock. The second alarm clock time is the time of advance reminder, called the advance time. The second alarm clock time is the time of the first alarm clock time minus the advance time. The target time is the time when the alarm clocks of the day are traversed and the alarm list is obtained. Optionally, the target time can be zero o'clock and zero minutes (00:00). Optionally, the target time can also be other times, such as 7:00 in the morning.

[0008] After adding the smart alarm, the sports watch calculates the second alarm time that needs to be reminded in advance based on the first alarm time and the advance time, and adds the second alarm time to the alarm list so that a reminder can be given in advance at the second alarm time.

[0009] Taking the target time as 00:00 as an example, when the second alarm time is 00:00, the sports watch can remind at 00:00 to ensure that the user is reminded in advance. Afterwards, the sports watch also updates the status of the first alarm from the unremind state to the reminded state.

[0010] Optionally, the specific method of updating the state of the first alarm clock may be to modify the reminder flag of the smart alarm clock. The sports watch may modify the value of the reminder flag of the smart alarm clock from 0 to 1, or from false to true. Optionally, 1 and true represent the reminded state, and 0 and false represent the unremind state.

[0011] The sports watch can query the reminder flag of the smart alarm clock. At this time, the reminder flag has been updated to the value of the reminder state. The sports watch does not need to repeat the reminder at the first alarm time based on the reminder state represented by the reminder flag of the queried smart alarm clock. This can avoid repeated reminders from the smart alarm clock and improve the user experience.

[0012] In some possible implementations, if the second alarm time is the target time, a reminder is given at the target time, including: at the target time, determining whether there is an alarm time for the day; if so, when the second alarm time is the target time, a reminder is given at the target time.

[0013] In some possible implementations, the method further includes: if there is no alarm time for the current day, updating the alarm list at the target time for the next day.

[0014] Optionally, taking the target time as 00:00 as an example, the sports watch will traverse all the alarms of the day at 00:00 every day. If the second alarm time is 00:00, that is, the smart alarm needs to ring in advance at 00:00. At 00:00, the sports watch traverses all the alarms and obtains the alarm list of the day. At this time, if there is an alarm time in the alarm list, the sports watch will remind the user at 00:00 when it is determined that there is an alarm time of the day in the alarm list and the second alarm time is 00:00, so as to remind the user on time at the advance time expected by the user.

[0015] If the alarm time of the day does not exist in the alarm list of the day, it means that no alarm is set on the day. The sports watch can determine that the next alarm time is 00:00 of the next day, and traverse the alarms of the next day at 00:00 of the next day to obtain the alarm list of the next day.

[0016] In some possible implementations, the reminder is given at the target time, including: obtaining the sleep state of the user at the second alarm time; if the sleep state is a light sleep state, the reminder is given at the target time.

[0017] The sports watch can also obtain the user's sleep state when the second alarm clock time arrives. If the user's sleep state is a light sleep state, the sports watch can remind at the target time 00:00, that is, the second alarm clock time.

[0018] In some possible implementations, it also includes: if the sleep state is a deep sleep state, no reminder is given at the target time, and the state of the first alarm clock is kept in a non-reminding state; in response to the first alarm clock being in a non-reminding state, a reminder is given at the first alarm clock time.

[0019] If the user is in a deep sleep state at the second alarm time, the sports watch may not remind the user at the target time 00:00, that is, the second alarm time, to avoid affecting the user's deep sleep. At this time, the value of the reminder flag of the smart alarm clock represents the non-remind state, for example, 0 or false. After the sports watch queries the alarm list for the next day, when the first alarm time arrives, the sports watch queries the value of the reminder flag of the smart alarm clock to represent the value of the non-remind state, and then reminds the user on time to avoid missing the transaction.

[0020] In some possible implementations, the user's sleep status at the second alarm time is obtained; if the sleep status is a light sleep state, a reminder is given at a target time, including: sending the alarm duration corresponding to the second alarm time to an interrupt module through a first application; determining, through the interrupt module, whether the second alarm time has arrived based on the alarm duration corresponding to the second alarm time; if so, sending a reminder message to the first application through the interrupt module; in response to the reminder message, obtaining the sleep status through the first application; if the sleep status is a light sleep state, a reminder is given through the first application at the second alarm time; after the reminder is given through the first application, updating the state of the first alarm from a non-alarmed state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

[0021] It should be noted that the first application may be an alarm clock APP. The sports watch obtains the alarm list of the day through the alarm clock APP, and sends the shortest alarm duration corresponding to the earliest alarm time in the alarm clock list to the interrupt module. When the earliest alarm time arrives, the interrupt module sends a reminder message to the alarm clock APP. When the alarm clock APP receives the reminder message, the sports watch can give a reminder.

[0022] When the second alarm time is the earliest alarm time in the alarm list, and the second alarm time is the target time, and the target time is 00:00, the sports watch sends the alarm duration corresponding to the second alarm time to the interrupt module through the alarm APP. When the second alarm time arrives, the interrupt module sends a reminder message to the alarm APP. The sports watch can remind when the alarm APP receives the reminder message. Optionally, when the alarm APP receives the reminder message, the sports watch can also obtain the sleep state first. When the sleep state is a light sleep state, the sports watch reminds at 00:00. If at 00:00, the user's sleep state is a deep sleep state, the sports watch will not remind at 00:00 to avoid disturbing the user's deep sleep.

[0023] After the sports watch reminds at 00:00, the value of the reminder flag of the smart alarm clock can be updated to a value indicating the reminded state. Later, as time goes by, when the first alarm time is the earliest alarm time in the alarm list, the sports watch queries the reminder flag value through the alarm APP to indicate the reminded state, and there is no need to send the alarm duration corresponding to the first alarm time to the interrupt module. Based on this, the interrupt module of the sports watch will not report the alarm message at the first alarm time, and the sports watch will not remind at the first alarm time.

[0024] In some possible implementations, if the second alarm time is before the target time and the first alarm time is after the target time, it also includes: giving a reminder at the second alarm time, the state of the first alarm being a non-remind state at the second alarm time; after giving a reminder at the second alarm time, updating the state of the first alarm from a non-remind state to a reminded state; at the first alarm time, in response to the state of the first alarm being a reminded state, not giving a reminder.

[0025] In some possible implementations, at the first alarm time, in response to the first alarm status being in the reminded state, no reminder is given, including: updating the alarm list at the target time to obtain an updated list, the updated list including the first alarm time; at the first alarm time, in response to the first alarm status being in the reminded state, no reminder is given.

[0026] If the second alarm time is before the target time and the first alarm time is after the target time, that is, when the smart alarm time and the advance time span across days, the sports watch will remind at the advance time of the second alarm time. Afterwards, the sports watch can update the value of the reminder flag of the smart alarm from the value of the unremind state to the value of the reminded state. Afterwards, at the target time, the sports watch will still traverse the alarms of the next day and obtain the alarm list including the first alarm time. When the first alarm time becomes the earliest alarm time in the alarm list, the sports watch can query the status of the first alarm, such as querying the reminder flag of the smart alarm. Since the first alarm reminds after the first alarm time, the sports watch updates the value of the reminder flag of the first alarm to the reminded state, then when the sports watch queries the reminder flag of the first alarm, it is determined that the first alarm has reminded, and there is no need to repeat the reminder at the second alarm time.

[0027] When the smart alarm time and the advance time span across days, the sports watch will remind you at the advance time of the second alarm time. After that, when the target time comes, the sports watch will still traverse the alarms of the next day, and the alarm list obtained is called the update list. The update list includes the first alarm time. When the first alarm time comes, since the state of the first alarm is the reminded state, that is, the reminder flag of the smart alarm queried by the sports watch is a value representing the reminded state, such as 1 or true, the reminder will not be repeated.

[0028] In some possible implementations, the reminder is given at the second alarm time, including: obtaining the sleep state of the user at the second alarm time; and if the sleep state is a light sleep state, the reminder is given at the second alarm time.

[0029] In some possible implementations, it also includes: if the sleep state is a deep sleep state, no reminder is given at the second alarm time, and the first alarm state is kept in a non-reminding state; the alarm list is updated at the target time to obtain an updated list, the updated list includes the first alarm time; in response to the first alarm being in a non-reminding state, a reminder is given at the first alarm time.

[0030] The sports watch can also obtain the user's sleep state when the second alarm clock time arrives. If the user's sleep state is a light sleep state, the sports watch can remind at the target time 00:00, that is, the second alarm clock time.

[0031] If the user is in a deep sleep state at the second alarm time, the sports watch may not remind the user at the target time 00:00, that is, the second alarm time, to avoid affecting the user's deep sleep. At this time, the value of the reminder flag of the smart alarm clock represents the non-reminder state, for example, 0 or false. When the target time arrives, the sports watch queries the alarm list for the next day, which is called an updated list. The updated list includes the first alarm time. The sports watch can query the value of the reminder flag of the smart alarm clock. At this time, the reminder flag of the smart alarm clock is a value representing the non-reminder state, then the sports watch will remind the user on time to avoid missing the transaction.

[0032] In some possible implementations, the user's sleeping state at the second alarm time is obtained; if the sleeping state is a light sleep state, a reminder is given at the second alarm time, including: sending the alarm duration corresponding to the second alarm time to an interrupt module through a first application; determining, through the interrupt module, whether the current time has reached the second alarm time based on the alarm duration corresponding to the second alarm time; if so, sending a reminder message to the first application through the interrupt module; in response to the reminder message, obtaining the sleeping state through the first application; if the sleeping state is a light sleep state, a reminder is given through the first application; after the reminder is given through the first application, updating the state of the first alarm from a non-alarmed state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

[0033] It should be noted that the first application may be an alarm clock APP. The sports watch obtains the alarm list of the day through the alarm clock APP, and sends the shortest alarm duration corresponding to the earliest alarm time in the alarm clock list to the interrupt module. When the earliest alarm time arrives, the interrupt module sends a reminder message to the alarm clock APP. When the alarm clock APP receives the reminder message, the sports watch can give a reminder.

[0034] When the second alarm time is the earliest alarm time in the alarm list, the sports watch sends the second alarm time or the corresponding alarm duration to the interrupt module through the alarm APP. When the second alarm time arrives, the interrupt module sends a reminder message to the alarm APP. When the alarm APP receives the reminder message, the sports watch can remind, so as to realize the reminder in advance. Optionally, when the alarm APP receives the reminder message, the sports watch can also obtain the sleep state first. When the sleep state is a light sleep state, the sports watch reminds at the second alarm time. If the user's sleep state is a deep sleep state at the second alarm time, the sports watch will not remind at the second alarm time to avoid disturbing the user's deep sleep.

[0035] After the sports watch reminds at the second alarm time, the value of the reminder flag of the first alarm, that is, the smart alarm, can be updated to a value representing the reminded state. Afterwards, as time goes by, when the target time 00:00 is reached, the sports watch traverses the alarms of the next day and obtains an updated list for the next day. When the first alarm time is the earliest alarm time in the update list, the sports watch queries the reminder flag value through the alarm APP and represents the reminded state, then there is no need to send the alarm duration corresponding to the first alarm time to the interrupt module. Based on this, the interrupt module of the sports watch will not report the alarm message at the first alarm time, and the sports watch will not remind at the first alarm time, thereby avoiding repeated reminders.

[0036] In a second aspect, an alarm reminder device is provided, comprising a unit composed of software and / or hardware, and the unit is used to execute any one of the methods in the technical solution described in the first aspect.

[0037] In a third aspect, an embodiment of the present application provides a chip, comprising a processor; the processor is used to read and execute a computer program stored in a memory to execute any one of the methods in the technical solution described in the first aspect.

[0038] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.

[0039] Further optionally, the chip also includes a communication interface.

[0040] In a fourth aspect, an electronic device is provided, comprising: a processor, a memory and an interface; the processor, the memory and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution described in the first aspect.

[0041] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution described in the first aspect.

[0042] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is run on an electronic device, the electronic device executes any one of the methods in the technical solution described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application;

[0044] Figure 2 is a software structure block diagram of the terminal device 100 provided in an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of the software and hardware architecture of a sports watch provided in an embodiment of the present application;

[0046] Figure 4 This is an application scenario diagram of the interaction between a sports watch and a smart phone provided in an embodiment of the present application;

[0047] Figure 5 is a schematic diagram of an alarm setting interface on a smart phone provided in an embodiment of the present application;

[0048] Figure 6 This is an example of an interface diagram of a sports watch provided in an embodiment of the present application;

[0049] Figure 7 This is another example of a sports watch interface diagram provided in an embodiment of the present application;

[0050] Figure 8 This is a flow chart of a method for adding an alarm provided in an embodiment of the present application;

[0051] Fig. 9 This is a flowchart of an alarm reminder method provided in an embodiment of the present application;

[0052] Fig.10 This is another example of a sports watch interface diagram provided in an embodiment of the present application;

[0053] Fig.11 This is a flowchart of another alarm reminder method provided in an embodiment of the present application;

[0054] Fig.12 This is a flowchart of another alarm reminder method provided in an embodiment of the present application;

[0055] Fig.13 This is a flowchart of another alarm reminder method provided in an embodiment of the present application;

[0056] Fig.14 This is a schematic diagram of the structure of an alarm reminder device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0058] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.

[0059] The alarm reminder method provided in the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0060] For example, Figure 1 1 is a schematic diagram of the structure of an example of a terminal device 100 provided in an embodiment of the present application. The terminal device 100 may be a wearable device, such as a sports watch. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc. Optionally, the terminal device 100 may also be a smart phone or a tablet computer, etc. The terminal device 100 may also include: an antenna 2, a mobile communication module 150, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a camera 193, and a subscriber identification module (SIM) card interface 195.

[0061] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0062] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0063] When the terminal device 100 is a smart phone or tablet computer, the software system can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the terminal device 100.

[0064] Figure 2 1 is a software structure diagram of the terminal device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0065] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0066] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0067] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0068] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0069] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0070] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0071] The phone manager is used to provide communication functions of the terminal device 100, such as management of call status (including connection, disconnection, etc.).

[0072] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0073] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and disappear automatically after a short stay without user interaction.

[0074] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0075] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0076] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0077] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0078] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0079] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0080] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0081] A 2D graphics engine is a drawing engine for 2D drawings.

[0082] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0083] When the terminal device is a wearable device such as a sports watch, the software structure diagram can be found in Figure 3 shown. Figure 3 A lightweight software architecture is shown, which includes the application layer for human-computer interaction, the application business framework layer (Framework layer), algorithms and internal libraries, the hardware abstraction layer, the lightweight kernel core layer and the hardware driver layer from top to bottom. The application layer can include a series of application packages.

[0084] like Figure 3 As shown, the application package may include third-party applications, communication applications, interconnection applications, health applications, sports applications, device management, system applications, manufacturing, wallet applications and other types of applications.

[0085] Optionally, the third-party applications may include: a navigation application, a player, an application 1, an application 2, etc.

[0086] Communication applications may include: messages, call logs, contacts, calls, and other applications.

[0087] Interconnected applications may include: finding mobile phones, temperature control and taking photos, voice assistants, personal affairs centers, situational intelligence, and other interconnected applications (such as one-touch transfer).

[0088] Health applications can be used to detect or manage data on heart rate, blood oxygen saturation, sleep, menstrual cycle, breathing training, heart health research, etc.

[0089] Sports applications can provide content in areas such as professional sports, multiple sports, training status, exercise records, and activity records.

[0090] The device management application can manage Over-the-Air (OTA) upgrades, watch face management, power on and off, factory reset (settings), and basic system settings.

[0091] System applications include: compass, weather, alarm, stopwatch, flashlight, timer, altitude barometer and music applications.

[0092] The manufacturing application is used to manage the user interfaces in the production phase, including: human-machine interaction interface (MMI UI), production UI, and aging UI.

[0093] Wallet applications include: various payment tools, bus cards, access cards and other tools.

[0094] The application framework layer is the APP business framework, which is used to provide basic capabilities for the interaction between the upper and lower layers. It can provide: ACE UI framework, basic system capabilities, underlying software service capabilities, sports and health service capabilities, and hardware service capabilities.

[0095] The ACE UI framework includes: ACE application development framework and UIKit. Among them, the ACE application development framework is used to implement: declarative interpretation, JS / C++ binding, application isolation, application management, JSEngine and other basic functions:

[0096] UIKit can provide user interface components, which can be used to provide a graphical user interface (GUI) framework and vector engine, acting on dial templates, fonts, layouts, and views.

[0097] The basic capabilities of the system include communication services and audio services. Communication services may include: message services, call services, interconnection and contact services; audio services may include: music playback, audio management, voice broadcast, voice services and music control services.

[0098] The underlying software service capabilities are used to provide basic services, manufacturing and equipment management capabilities. Among them, basic services include: log services, file systems, non-volatile storage (NV) management, exception records, dual-machine communication, memory management, permissions (Property), log (Log) system and other services; manufacturing services include: production services, aging services and MMI services; equipment management services include: equipment control, display management, sensor management and traditional Bluetooth management services.

[0099] Sports health service capabilities include: sports services and health services. Sports services include: exercise services, daily activity services, data storage services, training status assessment services, etc.; health services include: heart rate services, sleep services, respiratory pressure, heart health services, and blood oxygen services.

[0100] Hardware service capabilities are used to support positioning services, near field communication (NFC) services, traditional Bluetooth services, and Bluetooth low energy (BLE) services. Among them, positioning services include: integrated positioning and global positioning system (GPS) connection positioning (Connect GPS); NFC services include NFC services on the terminal device (such as sports watches) side and NFC-related protocol stacks; Bluetooth services include: dual mobile phones, connection management, call management, data management, IAP (writing to user flash memory, InApplicationProgramming), call management, music management and other services; BLE services include: related profiles, notification center services (such as: Apple Notification Center Service (Apple Notification Center Service), ANCs), connection management and data management and other services.

[0101] The algorithms and internal libraries include: basic library, algorithm library, traditional Bluetooth protocol stack and BLE protocol stack.

[0102] The basic libraries include: payment application, barcode, basic C library, Jerry Script (javascript engine), security library, C / JSON library, QRCode (JavaScript library for generating QR code), tinyxml (an XML parser), freetype (display), ICU4C (a collection of C / C++ and Java libraries), Harfbuzz (text shaping engine), etc.

[0103] The algorithm library includes: liveness detection algorithm, gesture algorithm, fusion, rope skipping algorithm, heart rate algorithm, blood pressure algorithm, dimming algorithm, sports algorithm, First Beat / TruSport (sports algorithm), physiological cycle algorithm, sleep algorithm, question algorithm, wearing detection algorithm, pedestrian dead reckoning (PDR) algorithm, breathing algorithm, pressure algorithm, electrocardiogram (ECG) algorithm and audio algorithm.

[0104] The Bluetooth protocol stack and the BLE protocol stack may be provided by chip vendors.

[0105] The hardware abstraction layer, also known as the HAL layer, is used to provide interfaces between hardware modules and software such as buttons, touch panel (TP), super input / output chip (SIO), Flash, charging module, motor, liquid crystal display (LCD), board support package (BSP), Bluetooth module (BT) and NFC module.

[0106] The hardware driver layer includes drivers for various hardware: BSP, photoplethysmography (PPG) module, TP, Flash, general-purpose input / output (GPIO), accelerometer and gravity sensor (Accelerometer+Gyroscope), charging manager (Charge), touch button (TouchKey), motor (Motor), LCD, BT, NFC and GNSS drivers.

[0107] The lightweight kernel core layer includes the kernel (Kernel-Core). The kernel includes the Lite OS module, which includes the Memery, Task, IPC and interrupt modules.

[0108] The application framework layer interacts with the application layer through the Framework API; the HAL layer interacts with the algorithms and internal libraries through the HAL API; the kernel interacts with the algorithms and internal libraries through the CMSIS API.

[0109] Usually, people set the alarm through the alarm APP of the application layer (hereinafter referred to as the application layer). After the alarm is set, the alarm APP sends the alarm duration to the Lite OS module of the kernel through: FWK layer, algorithm and internal library. The Lite OS module includes AlarmA function and AlarmB function. The alarm duration is managed and called by the AlarmA function. When the alarm time corresponding to the alarm duration arrives, the Lite OS module sends an alarm message to the upper application layer through the interrupt module. When the alarm APP of the application layer receives the alarm message, it can trigger the alarm, for example, playing alarm music, or triggering the motor to vibrate to remind the user.

[0110] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 , Figure 2 and Figure 3Taking the terminal device of the structure shown as an example, the alarm reminder method provided by the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios. In the following, the execution subject is an exemplary description as a sports watch.

[0111] With the development of electronic technology, smart wearable devices are increasingly being used by people. As one of the most widely used smart wearable devices, sports watches are favored by people. Sports watches can also be called sports bracelets. While being convenient to wear, they can also detect biological information such as heart rate and sleep to assist users in exercise and life. Sports watches can also be connected to smartphones via Bluetooth communication. Users can install the APP corresponding to the sports watch on their smartphones and manage the sports watch by operating the APP, such as viewing the heart rate, sleep and other information detected by the sports watch. Users can also manage the APP on the sports watch through the APP of the sports watch on the smartphone, such as installing new APPs and deleting unwanted APPs. Users can also set the alarm of the sports watch through the APP of the sports watch installed on the smartphone. After the user sets the alarm of the sports watch, the sports watch can ring at the set alarm time to remind the user. However, such a ringing method is relatively simple and the user experience is not high.

[0112] The above alarm clock is an ordinary alarm clock, which can also be called a business alarm clock. After the user sets an ordinary business alarm clock, the sports watch will ring or vibrate to remind the user when the alarm time arrives. For example, after the user sets the business alarm clock at 7 o'clock in the morning, when the time arrives at 7 o'clock in the morning, the sports watch can output a prompt message, such as ringing or vibrating to remind the user. In the embodiment of the present application, the operation that can be perceived by the user, such as the ringtone, vibration and / or light output at the alarm time to remind the user, is called an alarm, which can also be called a reminder. For the convenience of user use, a smart alarm clock is also set on the sports watch. The difference between the smart alarm clock and the business alarm clock is that the smart alarm clock can be set to remind in advance. Optionally, for the convenience of description and understanding, the reminder of the alarm clock involved in the following text is a bell, which is only an exemplary description. The way the alarm clock reminds can also be a combination of one or more of vibration, bell, indicator light, and indicator light flashing. The embodiment of the present application does not limit the reminder method of the alarm clock.

[0113] Smart alarm clocks usually set an advance amount of time, called the advance duration, such as five minutes, ten minutes, half an hour, etc. Optionally, the advance duration of the smart alarm clock can be modified according to user needs. In the embodiment of the present application, the moment of the smart alarm clock can be called the smart alarm clock moment, and the moment of the advance duration before the moment of the smart alarm clock is called the advance moment. When the sports watch is set with the smart alarm clock, the sports watch will remind you at the advance moment before the smart alarm clock moment. For example, the time of the smart alarm clock is 8:00 in the morning, and the advance duration is 30 minutes. Then at the moment corresponding to the advance duration of 7:30 in the morning, the sports watch reminds. Such an alarm reminder method can remind the user in advance that the time of the set smart alarm clock is about to arrive, which allows the user to prepare in advance, is more humane, and also enriches the function of the alarm clock and improves the user experience.

[0114] If the above-mentioned smart alarm clock is used to wake up sleep, the sports watch can also determine whether to set the alarm in advance in combination with the user's sleep state. After the user wears the sports watch to fall asleep, the sports watch will periodically detect the user's sleep state. When the advance time of the smart alarm clock arrives, the sports watch obtains the current sleep state. If the current user is in a deep sleep state, the sports watch will not remind. Wait until the smart alarm clock time arrives, and the sports watch will remind again. If the sleep state obtained by the sports watch is a light sleep state when the advance time of the smart alarm clock arrives, it will remind at the advance time. For example, when the time of the smart alarm clock is 8:00 in the morning, and the advance time is 30 minutes. At 7:30 in the morning, the sports watch detects that the current user is in a light sleep state, and reminds at 7:30. After that, the sports watch will no longer remind at 8:00 in the morning. If the user is in a deep sleep state at 7:30 in the morning, the sports watch will not remind at 7:30, and will wait until 8:00 to remind again. In this way, the user can be reminded in advance when the user is in a light sleep state, so that the user can prepare in advance. When the user is in a deep sleep state, the user will not be woken up early, ensuring the user's sleep time.

[0115] Optionally, the number of the above-mentioned smart alarm clocks can be increased or deleted. The user can set one or more smart alarm clocks as needed. For the smart alarm clock, it can also be turned on or off. When the user turns off the smart alarm clock, the sports watch will not remind at the smart alarm time and the advance time.

[0116] Optionally, the user can set the alarm of the sports watch by operating the APP of the sports watch installed on the smartphone. Figure 4As shown in FIG. 1 , the smartphone and the sports watch can be connected via Bluetooth. For example, the APP corresponding to the sports watch is the sports health APP. The user can open the sports health APP on the smartphone and enter the alarm setting interface in the sports health APP. The alarm setting interface can be found in FIG. Figure 5 The interface diagram shown. Users can see two types of alarms: smart alarm and business alarm in the alarm setting interface. The smart alarm is the first alarm of the sports watch, followed by the business alarm. Optionally, the business alarm can also be empty. Users can click the switch control of the smart alarm in the setting interface to turn the smart alarm on or off; users can also click the switch control of the business alarm in the alarm setting interface to turn the business alarm on or off; users can also click the add control (for example: +) at the bottom of the interface to add a new business alarm.

[0117] Optionally, the user can also directly operate the sports watch to add an alarm. The interface for adding an event alarm on the sports watch can be seen in FIG. Figure 6 If the user has not set an event alarm on the sports watch before, when the user opens the alarm clock app on the sports watch, the sports watch can display the following Figure 6 The interface shown in Figure a includes an add control (for example, +). The user can click Figure 6 Add the controls in Figure a, and the sports watch will display as follows Figure 6 The time setting interface of the event alarm is shown in Figure b. In the time setting interface of the event alarm, the user can slide the hour bar up and down to select the time for the event alarm, and can also slide the minute bar up and down to select the minute for the event alarm. Figure 6 In the time setting interface of the transaction alarm clock shown in Figure b, click the next control, and the sports watch will display the following Figure 6 The repeat date setting interface of the event alarm clock shown in Figure c in FIG. The user can select the date to be reminded in the repeat date setting interface of the event alarm clock. Figure 6 In Figure c of FIG. 1 , the selectable dates that need to be reminded include Sunday to Saturday. For example, when the user selects Monday, Tuesday, and Wednesday, the repeat date setting interface for setting the event alarm is as follows: Figure 6 As shown in Figure c. After that, the user clicks the OK control in the repeat date setting interface to complete the addition of the event alarm. After that, the sports watch can display the following Figure 6 The interface shown in Figure d in the figure. Users can Figure 6 In the interface shown in Figure d, continue to click Add Control to add more event alarms. Figure 6 In the interface shown in Figure d, click the switch control to turn off the transaction alarm.

[0118] Optionally, the time setting interface of the transaction alarm clock can also be displayed according to the twelve-hour system, for example Figure 6 As shown in Figure e. Figure 6 In the figure e in the figure, the user can also swipe up and down to select morning or afternoon, and then select the corresponding time to set the event alarm. Optionally, the recurrence date setting interface of the event alarm can also be as follows Figure 6 As shown in Figure f, the user can slide up and down on the repeat date setting interface to select the date to be reminded. Figure 6 FIG. 5( f) shows an example in which the user selects Sunday reminder.

[0119] Optionally, the user can also directly operate the sports watch to turn on the smart alarm clock. The user opens the alarm clock APP on the sports watch, and the sports watch displays the setting interface of the smart alarm clock, such as Figure 7 As shown in Figure a of the figure. The user can click the switch control in the setting interface of the smart alarm clock to turn on or off the smart alarm clock. When the user clicks the time display area in the setting interface of the smart alarm clock, the sports watch can display the time setting interface of the smart alarm clock, such as Figure 7 As shown in Figure b in the figure. In the time setting interface of the smart alarm clock, the user can slide the hour bar up and down to select the time for the smart alarm clock, and can also slide the minute bar up and down to select the minute for the smart alarm clock. Figure 7 In the time setting interface of the smart alarm clock shown in Figure b, click the next control, and the sports watch will display the following Figure 7 The repeat date setting interface shown in Figure c in the figure. The user can select the date to be reminded in the repeat date setting interface. Figure 7 In Figure c, seven dates from Sunday to Saturday are used as an example. For example, when the user selects Monday, Tuesday, and Wednesday, the repeat date setting interface can be Figure 7 As shown in Figure c. After that, the user clicks the OK control on the repeat date setting interface to complete the addition of the smart alarm clock. The sports watch can display the following Figure 7 The interface shown in Figure d. Figure 7 In the figure d in FIG. 8, a smart alarm clock for setting 8:00 am is shown as an example. The user can also click Figure 7 d in the figure to modify the advance time of the smart alarm clock (for example, the area showing "Smart wake-up 30 minutes"). After the smart alarm clock is turned on, the advance time can be the default value, such as 30 minutes. Figure 7 When the advance time area is displayed in the d figure, the sports watch can also display Figure 7The setting interface of the advance time is shown in Figure e. In the setting interface of the advance time, the user can slide the minute bar up and down to set the advance time. After the user selects the advance time to be set, click the OK control to complete the setting of the advance time. Optionally, after completing the setting of the advance time, the sports watch can display the following Figure 7 Optionally, the user can also Figure 7 In the interface shown in Figure d, click the switch control to turn off the smart alarm clock.

[0120] Optionally, the time setting interface of the smart alarm clock can also be displayed according to the twelve-hour system, for example Figure 7 As shown in Figure f. Figure 7 In the figure f, the user can also swipe up and down to select morning or afternoon, and then select the corresponding time to set the time of the smart alarm clock. Optionally, the repeat date setting interface can also be as follows Figure 7 As shown in Figure g, users can slide up and down to select the date on which they want to set the alarm. Figure 7 In the g figure, it is shown as an example that the user selects Sunday reminder.

[0121] It should be noted that, whether it is a business alarm clock or a smart alarm clock, when the user sets the alarm time, the sports watch will convert the alarm time into the number of minutes from zero o'clock and zero minutes (00:00), and the number of minutes can be recorded as the alarm duration corresponding to the alarm time. In other words, if the user sets the alarm for 7:00 in the morning, the sports watch will calculate the number of minutes from 7:00 in the morning to 00:00 on the same day, that is, 7×60=420 minutes. The sports watch will record the alarm duration corresponding to the 7:00 in the morning as 420 minutes.

[0122] After the user adds (turns on) a smart alarm, the process of adding a smart alarm to a sports watch can be found in Figure 8 The process shown includes:

[0123] S701. Obtain the time of the smart alarm clock.

[0124] When the user adopts Figure 5 or Figure 7 When a smart alarm is added in the manner shown, the sports watch can respond to user operations and recognize the time of the smart alarm, which can be called the smart alarm moment.

[0125] S702: Determine whether the smart alarm duration corresponding to the smart alarm time is greater than or equal to the advance duration. If yes, execute S703A; if no, execute S703B.

[0126] It should be noted that the smart alarm time is a specific time point, such as a few minutes, or a few minutes on a certain day of the week. The sports watch converts the smart alarm time into a corresponding number of minutes, which is called the smart alarm time. The time corresponding to the smart alarm time minus the advance time can be called the advance time.

[0127] The sports watch can determine whether the smart alarm duration is greater than or equal to the advance duration. If the smart alarm duration is greater than or equal to the advance duration, it means that the smart alarm time and the advance time are on the same day, that is, the smart alarm time and the advance time do not cross days. If the smart alarm duration is less than the advance duration, it means that the smart alarm time and the advance time are not on the same day, that is, the smart alarm time and the advance time cross days.

[0128] For example, if the smart alarm time is 0:30 and the advance time is 30 minutes, the sports watch determines that the smart alarm time is 30 minutes. At this time, the smart alarm time is equal to the advance time, and the smart alarm time and the advance time do not cross days; if the smart alarm time is 7:30 and the advance time is 30 minutes, the sports watch determines that the smart alarm time is 450 minutes (7×60+30=450). At this time, the smart alarm time is greater than the advance time, indicating that the smart alarm time and the advance time do not cross days. If the smart alarm time is 0:20 and the advance time is 30 minutes, the sports watch determines that the smart alarm time is 20 minutes. At this time, the smart alarm time is less than the advance time, indicating that the smart alarm time and the advance time cross days.

[0129] If the smart alarm time and the advance time do not cross days, the sports watch can execute step S703A.

[0130] If the smart alarm time and the advance time span across days, the sports watch can execute step S703B.

[0131] S703A: Determine whether the smart alarm clock needs to be reminded on that day. If so, execute S704.

[0132] Whether it is a smart alarm clock or a business alarm clock, each has a corresponding date flag, which is based on the Universal Time Coordinated (UTC).

[0133] Specifically, for an alarm time, seven date flags can be set, and these seven date flags correspond to the seven dates from Sunday to Saturday (i.e., the repeating dates mentioned above). If the value of a date flag is true or 1, then for this alarm time, the date corresponding to this date flag needs to be reminded; if the value of this date flag is false or 0, then for this alarm time, the date corresponding to this date flag does not need to be reminded. Figure 6As shown in Figure d, the user has selected the three dates of Monday, Tuesday and Wednesday, which means that the smart alarm clock at 8:00 a.m. needs to remind you on Monday, Tuesday and Wednesday, and does not need to remind you on the remaining Thursday, Friday, Saturday and Sunday.

[0134] The sports watch queries the value of the date flag corresponding to the day. Figure 6 Taking the date corresponding to the reminder required in Figure d in as an example, if the day is Monday, it can be determined that a reminder is required on that day; if the day is Friday, it can be determined that no reminder is required on that day.

[0135] Optionally, if no reminder is needed on the same day, the sports watch can set an alarm for 00:00 the next day. At 00:00 the next day, the sports watch can traverse the alarms that need to be reminded the next day and obtain the alarm list for the next day, which will not be repeated here.

[0136] Based on the alarm clock implementation logic, the sports watch will set a hidden zero-point alarm interrupt by default, that is, the 00:00 interrupt is not displayed to the outside, and the user cannot see the zero-point alarm interrupt in the setting interface of the alarm clock APP. The sports watch can traverse all the alarm times of the day at 00:00 every day to obtain the alarm list of the day. Optionally, the sports watch can calculate the number of minutes from each alarm time of the day to 00:00, and obtain the alarm duration corresponding to each alarm time. Then, the sports watch arranges the multiple alarm durations obtained in order from small to large. When 00:00 arrives every day, the sports watch will query the earliest alarm time in the alarm list, that is, query the shortest alarm duration, and then send the shortest alarm duration corresponding to this earliest alarm time to the interrupt module of the kernel layer through the alarm clock APP. It should be noted that the sports watch sends the alarm duration corresponding to the alarm time through the alarm clock APP, and the alarm duration is the number of minutes from the alarm time to 00:00 of the day.

[0137] It should be noted that the alarm function can be realized by the alarm function of the real-time alarm (RTC Alarm) provided by the operating system to set the alarm on time. Optionally, the RTC Alarm can be implemented in the Lite OS module. The Lite OS module includes an interrupt module. The interrupt module sets two functions, AlarmA and AlarmB. Among them, the AlarmA function supports setting an alarm time at the same time and sets the alarm when the alarm time arrives. The AlarmB function is used to start the system automatic update function on time.

[0138] Optionally, the sports watch sends the alarm duration to the interrupt module through the alarm clock APP of the application layer. The interrupt module counts the time and sends an alarm message to the alarm clock APP of the application layer when the time corresponding to the alarm duration arrives. The alarm clock APP responds to the received alarm message and gives a reminder.

[0139] S704: Determine whether the duration of the smart alarm clock is greater than or equal to the current duration corresponding to the current time. If so, execute S705.

[0140] The sports watch can calculate the number of minutes from the current moment to 00:00 on the same day, and record the number of minutes as the current duration corresponding to the current moment. After determining that a reminder is needed on the same day, the sports watch can continue to determine whether the duration of the smart alarm clock is greater than or equal to the current moment corresponding to the current time. For example, if the current moment is 7:00, the current duration is 7×60=420 minutes. In other words, the sports watch determines whether the duration of the smart alarm clock is greater than or equal to the current duration, that is, whether the smart alarm clock time is not earlier than the current moment.

[0141] For example, the smart alarm time is 8:00. If the current time is 7:00, the sports watch can determine that the smart alarm duration is greater than the current duration, that is, the smart alarm time is later than the current time; if the current time is 8:00, the sports watch can determine that the smart alarm duration is equal to the current duration, that is, the smart alarm time is equal to the current time; if the current time is 9:00, the sports watch can determine that the smart alarm duration is less than the current duration, that is, the smart alarm time is earlier than the current time.

[0142] Optionally, when the sports watch determines that the duration of the smart alarm clock is greater than or equal to the current duration, that is, when it determines that the time of the smart alarm clock is not earlier than the current time, step S705 can be executed.

[0143] Optionally, when the sports watch determines that the duration of the smart alarm is less than the current duration, that is, when the smart alarm time is determined to be earlier than the current time, it means that the smart alarm time of the day has passed and the smart alarm time cannot be used to remind the user. The sports watch can set an alarm for 00:00 the next day. When it is 00:00 the next day, the sports watch can traverse all the alarm times of the next day and obtain the alarm list of the next day, which will not be described in detail here.

[0144] S705: Get a new alarm time.

[0145] When the sports watch determines that the smart alarm duration is greater than or equal to the current duration, it means that the currently set smart alarm time is in time to remind on that day, and a new alarm time can be re-determined. Optionally, the new alarm time is the smart alarm time minus the advance duration, that is, the advance time mentioned above.

[0146] For example, if the smart alarm time is 8:00 and the advance time is 30 minutes, the sports watch determines that the new alarm time is 8:00 minus 30 minutes, which is 7:30.

[0147] S706: Determine whether the new alarm duration corresponding to the new alarm time is greater than or equal to the current duration. If yes, execute S707A; if no, execute S707B.

[0148] After the sports watch calculates the new alarm time, it can calculate the number of minutes from the new alarm time to 00:00 on the current day. This number of minutes is called the new alarm duration. The sports watch determines whether the new alarm duration is greater than or equal to the current duration, that is, whether the new alarm time is not earlier than the current time.

[0149] If the new alarm duration is greater than or equal to the current duration, that is, the new alarm time is not earlier than the current time, the sports watch executes step S707A; if the new alarm duration is less than the current duration, that is, the new alarm time is earlier than the current time, the sports watch executes step S707B.

[0150] For example, if the smart alarm time is 8:00 and the advance time is 30 minutes, the sports watch determines the new alarm time to be 8:00 minus 30 minutes, which is 7:30. If the current time is 7:00, it means that the new alarm time is greater than the current time, that is, the new alarm time is later than the current time, and the sports watch can execute S707A; if the current time is 7:30, it means that the new alarm time is equal to the current time, that is, the new alarm time is equal to the current time, and the sports watch can execute S707A; if the current time is 7:40, it means that the new alarm time is less than the current time, that is, the new alarm time is earlier than the current time, and the sports watch can execute S707B.

[0151] S707A. Add a new alarm with a new alarm time.

[0152] S707B. Add a new alarm for the current time.

[0153] When the sports watch determines that the new alarm duration is greater than or equal to the current duration, a new alarm can be added at the new alarm time to remind the user in advance according to the preset advance duration. When the sports watch determines that the new alarm duration is less than the current duration, it means that the new alarm time has passed, and a new alarm at the current time can be added, so that the sports watch can remind the user immediately at the current time and remind the user as early as possible.

[0154] That is to say, if the smart alarm time is 8:00 and the advance time is 30 minutes, the sports watch determines the new alarm time to be 7:30. If the current time is 7:30 or before 7:30, a new alarm with a new alarm time of 7:30 can be added. Then at 7:30, the sports watch can remind you. If the current time is after 7:30 (excluding 7:30), for example, 7:50. Since the current time does not exceed the smart alarm time, that is, the current time is not later than 8:00, the sports watch can add a new alarm with the current time of 7:50. At this time, the sports watch can remind you immediately and remind the user in advance.

[0155] Optionally, after the above S706, the process of adding a smart alarm clock may further include the following steps S708 to S710A, S708 to or S710B:

[0156] S708: Determine whether the duration of the smart alarm clock is equal to the advance duration. If so, execute S709.

[0157] The sports watch can determine whether the duration of the smart alarm is equal to the advance duration. In most cases, the duration of the smart alarm is not equal to the advance duration. In some cases, for example, when the smart alarm time is 0:30 and the advance duration is 30 minutes, the duration of the smart alarm is equal to the advance duration. If the duration of the smart alarm is equal to the advance duration, it means that the new alarm time is 00:00, and the sports watch can execute step S709.

[0158] S709: Determine whether the new alarm duration is greater than or equal to the current duration. If yes, execute S710A. If no, execute S710B.

[0159] S710A, add a new alarm at 00:00.

[0160] S710B, add a new alarm for the current time.

[0161] When the duration of the smart alarm is equal to the advance duration, and the duration of the new alarm is equal to the current duration, it means that the current time is 00:00, and the sports watch adds a new alarm for 00:00. When the duration of the smart alarm is equal to the advance duration, and the duration of the new alarm is greater than the current duration, it means that the current time is after 00:00, and the sports watch adds a new alarm for the current time.

[0162] For example, the smart alarm time is 0:30, and the advance time is 30 minutes. The new alarm time is 00:00, and the new alarm time is 0 minutes. If the current time is 00:00, the current time is 0 minutes, which means the new alarm time is equal to the current time. The sports watch can add a new alarm at 00:00; if the current time is 0:20, which means the new alarm time is greater than the current time. The sports watch can add a new alarm at 0:20 to remind the user as early as possible.

[0163] When an alarm reminder is completed, the sports watch again sends the next alarm time in the alarm list to the interrupt module through the alarm APP of the application layer, and repeats the above alarm reminder process. Based on this, the sports watch can support multiple reminders at different alarm times.

[0164] When a new alarm is added to the sports watch, a reminder can be given when the alarm time of the new alarm arrives, that is, the alarm reminder process is executed. Fig. 9 The flowchart of the alarm reminder after adding a new alarm is shown, which specifically includes:

[0165] S801, search the alarm list to determine whether there is an alarm time for the day. If yes, execute S802A; if no, execute S802B.

[0166] The alarm list may include the alarm time of the business alarm clock, or the alarm time of the smart alarm clock. Optionally, the alarm list may be a list of multiple alarm times, such as 7:30, 8:00, 12:00, etc.; or a list of multiple alarm durations corresponding to multiple alarm times, such as 420 minutes, 450 minutes, 720 minutes, etc.

[0167] Optionally, the sports watch sorts the durations of multiple alarms to obtain an alarm list. The sports watch traverses all alarms at 00:00 every day to obtain the alarm list of the day, and determines whether there is an alarm time for the day according to the alarm list. If the alarm time for the day exists in the alarm list, the sports watch executes S802A; if the alarm time for the day does not exist in the alarm list, the sports watch can execute S802B.

[0168] For example, if the user only sets an alarm for 7:00 a.m. every weekday, then at 00:00 on statutory holidays such as Saturdays and Sundays, the alarm list traversed by the sports watch will not contain the alarm time or alarm duration.

[0169] S802A: Send the alarm duration corresponding to the earliest alarm time of the day to the interrupt module.

[0170] S802B. Send the alarm duration corresponding to the alarm time of 0:00 the next day to the interrupt module.

[0171] If the alarm time of the day exists in the alarm list, the sports watch can query the earliest alarm time of the day (or the shortest alarm duration). After that, the sports watch can send the alarm duration corresponding to the earliest alarm time, that is, the shortest alarm duration, to the interrupt module through the alarm APP of the application layer. If the alarm time of the day does not exist in the alarm list, the sports watch can send the alarm duration corresponding to the alarm time of 00:00 the next day to the interrupt module through the alarm APP of the application layer. For example, the alarm duration corresponding to 00:00 the next day is 1440 (24×60=1440). After receiving the alarm duration, the interrupt module triggers a reminder at the corresponding alarm time.

[0172] That is, the AlarmA function in the interrupt module is used to manage the shortest alarm duration and trigger a reminder when the earliest alarm time corresponding to the shortest alarm duration arrives. For ease of description, the earliest alarm time corresponding to the shortest alarm duration managed by the AlarmA function is called the waiting alarm time.

[0173] S803: Determine whether the current time is the time to set off the alarm. If yes, execute S804.

[0174] S804: Prompt.

[0175] The sports watch determines whether the current moment is the alarm time corresponding to the shortest alarm duration in the AlarmA function. If the current moment is not the alarm time, S803 can be repeatedly executed. As time goes by, when the alarm time comes, the interrupt module can send a reminder message to the alarm APP, triggering the alarm APP to remind. When the alarm reminder is completed, the alarm APP of the application layer obtains the next alarm time in sequence. At this time, the next alarm time is the earliest alarm time of the day. The alarm APP of the application layer can then send the shortest alarm duration corresponding to this earliest alarm time to the interrupt module. The AlarmA function in the interrupt module receives the shortest alarm duration sent by the alarm APP of the application layer again, and repeats the above reminder process.

[0176] Take the example of a smart alarm time of 00:30 and a lead time of 30 minutes. If the smart alarm time is equal to the lead time, the new alarm time is 00:00. The user sets a smart alarm for 00:30 and sets the lead time to 30 minutes, which means that the user expects the sports watch to remind him in advance at 00:00, without the need to set the alarm at 0:30. However, based on the original reminder process, the sports watch will execute the default zero-point alarm interruption through the alarm APP. That is, the sports watch will traverse all the alarm times of the day at 00:00 and find the earliest alarm time, and send the shortest alarm time corresponding to the earliest alarm time, but will not ring or vibrate at this new alarm time (that is, the alarm at 0:00) to remind the user. This is inconsistent with the user's expectation of an advance reminder at 00:00. Since the sports watch will traverse all the alarm times when 00:00 arrives, it will traverse to the smart alarm time of 00:30. When the sports watch reminds the traversed alarm times one by one, the sports watch will remind again at the smart alarm time of 00:30. However, the result of the sports watch reminding again at 00:30 does not match the reminder method expected by the user, which affects the user experience.

[0177] If the smart alarm clock is used to wake up the sleeper, in the process of determining whether to remind the user based on the user's sleep state, the sports watch will not remind the user at 00:00 based on the original reminder logic, even if it detects that the user is in a light sleep state, and will remind the user at 00:30. This reminder method does not match the user's expected reminder method in advance, affecting the user experience.

[0178] Optionally, the alarm reminder process when the advance time is 00:00 can be found in Fig.11 The embodiments shown will not be described in detail here.

[0179] S703B, determine whether the smart alarm clock needs to be reminded on that day. If yes, execute S711A; if no, execute S711B.

[0180] If the smart alarm duration is less than the advance duration, it means that the advance time and the smart alarm time span across days (the advance time is before 00:00, and the smart alarm time is after 00:00). At this time, the sports watch can determine whether the smart alarm needs to be reminded on that day. For the detailed process of S703B, please refer to the relevant description of S703A in the previous text, which will not be repeated here.

[0181] S711A, obtain a new alarm time, and execute S712.

[0182] Specifically, when the sports watch determines that the smart alarm clock needs to remind you on that day, it can calculate the new alarm duration corresponding to the new alarm time. Specifically: the sports watch adds the smart alarm duration to the total number of minutes of the day, and subtracts the advance time to get the new alarm duration. For example, the smart alarm time is 0:02, and the advance time is 5 minutes, then the new alarm duration is: 1440+2-5=1437. Among them, 1440 is the product of 60×24, which is also the total number of minutes in a day. If the new alarm duration is converted to the corresponding new alarm time, it is 23:57. After that, continue to execute S712.

[0183] S711B. Do not add the alarm time for the day.

[0184] If the smart alarm does not need to be reminded on that day, the sports watch does not need to add the smart alarm time. Based on the original alarm reminder logic, the sports watch will still add an alarm interrupt at 00:00. And at 00:00 the next day, the process of traversing the alarm time of the next day will be started to obtain the alarm list of the next day.

[0185] S712: Determine whether the new alarm duration is greater than or equal to the current duration. If yes, execute S713A. Alternatively, if no, execute S713B.

[0186] The sports watch determines whether the new alarm duration is greater than or equal to the current duration, that is, determines whether the new alarm time is not earlier than the current time.

[0187] S713A, set the early alarm flag. Then, execute S714.

[0188] If the currently added alarm is a smart alarm, the sports watch also sets an advance alarm flag for the smart alarm to indicate that the smart alarm needs to be reminded in advance. If it is another business alarm, there is no need to set an advance alarm flag, that is, no advance reminder is required. Optionally, the sports watch sets an advance alarm flag by marking the corresponding advance alarm flag as 1 or true, indicating that the alarm needs to be reminded a certain length of time in advance.

[0189] S713B, obtain the alarm duration after the delay, and add a new alarm corresponding to the new alarm time of the alarm duration after the delay. Then, execute S714.

[0190] S714: Add a new alarm with a new alarm time.

[0191] When the new alarm duration is greater than or equal to the advance duration, that is, the new alarm time is not earlier than the current time, the sports watch can add a new alarm at the new alarm time. When the new alarm duration is less than the advance duration, that is, the new alarm time is earlier than the current time, the sports watch can add a new alarm at the current time, which can achieve instant reminders, thereby reminding the user as early as possible.

[0192] For example, the smart alarm time is 0:03, and the advance time is 5 minutes. The new alarm time is 23:57, and the new alarm duration is 1437 minutes (23×60+57). If the current time is before (not included) 23:57, for example, 23:50, the current duration is: 23*60+50=1430 minutes, which means that the new alarm duration is greater than the current duration, and the sports watch can add a new alarm with a new alarm time of 23:57. If the current time is 23:57 or after 23:57, for example, 23:59, which means that the new alarm duration is greater than or equal to the current duration, a new alarm with the current time of 23:59 can be added to remind the user as early as possible.

[0193] The interface of the sports watch can be as follows Fig.10 Figure a in the figure is an arbitrary interface. When the alarm time arrives, it can be displayed as follows Fig.10 The reminder interface shown in Figure b in FIG. The reminder interface may include an alarm name, such as Fig.10 The alarm name can be the name of the alarm set by the smartphone when setting the alarm through the sports health APP. Displaying the alarm name in the reminder interface can help users know the matters that need to be reminded in time. Fig.10 The reminder interface shown in Figure b in FIG. 1 can also display the current alarm time, such as 9:30. Fig.10 The reminder interface shown in Figure b can also display a close control (e.g., ×) and a delay control. Fig.10 Click the close control in the reminder interface shown in Figure b to terminate the reminder. The sports watch can first display the following Fig.10 The alarm off reminder interface shown in Figure c in the figure is displayed. After that, the sports watch returns to the previous Fig.10 The interface of Figure a in Figure 1 is shown in Figure 2. When the alarm is ringing, if the user Fig.10 Click the delay control in the reminder interface shown in Figure b to stop the reminder. The sports watch can display Fig.10 The alarm delay interface shown in Figure d in the figure. In the alarm delay interface, a reminder text of the delay time can also be displayed, for example: ring again in 10 minutes.

[0194] When the user clicks the delay control for the first time, the sports watch recalculates the alarm duration after the delay, and adds a new alarm corresponding to the new alarm time after the delay. The user can click the delay control multiple times, and the new alarm time can be pushed back multiple times by the preset delay duration. Specifically, the alarm duration after the delay = new alarm duration + number of delays * delay duration. For example, when the new alarm duration is 30 minutes and the delay duration is 10 minutes, when the user clicks the delay control for the third time, the alarm duration after the delay is 60 minutes (30+3×10=60). The sports watch can calculate the new alarm time after the delay based on the alarm duration after the delay, and add a new alarm at the new alarm time after the delay.

[0195] Optionally, the maximum number of delays can be set to 3, after which there is no further delay. That is, when the new alarm is delayed three times, the sports watch cancels the alarm and no longer reminds.

[0196] However, if the sports watch reminds in advance at the advance time of 23:57, and then searches for other alarm times of the day, it will be found that there are no other alarm times in the alarm list of the day. Then based on the alarm reminder process, the sports watch will trigger the zero-point alarm interruption of 00:00 by default, so as to start the alarm time of the next day's alarm time at the next 00:00. Then when the time reaches 00:00, when the sports watch traverses the alarm time of the next day, the traversed smart alarm time is 00:02. At this time, if there are no other alarm times between 00:00 and 00:02, the sports watch will send the 2-minute duration corresponding to the smart alarm time of 00:02 to the alarm module. When it reaches 00:02, the smart alarm will remind again. In other words, when the smart alarm time and the advance time span across days, the time will be repeated. This does not match user needs and affects user experience.

[0197] Next, we will combine Table 1 and Table 2 to summarize whether the result of the smart alarm reminder is normal. Table 1 and Table 2 use the reminder method of ringing as an example description. In addition, Table 1 and Table 2 use the example that the user needs to ring in advance when he is in a light sleep state, but does not need to ring in advance when he is in a deep sleep state. Specifically, Table 1 shows the reminder result of the smart alarm clock that the user expects.

[0198] Table 1

[0199]

[0200] In Table 1, if the user sets the smart alarm time to 00:00 and the advance time to 5 minutes, the sports watch can determine the advance time to be 23:55. Based on this, the user expects that in the light sleep state, the sports watch will ring at the advance time of 23:55, and will not ring at the smart alarm time of 00:00 as a normal result.

[0201] If the user sets the smart alarm time to 00:05 and the advance time to 5 minutes, the sports watch can determine the advance time to be 00:00. Based on this, the user expects that in the light sleep state, the sports watch will ring at the advance time of 00:00, and not ring at the smart alarm time of 0:05 as a normal result.

[0202] If the user sets the smart alarm time to 00:02 and the advance time to 5 minutes, the sports watch can determine the advance time to be 23:57. Based on this, the user expects that in the light sleep state, the sports watch will ring at the advance time of 23:57, and the smart alarm time of 0:02 will not ring as a normal result.

[0203] However, based on the reminder logic of the alarm clock, in the scenario shown in Table 1, the actual ringing result is shown in Table 2.

[0204] Table 2

[0205]

[0206] As shown in Table 2, if the user sets the smart alarm time to 00:00 and the advance time to 5 minutes, the sports watch can determine the advance time to be 23:55. Based on this, if the user is in a light sleep state, the sports watch will ring at the advance time of 23:55, but will not ring at the smart alarm time of 00:00. The overall result of scenario 1 is normal.

[0207] If the user sets the smart alarm time to 00:05 and the advance time to 5 minutes, the sports watch can determine the advance time to be 00:00. Based on this, if the user is in a light sleep state, the sports watch will not ring at the advance time of 00:00, but will ring at the smart alarm time of 0:05. The overall result of scenario 2 is abnormal.

[0208] If the user sets the smart alarm time to 00:02 and the advance time to 5 minutes, the sports watch can determine the advance time to be 23:57. Based on this, if the user is in a light sleep state, the sports watch rings at the advance time of 23:57 and rings again at the smart alarm time of 0:02. The overall result of scenario 3 is abnormal.

[0209] Fig.11The following is a schematic diagram of a reminder process when the alarm reminder result is abnormal when the advance time is 00:00. The process includes:

[0210] S1001, search the alarm list to determine whether there is an alarm time for the day. If yes, execute S1002A; if not, execute S1002B.

[0211] S1002A. Send the shortest alarm duration corresponding to the earliest alarm time of the day to the interrupt module.

[0212] S1002B. Send the alarm duration corresponding to the alarm time of 00:00 the next day to the interrupt module.

[0213] For a detailed introduction to S1001, please refer to the relevant description of S801 in the previous article. For a detailed introduction to S1002A, please refer to the relevant description of S802A in the previous article. For a detailed introduction to S1002B, please refer to the relevant description of S802B in the previous article. No further details will be given here.

[0214] The sports watch can traverse all alarms at 00:00 on the day and obtain the alarm list of the day. If the alarm time of the day exists in the alarm list, the sports watch can query the earliest alarm time (or the shortest alarm duration) of the day. After that, the sports watch can send the earliest alarm time (or the shortest alarm duration) to the interrupt module through the alarm APP of the application layer.

[0215] Take the smart alarm time as 00:30 and the advance time as 30 minutes as an example. If the sports watch determines that the advance time is 00:00 after setting the smart alarm, the sports watch can send the alarm time of 00:00 corresponding to the alarm time of 0 minutes to the interrupt module after executing all the alarm reminders of the previous day. At this time, the 0 minutes in the interrupt module is the duration corresponding to the next reminder to be set. After that, the sports watch executes S1003.

[0216] If the alarm time of the day does not exist in the alarm list, the sports watch can send the alarm duration corresponding to the alarm time of 00:00 the next day to the interrupt module through the alarm APP of the application layer. After that, the sports watch can traverse the alarm time of the next day at 00:00 the next day to obtain the alarm list of the next day.

[0217] S1003: Determine whether the current time is 00:00. If yes, execute S1004.

[0218] S1004: No reminder is given, and the smart alarm time is sent to the interrupt module.

[0219] S1005: Determine whether the current time is equal to the smart alarm time. If yes, execute S1006.

[0220] S1006. Give a reminder.

[0221] The sports watch determines whether the current moment is the alarm duration in the AlarmA function. If the current moment is not the alarm time corresponding to the alarm duration in the AlarmA function, the sports watch can determine that no reminder is needed at the current moment. The alarm duration corresponding to 00:00 in the interrupt module is the duration of the next reminder time, and the sports watch can repeat S1003. As time goes by, when it reaches 00:00, the interrupt module can send a reminder message to the alarm APP. However, based on the reminder process, the sports watch will execute the default zero-point alarm interrupt at 00:00, that is, when receiving the reminder message, it will default to traverse all the alarms of the next day and send the shortest alarm time for sending, and will not remind the new 00:00 alarm time. At the same time, when traversing the alarms of the next day, the sports watch can obtain the smart alarm time (for example, 00:30) of the smart alarm, and when the smart alarm time is the earliest alarm time of the next day, the alarm duration corresponding to the smart alarm time is sent to the interrupt module. When the time reaches the smart alarm, the sports watch reports the alarm message to the alarm APP through the interrupt module, and the sports watch responds to the alarm message and reminds through the alarm APP at the application layer. Such reminder results do not meet user expectations and affect user experience.

[0222] Based on this, the embodiment of the present application provides an alarm reminder method when the advance time is 00:00, which can ensure accurate reminders at the advance time of the smart alarm clock and no repeated reminders thereafter. Specifically, the process of this method can be referred to as Fig.12 As shown, including:

[0223] S1101, search the alarm list to determine whether there is an alarm time for the day. If yes, execute S1102A; if no, execute S1102B.

[0224] S1102A, send the earliest alarm time of the day to the interrupt module. Then, execute S1103.

[0225] S1102B. Send the alarm time of 00:00 the next day to the interrupt module.

[0226] For a detailed introduction to S1101, please refer to the relevant description of S801 in the previous article. For a detailed introduction to S1102B, please refer to the relevant description of S802A in the previous article. For a detailed introduction to S1102B, please refer to the relevant description of S802B in the previous article. No further details will be given here.

[0227] The sports watch also sends a time synchronization command through the alarm APP to instruct the next shortest alarm duration to be sent to the interrupt module and implement subsequent alarm reminders.

[0228] If the alarm time of the day exists in the alarm list, the sports watch can query the shortest alarm duration of the day. After that, the sports watch can send the shortest alarm duration to the interrupt module through the alarm APP of the application layer. The sports watch can use the interrupt module to call the AlarmA function to manage the shortest alarm duration.

[0229] Optionally, the shortest alarm duration can be the alarm duration corresponding to the advance time of the smart alarm moment. Take the smart alarm moment of 00:30 and the advance time of 30 minutes as an example. After setting the smart alarm moment, the sports watch can determine that the advance time is 00:00. Since 00:00 is the earliest time of the day, the earliest alarm moment of the day traversed by the sports watch at 00:00 is 00:00. After the sports watch has executed the alarm setting process for all the alarm moments of the previous day, the alarm duration corresponding to the new alarm moment of 00:00 can be sent to the interrupt module through the alarm APP of the application layer. Then execute S1103.

[0230] S1103: Determine whether the current time is 00:00. If yes, execute S1104.

[0231] S1104, add a new alarm for 00:00, and give a reminder at 00:00. Then execute S1105.

[0232] The sports watch determines whether the current time has reached the alarm time (i.e., 00:00) in the AlarmA function. If the current time has not reached the alarm time, the sports watch can determine that no reminder is needed at the current time. The sports watch can repeatedly execute S1103. As time goes by, when the alarm time of 00:00 is reached, the sports watch can use the interrupt module to send a reminder message to the alarm clock APP.

[0233] In the embodiment of the present application, the alarm clock APP is triggered by the reminder message to remind. After the reminder at 00:00 ends, the sports watch obtains the shortest alarm clock of the new day from the alarm clock list and sends it to the interrupt module. This ensures that even if the reminder is made in advance, the alarm clock list of the next day can be obtained on time, which will not affect the reminder of the subsequent alarm clock.

[0234] S1105: Update the reminder flag from the no reminder state to the reminder ring state.

[0235] It should be noted that the sports watch adds a reminder flag to the smart alarm clock. The ringing flag can be used to mark whether the smart alarm clock has already reminded. Whether the smart alarm clock reminds at the advance moment or at the smart alarm moment, the value of the reminder flag can be updated to true or 1, etc., indicating a reminded state. If before the advance moment, that is, the smart alarm clock does not remind at both the advance moment and the smart alarm moment, the value of the reminder flag can be false or 0, etc., indicating a non-remind state. Optionally, when the reminder mode is ringing, the reminder flag can also be called a ringing flag.

[0236] After the sports watch issues a reminder at 00:00 in advance, the reminder flag may also be updated from a non-reminding state to a reminder ring state.

[0237] S1106: Determine whether the reminder flag of the smart alarm clock indicates a reminder state. If so, execute S1107.

[0238] Optionally, after S1106, if the reminder flag of the smart alarm clock is in a non-reminding state, the sports watch continues to return to execute step S1001.

[0239] S1107: Do not send the alarm duration corresponding to the smart alarm time to the interrupt module.

[0240] Optionally, the sports watch may further execute S1108:

[0241] S1108: Send the shortest alarm duration after the smart alarm time.

[0242] Under the instruction of the time synchronization command, the sports watch traverses to the smart alarm time 00:30. When the smart alarm time 00:30 is the earliest alarm time in the alarm list, the sports watch first determines whether the reminder flag is in the reminded state. If the sports watch reminds at the advance time 00:00, the reminder flag is in the reminded state at this time. The sports watch does not need to send the alarm duration corresponding to the smart alarm time to the interrupt module through the alarm APP, that is, there is no need to remind at the smart alarm time. This can avoid repeated reminders of the smart alarm clock and improve the user experience.

[0243] Optionally, in the above Fig.11 Based on the embodiment shown, another possible implementation of step S1104 includes:

[0244] After the sports watch adds a new alarm clock at the advance time 00:00, the user's sleep state is obtained at the advance time 00:00. Optionally, if the user is in a light sleep state at 00:00, the sports watch can directly remind the user. Then, S1104 and subsequent steps are executed to ensure that the user is reminded in advance to avoid delaying the matters that the user needs to be reminded.

[0245] If the user is in a deep sleep state at 00:00, the sports watch will not remind, and the reminder flag will not be modified. In other words, the reminder flag remains in the unremind state. When the sports watch traverses to the smart alarm time 00:30 under the instruction of the time synchronization command. When the smart alarm time 00:30 is the earliest alarm time in the alarm list, the sports watch first determines whether the reminder flag is in the reminded state. At this time, since the sports watch did not remind at the advance time 00:00, the reminder flag is still in the unremind state. The sports watch can send the alarm duration corresponding to the smart alarm time to the interrupt module through the alarm APP. When the smart alarm time comes, the sports watch reports the alarm message to the alarm APP through the interrupt module. In response to the alarm message, the sports watch reminds through the alarm APP to ensure that the user is reminded on time and will not disturb the user's deep sleep, ensuring user experience. Afterwards, the sports watch can also send the shortest alarm duration after the smart alarm time to the interrupt module to ensure that subsequent alarms remind on time.

[0246] Optionally, the sports watch can detect whether the user is wearing a sports watch through a wearing detection module. In the case where the user is wearing a sports watch, the sports watch can also use a sleep algorithm module to detect whether the user's sleep state is a deep sleep state or a light sleep state. Optionally, the sports watch can monitor the user's activity level during a preset time period, for example, the activity level decreases in the first five minutes and further decreases in the next ten minutes, and then determine that the user may enter a sleep state. If the user's heart rate is lower than the heart rate threshold during deep sleep at this time, for example, lower than 70 beats / minute, it is determined that the user is in a deep sleep state; if the user's heart rate is lower than the heart rate threshold during light sleep and higher than the heart rate threshold during deep sleep, for example, lower than 80 beats / minute and higher than 70 beats / minute, it is determined that the user is in a light sleep state. The embodiment of the present application does not limit how a sports watch determines the sleep state.

[0247] Optionally, when the above alarm reminder method is applied to a smart phone, the sleep state can be detected by a sports watch or other wearable devices and transmitted to the smart phone, which will not be described in detail here.

[0248] In an embodiment of the present application, when the advance moment and the smart alarm moment span days, that is, the advance moment is before 00:00, and the smart alarm moment is after 00:00. After the sports watch reminds at the advance moment, when traversing the alarm of the next day at 00:00, it can still traverse to the smart alarm moment. Therefore, the sports watch will repeat the reminder at the advance moment and the smart alarm moment. Such a reminder method is inconsistent with the user's expectations and affects the user experience. Based on this, in an embodiment of the present application, the sports watch can modify the reminder flag of the smart alarm to the reminded state after reminding at the advance moment. When the smart alarm moment arrives, the sports watch does not need to repeat the reminder at the smart alarm moment by querying that the reminder flag is modified to the reminded state. This method can effectively avoid the smart alarm clock from repeatedly reminding when the advance moment is 00:00, thereby improving the user experience.

[0249] Fig.13 A schematic diagram of an alarm reminder process for a situation where the advance time and the smart alarm time span across days is shown, including:

[0250] S1201, search the alarm list of the day to determine whether there is an alarm time for the day. If yes, execute S1202A; if not, execute S1202B.

[0251] S1202A: Send the shortest alarm duration corresponding to the earliest alarm time of the day to the interrupt module. Then, execute S1203.

[0252] S1202B. Send the alarm duration corresponding to the alarm time of 00:00 the next day to the interrupt module.

[0253] For a detailed introduction to S1201, please refer to the relevant description of S801 in the previous article. For a detailed introduction to S1202A, please refer to the relevant description of S802A in the previous article. For a detailed introduction to S1202B, please refer to the relevant description of S802B in the previous article. No further details will be given here.

[0254] S1203: When the advance time is the earliest alarm time of the day, determine whether the reminder flag corresponding to the advance time is in the reminder state. If not, execute S1204.

[0255] The sports watch sends the shortest alarm duration corresponding to the earliest alarm time of the day to the interrupt module. When all other alarms before the advance time have been reminded, the advance time is the earliest alarm time of the day. At this time, the sports watch determines whether the reminder flag corresponding to the advance time is in the reminded state. It should be noted that the reminder flag corresponding to the advance time is the reminder flag of the smart alarm clock. At this time, since the sports watch has not reminded at the advance time, the reminder flag of the smart alarm clock is in the non-remind state, indicating that a reminder is needed, and the sports watch executes S1204.

[0256] Optionally, the sports watch can query the corresponding reminder flag each time the earliest alarm time is obtained. If the reminder flag indicates that the alarm time is in the unremind state, the shortest alarm duration corresponding to the earliest alarm time is issued; if the reminder flag indicates that the alarm time is in the remind state, the shortest alarm duration is no longer issued, but the alarm duration corresponding to the next alarm time is continuously queried, so as to avoid repeated reminders of the same alarm.

[0257] S1204: Send the alarm duration corresponding to the advance time to the interrupt module.

[0258] At this time, the reminder flag corresponding to the advance time is in the non-reminding state, and the sports watch sends the alarm duration corresponding to the advance time to the interrupt module, which can then remind the user in advance at the advance time to ensure user experience.

[0259] Taking the smart alarm time of 00:02 and the advance time of 5 minutes as an example, at the alarm time of 23:00 of a transaction alarm before the advance time of the day, the sports watch reminds. After that, the earliest alarm time is 23:57 in advance. The sports watch queries the reminder flag of the smart alarm at 00:02. If the reminder flag of the smart alarm is in the unremind state, the sports watch sends the alarm duration of 1437 minutes corresponding to the advance time of 23:57 to the interrupt module through the alarm APP. At this time, 23:57 is the time to be reminded. When it reaches 23:57, the sports watch will remind.

[0260] S1205: Prompt at the advance time, and change the reminder flag corresponding to the advance time from a non-remind state to a reminded state.

[0261] After the sports watch sends the alarm duration corresponding to the advance time to the interrupt module through the alarm APP, when the advance time arrives, the interrupt module can send an alarm message to the alarm APP. In response to the alarm message, the sports watch reminds through the alarm APP.

[0262] S1206: Determine whether the current time is 00:00. If yes, execute S1207.

[0263] S1207. Traverse the alarms for the next day to obtain the alarm list for the next day.

[0264] When the advance time and the smart alarm time span across days, after the sports watch reminds at the advance time 23:57, it traverses the alarms of the next day at the next 00:00 to obtain the alarm list of the next day. It should be noted that the alarm list of the next day includes the smart alarm time 00:02.

[0265] S1208: When the smart alarm time is the earliest alarm time of the next day, determine whether the reminder flag of the smart alarm is in the reminder state. If so, execute S1209.

[0266] S1209: Do not send the alarm duration corresponding to the smart alarm time to the interrupt module. Then, return to execute S1201.

[0267] After obtaining the alarm list for the next day, the sports watch sends the shortest alarm duration corresponding to the earliest alarm time in the alarm list for the next day to the interrupt module and issues a reminder.

[0268] When the smart alarm time 00:02 is the earliest alarm time of the next day, the sports watch determines whether the reminder flag of the smart alarm is in the reminded state. If it is in the reminded state, the sports watch determines that it has been reminded normally at the advance time 23:57 and does not need to be reminded again. Therefore, there is no need to send the alarm duration of 2 minutes corresponding to the smart alarm time 00:02 to the interrupt module, avoiding repeated reminders and improving user experience.

[0269] Afterwards, the sports watch can return to execute S1201, that is, send the alarm duration corresponding to the earliest alarm time after the smart alarm time to the interrupt module to ensure that subsequent alarms remind on time.

[0270] Optionally, in the above Fig.13 Based on the embodiment shown, another possible implementation of step S1205 includes:

[0271] After the sports watch adds a new alarm clock at 23:57 in advance, the user's sleep state is obtained at 23:57 in advance. Optionally, if the user is in a light sleep state at 23:57, the sports watch can directly remind the user. Then, S1205 and subsequent steps are executed to ensure that the user is reminded in advance to avoid delaying the matters that the user needs to be reminded.

[0272] If the user is in a deep sleep state at 23:57, the sports watch will not remind, and the reminder flag will not be modified. In other words, the reminder flag remains in the unremind state. When the sports watch traverses to the smart alarm time 00:03 under the instruction of the time synchronization command. When the smart alarm time 00:03 is the earliest alarm time in the alarm list, the sports watch first determines whether the reminder flag is in the reminded state. At this time, since the sports watch did not remind at the advance time 23:57, the reminder flag is still in the unremind state. The sports watch can send the alarm duration corresponding to the smart alarm time to the interrupt module through the alarm APP. When the smart alarm time comes, the sports watch reports the alarm message to the alarm APP through the interrupt module. In response to the alarm message, the sports watch reminds through the alarm APP at the smart alarm time 00:03 to ensure that the user is reminded on time and will not disturb the user's deep sleep, ensuring user experience. Afterwards, the sports watch can also send the alarm duration corresponding to the earliest alarm time after the smart alarm time to the interrupt module to ensure that subsequent alarms remind on time.

[0273] An embodiment of the present application also provides an alarm reminder method, including: obtaining a first alarm time and an advance time of a first alarm clock; adding a second alarm time to an alarm list, the second alarm time being a time before the first alarm time for a certain period of time in advance; if the second alarm time is a target time, giving a reminder at the target time, and updating the state of the first alarm clock from a non-remind state to a reminded state, the target time being the time when the alarm list is obtained; at the first alarm time, in response to the first alarm clock being in a reminded state, not giving a reminder.

[0274] It should be noted that the first alarm clock is a smart alarm clock, the first alarm clock time is the smart alarm clock time, and the advance time is the advance amount corresponding to the smart alarm clock. The second alarm clock time is the time of advance reminder, called the advance time. The second alarm clock time is the time of the first alarm clock time minus the advance time. The target time is the time when the alarm clocks of the day are traversed and the alarm list is obtained. Optionally, the target time can be zero o'clock and zero minutes (00:00). Optionally, the target time can also be other times, such as 7:00 in the morning.

[0275] After adding the smart alarm, the sports watch calculates the second alarm time that needs to be reminded in advance based on the first alarm time and the advance time, and adds the second alarm time to the alarm list so that a reminder can be given in advance at the second alarm time.

[0276] Taking the target time as 00:00 as an example, when the second alarm time is 00:00, the sports watch can remind at 00:00 to ensure that the user is reminded in advance. Afterwards, the sports watch also updates the status of the first alarm from the unremind state to the reminded state.

[0277] Optionally, the specific method of updating the state of the first alarm clock may be to modify the reminder flag of the smart alarm clock. The sports watch may modify the value of the reminder flag of the smart alarm clock from 0 to 1, or from false to true. Optionally, 1 and true represent the reminded state, and 0 and false represent the unremind state.

[0278] The sports watch can query the reminder flag of the smart alarm clock. At this time, the reminder flag has been updated to the value of the reminder state. The sports watch uses the value of the queried reminder flag as the value representing the reminder state, and there is no need to repeat the reminder at the first alarm time. This can avoid repeated reminders from the smart alarm clock and improve the user experience.

[0279] In some possible implementations, if the second alarm time is the target time, a reminder is given at the target time, including: at the target time, determining whether there is an alarm time for the day; if so, when the second alarm time is the target time, a reminder is given at the target time.

[0280] In some possible implementations, the method further includes: if there is no alarm time for the current day, updating the alarm list at the target time for the next day.

[0281] Optionally, taking the target time as 00:00 as an example, the sports watch will traverse all the alarms of the day at 00:00 every day. If the second alarm time is 00:00, that is, the smart alarm needs to ring in advance at 00:00. At 00:00, the sports watch traverses all the alarms and obtains the alarm list of the day. At this time, if there is an alarm time in the alarm list, the sports watch will remind the user at 00:00 when it is determined that there is an alarm time of the day in the alarm list and the second alarm time is 00:00, so as to remind the user on time at the advance time expected by the user.

[0282] If the alarm time of the day does not exist in the alarm list of the day, it means that no alarm is set on the day. The sports watch can determine that the next alarm time is 00:00 of the next day, and traverse the alarms of the next day at 00:00 of the next day to obtain the alarm list of the next day.

[0283] In some possible implementations, the reminder is given at the target time, including: obtaining the sleep state of the user at the second alarm time; if the sleep state is a light sleep state, the reminder is given at the target time.

[0284] The sports watch can also obtain the user's sleep state when the second alarm clock time arrives. If the user's sleep state is a light sleep state, the sports watch can remind at the target time 00:00, that is, the second alarm clock time.

[0285] In some possible implementations, it also includes: if the sleep state is a deep sleep state, no reminder is given at the target time, and the state of the first alarm clock is kept in a non-reminding state; in response to the first alarm clock being in a non-reminding state, a reminder is given at the first alarm clock time.

[0286] If the user is in a deep sleep state at the second alarm time, the sports watch may not remind the user at the target time 00:00, that is, the second alarm time, to avoid affecting the user's deep sleep. At this time, the value of the reminder flag of the smart alarm clock represents the non-remind state, for example, 0 or false. After the sports watch queries the alarm list for the next day, when the first alarm time arrives, the sports watch queries the value of the reminder flag of the smart alarm clock to represent the value of the non-remind state, and then reminds the user on time to avoid missing the transaction.

[0287] In some possible implementations, the user's sleep status at the second alarm time is obtained; if the sleep status is a light sleep state, a reminder is given at a target time, including: sending the alarm duration corresponding to the second alarm time to an interrupt module through a first application; determining, through the interrupt module, whether the second alarm time has arrived based on the alarm duration corresponding to the second alarm time; if so, sending a reminder message to the first application through the interrupt module; in response to the reminder message, obtaining the sleep status through the first application; if the sleep status is a light sleep state, a reminder is given through the first application at the second alarm time; after the reminder is given through the first application, updating the state of the first alarm from a non-alarmed state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

[0288] It should be noted that the first application may be an alarm clock APP. The sports watch obtains the alarm list of the day through the alarm clock APP, and sends the shortest alarm duration corresponding to the earliest alarm time in the alarm clock list to the interrupt module. When the earliest alarm time arrives, the interrupt module sends a reminder message to the alarm clock APP. When the alarm clock APP receives the reminder message, the sports watch can give a reminder.

[0289] When the second alarm time is the earliest alarm time in the alarm list, and the second alarm time is the target time, and the target time is 00:00, the sports watch sends the alarm duration corresponding to the second alarm time to the interrupt module through the alarm APP. When the second alarm time arrives, the interrupt module sends a reminder message to the alarm APP. The sports watch can remind when the alarm APP receives the reminder message. Optionally, when the alarm APP receives the reminder message, the sports watch can also obtain the sleep state first. When the sleep state is a light sleep state, the sports watch reminds at 00:00. If at 00:00, the user's sleep state is a deep sleep state, the sports watch will not remind at 00:00 to avoid disturbing the user's deep sleep.

[0290] After the sports watch reminds at 00:00, the value of the reminder flag of the smart alarm clock can be updated to a value indicating the reminded state. Later, as time goes by, when the first alarm time is the earliest alarm time in the alarm list, the sports watch queries the reminder flag value through the alarm APP to indicate the reminded state, and there is no need to send the alarm duration corresponding to the first alarm time to the interrupt module. Based on this, the interrupt module of the sports watch will not report the alarm message at the first alarm time, and the sports watch will not remind at the first alarm time.

[0291] In some possible implementations, if the second alarm time is before the target time and the first alarm time is after the target time, it also includes: giving a reminder at the second alarm time, the state of the first alarm being a non-remind state at the second alarm time; after giving a reminder at the second alarm time, updating the state of the first alarm from a non-remind state to a reminded state; at the first alarm time, in response to the state of the first alarm being a reminded state, not giving a reminder.

[0292] In some possible implementations, at the first alarm time, in response to the first alarm status being in the reminded state, no reminder is given, including: updating the alarm list at the target time to obtain an updated list, the updated list including the first alarm time; at the first alarm time, in response to the first alarm status being in the reminded state, no reminder is given.

[0293] If the second alarm time is before the target time and the first alarm time is after the target time, that is, when the smart alarm time and the advance time span across days, the sports watch will remind at the advance time of the second alarm time. Afterwards, the sports watch can update the value of the reminder flag of the smart alarm from the value of the unremind state to the value of the reminded state. Afterwards, at the target time, the sports watch will still traverse the alarms of the next day and obtain the alarm list including the first alarm time. When the first alarm time becomes the earliest alarm time in the alarm list, the sports watch can query the status of the first alarm, such as querying the reminder flag of the smart alarm. Since the first alarm reminds after the first alarm time, the sports watch updates the value of the reminder flag of the first alarm to the reminded state, then when the sports watch queries the reminder flag of the first alarm, it is determined that the first alarm has reminded, and there is no need to repeat the reminder at the second alarm time.

[0294] When the smart alarm time and the advance time span across days, the sports watch will remind you at the advance time of the second alarm time. After that, when the target time comes, the sports watch will still traverse the alarms of the next day, and the alarm list obtained is called the update list. The update list includes the first alarm time. When the first alarm time comes, since the state of the first alarm is the reminded state, that is, the reminder flag of the smart alarm queried by the sports watch is a value representing the reminded state, such as 1 or true, the reminder will not be repeated.

[0295] In some possible implementations, the reminder is given at the second alarm time, including: obtaining the sleep state of the user at the second alarm time; and if the sleep state is a light sleep state, the reminder is given at the second alarm time.

[0296] In some possible implementations, it also includes: if the sleep state is a deep sleep state, no reminder is given at the second alarm time, and the first alarm state is kept in a non-reminding state; the alarm list is updated at the target time to obtain an updated list, the updated list includes the first alarm time; in response to the first alarm being in a non-reminding state, a reminder is given at the first alarm time.

[0297] The sports watch can also obtain the user's sleep state when the second alarm clock time arrives. If the user's sleep state is a light sleep state, the sports watch can remind at the target time 00:00, that is, the second alarm clock time.

[0298] If the user is in a deep sleep state at the second alarm time, the sports watch may not remind the user at the target time 00:00, that is, the second alarm time, to avoid affecting the user's deep sleep. At this time, the value of the reminder flag of the smart alarm clock represents the non-reminder state, for example, 0 or false. When the target time arrives, the sports watch queries the alarm list for the next day, which is called an updated list. The updated list includes the first alarm time. The sports watch can query the value of the reminder flag of the smart alarm clock. At this time, the reminder flag of the smart alarm clock is a value representing the non-reminder state, then the sports watch will remind the user on time to avoid missing the transaction.

[0299] In some possible implementations, the user's sleeping state at the second alarm time is obtained; if the sleeping state is a light sleep state, a reminder is given at the second alarm time, including: sending the alarm duration corresponding to the second alarm time to an interrupt module through a first application; determining, through the interrupt module, whether the current time has reached the second alarm time based on the alarm duration corresponding to the second alarm time; if so, sending a reminder message to the first application through the interrupt module; in response to the reminder message, obtaining the sleeping state through the first application; if the sleeping state is a light sleep state, a reminder is given through the first application; after the reminder is given through the first application, updating the state of the first alarm from a non-alarmed state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

[0300] It should be noted that the first application may be an alarm clock APP. The sports watch obtains the alarm list of the day through the alarm clock APP, and sends the shortest alarm duration corresponding to the earliest alarm time in the alarm clock list to the interrupt module. When the earliest alarm time arrives, the interrupt module sends a reminder message to the alarm clock APP. When the alarm clock APP receives the reminder message, the sports watch can give a reminder.

[0301] When the second alarm time is the earliest alarm time in the alarm list, the sports watch sends the second alarm time or the corresponding alarm duration to the interrupt module through the alarm APP. When the second alarm time arrives, the interrupt module sends a reminder message to the alarm APP. When the alarm APP receives the reminder message, the sports watch can remind, so as to realize the reminder in advance. Optionally, when the alarm APP receives the reminder message, the sports watch can also obtain the sleep state first. When the sleep state is a light sleep state, the sports watch reminds at the second alarm time. If the user's sleep state is a deep sleep state at the second alarm time, the sports watch will not remind at the second alarm time to avoid disturbing the user's deep sleep.

[0302] After the sports watch reminds at the second alarm time, the value of the reminder flag of the first alarm, that is, the smart alarm, can be updated to a value representing the reminded state. Afterwards, as time goes by, when the target time 00:00 is reached, the sports watch traverses the alarms of the next day and obtains an updated list for the next day. When the first alarm time is the earliest alarm time in the update list, the sports watch queries the reminder flag value through the alarm APP and represents the reminded state, then there is no need to send the alarm duration corresponding to the first alarm time to the interrupt module. Based on this, the interrupt module of the sports watch will not report the alarm message at the first alarm time, and the sports watch will not remind at the first alarm time, thereby avoiding repeated reminders.

[0303] The above describes in detail an example of the method provided by the present application. It is understandable that, in order to implement the above functions, the corresponding device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0304] The present application can divide the functional modules of the alarm reminder device according to the above method example. For example, each function can be divided into each functional module, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0305] Fig.14 The schematic diagram of the structure of an alarm reminder device provided by the present application is shown. The device 1400 includes:

[0306] The acquisition module 1401 is used to acquire the first alarm time and advance time of the first alarm.

[0307] The adding module 1402 is used to add a second alarm time to the alarm list, where the second alarm time is a time before the first alarm time by a certain time period.

[0308] The reminder module 1403 is used to remind at the target time when the second alarm time is the target time, and update the state of the first alarm from the non-reminding state to the reminded state, and the target time is the time to obtain the alarm list.

[0309] The reminder module 1403 is further configured to, at the first alarm time, in response to the first alarm being in the reminded state, not give a reminder.

[0310] Optionally, the reminder module 1403 is specifically used to determine whether there is an alarm time of the day at the target time; if so, when the second alarm time is the target time, a reminder is given at the target time.

[0311] Optionally, the adding module 1402 is further used to update the alarm list at the target time of the next day if there is no alarm time for the current day.

[0312] Optionally, the reminder module 1403 is specifically used to obtain the user's sleep state at the second alarm time; if the sleep state is a light sleep state, a reminder is given at the target time.

[0313] Optionally, the reminder module 1403 is specifically used to not remind at the target time if the sleep state is a deep sleep state, and keep the state of the first alarm clock in a non-reminding state; in response to the first alarm clock being in a non-reminding state, remind at the first alarm clock time.

[0314] Optionally, the reminder module 1403 is specifically used to send the alarm duration corresponding to the second alarm moment to the interrupt module through the first application; determine through the interrupt module whether the second alarm moment has arrived according to the alarm duration corresponding to the second alarm moment; if so, send a reminder message to the first application through the interrupt module; in response to the reminder message, obtain the sleep state through the first application; if the sleep state is a light sleep state, remind through the first application at the second alarm moment; after reminding through the first application, update the state of the first alarm from a non-remind state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, do not send the alarm duration corresponding to the first alarm moment to the interrupt module through the first application.

[0315] Optionally, if the second alarm time is before the target time and the first alarm time is after the target time, the reminder module 1403 is also used to remind at the second alarm time, and the state of the first alarm is a non-remind state at the second alarm time; after the reminder at the second alarm time, the state of the first alarm is updated from a non-remind state to a reminded state; at the first alarm time, in response to the state of the first alarm being a reminded state, no reminder is given.

[0316] Optionally, the reminder module 1403 is specifically used to update the alarm list at the target time to obtain an updated list, which includes the first alarm time; at the first alarm time, in response to the state of the first alarm being the reminded state, no reminder is given.

[0317] Optionally, the reminder module 1403 is specifically used to obtain the sleep state of the user at the second alarm time; if the sleep state is a light sleep state, a reminder is given at the second alarm time.

[0318] Optionally, the reminder module 1403 is specifically used to not remind at the second alarm time if the sleep state is a deep sleep state, and keep the state of the first alarm clock as a non-remind state; update the alarm list at the target time to obtain an updated list, the updated list includes the first alarm clock time; in response to the first alarm clock being in a non-remind state, remind at the first alarm clock time.

[0319] Optionally, the reminder module 1403 is specifically used to send the alarm duration corresponding to the second alarm moment to the interrupt module through the first application; determine through the interrupt module whether the second alarm moment has arrived according to the alarm duration corresponding to the second alarm moment; if so, send a reminder message to the first application through the interrupt module; in response to the reminder message, obtain the sleep state through the first application; if the sleep state is a light sleep state, remind through the first application; after reminding through the first application, update the state of the first alarm from a non-remind state to a reminded state through the first application; in response to the first alarm state being updated to a reminded state, the alarm duration corresponding to the first alarm moment is not sent to the interrupt module through the first application.

[0320] The specific manner in which the device 1400 executes the alarm reminder method and the beneficial effects produced can be found in the relevant description of the method embodiment, which will not be repeated here.

[0321] The present application also provides an electronic device, including the above processor. The electronic device provided by this embodiment can be Figure 1 The terminal device 100 shown is used to execute the above alarm reminder method. In the case of an integrated unit, the terminal device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the terminal device, for example, it can be used to support the terminal device to execute the steps performed by the display unit, the detection unit and the processing unit. The storage module can be used to support the terminal device to execute and store program codes and data, etc. The communication module can be used to support the communication between the terminal device and other devices.

[0322] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other terminal devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0323] In one embodiment, when the processing module is a processor and the storage module is a memory, the terminal device involved in this embodiment may be a Figure 1 Device of the structure shown.

[0324] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the alarm reminder method described in any of the above embodiments.

[0325] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the alarm reminder method in the above-mentioned embodiment.

[0326] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.

[0327] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, the replaced units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0328] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0329] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0330] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An alarm reminder method, characterized in that: include: Get the first alarm time and advance time of the first alarm; Adding a second alarm time to the alarm list, wherein the second alarm time is a time before the first alarm time by the time length; If the second alarm time is the target time, a reminder is given at the target time, and the state of the first alarm is updated from a non-reminding state to a reminded state, and the target time is the time when the alarm list is obtained; At the first alarm time, in response to the first alarm being in a reminded state, no reminder is given.

2. The method according to claim 1, characterized in that: If the second alarm time is the target time, giving a reminder at the target time includes: At the target time, determining whether there is an alarm time for the day; If it exists, when the second alarm time is the target time, a reminder is given at the target time.

3. The method according to claim 2, characterized in that The method further comprises: If there is no alarm time for the current day, the alarm list is updated at the target time of the next day.

4. The method according to any one of claims 1 to 3, characterized in that The reminding at the target time includes: Obtaining the user's sleeping state at the second alarm time; If the sleeping state is a light sleeping state, a reminder is given at the target time.

5. The method according to claim 4, characterized in that The method further comprises: If the sleep state is a deep sleep state, no reminder is given at the target time, and the state of the first alarm clock is kept as a non-reminding state; In response to the first alarm being in a non-reminding state, a reminder is given at the first alarm time.

6. The method according to claim 4, characterized in that obtaining the user's sleeping state at the second alarm time; If the sleep state is a light sleep state, a reminder is given at the target time, including: Sending the alarm duration corresponding to the second alarm time to the interrupt module through the first application; Determining, by the interrupt module, whether the current time has reached the second alarm time according to the alarm duration corresponding to the second alarm time; If so, sending a reminder message to the first application through the interrupt module; In response to the reminder message, acquiring the sleep state through the first application; If the sleeping state is a light sleep state, a reminder is given through the first application at the second alarm time; After the reminder is given by the first application, the state of the first alarm clock is updated from a non-reminding state to a reminded state by the first application; In response to the state of the first alarm being updated to the reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

7. The method according to any one of claims 1 to 3, 5 and 6, characterized in that: If the second alarm time is before the target time and the first alarm time is after the target time, the method further includes: Remind at the second alarm time, the first alarm being in a non-remind state at the second alarm time; After the second alarm clock reminds at the time, updating the state of the first alarm clock from a non-reminding state to a reminded state; At the first alarm time, in response to the first alarm being in the reminded state, no reminder is given.

8. The method according to claim 7, characterized in that The step of not giving a reminder at the first alarm time in response to the state of the first alarm being a reminded state includes: updating the alarm list at the target time to obtain an updated list, wherein the updated list includes the first alarm time; At the first alarm time, in response to the first alarm being in the reminded state, no reminder is given.

9. The method according to claim 7, characterized in that: The reminding at the second alarm time includes: Obtaining the user's sleeping status at the second alarm time; If the sleeping state is a light sleeping state, a reminder is given at the second alarm time.

10. The method according to claim 9, characterized in that The method further comprises: If the sleep state is a deep sleep state, no reminder is given at the second alarm time, and the state of the first alarm is kept as a non-reminding state; updating the alarm list at the target time to obtain an updated list, wherein the updated list includes the first alarm time; In response to the first alarm being in a non-reminding state, a reminder is given at the first alarm time.

11. The method according to claim 9 or 10, characterized in that: The step of obtaining the user's sleep state at the second alarm time; and if the sleep state is a light sleep state, giving a reminder at the second alarm time, includes: Sending the alarm duration corresponding to the second alarm time to the interrupt module through the first application; Determining, by the interrupt module, whether the current time has reached the second alarm time according to the alarm duration corresponding to the second alarm time; If so, sending a reminder message to the first application through the interrupt module; In response to the reminder message, acquiring the sleep state through the first application; If the sleep state is a light sleep state, a reminder is given through the first application; After the reminder is given by the first application, the state of the first alarm clock is updated from a non-reminding state to a reminded state by the first application; In response to the state of the first alarm being updated to the reminded state, the alarm duration corresponding to the first alarm time is not sent to the interrupt module through the first application.

12. An electronic device, characterized in that: include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other so that the electronic device executes the method as claimed in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 11.